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.

AndrejaKo
  • 695
  • 1
  • 8
  • 15

8 Answers8

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
Ricky
  • 32,810
  • 2
  • 45
  • 85
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.

n611x007
  • 107
  • 3
Anon
  • 181
  • 2
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).

Baldrick
  • 5,310
  • 8
  • 40
  • 79
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.

n611x007
  • 107
  • 3
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.

n611x007
  • 107
  • 3
Big Perm
  • 123
  • 5
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.

Andomar
  • 131
  • 2
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.

MattE
  • 2,097
  • 4
  • 24
  • 34
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.

user1279
  • 11
  • 2