LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Routing table (https://www.linuxquestions.org/questions/linux-newbie-8/routing-table-793393/)

vinaytp 03-05-2010 07:51 AM

Routing table
 
Dear All,

Output of ifconfig is as shown below:

Code:

[vinay@vinay log]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:86:16:D4:32 
          inet addr:172.17.70.145  Bcast:172.17.70.255  Mask:255.255.255.0
          inet6 addr: fe80::221:86ff:fe16:d432/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:261383 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:102189187 (97.4 MiB)  TX bytes:12403896 (11.8 MiB)
          Memory:d0180000-d01a0000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:26576 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26576 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:57020168 (54.3 MiB)  TX bytes:57020168 (54.3 MiB)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::a4dd:ddff:fec0:8f9a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:61 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10541 (10.2 KiB)  TX bytes:8507 (8.3 KiB)

My routing table as shown below:

Code:

Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
172.17.70.0    0.0.0.0        255.255.255.0  U        0 0          0 eth0
192.168.122.0  0.0.0.0        255.255.255.0  U        0 0          0 virbr0
169.254.0.0    0.0.0.0        255.255.0.0    U        0 0          0 eth0
0.0.0.0        172.17.70.1    0.0.0.0        UG        0 0          0 eth0

The machines which come under 172.17.70.0 address do not require a router/gateway to route the packets.

Also machines that come under 192.168.122.0 are Virtual machines, and they reside in my server. So they too do not need a gateway.

whereas why is gateway not required for the machines that come under 169.254.0.0 newtork ? Also what is the meaning of UG under flags ?

Thanks in advance

jstephens84 03-05-2010 07:53 AM

Quote:

Originally Posted by vinaytp (Post 3886908)
Dear All,

Output of ifconfig is as shown below:

Code:

[vinay@vinay log]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:21:86:16:D4:32 
          inet addr:172.17.70.145  Bcast:172.17.70.255  Mask:255.255.255.0
          inet6 addr: fe80::221:86ff:fe16:d432/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:261383 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:102189187 (97.4 MiB)  TX bytes:12403896 (11.8 MiB)
          Memory:d0180000-d01a0000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:26576 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26576 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:57020168 (54.3 MiB)  TX bytes:57020168 (54.3 MiB)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00 
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::a4dd:ddff:fec0:8f9a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:61 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10541 (10.2 KiB)  TX bytes:8507 (8.3 KiB)

My routing table as shown below:

Code:

Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
172.17.70.0    0.0.0.0        255.255.255.0  U        0 0          0 eth0
192.168.122.0  0.0.0.0        255.255.255.0  U        0 0          0 virbr0
169.254.0.0    0.0.0.0        255.255.0.0    U        0 0          0 eth0
0.0.0.0        172.17.70.1    0.0.0.0        UG        0 0          0 eth0

The machines which come under 172.17.70.0 address do not require a router/gateway to route the packets.

Also machines that come under 192.168.122.0 are Virtual machines, and they reside in my server. So they too do not need a gateway.

whereas why gateway is not required for the machines that come under 169.254.0.0 newtork ?

Thanks in advance

169.254 is known as apipa. This is basically assigned to network adapters when they either don't have a static IP or can't get a dhcp address.

vinaytp 03-05-2010 08:05 AM

Quote:

Originally Posted by jstephens84 (Post 3886911)
169.254 is known as apipa. This is basically assigned to network adapters when they either don't have a static IP or can't get a dhcp address.

Thank you very much j stephens84.

I can google on APIPA.

What is UG under flags ? what does that mean ?

jstephens84 03-05-2010 10:24 AM

Quote:

Originally Posted by vinaytp (Post 3886929)
Thank you very much j stephens84.

I can google on APIPA.

What is UG under flags ? what does that mean ?

According to the man pages here is what I found.
Code:

Flags  Possible flags include
              U (route is up)
              H (target is a host)
              G (use gateway)
              R (reinstate route for dynamic routing)
              D (dynamically installed by daemon or redirect)
              M (modified from routing daemon or redirect)
              A (installed by addrconf)
              C (cache entry)
              !  (reject route)

So if I am reading this right it would be saying to use this as a Default gateway and the U is saying the route is up. Also 0.0.0.0 means that all traffic will deafult to this route first unless a static route has been entered.


All times are GMT -5. The time now is 05:36 AM.