Download presentation
Presentation is loading. Please wait.
1
1 Computer Networks IP: The Internet Protocol
2
2 IP is a connection-less, unreliable network layer protocol IP provides best effort services in the sense – There is no guarantee of delivery of error-free packets – There is no guarantee of ordered delivery of packets – There is no guarantee of delivery of packets IP relies on upper layer transport protocols (TCP) to take care of these problems.
3
3 IP Datagram Format VerHlenToS (8 bits)Total length (16 bits) Identification (16 bits)FFrag. Off. (13 bits) TTLProtocolHeader Check (16 bits) Source IP Address (32 bits) Destination IP Address (32 bits) Options (a maximum of 40 bytes) Payload (variable length) Fixed length of 20 bytes
4
4 Protocol Field The protocol field (8-bits) defines the protocol that is using the services of IP It defines the final destination protocol the packet should be delivered to. This is important since several protocols could be multiplexed over IP – TCP: 6, UDP: 17
5
5 Fragmentation IP packet may travel over different networks (LANs and WANs) A router de-capsulate an IP packet from the frame it receives, process it, and encapsulate it in another frame Frame size and format varies depend on the data link protocol used by the physical network through which the frame is traveling MTU (Maximum Transmission Unit) is the maximum size of the data field (payload) in the frame If Packet size > MTU, Need for Fragmentation
6
6 MTU IP Packet MTU (Payload of Frame)HeaderTrailer Protocol MTU (Octets) Ethernet 1500 Token Ring (4 Mbps) 4464 Token Ring (16 Mbps) 17914
7
7 Fragmentation (Cont.) Each fragment has its own header (most of fields are copied, some will change, including the total length, the Flags and the fragmentation offset fields) A fragmented datagram may itself be fragmented if it encounters a network with smaller MTU. A packet can be fragmented by a source host or by any router in the path. Re-assembly of the packet must be done at the destination host.
8
8 Fields related to Fragmentation Identification (16 bits): All fragments of a packet has the same ID number which is the same as that of the original packet. The R/x knows that all fragments having the same ID should be assembled into one packet Flags (3 bits): Fragmentation Offset (13 bits): Relative position of the fragment to the whole packet measured in units of 8 octets DM D: Do not Fragment M: More Fragment
9
9 IP Fragmentation: Reassembly ID =x offset =0 fragflag =0 length =4000 ID =x offset = fragflag = length = ID =x offset = fragflag = length = ID =x offset = fragflag = length = One large datagram becomes several smaller datagrams Example r 4000 byte datagram m 3980 bytes of data m 20 bytes of IP header r MTU = 1500 bytes r Length: length of data in datagram (data + IP header) r ID: unique identifier, used for reassembly r fragflag: m 0 - last fragment m 1 – more fragments to follow r Offset: Offset relative to location in initial datagram. m given in 8-byte chunks.
10
10 IPv4 Addressing The Internet is made of combination of LANs and WANs connected via routers A host needs to be able to communicate with another host without worrying about which physical network must be passed through Hosts must therefore be identified uniquely and globally at the network layer For efficient and optimum routing, routers must also be identified uniquely and globally at the network layer
11
11 IP Addressing (Continued) IPv4 address is a 32-bit address, implemented in software, is used to uniquely and globally identify a host or a router on the Internet A device can have more than one IP address if it is connected to more than one network (multi- homed) An IP address have two parts, the netid and the hostid. They have variable lengths depending on the class of the address All devices on the same network have the same netid
12
12 Classful IP Addressing Class A: 0Netid (7 bits)Hostid (24 bits) Class C: Class D: Class E: Class B: Netid (14 bits) 10 Hostid (16 bits) 110 Netid (21 bits)Hostid (8 bits) 1110Multicast address (24 bits)1111Reserved for future use (24 bits)
13
13 Decimal to Binary Conversion
14
14 Classful Addressing (Cont.) Class A Class B Class C Class D Class E FromTo 0.0.0.0 128.0.0.0 192.0.0.0 224.0.0.0 240.0.0.0 127.255.255.255 191.255.255.255 223.255.255.255 239.255.255.255 255.255.255.255
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.