Re: How do I read/interpret a (netstat) routing table ?
- From: Anand <n.anand.k@xxxxxxxxx>
- Date: Wed, 01 Aug 2007 23:09:38 -0700
On Jul 27, 4:23 pm, tho...@xxxxxxxxx (Thommy Kanther) wrote:
After entering a command
netstat -rn
on my computer I am getting the following information (see bottom).
Ok, I know this routing table is used to direct TCP/IP packets to their destination.
But how do I interpret this table ?
For example has a routing command line higher priority the lower it is listed in
the table ?
Assume on local computer 192.168.0.14 a TCP-IP packet is arriving with the destination
192.168.0.32
Starting with the last entry line and going higher step by step the first line which
matches
the destination mask of the two first columns is
192.168.0.0 255.255.255.0 192.168.0.14 192.168.0.14 30
Hmm, from my point of view the routing table says the following: Forward the
packet to computer 192.168.0.14 over interface 192.168.0.14. But what makes this for
a sense? This is the local computer. Why should the packet be forward to itself ?
Shouldn't be a the entry line as follows:
192.168.0.0 255.255.255.0 192.168.0.31 192.168.0.1 30
I am a bit confused.
Could someone give me a good explanation or direct my to a web pages with
good sample evaluations ?
Thank ypu
Thomas
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.14 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.14 192.168.0.14 30
192.168.0.14 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.0.255 255.255.255.255 192.168.0.10 192.168.0.14 30
224.0.0.0 240.0.0.0 192.168.0.10 192.168.0.14 30
255.255.255.255 255.255.255.255 192.168.0.10 192.168.0.14 1
Default Gateway: 192.168.0.1
===========================================================================
Persistent Routes:
None
Probably, the routing table what ever you see, I think is not
configured properly.
I would like to explain the fields first,
Network Destination --> The one which is outside your subnet,
basically it has different subnet mask compared to local.
NetMask --> Makes it easier for the Router (layer 3 device, which
isolates 2 subnets). This is used to identify which subnet the packet
must go to.
Gateway --> There could be more than one gateway within a network, so
to reach the destination we configure which could be the best possible
gateway
Interface --> Assuming that we could have more number of interfaces
(ethernet interfaces, eth0, eth1, eth2...) and each interface would be
assigned an IPAddress,
so this information is required, on how to reach
the gateway and through which interface it needs to push the packet.
Metric --> Provides the path cost, basically for static routing the
value would be 1 (default, but we can change it) and for dynamic
routing (RIP, IGRP, OSPF) it varies.
Assume that we have a packet with destination IP address as w.x.y.z
arrives to Router, so now the router checks the Routing table and if
it identifies that w.x.y.0/24 is present in the table then it will try
to reach the concerned gateway by pushing through the respective
interface. Assume that there were two entries of the same with metrics
different, then the router has to choose the one which has a lower
value. Assume the router did not find any entries in the routing table
then it would go to default gateway.
Now assume the other scenario, a packet with the destination IP
address k.l.m.n arrives to router, and k.l.m.0/24 is default mask of
the router, then it implies that the packet is destined to same
network and it does not push to outside subnet.
if for further queries search "routing algorithm" in google. you could
find many doc's.
.
- Prev by Date: Re: why I can't open shared folders in xp from win98?
- Next by Date: Re: Broadcasting over a network
- Previous by thread: Windows XP - Issues Browsing HTTP
- Next by thread: Home network is too connected?
- Index(es):
Relevant Pages
|