IP addresses are expressed as four bytes, either in hex or dotted-decimal, such as 134.24.8.66.
Originally, 134 was the network address and the lower 3 bytes identified a computer. This only worked when there were <=255 networks. (FF means "broadcast.")
Now, the high order bits identify an address class, as follows:
| Class | High Order Bits | Bytes for Net-ID |
| A | 0 - - - - | 1 |
| B | 1 0 - - - | 2 |
| C | 1 1 0 - - | 3 |
| D | 1 1 1 0 - | (multicasting) |
| E | 1 1 1 1 0 | (reserved for future) |
| 1 bit | 7 bits | 24 bits |
| 0 | Network ID | Host ID |
| 2 bits | 14 bits | 16 bits |
| 10 | Network ID | Host ID |
| 3 bits | 21 bits | 8 bits |
| 110 | Network ID | Host ID |
E is reserved for future expansion.
Reflections on Addresses. Two million networks: enough?
Well, they would be small ones. The more likely bottleneck will occur at Class B, because any decent sized business needs a Class B, and it's not at all unlikely that there are more than 16,000 businesses or equivalent governmental entities that will want a network in the next few years.
Large providers will need Class A, and there are only a few of these; so I conjecture that a stop-gap will be that large providers will get several class B's or a whole bunch of C's issued to them.
Internet Network Information Center (InterNIC) assigns unique network ID numbers. Local administrators assign host ID numbers. Often they effectively 'recurse' on the Internet strategy by creating sub-networks.
Multicasting. Regular transmission is "unicasting". Multicasting
refers to a host group. The Internet Group Management Protocol (IGMP)
is used.
Example multicast addresses:
224.0.1.1 - Network Time Protocol
Internet Assigned Number Authority (IANA) assigns some multicast addresses as well-known addresses, designating a permanent host group.
Address Protocols: Address Resolution Protocol and RARP.
ARP translates 32 bit Internet addresses into 48 bit Ethernet (or other "link layer") addresses; RARP does the reverse. ARP uses the link layer's broadcast capability to query the net and identify who's currently linked up. It asks them what they think their IP address is, and caches the information for later use. Namely, when an IP datagram arrives, the router translates its address into a link layer address and sends it on along.
Data enroute from the application layer to the transport layer is called an application message. It is probably embodied as a parameter value or an array of data being pointed to in a procedure-call.
When it's flowing from TCP into the network layer it's called a TCP segment (because TCP is a byte-stream delivery service) or sometimes a transport message. If using UDP, we'd encounter a UDP datagram.
When it comes out of IP headed for the hardware, it's an IP Packet.
The IP Header.
Almost always 20 bytes wide; thought of as 4 32-bit words. It contains the following information.
VERS: Version number. 4 bits. Whew! But we're only up to version 4, so I guess 4 bits will be enough for a while.
HLEN: Header length. 4 bits. Normally this says '5' for 5 32 bit words.
TOS: Type of Service. 8 bits, defining service performance.
| Bits 0-2 | 3 | 4 | 5 | 6 | 7 |
| Precedence | Delay | Throughput | Reliability | Cost | Unused |
Delay=1: minimize delays. e. g. Telnet.
Throughput=1: maximize throughput. e. g. FTP.
Reliability=1: maximize reliability. e. g. SNMP (network management)
Cost=1: minimize cost. e. g. Usenet news groups.
Packet Length, including the packet header, in bytes.
Identification and Flags and Fragment Offset are used to reassemble fragements of datagrams.
Time-to-Live (TTL) tells how long the packet can live on the network; i. e. when it becomes 'stale' and useless. Every router decrements TTL by one, plus the number of seconds the packet waited inside the router's buffer. If TTL reaches zero, TCP/IP destroys the packet and notifies the sending host, via ICMP.
Most folks set TTL to 30 before shipping them.
Protocol is an 8 bit field which indicates which protocol generated the data within the packet. This guides the choice of transport module at the network layer.
| Protocol | Decimal | Binary |
| ICMP | 1 | 00000001 |
| IGMP | 2 | 00000010 |
| TCP | 6 | 00000110 |
| UDP | 17 | 00010001 |
Source and Destination IP addresses (each 32 bits) never change, no matter how many hops the packet takes.
IP Options - this field of 8 bits is for testing and debugging. They are rarely used.
Fragmentation
Technologies such as Ethernet specify a Maximum Transfer Unit (MTU) which is the largest packet size the physical network will be asked to transmit. Anything larger must be broken down.
For reasons of time, we will not describe this section about implementation (pages 94-98).
Consequences of Fragmentation. Because multiple packets are involved, the probability of failure increases. Also some time cost is incurred by fragmentation.
Avoiding fragmentation. The default MTU used by TCP is 576 bytes, allowing for 512 bytes of data plus the TCP and IP headers, etc.
To get information to a destination, a given router can either perform Direct Delivery (if it knows that the host is in an immediately connected network) or Indirect Delivery (if it knows which adjacent net is best able to pass the information onward.)
Each entry in a routing table contains three fields: Network destination, Gateway and Flags. The Network field is the "input" - this is the field which must match the destination address. The Gateway and Flags fields are the "output" - the answer to the question "what do I do next?"
Direct Delivery. If the Flags field indicates a direct connection, then the network will translate the destination IP address into a link layer address (e. g. Ethernet), using the Address Resolution Protocol; encapsulate the data into a data frame and transmit it directly to its destination.
At the end of every journey is a direct delivery. The mailman puts the letter in your box.
Indirect Delivery. If an indirect connection was indicated by the routing table, the link layer translation still has to occur but the destination will be the next direct connection along the pathway - i. e. the address of the next router in the chain.
2. Describe how successive layers "encapsulate" data from higher layers. Why does every layer add a header, but only Ethernet adds a trailer? The answer is not explicitly stated in these Notes (or in the text, chapters 1..4) but you can deduce it from information you have so far.
3. Internet addresses are 32 bits long. Does this mean that the Internet can have essentially 2**32 computers on it before we run out of usable address space? If not, why not?
4. Explain "Time to Live." Does Live rhyme with Jive in this sentence?