Display all the interfaces you have on your server:
ifconfig
Display all interfaces as well as inactive interfaces you may have:
ifconfig -a
Assign the eth0 interface the IP-address of 192.168.1.100:
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
Assign the default gateway for eth0 to 192.168.1.1 (for example your router):
route add default gw 192.168.1.1 eth0
Verify that you can reach your router (192.168.1.1):
ping 192.168.1.1
Display the routing information with the command route to see if routing entry is correct:
route -n
Check the status of the interfaces quickly:
netstat -i
Show all active connections:
netstat
Show all active TCP connections:
netstat -t
DNS lookups and displays the answers that are returned from the name server (To troubleshoot DNS problems):
dig ubuntulinux.org
Determine the network route from your computer to some other computer:
traceroute ubuntulinux.org
View your ARP (used by a networked machine to resolve the hardware location/address of another machine on the same local network) Cache:
arp
Remove any entry from the ARP cache for the specified host (for example 192.168.1.103):
arp -d 192.168.1.103
Send out unsolicited ARP messages so as to update remote arp caches (for example 192.168.1.103):
arping 192.168.1.103
Shutdown a specific interface (for example eth0):
ifconfig eth0 down
Activate a specific interfrace (for example eth0):
ifconfig eth0 up
Stop all network devices manually on your system (Debian specific):
/etc/init.d/networking stop
Start all network devices manually on your system (Debian specific):
/etc/init.d/networking start
Restart all network devices manually on your system (Debian specific):
/etc/init.d/networking restart