Thursday 19 May 2016

ip command usage basics

Get detailed information of the network interfaces attached to your computer:

ip addr

Get a list of your layer 3 addresses:

ip addr | grep inet

Bring an interface down:

ip link set dev eth0 down

and to bring a device up we can issue:

ip link set dev eth0 up

To add a static route:

ip route add 10.0.100.0/24 via 172.16.0.1 dev eth1

and to delete a static route:

ip route del 10.0.100.0/24

Add an ip to an interface:

ip addr add 10.11.12.13/16 dev eth0

Remove an ip from an interface:

ip addr del 10.11.12.13/16 dev eth0

0 comments:

Post a Comment