This page was exported from Knowledge Base [ https://kb.net4future.de ]
Export date: Sat Sep 19 3:16:24 2020 / +0000 GMT

Linux route commands



Add a Host route


route add -host 169.47.211.142 gw 10.135.249.118

Delete the Host route


route del -host 169.47.211.142 gw 10.135.249.118

Print the routes with DNS Reverse PTR Record


route

example:

vra-lx:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
#default 10.135.249.65 0.0.0.0 UG 0 0 0 eth0
8c.7c.0a05.ip4. 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
10.135.249.64 * 255.255.255.192 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
68.49.c682.ip4. 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
8e.d3.2fa9.ip4. 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
192.168.10.0 10.135.249.118 255.255.255.0 UG 0 0 0 eth0

Print only the IPs


route -n

example:

vra-lx:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.135.249.65 0.0.0.0 UG 0 0 0 eth0
5.10.124.140 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
10.135.249.64 0.0.0.0 255.255.255.192 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
130.198.73.104 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
169.47.71.94 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
169.47.211.142 10.135.249.118 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.10.0 10.135.249.118 255.255.255.0 UG 0 0 0 eth0

Add default gateway or over vRA VAMI


route add default gw 10.10.10.1
Post date: 2018-01-16 16:50:54
Post date GMT: 2018-01-16 16:50:54
Post modified date: 2018-01-16 16:52:35
Post modified date GMT: 2018-01-16 16:52:35
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com