Forward decision

Answered Question
Mar 5th, 2008
User Badges:

Hi seniors, On what basis a CISCO IOS decides to drop a packet or forward a packet, I mean how a packet with 192.168.10.1 will be match with the follwing table

1. 192.168.10.64/26

2. 192.168.10.0/30

3. 192.168.10.4/30

4. 192.168.10.8/30

5. 192.168.10.192/26

6. 192.168.10.128/26

I am not caring for outgoing ports, just want to know how IOS will decide about the route, with classless & classful. regards, Tahir

Correct Answer by lamav about 9 years 1 month ago

Haj Tahir:


A router maintains a routing table for various networks. It learns about networks through dynamic routing protocols, static routes, or by virtue of being directly conneected to the network.


Giving you a simple, abridged version of things, when a router receives a packet on one of its interfaces, it will examine the destination address in the IP datagram.


It will then look in its routing table for a route to the network. If the destination address falls within the range of one of the networks it has in its routing table, it will forward it according to the next hop given in the routing table entry. If it has more than one route, it will take the route with the longest prefix match.


So, if it has a route to 192.168.0.0/16 and 192.168.10.0/30, it will route according to the latter - the more specific entry (longest prefix match), even though 192.168.0.0 includes the host address.


To answer your question regarding the 192 address you gave us, you must understand subnet masks. The IP address 192.168.10.1 is a host address that falls within network 192.168.10.0/30. The /30 mask will give you 4 addresses:


192.168.10.0 <---subnet address

192.168.10.1 <---host address

192.168.10.2 <---host address

192.168.10.3 <---Directed broadcast


For the router to successfully route subnets of major networks, you should have the ip classless command configured on the router. Of course, you would also have to deploy a routing protocol that supports classless routing and VLSM, like OSPF or EIGRP.


Volumes can be written about all this, so this is just a basic overview to answer your specific question.


HTH


IF so, please rate this post.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Wed, 03/05/2008 - 15:17
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

2. 192.168.10.0/30


as it has the longest mask for that destination IP.


__


Edison.

Correct Answer
lamav Wed, 03/05/2008 - 15:19
User Badges:
  • Blue, 1500 points or more

Haj Tahir:


A router maintains a routing table for various networks. It learns about networks through dynamic routing protocols, static routes, or by virtue of being directly conneected to the network.


Giving you a simple, abridged version of things, when a router receives a packet on one of its interfaces, it will examine the destination address in the IP datagram.


It will then look in its routing table for a route to the network. If the destination address falls within the range of one of the networks it has in its routing table, it will forward it according to the next hop given in the routing table entry. If it has more than one route, it will take the route with the longest prefix match.


So, if it has a route to 192.168.0.0/16 and 192.168.10.0/30, it will route according to the latter - the more specific entry (longest prefix match), even though 192.168.0.0 includes the host address.


To answer your question regarding the 192 address you gave us, you must understand subnet masks. The IP address 192.168.10.1 is a host address that falls within network 192.168.10.0/30. The /30 mask will give you 4 addresses:


192.168.10.0 <---subnet address

192.168.10.1 <---host address

192.168.10.2 <---host address

192.168.10.3 <---Directed broadcast


For the router to successfully route subnets of major networks, you should have the ip classless command configured on the router. Of course, you would also have to deploy a routing protocol that supports classless routing and VLSM, like OSPF or EIGRP.


Volumes can be written about all this, so this is just a basic overview to answer your specific question.


HTH


IF so, please rate this post.

tahir1234 Wed, 03/05/2008 - 17:14
User Badges:

Thanks for both the replies. Lamav can you further clear the concept involved in how IOS takes care while we configure "classless" and how differently when we configure "classful" or in what conditions either one is necessary. Thanks again for seniors help as I am novice in networking field. Tahir.

Actions

This Discussion