Module A Panko and Panko Business Data Networks and Telecommunications, 8 th Edition © 2011 Pearson Education, Inc. Publishing as Prentice Hall
This module presents additional material about TCP/IP standards. Most of the material in this module can be read after Chapter 2, but some of it is designed to be covered after Chapter 10. The material in this module is not designed to be read front-to-back like a regular chapter, although it can be covered this way. 2 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Multiplexing Details of TCP operationIP mask operationsIP Version 6IP fragmentationDynamic routing protocolsAddress Resolution ProtocolIP Address ClassesMobile IP 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP packets can carry different things in their data fields. ◦ TCP segments ◦ UDP datagrams ◦ ICMP supervisory messages (later) ◦ RIP messages (later) 4 IP Data FieldIP Header © 2011 Pearson Education, Inc. Publishing as Prentice Hall
We say that IP can multiplex (mix) different types of traffic in a stream of IP packets. 5 UDPIP-HTCPIP-HUDPIP-HICMPIP-H Stream of Arriving or Outgoing IP Packets Single IP Packet Carrying UDP Datagram © 2011 Pearson Education, Inc. Publishing as Prentice Hall
The IP process must pass contents of arriving IP packets to the correct process for subsequent handling. 6 IP TCPUDP ICMP UDPIP-H IP Process Arriving Packets © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP process must also accept messages from multiple processes and multiplex them on an outgoing stream. 7 IP TCPUDP ICMP UDPIP-H IP Process Outgoing Packets © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Need a way for receiving IP process to know what is in the data field ◦ So it can pass the contents to the appropriate process 8 IP Data FieldIP Header © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP Header has an 8-bit Protocol field. ◦ Identifies the contents of the data field 1=ICMP, 8=TCP, 17=UDP, and so on 9 Total Length in Bytes (16) Time to Live (8) Version (4) Hdr Len (4) TOS (8) Indication (16 bits)Flags (3)Fragment Offset (13) Source IP Address Destination IP Address Header Checksum (16) Protocol (8 ) © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Other Messages Have Analogous Fields ◦ Identify contents of data field TCP and UDP ◦ Have Port number fields ◦ Identify the application process (80=HTTP) 10 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16)Reserved (6) © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Other Messages Have Analogous Fields ◦ Identify contents of data field PPP ◦ Protocol field identifies contents of information field as IP, IPX, a supervisory message, and so on. 11 FlagAddrCtrlProtInfoCRCFlag © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Multiplexing Details of TCP operation IP mask operationsIP Version 6IP fragmentationDynamic routing protocolsAddress Resolution ProtocolIP Address ClassesMobile IP 12 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
TCP is Reliable. ◦ IP packets carrying TCP segments may arrive out of order. ◦ TCP must put the TCP segments in order © 2011 Pearson Education, Inc. Publishing as Prentice Hall
TCP is Reliable. ◦ Each correct TCP segment is acknowledged by the receiver. 14 Source Transport Process Source Transport Process Destination Transport Process Destination Transport Process TCP Segment ACK © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Each TCP segment sent by a side must have a sequence number. ◦ Simplest: 1,2,3,4,5,6,7 ◦ To detect lost or out-of-sequence messages ◦ TCP uses a more complex approach ? © 2011 Pearson Education, Inc. Publishing as Prentice Hall
TCP header has a 32-bit sequence number field. 16 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Initial Sequence Number is randomly selected by the sender; say, 79. Sent in the sequence number field of the first TCP segment TCP Data Field TCP Header Sequence Number Field with Initial Sequence Number (79) © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Data octets in data fields of all segments in a connection are viewed as a long string. TCP Segment 179 TCP Segment TCP Segment Octets in Data Field 2 Octets in Data Field ISN © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Supervisory segments, which contain a header but no data, are treated as carrying a single octet of data. TCP seg TCP seg 2900 TCP seg … 19 Supervisory Segment Carries Data © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Sequence number field gets the value of the first octet in the data field. TCP 179 TCP TCP is SeqNum Field Value 83 is SeqNum Field Value 79 is SeqNum Field Value © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Acknowledgement must indicate which TCP segment is being acknowledged. 21 Source TCP Process Source TCP Process Destination TCP Process Destination TCP Process TCP Segment ACK © 2011 Pearson Education, Inc. Publishing as Prentice Hall
TCP header contains a 32-bit Acknowledgement Number field to designate the TCP segment being acknowledged. 22 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Acknowledgement Number field contains the next byte expected—the last byte of the segment being acknowledged, plus one. TCP 179 TCP TCP is AckNum Field Value 85 is AckNum Field Value 80 is AckNum Field Value © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Quiz: A TCP segment contains the following data octets: ◦ 567, 568, 569, 570, 571, 572, 573, 574 What will be in the sequence number field of the TCP segment delivering the data? What will be in the acknowledgement number field of the TCP segment acknowledging the TCP segment that delivers these octets? 24 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Flow Control ◦ One TCP process transmits too fast. ◦ Other TCP process is overwhelmed. ◦ Receiver must control transmission rate. ◦ This is flow control. 25 TCP Process Too Much Data Flow Control Message © 2011 Pearson Education, Inc. Publishing as Prentice Hall
A TCP segment has a Window Size field. ◦ Used in acknowledgements 26 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6) Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
A TCP segment has a Window Size field. ◦ Tell how many more octets the sender can send beyond the segment being acknowledged 27 TCP Process Data Acknowledgement with Window Size Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Example ◦ TCP segment contained octets 45–89 ◦ Acknowledgement number for TCP segment acknowledging the segment is 90 ◦ If Window Size field value is 50, then ◦ Sender may send through octet 140 ◦ Must then stop unless the window has been extended in another acknowledgement 28 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Each Acknowledgement extends the window of octets that may be sent. ◦ Called a sliding window protocol 29 1–4445 – 7980 – – May send through – 4445 – 7980 – – May send through 920 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
TCP Segments have maximum data field sizes. ◦ (Size limit details are discussed later.) ◦ What if an application layer message is too large? 30 TCP HeaderTCP Data Field Max Application Layer Message © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Application layer message must be fragmented. ◦ Broken into several pieces ◦ Delivered in separate TCP segments 31 TCP HeaderTCP Data Field Max App Frag 1App Frag 2App Frag 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Note that, in TCP fragmentation, the TCP segment is not fragmented. ◦ The application layer message is fragmented. 32 TCP HeaderTCP Data Field Max App Frag 1App Frag 2App Frag 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Transport layer process on the source host does the fragmentation. ◦ Application layer on the source host is not involved ◦ Transparent to the application layer 33 Application Transport Internet Application Message TCP Segment © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Transport layer process on the destination host does the reassembly. ◦ Application layer on the destination host is not involved; gets original application layer message 34 Application Transport Internet Application Message TCP Segment © 2011 Pearson Education, Inc. Publishing as Prentice Hall
What is the maximum TCP data field size? ◦ Complex Maximum Segment Size (MSS) ◦ Maximum size of a TCP segment’s data field ◦ NOT maximum size of the segment as its name would suggest!!! 35 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MSS Default is 536 octets. ◦ Maximum IP packet size any network must support is 576 octets. Larger IP packets MAY be fragmented ◦ IP and TCP headers are 20 octets each if there are no options. ◦ This gives the default MSS of 536. ◦ Smaller if there are options in the IP or TCP header. 36 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MSS Default is 536 octets. ◦ Suppose the application layer process is 1,000 octets long. ◦ Two TCP segments will be needed to send the data. ◦ The first can send the first 536 octets. ◦ The second can carry the remaining 464 octets of the application layer message. 37 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Each side may announce a larger MSS. ◦ An option usually used in the initial SYN message it sends to the other. ◦ If announces MSS of 2,048, this many octets of data may be sent in each TCP segment. ◦ 536 is only the default—the value to use if no other value is specified by the other side. 38 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operation IP mask operations IP Version 6IP fragmentationDynamic routing protocolsAddress Resolution ProtocolIP Address ClassesMobile IP 39 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Masks were introduced in Chapter 9. IP addresses alone do not tell you the size of their network or subnet parts. Network Mask ◦ Has 1s in the network part ◦ Has 0s in the remaining bits Subnet Mask ◦ Has 1s in the network plus subnet parts ◦ Has 0s in the remaining bits 40 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Based on Logical AND ◦ Both must be true for the result to be true Example ◦ Data ◦ Mask ◦ Result 41 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Based on Logical AND ◦ If mask bit is 1, get back original data ◦ If mask bit is 0, bet back zero Example ◦ Data ◦ Mask ◦ Result 42 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP packet arrives at a router ◦ Router sees destination IP address ◦ Compares to each router forwarding table row ◦ Address Part in First Entry ◦ ◦ Mask in First Entry ◦ © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Mask the IP destination Address ◦ (IP address) ◦ (mask) ◦ (result) Compare Result with First Entry Address part ◦ (address part) ◦ (result) The Entry is a Match! 44 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Recap ◦ Read destination IP address of incoming IP packet. ◦ For each entry in the router forwarding table Read the mask (prefix). Mask the incoming IP address. Compare the result with the entry’s IP address part. Do they match or not? 45 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Simple for Computers ◦ Computers have circuitry AND two numbers. ◦ Computers have circuitry to COMPARE two numbers to see if they are equal or not. ◦ Very computer-friendly, so used on routers. Difficult for people, unfortunately 46 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operations IP Version 6 IP fragmentationDynamic routing protocolsAddress Resolution ProtocolIP Address ClassesMobile IP 47 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
The dominant version of the Internet Protocol is Version 4 (v4). ◦ Earlier versions were not implemented The emerging version is Version 6 (v6). ◦ V5 was defined but not implemented ◦ Informally called IPng (Next Generation) IPv6 is already defined. ◦ Continuing improvements in V4 may delay its adoption 48 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IPv6 raises the size of the Internet address field from 32 bits to 128 bits. ◦ We are running out of IP V4 addresses. ◦ V6 will solve the problem. ◦ But current work-arounds are delaying the need for IPv6 addresses—mostly Network Address Translation. 49 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Improved Security ◦ But, through IPsec, v4 is being upgraded in security as well Improved Quality of Service (QoS) ◦ But, under IETF Differentiated Services (diffserv) initiative, IPv4 is being upgraded in this area as well 50 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Extension Headers ◦ IPv4 headers are complex. ◦ IPv6 basic header is simple. ◦ IPv6 uses extension headers for options. 51 Basic Header Extension Header 1 Extension Header 2 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Extension Headers ◦ Basic header has 8-bit Next Header field ◦ Identifies first extension header or says that payload follows 52 Basic Header Extension Header 1 Extension Header 2 NH © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Extension Headers ◦ Each extension header also has 8-bit Next Header field ◦ Identifies next extension header or says that payload follows 53 Basic Header Extension Header 1 Extension Header 2 NH © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Extension Headers ◦ Next header field is an elegant way to allow options ◦ Easy to add new extension headers for new needs 54 Basic Header Extension Header 1 Extension Header 2 NH © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operationsIP Version 6 IP fragmentation Dynamic routing protocolsAddress Resolution ProtocolIP Address ClassesMobile IP 55 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Maximum Transmission Unit (MTU) ◦ Largest IP packet a network will accept ◦ Arriving IP packet may be larger 56 IP Packet MTU © 2011 Pearson Education, Inc. Publishing as Prentice Hall
If IP packet is longer than the MTU, the router breaks packet into smaller packets. ◦ Called IP fragments ◦ Fragments are still IP packets ◦ Earlier in Mod A, fragmentation in TCP 57 IP Packet IP Packets Fragmentation MTU 3 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
What is Fragmented? ◦ Only the original data field ◦ New headers are created 58 IP Packet IP Packets Fragmentation MTU 3 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
What Does the Fragmentation? ◦ The router ◦ Not the subnet 59 IP Packet IP Packets Fragmentation MTU 3 3 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Original packet may be fragmented multiple times along its route. 60 Destination Host Internet Process Source Host Internet Process Fragmentation © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Internet layer process on destination host defragments, restoring the original packet. IP defragmentation only occurs once. 61 Destination Host Internet Process Defragmentation Source Host Internet Process © 2011 Pearson Education, Inc. Publishing as Prentice Hall
More Fragments field (1 bit) ◦ 1 if more fragments ◦ 0 if not ◦ Source host internet process sets to 0 ◦ If router fragments, sets More Fragments field in last fragment to 0 ◦ In all other fragments, sets to Original IP PacketFragments © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP packet has a 16-bit Identification field. 63 Total Length in Bytes (16) Time to Live (8) Options (if any) Version (4) Hdr Len (4) TOS (8) Identification(16 bits) Flags (3)Fragment Offset (13) Source IP Address Destination IP Address Header Checksum (16)Protocol (8) PAD Data Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP packet has a 16-bit Identification field. ◦ Source host internet process places a number in the Identification field. ◦ Different for each original (non-fragmented) IP packet. 64 Total Length in Bytes (16) Time to Live (8) Version (4) Hdr Len (4) TOS (8) Identification(16 bits) Flags (3)Fragment Offset (13) Header Checksum (16)Protocol (8) © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP packet has a 16-bit Identification field. ◦ If router fragments a packet, it places the original Identification field value in the Identification field of each fragment Original IP PacketFragments © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Purpose ◦ Allows receiving host’s internet layer process to know what fragments belong to each original packet ◦ Works even if an IP packet is fragmented several times Original IP PacketFragments © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Fragment offset field (13 bits) is used to reorder fragments with the same Identification field. Contains the data field’s starting point (in octets) from the start of the data field in the original IP packet. 67 Total Length in Bytes (16) Version (4) Hdr Len (4) TOS (8) Identification (16 bits)Flags (3) Fragment Offset (13) © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Receiving host’s internet layer process assembles fragments in order of increasing fragment offset field value. This works even if fragments arrive out of order! It works even if fragmentation occurs multiple times Fragment Offset Field © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP Fragmentation ◦ Data field of a large IP packet is fragmented. ◦ The fragments are sent into a series of smaller IP packets fitting a network’s MTU. ◦ Fragmentation is done by routers. ◦ Fragmentation may be done multiple times along the route. 69 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP Defragmentation ◦ Defragmentation (reassembly) is done once, by destination host’s internet layer process. 70 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All IP packets resulting from the fragmentation of the same original IP packet have the same Identification field value. Destination host internet process orders all IP packets from the same original on the basis of their Fragment Offset field values. More Fragments field tells whether there are no more fragments coming. 71 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operationsIP Version 6IP fragmentation Dynamic routing protocols Address Resolution ProtocolIP Address ClassesMobile IP 72 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Why Dynamic Routing Protocols? ◦ Each router acts independently, based on information in its router forwarding table. ◦ Dynamic routing protocols allow routers to share information in their router forwarding tables. 73 Router Forwarding Table Data © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Routing Information Protocol (RIP) is the simplest dynamic routing protocol. ◦ Each router broadcasts its entire routing table frequently. ◦ Broadcasting makes RIP unsuitable for large networks. 74 Routing Table © 2011 Pearson Education, Inc. Publishing as Prentice Hall
RIP is the simplest dynamic routing protocol. ◦ Broadcasts go to hosts as well as to routers. ◦ RIP interrupts hosts frequently, slowing them down; unsuitable for large networks. 75 Routing Table © 2011 Pearson Education, Inc. Publishing as Prentice Hall
RIP is limited. ◦ RIP routing table has a field to indicate the number of router hops to a distant host. ◦ The RIP maximum is 15 hops. ◦ Farther networks are ignored. ◦ Unsuitable for very large networks. 76 Hop © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Is a Distance Vector Protocol ◦ “New York” starts, announces itself with a RIP broadcast. ◦ “Chicago” learns that New York is one hop away. ◦ Passes this on in its broadcasts. 77 New YorkChicagoDallas 1 hop NY is 1 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Learning Routing Information ◦ “Dallas” receives broadcast from Chicago. ◦ Already knows “Chicago” is one hop from Dallas. ◦ So New York must be two hops from Dallas. ◦ Places this information in its routing table. 78 New YorkChicagoDallas 1 hop NY is 1 NY is 2 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Slow Convergence ◦ Convergence is getting correct routing tables after a failure in a router or link. ◦ RIP converges very slowly. ◦ May take minutes. ◦ During that time, many packets may be lost. 79 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Encapsulation ◦ Carried in data field of UDP datagram Port number is 520 ◦ UDP is unreliable, so RIP messages do not always get through. ◦ A single lost RIP message usually does little or no harm. 80 UDP Header UDP Data Field RIP Message © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Link State Protocol ◦ Link is a connection between two routers. ◦ OSPF routing table stores more information about each link than just its hop count: cost, reliability, and so on. ◦ Allows OSPF routers to optimize routing based on these variables. 81 Link © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Network is Divided into Areas. ◦ Each area has a designated router 82 Area Designated Router © 2011 Pearson Education, Inc. Publishing as Prentice Hall
When a router senses a link state change ◦ Sends this information to the designated router 83 Area Designated Router Notice of Link State Change © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Designed router notifies all routers ◦ Within its area 84 Area Designated Router Notice of Link State Change © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Efficient ◦ Only routers are informed (not hosts). ◦ Usually only updates are transmitted, not whole tables. 85 Area Designated Router Notice of Link State Change © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Fast Convergence ◦ When a failure occurs, a router transmits the notice to the designated router. ◦ Designated router send the information back out to other routers immediately. 86 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Encapsulation ◦ Carried in data field of IP packet Protocol value is 89 ◦ IP is unreliable, so OSPF messages do not always get through. ◦ A single lost OSPF message usually does little or no harm. 87 IP Header IP Data Field OSPF Message © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Within a network you control, it is your choice. ◦ Your network is an autonomous system. ◦ Select RIP or OSPF based on your needs. ◦ Interior routing protocol. 88 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
RIP is fine for small networks. ◦ Easy to implement ◦ 15 hops is not a problem ◦ Broadcasting, interrupting hosts are not too important 89 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
OSPF is scalable. ◦ Works with networks of any size ◦ Management complexities are worth the cost in large networks 90 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
To connect different autonomous systems ◦ Must standardize cross-system routing information exchanges ◦ BGP is most popular today ◦ Gateway is the old name for router ◦ Exterior routing protocol 91 Autonomous System Autonomous System BGP © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Distance vector approach ◦ Number of hops to a distant system is stored in the router forwarding table Normally only sends updates 92 Autonomous System Autonomous System BGP © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Encapsulation ◦ BGP uses TCP for delivery ◦ Reliable ◦ TCP is only for one-to-one connections ◦ If a border router connects to multiple external routers, must establish a TCP and BGP connection to each 93 Autonomous System Autonomous System BGP © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operationsIP Version 6IP fragmentationDynamic routing protocols Address Resolution Protocol IP Address ClassesMobile IP 94 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Each host and router on a subnet needs a data link layer address to specify its address on the subnet. ◦ This address appears in the data link layer frame sent on a subnet. ◦ For instance, 48-bit MAC layer frame addresses for LANs. 95 Subnet DA DL Frame for Subnet © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Each host and router also needs an IP address at the internet layer to designate its position in the overall Internet. 96 Subnet © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP address ◦ To guide delivery to destination host across the Internet (across multiple networks) Subnet Address ◦ To guide delivery between two hosts, two routers, and a host and router within a single LAN, Frame Relay network, and so on 97 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
In a company, each person has a company- wide ID number (like IP address). In a company, each person also has a local office number in a building. Paychecks are made out to ID numbers. For delivery, also need to know office number. 98 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Problem ◦ Router knows that destination host is on its subnet based on the IP address of an arriving packet. ◦ Does not know the destination host’s subnet address, so cannot deliver the packet across the subnet. 99 Subnet Subnet Address? Destination Host © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Router creates an ARP Request message to be sent to all hosts on the subnet. ◦ Address resolution protocol message asks “Who has IP address ?” ◦ Passes ARP request to data link layer process for delivery. 100 Subnet ARP Request © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Data link process of router broadcasts the ARP Request message to all hosts on the subnet. ◦ On a LAN, MAC address of 48 ones tells all stations to pay attention to the frame. 101 Subnet ARP Request © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Host with IP address responds. ◦ Internet process creates an ARP Response message. ◦ Contains the destination host’s subnet address (48-bit MAC address on a LAN). 102 Subnet ARP Response © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Router delivers the IP packet to the destination host. ◦ Places the IP packet in the subnet frame ◦ Puts the destination host’s subnet address in the destination address field of the frame 103 Subnet Deliver IP Packet within a Subnet Frame © 2011 Pearson Education, Inc. Publishing as Prentice Hall
ARP Requests and Responses are sent between the internet layer processes on the router and the destination host. 104 Internet Process Router Internet Process Destination Host ARP Request ARP Response © 2011 Pearson Education, Inc. Publishing as Prentice Hall
However, the data link processes deliver these ARP packets. ◦ Router broadcasts the ARP Request. ◦ Destination host sends ARP Response to the subnet source address found in the broadcast frame. 105 Internet Process Router Internet Process Destination Host Broadcast ARP Request Direct ARP Response Data Link Process Data Link Process © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operationsIP Version 6IP fragmentationDynamic routing protocolsAddress Resolution Protocol IP Address Classes Mobile IP 106 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
How large is the network part in an IP address? Today we use network masks to tell. Originally, IP had address classes with fixed numbers of bits in the network part. ◦ Class A: 8 bits (24 bits in local part) ◦ Class B: 16 bits (16 bits in local part) ◦ Class C: 24 bits (8 bits in local part) 107 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All Class A IP addresses begin with 0. 7 remaining bits in network part. ◦ Only 128 possible Class A networks. 24 bits in local part. ◦ Over 16 million hosts per Class A network! All Class A network parts are assigned or reserved. 108 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All Class B IP address begin with 10 (1st zero in 2nd position). 14 remaining bits in network part ◦ Over 16,000 possible Class B networks 16 bits in local part ◦ Over 65,000 possible hosts A good trade-off between number of networks and hosts per network Most have been assigned 109 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All Class C IP address begin with 110 (1st zero in 3d position). 21 more bits in network part ◦ Over 2 million possible Class C networks! 8 bits in local part ◦ Only 256 possible hosts per Class C network! Unpopular, because large firms must have several 110 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All Class D IP address begin with Used for multicasting, not defining networks. ◦ Sending message to group of hosts ◦ Not just to one (unicasting) ◦ Not ALL hosts (broadcasting) ◦ Say, to send a videoconference stream to a group of receivers 111 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
All hosts in a multicast group listen for this multicast address as well as for their specific own host IP address. 112 Packets to Multicast Address Not in Group Reject In Group Accept In Group Accept © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Traditionally, unicasting and broadcasting ◦ Unicasting: send to one host ◦ Broadcasting: send to ALL hosts Multicasting ◦ Send to SOME hosts ◦ 500 stations viewing a video course ◦ 50 computers getting software upgrades ◦ Standards exist and are improving ◦ Not widely used yet 113 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
Do not need to send an IP packet to each host ◦ Single packets go out ◦ Only multiplied when necessary 114 Single Packet Multiple Packets © 2011 Pearson Education, Inc. Publishing as Prentice Hall
MultiplexingDetails of TCP operationIP mask operationsIP Version 6IP fragmentationDynamic routing protocolsAddress Resolution ProtocolIP Address Classes Mobile IP 115 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
IP addresses are associated with fixed physical locations. Mobile IP is needed for notebooks, other portable equipment. Computer still gets a permanent IP address. When travels, also gets a temporary IP address at its location. This is linked dynamically to its permanent IP address. 116 © 2011 Pearson Education, Inc. Publishing as Prentice Hall
117 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall