In a mobile setting, a host can become disconnected from one network and connected to a different one.
An IP address on the other hand is supposed to indicate roughly when a host is in a network.
One solution to this problem is to have the mobile device get a new IP address using something like DHCP.
For some internet applications this might work: For instance, if all you were doing was requesting and receiving web pages.
For other applications like Voice over IP it would probably cause the application to fail.
More Routing for Mobile Hosts
The procedures to solve the problem of getting IP to work in the mobile setting are called Mobile IP and there is an IETF Mobile IP Working group dedicated to solving them.
One technology introduced to support Mobile IP is the use of a home agent.
This router is located on the "home" network of the mobile host.
Each mobile host has a permanent IP address called its home address which has a network number equal to that of the home network.
In addition, to the home agent, another special router called the foreign agent is also often used.
Home and foreign agents use advertisements to announce their presence.
The Home agent's advertisement enable the Mobile Host to learn its Home Network's address before it leaves that network.
When the Mobile Host connects to a new network, it determines who is a foreign agent by listening for foreign agent advertisements. It then registers with the foreign agent for that network, telling the foreign agent what its home network is.
The foreign agent then contacts the home agent providing a care-of address (the IP address of the foreign agent).
Sending and Receiving Mobile IP
To send a packet, a mobile host sets the destination of the IP packet to where ever it wants to send, and it sets the source IP to its permanent IP address.
For some other host B to send to the mobile host A, B uses A's permanent IP address as the destination.
The Home agent, uses a technique called proxy ARP to impersonate the Mobile Host on the Home Network.
It should be noted it only does this if A has registered with a foreign agent; otherwise, it just lets the packet go to A on the Home Network.
Suppose the Home Agent receives the packet destined for A. In this case, it forwards the packet to the foreign agent by just wrapping the packet in another IP header with destination the Foreign Agent.
The foreign agent unwraps this packet and sends it to the hardware (Ethernet) address registered with it by A.
Sometimes to improve the performance of sending to the Mobile Host, the Home Agent can send a binding update message back to B with the care-of address of A.
This allows B to directly send to A at this new address.
Router Implementation
Router Implementation is in many ways similar to switch implementation, which we've already discussed.
Routers must be able to handle variable length packets. so in this respect router implementation differs from ATM based switch implementation.
Often a router's fabric does switching based on cells.
To make this possible, the input and output ports need to be able to handle segmentation and reassembly.
Router's can usually forward a certain number of packets per second (pps).
So total throughput in bits per second depends on packet size.
The physical speed of a port in bits per second is called the line rate.
The largest packet size that can be handled at this rate is given by:
packetsize = linerate/pps.
More on Router Implementation
Two common router implementation approaches to the problem of forwarding IP packets are: centralized and distributed.
In the centralized model, the IP forwarding algorithm is done in a single processing engine that handles traffic from all ports.
In the distributed model, the IP forwarding algorithm uses several processing engines, either at each port or for a group of ports.
The latter should in theory be faster, however, it is more complicated as now several forwarding tables need to be maintained, etc.
Unlike bridge and ATM switch forwarding, the router needs to be able to determine if a particular IP address is directly reachable off an interface or whether the packet needs to be sent to another router. The number of bits of the IP address to use is thus variable depending on the network address of the router to which we want to send.
Quiz
Which protocol might we use if we have a host's IP address and we want its Ethernet address?
DHCP
ARP
RIP
Global Internet
So far our discussion of internetworks has been somewhat "scalable".
Each router does not need to know each host on the internet, but it does need to know
each network.
Today's internet has ten or hundreds of thousands of networks connected to it, and the routing protocols
we've discussed so far don't scale to those kinds of sizes.
We next look at techniques which can scale to the needed sizes.
To discuss these techniques, we first recall from last day we described how using OSPF
we split our internetworks into autonomous systems (AS's), where an AS might be ISP or
some other entity that is under one organizations administrative control.
Each router just needs to know how to route in its AS or AS's. (Might belong to backbone AS and
some other one)
Two issues we need to address with scaling: (1) minimizing the number of network numbers that get carried around in
the protocol, (2) making sure that the IP address does not get consumed too quickly.
Subnetting
The original intent of IP addresses was that the network part would uniquely identify exactly one physical network.
The problem is a class C network can only have 255 nodes and it is very easy for a small company to exceed this.
On the other hand, there are far too few class B network addresses (only 214, about 16000 ).
If we assign many network numbers to an organization (i.e., make an organization up out of many Class C networks) then
router forwarding tables will start to grow too quickly and so the forwarding algorithms will tend to get slower.
To solve this problem, the idea of subnetting was introduced.
In subnetting, one takes a single IP network number and allocates the IP addresses with that number to several physical networks
referred to as subnets.
It should be the case that these subnets are physically close to each other.
All nodes on the same subnet must be configured with the same subnet mask. This mask indicates which bits
of the IP address will be kept when dealing with the subnet. So for instance, 255.255.255.0 could be bit-wise AND'd to the IP address of a
host on a Class C network to get the relevant subnet (i.e., its network address).
More on Subnetting
Subnetting effectively allows us to split up a large network like a Class B network into smaller subnets which are still bigger than a Class C network.
Class B Network
Network number
Host Number
Subnet Mask 255.255.192
111111111111111111
00000000000000
Subnetting the Class B Network
Network number
Subnet ID
Host Number
To send when subnetting is in use, a host ANDs the destination IP address with the host's own IP mask. If it results in the hosts
own subnet, then it knows it can deliver the packet over the subnet.
Otherwise, if the result is not equal, the packet needs to be sent to a router to be forwarded to another subnet.
To handle subnetting a router's forwarding table now has entries (subnet address, subnet mask, outgoing
line)
When a packet arrives at a router. Its destination IP address is
extracted, this is matched to a router entry, by first ANDing it with the
entry mask then comparing to the subnet address. If it matches the
corresponding line is used.
Classless Interdomain Routing (CIDR)
CIDR is a technique that address two scaling concerns in the internet: the growth of backbone routing tables
as more and more network numbers need to be stored in them, and the potential for the 32 bit IP address space to be exhausted well before the 4 billionth host is attached to the internet.
Rather than use classes, in CIDR, network addresses are often written as
Address/#lead on bits in the mask. Masks are 32 bits with the lead bits
on, the rest off. For example, we might write the IP address as:
194.24.0.0/21
This number can then be used to refer to a whole AS and gives us a finer control over the size of such networks than could be had using a classful approach.
Notice although similar to subnetting, in subnetting we wanted to share the same address for multiple different physical networks.