IP command syntax
OBJECT
The names of all objects may be written in full or abbreviated form, f.e. address is abbreviated as addr or just a.
Example:-
[rajesh@localhost ~]$ ip neighbour
192.168.150.1 dev eth0 lladdr 00:50:56:c0:00:08 DELAY
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa STALE
[rajesh@localhost ~]$ ip addrlabel list
prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 2002::/16 label 2
prefix fc00::/7 label 5
prefix ::/0 label 1
[rajesh@localhost ~]$ ip link stat
Command "stat" is unknown, try "ip link help".
[rajesh@localhost ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
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 qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
[rajesh@localhost ~]$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
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 qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
Description:-
ip link - network device configuration
link is a network device and the corresponding commands display and change the state of devices.
[rajesh@localhost ~]$ ip addr sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.150.4/24 brd 192.168.150.255 scope global eth0
inet 192.168.150.100/24 brd 192.168.150.255 scope global secondary eth0:0
inet6 fe80::20c:29ff:feb9:b0d7/64 scope link
valid_lft forever preferred_lft forever
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
[rajesh@localhost ~]$ ip route list
192.168.150.0/24 dev eth0 proto kernel scope link src 192.168.150.4
169.254.0.0/16 dev eth0 scope link metric 1002
default via 192.168.150.2 dev eth0 proto static
[rajesh@localhost ~]$ ip monitor
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa REACHABLE
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa STALE
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa REACHABLE
^C
The names of all objects may be written in full or abbreviated form, f.e. address is abbreviated as addr or just a.
link | network device. |
address | protocol (IP or IPv6) address on a device. |
addrlabel | label configuration for protocol address selection. |
neighbour | ARP or NDISC cache entry. |
route | routing table entry. |
rule | rule in routing policy database. |
maddress | multicast address. |
mroute | multicast routing cache entry. |
tunnel | tunnel over IP. |
xfrm | framework for IPsec protocol. |
Example:-
[rajesh@localhost ~]$ ip neighbour
192.168.150.1 dev eth0 lladdr 00:50:56:c0:00:08 DELAY
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa STALE
[rajesh@localhost ~]$ ip addrlabel list
prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 2002::/16 label 2
prefix fc00::/7 label 5
prefix ::/0 label 1
[rajesh@localhost ~]$ ip link stat
Command "stat" is unknown, try "ip link help".
[rajesh@localhost ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
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 qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
[rajesh@localhost ~]$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
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 qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
Description:-
ip link - network device configuration
link is a network device and the corresponding commands display and change the state of devices.
[rajesh@localhost ~]$ ip addr sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b9:b0:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.150.4/24 brd 192.168.150.255 scope global eth0
inet 192.168.150.100/24 brd 192.168.150.255 scope global secondary eth0:0
inet6 fe80::20c:29ff:feb9:b0d7/64 scope link
valid_lft forever preferred_lft forever
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether be:1c:29:41:fb:35 brd ff:ff:ff:ff:ff:ff
[rajesh@localhost ~]$ ip route list
192.168.150.0/24 dev eth0 proto kernel scope link src 192.168.150.4
169.254.0.0/16 dev eth0 scope link metric 1002
default via 192.168.150.2 dev eth0 proto static
[rajesh@localhost ~]$ ip monitor
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa REACHABLE
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa STALE
192.168.150.2 dev eth0 lladdr 00:50:56:fd:c8:aa REACHABLE
^C
Comments
Post a Comment