Note: Commands listed should be run as root or with sudo (switch user do) command.
Enter the following command to enable or start your networking in BackTrack
/etc/init.d/networking start
This command will start all the interfaces in the /etc/network/interfaces file.
Below are more information in how to enable or start networking in Backtrack.
Setting your interfaces to get ip addresses via DHCP.
See my sample /etc/network/interfaces file.
root@wiztechie:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
Setting your interfaces manually or having static ip addresses.
See my sample /etc/network/interfaces file.
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
Setting up your nameserver.
See my sample /etc/resolv.conf file.
root@wiztechie:~# cat /etc/resolv.conf
nameserver 192.168.0.1
If you only want specific interfaces to get ip address via the DHCP (in this example, let’s say eth0 and wlan0 only) then remove every thing else for the file with the exception of the lo interface.
See my sample /etc/network/interfaces file.
Note: Backup first your /etc/network/interfaces file if you’re having some doubt with what you are doing, in this way you can revert back to the original file. To do this enter cp /etc/network/interfaces /etc/network/interfaces.bak (this create a backup of the /etc/network/interfaces file)
root@wiztechie:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
If you want to autostart or run this at startup, enter the command.
update-rc.d networking defaults