Mémo IPROUTE2

Petit mémo perso de commande iproute

à enrichir au fur et à mesure :)

 

ip route show

Nous montre la table de routage du kernel

routinux:~# ip route show
62.4.16.238 dev ppp0 proto kernel scope link src 213.41.176.72
195.5.250.16/29 dev eth2 proto kernel scope link src 195.5.250.17
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.254
default via 62.4.16.238 dev ppp0

 

ip link list

Nous montre les liens de connexion

routinux:~# ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:46:17:4c:2e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:46:17:52:ef brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:da:41:b6:ec brd ff:ff:ff:ff:ff:ff
8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 3
link/ppp

 

ip address show

Nous montre nos IP

routinux:~# ip address show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:46:17:4c:2e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:46:17:52:ef brd ff:ff:ff:ff:ff:ff
inet 192.168.1.254/24 brd 192.168.1.254 scope global eth1
4: eth2: <BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:da:41:b6:ec brd ff:ff:ff:ff:ff:ff
inet 195.5.250.17/29 brd 195.5.214.23 scope global eth2
8: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 3
link/ppp
inet 213.41.176.72 peer 62.4.16.238/32 scope global ppp0

ip neigh show

Nous montre nos « voisins »

routinux:~# ip neigh show
195.5.250.20 dev eth2 nud failed
192.168.1.100 dev eth1 lladdr 00:10:dc:ff:db:7d nud reachable
192.168.1.101 dev eth1 lladdr 00:50:ba:31:d0:23 nud stale

 

Supprimons l’adresse qui est injoignable :

 

routinux:~# ip neigh delete 195.5.250.20 dev eth2
routinux:~# ip neigh show
192.168.1.100 dev eth1 lladdr 00:10:dc:ff:db:7d nud reachable
192.168.1.101 dev eth1 lladdr 00:50:ba:31:d0:23 nud stale

 

Supprimons tout le cache :

routinux:~# ip neigh flush

ip rule list

Affiche les tables de routage

 

routinux:~# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default

 


Article lu 1113 fois

Laisser un commentaire