24-12-2012, 05:54 PM
How the TCP/IP Protocol Works
TCPIP Protocol.ppt (Size: 467 KB / Downloads: 289)
Internet Protocol (IP RFC-791)
Layering allows one to replace one service without affecting others
IP layer (basic unit of transfer in TCP/IP) provides:
Best-effort (does not discard capriciously), unreliable (no guarantees)
Packet may be lost, duplicated, out-of-order with no notification
Connectionless (each packet treated independently)
IP software provides routing
IP datagram format
Vers (4 bits): version of IP protocol (IPv4=4)
Hlen (4 bits): Header length in 32 bit words, without options (usual case) = 20
Type of Service – TOS (8 bits): little used in past, now being used for QoS
Total length (16 bits): length of datagram in bytes, includes header and data
Time to live – TTL (8bits): specifies how long datagram is allowed to remain in internet
Routers decrement by 1
When TTL = 0 router discards datagram
Prevents infinite loops
Protocol (8 bits): specifies the format of the data area
Protocol numbers administered by central authority to guarantee agreement, e.g. TCP=6, UDP=17 …
IP Fragmentation
How do we send a datagram of say 1400 bytes through a link that has a Maximum Transfer Unit (MTU) of say 620 bytes?
Answer the datagram is broken into fragments
Router fragments 1400 byte datagrams
Into 600 bytes, 600 bytes, 200bytes (note 20 bytes for IP header)
Routers do NOT reassemble, up to end host
Fragmentation Control
Identification: copied into fragment, allows destination to know which fragments belong to which datagram
Fragment Offset (12 bits): specifies the offset in the original datagram of the data being carried in the fragment
Measured in units of 8 bytes starting at 0
Flags (3 bits): control fragmentation
Reserved (0-th bit)
Don’t Fragment – DF (1st bit):
useful for simple (computer bootstrap) application that can’t handle
also used for MTU discovery (see later)
if need to fragment and can’t router discards & sends error to source
More Fragments (least sig bit): tells receiver it has got last fragment
TCP traffic is hardly ever fragmented (due to use of MTU discovery). About 0.5% - 0.1% of TCP packets are fragmented .
Creative IP address allocation
Class A addresses 64 – 127 reserved
Handle on individual basis
Class B only assigned given a demonstrated need
Class C
divided up into 8 blocks allocated to regional authorities
208-223 remains unassigned and unallocated
Three main registries handle assignments
APNIC – Asia & Pacific www.apnic.net
ARIN – N. & S. America, Caribbean & sub-Saharan Africa www.arin.net
RIPE – Europe and surrounding areas www.ripe.net