Overview: IP
addresses: network and host part
header
fragmentation and reassembly
IPv6
mobile IP
ICMP
DHCP
SLIP
PPP
Network and Host parts
Class-based addressing
Subnetting
Classless addressing (Classless Inter-Domain Routing, CIDR)
Class-based addressing
Class A addresses start with a 0 bit, followed by 7 bits of network ID and 24 bits of host ID
Class B addresses start with 10, followed by 14 bits of network ID and 16 bits of host ID
Class C addresses start with 110, followed by 21 bits of network ID and 8 bits of host ID
Problems:
Class B is too large (uses too many bits)
Class C is too small for a lot of organizations (e.g. ISP, company)
don't
ever
want to renumber, so sign up for largest possible block
soon (1994?) "ran out" of class B addresses
Subnetting
split big network into smaller networks
use a
network mask
to identify the network part of the address
e.g. 255.255.255.192 identifies a subnetwork with 64 host addresses
from outside network, send to network (identified by class)
within network, use network mask to find subnetwork/host parts
CIDR
use network masks to route also from outside of network
no longer need classes
a single large network can include smaller networks which can include smaller networks (flexible hierarchy)
IP Header
bits
field
4
ip Version number (4)
4
header length, in 32-bit words
8
type of service
16
packet length in bytes
16
ID
3
flags
13
offset
8
time to live
8
protocol
16
header checksum
32
source IP address
32
destination IP address
IP Header
version number is always 4 for this version of IP (IPv4)
header length is 5 (20 bytes) unless there are options, in which case it is larger
type of service is not used extensively in IPv4
packet length helps us deal with padding (e.g. ethernet)
time to live is decremented by each router, routers discard packets with TTL = 0
protocol is like ethernet protocol type:
1 for ICMP
6 for TCP
17 for UDP
IP Header Checksum
16-bit internet checksum
covers the header, including any options
error detection for payload must be done by higher-level protocol
sending: checksum value set to zero before checksum computation
receiving: checksum of entire header must be
0xffff
because TTL (and possibly options) change at each router, checksum must be recomputed at each hop
potential for router software errors
IP fragmentation
IP packets cannot be larger than Maximum Transmission Unit (MTU) of underlying network
many different networks in Internet
router may be given packet of size N to send over network with MTU < N
put "unique" identifier in each packet
fragmentation may also be done by sender
IP reassembly
ID identifies packet
offset * 8 identifies fragment within packet
flags identify end of packet (last fragment)
packets, fragments may be delivered out of order
use TTL to discard packets with lost fragments
IPv6
design initiated in response to exhaustion of class B addresses
128-bit addresses
better autoconfiguration
better security (encryption, authentication)
better type of service
simpler to process a packet
no header checksum
"extension headers" instead of options, higher-level protocols
Does not interoperate with IPv4, but can be tunneled
ICMP
Internet Control Message Protocol
ping
try to inform sender when discarding a packet
(never send in response to an ICMP packet)
unreliable, but useful
Mobile IP
post office forwarding address
I get a guest IP address from the network I'm on
forwarding agent on my network sends all my packets to the guest address
I can either
send packets with my home IP address (probably dropped for security reasons)
send packets with my guest IP address (source address authentication won't work)
DHCP
Dynamic Host Configuration Protocol
"plug and play"
broadcast request for IP address
assigned IP address
e.g. ISPs
PPP
"lower layer" for IP (and other protocols)
has IP address negotiation
can use multiple serial lines
2-byte CRC
complex, useful
SLIP
"lower layer" for IP only
marker character END, replaced in packet by ESC END
escape character ESC, replaced in packet by ESC ESC
END starts and ends packet
IP+TCP headers are predictable: compression increases rate of useful data