40

I'm studying networking and one of the most basic things I've been told countless times is that computers can't communicate outside of their own subnet.

On the other hand, by looking at some ADSL setups, I've seen that in case where a fixed IP address is assigned to the user's WAN interface, a /32 subnet mask is used for the WAN interface and the default gateway is of course outside of the subnet.

So how would the host with /32 subnet communicate with outside network?

Here's a sort of a diagram of what I have:

Network Diagram

The DSL modem is set up to act as a bridge so Router0 does authentication and sets up connection via PPPoE to the ISP. The Router0 gets an IP address on its WAN interface (Fa0/0 on the diagram) which is from a /32 subnet using IPCP. It only receives a single IP address on the WAN interface and IP aliasing isn't being used here.

I understand what goes on from the Router0 to the LAN. What I don't understand is how does the Router0 communicate with ISP.

8 Answers 8

32

DSL tends to use PPPoE, which means the link is point-to-point. A /32 is perfectly valid here. In fact, no address at all is still valid -- one would need routable addresses beyond the PPP link, 'tho. In this case, it works because there's only one possible destination on the link. Every packet put on that link will be processed by the other end, and v.v.

blue-gw#show int di1
 Dialer1 is up, line protocol is up (spoofing)
 Description: Bellsouth.net DSL
 Internet address is 74.167.x.x/32

Routing:
 Gateway of last resort is 72.157.24.5 to network 0.0.0.0
 ...
      72.0.0.0/32 is subnetted, 1 subnets
 C       72.157.24.5 is directly connected, Dialer1
      74.0.0.0/32 is subnetted, 1 subnets
 C       74.167.x.x is directly connected, Dialer1
2
  • 1
    Could you please explain a bit more how the /32 is fine on point-to-point link? I understand that on a point-to-point link, the data has nowhere to go except to the other side, but in such case, I'd expect to see the interface set up as the exit point in the routing table and not the IP address of the default gateway. If the explanation is too complicated to fit an answer, some keywords for Google would be good too.
    – AndrejaKo
    Commented May 19, 2013 at 20:13
  • 2
    PPP reports local and remote side addresses, so the interface will be set with the local (usually /32) and the default gateway will be the remote. A route to the remote via the PPP interface will be auto-generated. (see edit)
    – Ricky
    Commented May 19, 2013 at 20:16
14

I'm studying networking and one of the most basic things I've been told countless times is that computers can't communicate outside of their own subnet.

Stated without qualification like this, it is misleading and false. Of course, the Internet is divided between subnets, and yet anything can talk to anything else (most of them in an indirect way).

What you must have learned is that hosts cannot communicate directly over data link protocols like ethernet outside of their subnet, because a subnet represents some physical network segment. To communicate with hosts outside of the subnet, it is necessary to send a packet to a gateway which is on the subnet. This is what routing is all about.

Really, the question you should be asking is: how can an interface have an address such that all of the bits of the address are subnet, and there are no host bits?

The answer is that this is a point-to-point link. Point to point links are not full blown networks. The two interfaces on either end of a link know that they are talking to each other without the need for any datalink level addressing, and so at the network level, they can share the same IP address.

Moreover, a datalink can be regarded as its own network segment, and so it can have its own subnet, and that subnet only needs to contain one address.

If one end of the endpoint needs to talk specifically to the other, it can just use that address. If the router uses any other address and sends it over the modem, that packet is then not addressed for the peer; it is addressed to something else beyond that peer. The peer will receive the packet and route it.

Basically the ISP equipment is just configured this way: it has hundreds of incoming subscriber lines, and it gives each one a 32 subnet. If you have a point-to-point segment with one address, the netmask is basically moot, but you still need one: something has to be filled in for the netmask field on the interfaces and in the routing tables of the hosts.

4
  • Not really. Even in the "internet" case, one host is still talking to another host within a common subnet (aka "the router") who talks to yet another connected host, etc., etc.
    – Ricky
    Commented May 20, 2013 at 1:38
  • Ricky Beam didn't read to the second paragraph.
    – Anon
    Commented May 20, 2013 at 3:09
  • The point you seem to miss... one can only talk to something that is directly connected. If A is connected to B is connected to C, A cannot send a packet directly to C; it must go to B first. (there are tricks to make it look like A is talking directly to C... proxy-arp, bridging, etc.)
    – Ricky
    Commented May 20, 2013 at 17:12
  • 4
    I perfectly understand bridging, proxy arp and such an have worked extensively in the past on networking kernel code: driver level and up (not to mention application level network programming, as well as IT level network configuration). I never wrote that anything can talk directly to anything else. But the blank statement that "computers cannot communicate outside of their subnet" appears to be misleading.
    – Anon
    Commented Jun 3, 2013 at 0:58
9

This is just an additional note as the questions has already been answered by Ricky;

As Ricky has already pointed out, with a PPP Link, there are only two devices on the link. A local device and remote device, so there can only be two addressed on the link also (local and remote). So the local and remote addressed can be in different subnets because there is no where else for traffic placed on the link to go to, apart from the device at the other end of the lihnk. That is a simple enough concept, which you have said you understand.

Further to that though, remember that routing entries can be via interfaces as well as next hop IP address. People are often taught that routing entries are something like "0.0.0.0/0 via 5.5.5.5" where 5.5.5.5 is the ISP router and 0.0.0.0/0 is a default route. Routes can also be "0.0.0.0/0 via Fa1/0". If Fa0/1 is a point-to-point link, just specifying the interface is fine. As we have said, there is nowhere for the traffic to go, other than the device on the other end (which is the ISP router).

