User Tools

Site Tools


unix:networking

This is an old revision of the document!


Networking

ip command

ip ro ip route show ip route ls

default via 192.168.1.1 dev wlan0  proto static 
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.3  metric 9 
192.168.10.0/24 dev eth0  proto kernel  scope link  src 192.168.10.1  metric 1 
192.168.56.0/24 dev vboxnet0  proto kernel  scope link  src 192.168.56.1 

ip route add default via 192.168.1.1 dev eth0
Add a default gateway (for all IP addresses on the system) that can be reached on eth0

ip link set up ip link set down
change the state of the device to UP or DOWN

ip address show
shows the IP addresses assigned to interfaces

ip addr add 192.168.1.10/24 dev eth0
add new protocol address

ip addr flush dev eth0 -statistics
release all the IP addresses of the device eth0

unix/networking.1418690116.txt.gz · Last modified: 2014/12/16 01:35 by bajeluk