Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am new to networking and have a very basic question on subnets and routers..

Consider the below... 3 subnets and two routers...

subnet 11.0/24 is connected to Router 1 (R1)

R1 is linked to R2 via the subnet 12.0/24.

subnet 13.0/24 is also connected to R2.

x.x.11.0/24 -> R1 - x.x.12.1 .... x.x.12.2 - R2 <- x.x.13.0/24

So, the x.x.12.0/24 subnet lies between the two routers.

My question is, what is the advantage of having the routers linked by the 12.0/24 subnet? I still have to put a static route from the .11.0/24 network to the .13.0/24 network via the interface x.x.12.1. But why is it good to have the routers linked on the same subnet, couldn't you just allocate any address on each side of the link?

Hope I have explained that ok!

share|improve this question
1  
Smells like homework. –  Chris S Oct 28 '10 at 1:24

3 Answers 3

up vote 2 down vote accepted

I'm getting from your comments to Zypher's answer that you're unclear why the "interstitial" network between the Router A's e1 interface and Router B's e0 interface need to be in same subnet.

Let's not get hung-up on the phrase "static routes". Let's say "routing table entries". How those entries get there, either statically assigned or via a dynamic routing protocol, is immaterial for this example.

You've got a topology like this:

 e0 - 1.1.11.1/24     e0 - 1.1.12.2/24
    v  __________        v  __________
    v |          |       v |          |
///---| Router A |---///---| Router B |---///
      |__________| ^       |__________| ^
                   ^                    ^
      e1 - 1.1.12.1/24     e1 - 1.1.13.1/24

You know that Router A will need a routing table entry that says "1.1.13.0/24 is reachable via 1.1.12.2". Likewise, you know that Router B will need a routing table entry that says "1.1.11.0/24 is reachable via 1.1.12.1".

You're conflating the need for routing table entries on both routers to reach the "end" networks with the addressing of the "interstitial" network. They have nothing to do with each other. No matter how you address that interstitial network, you'll need routing table entries in both routers to get traffic to flow from one of the "end" networks all the way thru to the other.

You could always do something like the network below:

 e0 - 1.1.11.1/24     e0 - 5.4.3.2/32
    v  __________        v  __________
    v |          |       v |          |
///---| Router A |---///---| Router B |---///
      |__________| ^       |__________| ^
                   ^                    ^
      e1 - 9.8.7.6/32     e1 - 1.1.13.1/24

In this network, you'd need the routing table entries "5.4.3.2/32 is reachable via interface e1" AND "1.1.13.1/24 is reachable via 5.4.3.2" in Router A. Likewise, you'd need the entries "9.8.7.6/32 is reachable via interface e0" AND "1.1.11.0/24 is reachable via 9.8.7.6" in Router B.

When we used intefaces in the same subnet for the intersitial network we got a route to the interstitial network "for free" (because an interface with a netmask smaller than /32 implies a route to the attached network via that interface). Using crazy disjoint IP addresses for the interstitial network means we need to add routes to make the interstitial network work in addition to the routes to allow traffic to flow between the "ends".

share|improve this answer
    
+1 thanks for doing that ... got distracted by whiney devs :-D –  Zypher Oct 28 '10 at 19:09
    
thank you so much for taking the time to post such a clear answer, much appreciated. –  NotNowJohn Oct 28 '10 at 21:48
    
@Zypher: @all: Thanks again to all, much clearer now. Perhaps the reason I got confused in the first place is that I had been using serial links in my packet tracer test to link the routers... This does allow the remote networks to see on another, once a routing entry points to the remote network via the serial interface... Is this something to do with point-to-point? FastEthernet behaves as you have described here. –  NotNowJohn Oct 29 '10 at 0:09
    
@NotNowJohn: You can run serial links unnumbered and, by definition, they're point-to-point (for sake of argument... let's not talk about multi-drop serial here...). –  Evan Anderson Oct 29 '10 at 1:56

There is no advantage to using a /24 to connect two routers. In fact you will never see that outside of possibly very large ISPs and backbone providers in a well designed system. at most you would see is a /29 if you have a fail-over setup. That said, the routers NEED to have an interface on the same subnet to allow them to talk to each other and pass the forwarded packets back and forth.

share|improve this answer
2  
+1 - A certain subnetting example in an answer on a certain sysadmin support site (serverfault.com/questions/49765/how-does-subnetting-work) uses /24's for clarity but, as Zypher points out, nobody really uses /24's as interstitial networks IRL. –  Evan Anderson Oct 28 '10 at 0:48
2  
I see lots /24's used for point to point links inside a Organization using RFC1918 address space. When someone is using 10/8 they tend to think they just want to allocate extra space unless in case they might want it some day. –  Zoredache Oct 28 '10 at 1:21
    
@Evan Common man don't you have enough upvotes on that answer? :-D. @Zoredache oh yes i'm sure people do it doesn't mean it's a good design ... hence my "in a well designed ..." qualifier. –  Zypher Oct 28 '10 at 2:25
    
@Zypher: It took a long time to write! >smile< I need to dig out the old "end" of the answer from one of the old data dumps, clean it up, and put it somewhere. The answer just stops mid-sentence right now! –  Evan Anderson Oct 28 '10 at 3:01
    
@Zypher: Tks for reply. I get that the intra-router subnet should be smaller than /24, but why do the routers NEED to have the interfaces on the same subnet? I still have to put a static route on R1 to tell it that packets destined for 13/0 go out through that interface. In my testing, it doesnt seem to care what subnet the R2 side of the link is on, the packets still arrive there. e.g. they go out through an interface 12.0/24 on R1 and arrive through an interface 15.0/24 on R2. –  NotNowJohn Oct 28 '10 at 10:33

Using a /24 as an interconnect is fairly uncommon. You will see routers with loopback interfaces all out of a /24, but if there's any IP at all on an inter-router link (true point-to-point interfaces don't always need one at all), it would commonly be a /30 or a /29.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.