ip
Useful basic commands
$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
...
# eg. show specific network interface
$ ip link show test0
4: test0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 32:25:da:4e:93:fa brd ff:ff:ff:ff:ff:ff
...$ ip link add [iface_name] type [iface_type]
# eg. add a dummy interface with name test0
$ ip link add test0 type dummy
Example 1: Create a dummy interface
Example 2: Reset configurations on interface
Example 3: Replace default route
Last updated