5
  • 1
    Please do not tell people they can route to a broadcast-multiaccess interface (read: ETHERNET -- Fa0/1 is ethernet; ethernet is not p-t-p) That's proxy-arp; and there is never a good reason to do that. In fact, it just makes a mess that people who don't know any better will never understand. (eg, their router/switch running out of memory causing various important process to fail.)
    – Ricky
    Commented May 1, 2014 at 4:30
  • If Fa0/1 is configured with a /31 its a perfectly valid config. Please don't tell me not to do something when my answer wasn't specific enough to warrant you un-requested concern. Good day to you.
    – Baldrick
    Commented May 3, 2014 at 12:50
  • Even with a /31, it's still ethernet, and thus, proxy-arp. (Unless the hardware has specific p-t-p ethernet capabilities, which most don't.) I've seen too many people do as you suggest with zero clue; and it makes a g.. d... mess they cannot figure out. If you know how to do it without creating a 47k entry arp cache, good for you; the people who come here for answers very likely don't.
    – Ricky
    Commented May 4, 2014 at 11:42
  • 1
    PS: you can ask and answer your own question to expound on this subject.
    – Ricky
    Commented May 4, 2014 at 11:43
  • 2
    Just going to add that proxy-arp should be disabled everywhere, causing the ethernet (non p2p) configuration to fail and get fixed by the end-user. Unfortunately some OS's do not disable proxy-arp by default. Also you can use the interface argument in a route ip route 1.1.1.1 255.255.255.255 fa0/1 2.2.2.2 to ensure the static route is only active when that interface is up.
    – cpt_fink
    Commented Jul 3, 2014 at 3:51
4

To demonstrate what others have explained, you can connect two Cisco routers via serial;

  • Debug ppp negotiate (or debug ppp packet for more verbose output).
  • Under the serial interfaces configure IP addresses on different subnets.
  • Set 'encapsulation ppp'
  • no shut

Notice IPCP do its thing and the far end subnet seen as directly connected in the routing table.

1
  • one could add some demonstrative images of how all this looks like. eg. this debug ppp negotiate image from cisco.com site
    – n611x007
    Commented Jul 1, 2014 at 7:30
4

Sounds like your router has a PPPoE WAN connection. With PPPoE, the "normal" IP rules don't apply as the connection between BRAS and client is tunneled.

Generally, with many tunneling protocols, the local end-point can assume the remote end-point's IP address or have none at all. Any packet not destined for the local network would be pushed into the tunnel, for the remote end to deal with.

3

Your router only needs a /32 route to talk to the ISP router.

In addition, your router will have the ISP router listed as default gateway or "gateway of last resort". When your router wants to deliver a packet to a host it doesn't know, it will send it to the ISP router.

The ISP router is only the first step onto the wider internet. It follows the same pattern as above: the router itself knows only a few hosts to talk to, but it can reach all other routers in the world because it can determine the next stop for any IP address.

Every router on the path from client to server knows one step ahead ("the next router") and one step back ("the previous router".) None of the routers needs to know the entire path.

Life is simple for your work router. It has an entry for the local LAN, it knows how to reach one ISP router, and it has a default route to the ISP router. Backend internet routers are more complex, but the idea is the same.

2

In a SP environment then the use of IPCP to dynamically assign the ip address to the dsl router it's /32 IP address is used (lan addresses are often advertised outbound via radius as framed routes). A static route is used via a dialer interface to send traffic from the lan outbound to the internet - so static routing only is used and a default route is advertised to the CE router via IPCP. Therefore Only a /32 is needed to communicate with other networks in certain design scenarios.

1

In your question it seemms you want to understand the mechanics of the R0 to ISP connection. As mentioned, xDSL is usually implemented via PPPoE or some form of bridging.

Essentially, what is happening here is "Ethernet bridging". Bridging is a OSI layer 2 function that doesn't require or make us of IP. The 32-bit IP address is merely a PPP endpoint identifier for the ISP. The modem encapsulates and de-encapsulates IP traffic into and out of Ethernet.

In the network equipment at the ISP head-end, where the PPP circuit is terminated, the ip address becomes useful as the ISP and the Internet can route ip traffic to/fro the R0 publicly ip addressed interface that serves the LAN behind it. The only "routing" that is happening is on either end of the ppp circuit.

I hope that's somewhat helpful in understanding the mechanics of the RO to ISP connection.

6
  • 1
    In this context, what does R0/RO mean?
    – AndrejaKo
    Commented May 27, 2013 at 21:02
  • perhaps an R0 http://www.faqs.org/patents/img/20090213867_02.png from "BLADE ROUTER WITH NAT SUPPORT"
    – n611x007
    Commented Jul 1, 2014 at 7:44
  • @AndrejaKo RO may have stood for Route Optimization. benedikt-stockebrand.de/ipv6-in-practice-index_de.html not sure.
    – n611x007
    Commented Jul 1, 2014 at 7:45
  • another most likely R0 candidate may be from R0..Rn sequence for marking hops in label-switched path (LSP) tunnel from cisco. also has head-end as one end of an LSR. latter seems to stand for Label switch router. this sounds the most likely.
    – n611x007
    Commented Jul 1, 2014 at 7:57
  • even more R0 possibilities are Request 0 as in D0 for Data 0, "for a stop-and-wait type of request/response protocol". unlikely.
    – n611x007
    Commented Jul 1, 2014 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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