×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

subnetting routes

Unanswered Question
Jan 9th, 2006
User Badges:

I have seen on one of my routers, an ip route where half the subnet goes to one router and the the other to another router, this is done by applying a mask, it was something like ip route 172.19.54.0 255.255.255.0 x.x.x.x, and the other route was 172.19.54.0 255.255.128.0 x.x.x.x, Its something like that, Can anyone tell me how that works


thanks a million


Carlos

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
spremkumar Mon, 01/09/2006 - 06:55
User Badges:
  • Red, 2250 points or more

Hi


I feel you have got most specific routing entry for the half of the subnet and a entry for the whole /24 network.

The packets destined to first half of the network will take the path/host mentioned in the second route and the packet for the other ips/hosts belongs to the major /24 network will take the path via the ip mentioned in the first ip route command.


If both the routes are pointing towards the same host/ip better you can remove the second one and keep ur routing table neat & clean..


regds


mheusinger Mon, 01/09/2006 - 08:55
User Badges:
  • Green, 3000 points or more

Hello,


You might wonder what a router does in case there is an "address overlap". Well a router will always take the longest match in the routing table. That means it will take the matching entry with the highest value for the netmask (f.e. /25 is better suited than /24).


By the way the "worst address overlap" is when you have a default route 0.0.0.0/0, which covers every IP address. It will however only be used in case there is no more specific routing entry for a packet´s destination IP.


Did this help? Please rate all posts.


Martin

carl_townshend Tue, 01/10/2006 - 03:22
User Badges:

Hi there


That didnt really answer my question, thanks anyway, I wanted to know how come the mask of 255.255.128.0 makes the upper half of the ip range to go to another route, I want to know why we use the .128 mask etc ?


thanks


Carlos

pkhatri Tue, 01/10/2006 - 03:42
User Badges:
  • Purple, 4500 points or more

Hi Carlos,


Let's take a simpler example to illustrate this.


Suppose you have the network 10.1.1.0/24 and you wish to route the bottom half via one interface and the top half via another.


Now, you have a 255.255.255.0 mask to start off with. In order to create two halves of the network, you need to have a mask that is one bit longer than the original mask. In this case, this means that you need a /25 mask, which is 255.255.255.128.


With a mask of 255.255.255.128, what you are actually doing is dividing the last octet of the network into two pieces.


10.1.1.0/25 - Includes all addresses from 10.1.1.0 to 10.1.1.127. All of these address have the MSB of their last octet equal to 0 (convert to binary and see).


10.1.1.128/25 - Includes all addresses from 10.1.1.128 to 10.1.1.255. All of these address have the MSB of their last octet equal to 1 (convert to binary and see).


Therefore, using a mask of 255.255.255.128, you have succeeded in splitting this prefix.


Hope that helps.. pls rate the post if it does.


Paresh.


carl_townshend Tue, 01/10/2006 - 06:27
User Badges:

Hi thanks for that thats brilliant, Im not to good at subnetting, is there any docs you can point me to to help me ?

Actions

This Discussion