3

Can someone explain me what the out put of route -n?

# route -n 
Kernel IP routing table 
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
2
  • 2
    man route is all you need. – cuonglm May 19 '13 at 17:08
  • 2
    route is deprecated on linux, use ip route instead. – BatchyX May 19 '13 at 17:17
11

Your table is basically saying:

If you want to reach another host with an IP address

  • starting with 192.168.0 -> send it to interface eth1
  • starting with 169.254 -> send it to interface eth1
  • starting with 127 -> send it to interface lo
  • else send it to your router (192.168.0.1)

The route command is a legacy command you should use the iproute tool instead.

For a more basic introduction you can start with the Wikipedia article about Routing Tables.

2
  • Hey @michas thanks by the explanation, what I'm trying to achieve is a load balance on opensuse 12.3, I got two internet connection one is from my shared building internet, it's pluged to a router on port WAN and I'm connected to the router with eth0 pluged at port LAN1, the other is my own internet cable it's pluged on a router wifi and it's connected with wlan0 and I got a 3rd one That I intent to use for my local Lan, which will be available for the other devices at my home, this is eth1 pluged to another router. I want all that Local Lan to go through a proxy squid. – Felipe Dos Santos Miranda May 19 '13 at 23:36
  • 'route command is a legacy command', according to who? – Donato Dec 5 '19 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.