Held Friday, April 7, 2000
Today we continue to consider some basic protocols and issues that
pertain to IP.
- IP address design
- IP forwarding tables
- IP to local addressing and back again
- ICMP: Errors in IP
- As we noted last class, fixed address designs tend to lead to problems
as you give too many addresses to some networks and too few to others.
- The designers of IP considered this issue and decided to assign
classes to differnet kinds of addresses.
- Class A addresses begin with a 0. There are 7 bits for the
network number and 24 for the host. There are only 126 class
- Class B addresses begin with 10. There are 14 bits for the
network number and 16 for the host.
- Class C addresses begin with 110. There are 21 bits for the
network number and 8 for the host.
- When an IP router receives a message, what does it do?
- It looks at the address.
- Case 1: It's an address on one of the networks the router is
connected to. Translate the message to a local address and
- Case 2: It's an address on another network and the router has an
inclination about the path to that network. Forward to the
next router (using local addressing)
- Case 3: It's an address on another network and the router has never
heard of that network before. Forward to a default router.
- In each of these cases, the router needs to send a message to another
device on one of its networks (either a host or another router).
To do so, it needs the local address of that device.
- E.g., on an Ethernet, it needs the Ethernet address
- How does it figure these out?
- In many cases, it knows it already. Presumably, if a router
knows which router to forward to, it knows the address of that
- Otherwise, it broadcasts ``Hey, who's at IP address X?''
and someone replies.
- Note that this requires broadcast to work successfully.
- If the reply is broadcast, everyone on the network can
make a note as to the IP/local connection.
- The protocol used to do this is ARP (Address Resolution Protocol).
- You can look at the ARP table for a local machine with
- Note that we also have the reverse problem: if a device knows
its own local address, how does it figure out its IP address?
- And why would it want to?
- There are a number of solutions:
- You can hard-code it in some boot tables.
- It can send/broadcast a query to a server which looks it up in a table.
- It can send/broadcast a query to a server which assigns it dynamically.
- The RARP (Reverse Address Resolution Protocol) protocol was traditionally
used for this.
- These days, DHCP (Dynamic Host Configuration Protocol) is also used.
- As you've already noted, the IP is really a collection of protocols.
- One of the important associated protocols is the Internet Control
Message Protocol. ICMP protocols are IP messages in which the protocol
is set to 1.
- Why do we need an error message protocol? So that hosts and routers
can make a good-faith effort to relay useful information about the
- What kinds of errors might we relay?
- Whoops, your message ran out of time
- It is not possible to reach the destination
- The IP header is malformed
- A router or destination is congested
- The message seems to be going in the wrong direction
- The destination is giving up on reassembly.
- We'll think of some reasons these things might happen.
- What other things might we relay? There are also ICMP queries.
- Are you alive? (Ping)
- What time is it?
- Although we won't go into all the details of routing today,
it helps to think of some of the basics.
- We need routing to be adaptive.
- We need routing to be distributed.