cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
495
Views
0
Helpful
7
Replies

routing subnets

rhltechie
Level 1
Level 1

Hi All,

I currently have a route set in my router like the following:

ip route 10.0.0.0 255.255.248.0 <next hop>

It has come to my attention that inside my wan I will have need to route something like the following:

ip route 10.0.0.40 255.255.255.252 <next hop2>

Do I enter this just as it is above seeing as the entire /21 is stated in the first route but need to go to different places. I guess I am asking if the second will work even if I have the first.

TIA,

R

7 Replies 7

Roberto Salazar
Level 8
Level 8

Yeap, it will work. The router does it's routing table look up and does it matching with the longest mask.

Please rate helpful posts.

gpulos
Level 8
Level 8

your new route will work although........

the 30 bit ip route does step into the 21 bit ip route boundries, as 10.0.0.40 is technically a host of 10.0.0.0/21.

a simple new route to the new 30 bit subnet will work for two networks connected but as the network edge expands and routing protocols are used, this will become an issue that may need to be corrected.

i would think of separating the two subnets logically within a single supernet.

tdrais
Level 7
Level 7

It depends.

The biggest issue will be a device on the /21 that attempts to get to the /30 net. It will think that it is local and ARP for it. If the router that owns the gate for the /21 is running proxy arp and also contains the route to the /30 it will respond and correctly route the packet. If it does not have the specific route or proxy arp is not enabled it will not work.

Traffic flowing from the /30 to the /21 will work since that traffic is normal layer 3.

hmm, well maybe more info will help.

The deal is, my provider asked someone at my company for a /21 before I was employed here and it was given. the wan routers were given addresses from this /21. I am reworking my entire WAN but I wish for them to run in tandem so that I convernt sites over at my pace. For the new WAN, I am still using addresses inside this /21 but out through a different interface. I need a way to route the new wan, but for ease the engineer before me just did a route for the entire /21 out through a specific interface. The route I have currently will go away after I get all of my sites converted, but for the mean time I need to be able to route to them. What is the best way for me to handle this if not what I have stated above?

Thanks

if you could provide all the subnets in use then it will be ez to determine what we have to work with as far as moving forward.

keep in mind it will be a best practice to keep all subnets as small as possible while still allowing room for growth but also in a heirarchy that allows for subnet(s) additions.

ie: if you have 390 hosts that need to talk to the network and you expect mild expansion of the number of hosts, then perhaps a 2046 host subnet is too inefficient. try to subnet it even further if possible.

how many hosts on your 10.0.0.0/21 subnet? this subnet can hold upto 2046 hosts. (quite a bit in todays subnetted, VLANed world)

Routes are chosen and built in the routing table based on the routing protocol's administrative distance. The routes learned from the routing protocol with the lowest administrative distance are installed in the routing table. If there are multiple paths to the same destination from a single routing protocol, then the multiple paths would have the same administrative distance and the best path is selected based on the metrics. With your example both are static routes which would give them the same administrative distance.

Making Forwarding Decisions

Let's look at the three routes we just installed in the routing table, and see how they look on the router.

router# show ip route

....

D 192.168.32.0/26 [90/25789217] via 10.1.1.1

R 192.168.32.0/24 [120/4] via 10.1.1.2

O 192.168.32.0/19 [110/229840] via 10.1.1.3

....

If a packet arrives on a router interface destined for 192.168.32.1, which route would the router choose? It depends on the prefix length, or the number of bits set in the subnet mask. Longer prefixes are always preferred over shorter ones when forwarding a packet.

In this case, a packet destined to 192.168.32.1 is directed toward 10.1.1.1, because 192.168.32.1 falls within the 192.168.32.0/26 network (192.168.32.0 to 192.168.32.63). It also falls within the other two routes available, but the 192.168.32.0/26 has the longest prefix within the routing table (26 bits verses 24 or 19 bits).

Likewise, if a packet destined for 192.168.32.100 arrives on one of the router's interfaces, it's forwarded to 10.1.1.2, because 192.168.32.100 doesn't fall within 192.168.32.0/26 (192.168.32.0 through 192.168.32.63), but it does fall within the 192.168.32.0/24 destination (192.168.32.0 through 192.168.32.255). Again, it also falls into the range covered by 192.168.32.0/19, but 192.168.32.0/24 has a longer prefix length.

In your case packets destined to 10.0.0.41 or .42 it will take the route with the longest prefix match which is 10.0.0.40/30 and for packets destined to 10.0.0.1 it will take the 10.0.0.0/21 because it does not fall into 10.0.0.40 subnet and the longest prefix matching that destination is 10.0.0.0/21.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094823.shtml#metrics

Please rate helpful posts.

If there is no overlap at the device level you should be fine. Routers always use the most specific route.

It is end devices that you do not want to overlap.

As long as the routers on this /21 network have some kind of default route back to this core router it will work. When you move each segment it will lose this route and should take the default back. The main router will have the new route to the new interface and will work. Again you will need some form of default route back to this core router.