Chapter 14 in Stallings 10Th Edition
Total Page:16
File Type:pdf, Size:1020Kb
The Internet Protocol Chapter 14 in Stallings 10th Edition CS420/520 Axel Krings Page 1 Sequence 16 Table 14.1 Internetworki ng Terms (Table is on page 429 in the textbook) CS420/520 Axel Krings Page 2 Sequence 16 1 Host A Host B App X App Y App Y App X Port 1 2 3 2 4 6 Logical connection (TCP connection) TCP TCP Global internet IP address IP Network Access Network Access Protocol #1 Protocol #2 Logical connection Physical Subnetwork attachment (e.g., virtual circuit) Physical point address Router J IP NAP 1 NAP 2 Network 1 Network 2 Physical Physical Figure 14.1 TCP/IP Concepts CS420/520 Axel Krings Page 3 Sequence 16 Why we do not want Connection Oriented Transfer CS420/520 Axel Krings Page 4 Sequence 16 2 Connectionless Operation • Internetworking involves connectionless operation at the level of the Internet Protocol (IP) IP ••Initially developed for the DARPA internet project ••Protocol is needed to access a particular network CS420/520 Axel Krings Page 5 Sequence 16 Connectionless Internetworking • Advantages —FlexiBility —Robust —No unnecessary overhead • UnreliaBle —Not guaranteed delivery —Not guaranteed order of delivery • Packets can take different routes —ReliaBility is responsiBility of next layer up (e.g. TCP) CS420/520 Axel Krings Page 6 Sequence 16 3 LAN 1 LAN 2 Frame relay WAN Router Router End system (X) (Y) End system (A) (B) TCP TCP IP IP IP IP t1 t6 t7 t10 t11 t16 LLC LLC LLC LLC t2 t5 LAPF LAPF t12 t15 MAC MAC MAC MAC t3 t4 t8 t9 t13 t14 Physical Physical Physical Physical Physical Physical t1, t6, t7, t10, t11, t16 IP-H TCP-H Data t2, t5 LLC1-H IP-H TCP-H Data t3, t4 MAC1-H LLC1-H IP-H TCP-H Data MAC1-T t8, t9 FR-H IP-H TCP-H Data FR-T t12, t15 LLC2-H IP-H TCP-H Data t13, t14 MAC2-H LLC2-H IP-H TCP-H Data MAC2-T TCP-H = TCP header MACi-T = MAC trailer IP-H = IP header FR-H = Frame relay header LLCi-H = LLC header FR-T = Frame relay trailer MACi-H = MAC header Figure 14.2 Example of Internet Protocol Operation CS420/520 Axel Krings Page 7 Sequence 16 Connectionless Internetworking • Connectionless internet facility is flexiBle • IP provides a connectionless service Between end systems —Advantages: • Is flexible • Can Be made roBust • Does not impose unnecessary overhead CS420/520 Axel Krings Page 8 Sequence 16 4 IP Design Issues • Routing • Datagram lifetime • Fragmentation and reassemBly • Error control • Flow control CS420/520 Axel Krings Page 9 Sequence 16 S2 S1 T1 P1 P3 T2 T3 The Internet P2 as a Network (a) Packet-switching network architecture N1 P P S2 R1 P R3 S1 P P P N2 P P P R2 N3 (b) Internetwork architecture CS420/520 Axel Krings Page 10 Sequence 16 Figure 14.3 The Internet as a Network 5 Routing Source routing ••Routing table indicates ••Each router appends next router to which its internet address to a datagram is sent ••Source specifies route list of addresses in the ••Can Be static or to Be followed datagram dynamic ••Can Be useful for ••Useful for testing and security and priority debugging purposes ES / routers maintain routing tables Route recording CS420/520 Axel Krings Page 11 Sequence 16 Datagram Lifetime • If dynamic or alternate routing is used the potential exists for a datagram to loop indefinitely —Consumes resources —Transport protocol may need upper Bound on lifetime of a datagram • Can mark datagram with lifetime • When lifetime expires, datagram is discarded CS420/520 Axel Krings Page 12 Sequence 16 6 Fragmentation and Re-assembly • Protocol exchanges data Between two entities • Lower-level protocols may need to Break data up into smaller Blocks, called fragmentation • Reasons for fragmentation: — Network only accepts Blocks of a certain size — More efficient error control and smaller retransmission units — Fairer access to shared facilities — Smaller buffers • Disadvantages: — Smaller buffers — More interrupts and processing time CS420/520 Axel Krings Page 13 Sequence 16 Fragmentation and Reassembly Packets get smaller as data At destination traverses internet Internet Fragmentation Issue of when to Need large reassemBle Buffers at routers Intermediate Buffers may fill reassemBly with fragments Intranet Fragmentation All fragments must go through same router CS420/520 Axel Krings Page 14 Sequence 16 7 IP Fragmentation • IP reassemBles at destination only • Uses fields in header Data Unit Identifier (ID) Identifies end system originated datagram Data length Length of user data in octets Offset Position of fragment of user data in original datagram In multiples of 64 bits (8 octets) More flag Indicates that this is not the last fragment CS420/520 Axel Krings Page 15 Sequence 16 Original IP datagram Data length = 404 octets Segment offset = 0; More = 0 IP TCP Header Header TCP payload (384 octets) (20 (20 octets) octets) IP TCP Header Header Partial TCP payload (188 octets) (20 (20 octets) octets) First fragment Data length = 208 octets Segment offset = 0; More = 1 IP Header Partial TCP payload (196 octets) (20 octets) Second fragment Data length = 196 octets Segment offset = 26 64-bit units (208 octets); More = 0 Figure 14.4 Fragmentation Example CS420/520 Axel Krings Page 16 Sequence 16 8 Error and Flow Control Error control Flow control —Discarded datagram —Allows routers to limit identification is the rate they receive needed data —Reasons for discarded —Send flow control datagrams include: packets requesting • Lifetime expiration reduced data flow • Congestion • FCS error CS420/520 Axel Krings Page 17 Sequence 16 Internet Protocol (IP) v4 • Defined in RFC 791 • Part of TCP/IP suite • Two parts Specification of Specification of actual protocol interface with a format and higher layer mechanisms CS420/520 Axel Krings Page 18 Sequence 16 9 IP Services • Primitives • Parameters —Specifies functions to —Used to pass data and Be performed control information —Form of primitive implementation dependent —Send-request transmission of data unit —Deliver-notify user of arrival of data unit CS420/520 Axel Krings Page 19 Sequence 16 IP Parameters • Source and destination addresses • Protocol • Type of Service • Identification • Don’t fragment indicator • Time to live • Data length • Option data • User data CS420/520 Axel Krings Page 20 Sequence 16 10 IP Options Route Security recording Source routing Stream identification Timestamping CS420/520 Axel Krings Page 21 Sequence 16 ECN Version IHL DS Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options + Padding (a) IPv4 header ECN Version DS Flow Label Payload Length Next Header Hop Limit Source Address Destination Address (b) IPv6 header Field name kept from IPv4 to IPv6 Name and position changed in IPv6 Field not kept in IPv6 New field in IPv6 Figure 14.5 IPv4 and IPv6 Headers CS420/520 Axel Krings Page 22 Sequence 16 11 0 Network (7 bits) Host (24 bits) Class A 1 0 Network (14 bits) Host (16 bits) Class B 1 1 0 Network (21 bits) Host (8 bits) Class C 1 1 1 0 Multicast Class D 1 1 1 1 0 Future Use Class E Figure 14.6 IPv4 Address Formats CS420/520 Axel Krings Page 23 Sequence 16 IP IP IP Addresses Addresses Addresses Class A Class B Class C Start with Binary 110 Start with Binary 0 Start with Binary 10 Network addresses with a Range 192 to 223 first octet of 0 (Binary Range 128 to 191(Binary 0000000) and 127 (Binary 10000000 to 10111111) 01111111) are reserved Second and third octet also part of network address 126 potential Class A Second octet also included network numbers in network address 221 = 2,097,152 addresses 214 = 16,384 Class B Nearly all allocated Range 1 to 126 addresses ••See IPv6 CS420/520 Axel Krings Page 24 Sequence 16 12 Subnets and Subnet Masks • Allows arBitrary complexity of internetworked LANs within organization • Insulate overall internet from growth of network numBers and routing complexity • Site looks to rest of internet like single network • Each LAN assigned subnet numBer • Host portion of address partitioned into subnet numBer and host numBer • Local routers route within subnetted network • Subnet mask indicates which Bits are subnet numBer and which are host numBer CS420/520 Axel Krings Page 25 Sequence 16 Table 14.2 IPv4 Addresses and Subnet Masks Binary Representation Dotted Decimal IP address 11000000.11100100.00010001.00111001 192.228.17.57 Subnet mask 11111111.11111111.11111111.11100000 255.255.255.224 Bitwise AND of address 11000000.11100100.00010001.00100000 192.228.17.32 and mask (resultant network/subnet number) Subnet number 11000000.11100100.00010001.001 1 Host number 00000000.00000000.00000000.00011001 25 (a) Dotted decimal and binary representations of IPv4 address and subnet masks Binary Representation Dotted Decimal Class A default mask 11111111.00000000.00000000.00000000 255.0.0.0 Example Class A mask 11111111.11000000.00000000.00000000 255.192.0.0 Class B default mask 11111111.11111111.00000000.00000000 255.255.0.0 Example Class B mask 11111111.11111111.11111000.00000000 255.255.248.0 Class C default mask 11111111.11111111.11111111.00000000 255. 255. 255.0 Example Class C mask 11111111.11111111.11111111.11111100 255. 255. 255.252 (b) Default subnet masks CS420/520 Axel Krings Page 26 Sequence 16 13 Inter-domain Routing • Classless Inter-Domain Routing - CIDR —Introduced in 1993 By the Internet Engineering Task Force —Goal was to slow the growth of routing taBles on routers across the Internet, and to help slow the rapid exhaustion of IPv4 addresses —CIDR appends a “/” character to the address and the decimal numBer of leading Bits of the routing prefix —Example: • 192.168.1.0/24 for IPv4 • 2001:dB8::/32