Presentation on theme: "CHAPTER 5: LINK LAYER & LANS LINK LAYER & LANS Flow Control Flow Control Error Control Error Control Data Link Protocols Data Link Protocols Medium Access."— Presentation transcript:
CHAPTER 5: LINK LAYER & LANS LINK LAYER & LANS Flow Control Flow Control Error Control Error Control Data Link Protocols Data Link Protocols Medium Access Control Medium Access Control IEEE 802 Standards IEEE 802 Standards Multiprotocol Label Switching Multiprotocol Label Switching Example: Tracing A Web Page Request Example: Tracing A Web Page Request
FLOW CONTROL Page 117Chapter 5CS 447 frameframeframeframeframeframeframeframeframeframe NetworkNodeNetworkNode When a network node transmits frames faster than the next network node can “digest” them, the receiver will usually just discard the excess frames. To combat this problem, the Data Link Layer protocol usually contains some kind of “flow control” mechanism.
STOP-AND-WAIT Page 118Chapter 5CS 447 ACK #6 ACK #5 ACK #4 frame #6 frame #5 frame #4 ACK #3 ACK #2 ACK #1 frame #3 frame #2 frame #1 NetworkNode NetworkNode One approach to Data Link Layer flow control is for the receiving node to respond with an acknowledgement whenever it has finished dealing with the previous frame and is ready to receive the next frame. Variations on this approach include: “Piggybacking” ACKs on frames going the opposite direction on the link, in order to reduce line utilization.“Piggybacking” ACKs on frames going the opposite direction on the link, in order to reduce line utilization. Sending negative acknowledgements whenever a received frame is corrupted or whenever a frame is not received in a timely fashion.Sending negative acknowledgements whenever a received frame is corrupted or whenever a frame is not received in a timely fashion. Retransmitting a frame automatically whenever an ACK is not received in a timely fashion.Retransmitting a frame automatically whenever an ACK is not received in a timely fashion.
SLIDING WINDOWS Page 119Chapter 5CS 447 By increasing the memory on each network node and using a more sophisticated algorithm for keeping track of which frames have and haven’t been accepted, traffic can flow more smoothly between the nodes. Sending Node (window size 8) Receiving Node F3 F2 F1 F0 F5 F4 Sending Node (window size 2) Receiving Node F3 F5 F4 ACK (awaiting F3) Sending Node (window size 5) Receiving Node ACK (awaiting F7) F7 F0 F2 F1 Sending Node (window size 4) Receiving Node F4 F3 F5 F7 F6 F0 F2 F1 Sending Node (window size 0) STOP Receiving Node F0 F7 F1 F3 F2 F4 F6 F5 Sending Node (window size 0) STOP Receiving Node
ERROR CONTROL Page 120Chapter 5CS 447 faerm??? frame Error control at the Data Link Layer is concerned with the detection (and, if possible, the correction) of lost or corrupted frames between consecutive network nodes. NetworkNodeNetworkNodeframe NetworkNodeNetworkNode
ERROR DETECTION: PARITY CHECK Page 121Chapter 5CS 447 One way to detect transmission errors is by using parity bits to ensure that each segment of data has an even number of 1’s (even parity) or an odd number of 1’s (odd parity), depending on which type of parity the protocol is using. Wants to send message “YO!” in ASCII, using even parity. ASCII ‘Y’ is 1011001, so tack on a ___ ASCII ‘O’ is 1001111, so tack on a ___ ASCII ‘!’ is 0010001, so tack on a ___ 0 1 0 So, the transmitted message is: 10110010 10011111 00100010 Received message is: 10110010 10011111 00110010 First byte is 10110010, with even parity, so it’s ASCII ‘Y’ Second byte is 10011111, with even parity, so it’s ASCII ‘O’ Third byte is 00110010, with odd parity, so it’s an error!!! One major problem with parity checking: if a segment has an even number of corrupted bits, no error is detected! 101100101001111100100011 NetworkNodeNetworkNode
ERROR DETECTION: CYCLIC REDUNDANCY CHECK Page 122Chapter 5CS 447 For more effective error detection, the cyclic redundancy check was developed. 1. Both stations agree upon a binary “generator”, for example: 110101 2.The sending station tacks len(generator)- 1 0’s onto its binary message and does a modulo-2 division by the generator. For example, if the original message is 100011011001000111 with generator 110101, then the division at right is performed: 10001101100100011100000 110101 1 1 110101 101100101100 1111 110101 110011110011 111111 110101 0011010000110100 111001111001 110101 00001100010000110001 1110010000111100100001 110101 0010011000100110 1110010000100111100100001001 110101 100110100110 111001000010011111001000010011 110101 100110100110 11100100001001111110010000100111 110101 100110100110 1110010000100111111100100001001111 110101 100110100110 111001000010011111111001000010011111 110101 1001110011 3.The sending station transmits its message, with the remainder of the above quotient added as a suffix. Actual transmission: 10001101100100011110011 Actual transmission: 10001101100100011110011
CRC AT THE RECEIVER Page 123Chapter 5CS 447 4.The receiving station performs a modulo-2 division by the generator on the received message (including the appended CRC suffix). 5.If the remainder of this quotient is non-zero, then a transmission error has occurred. Otherwise, we’re reasonably certain that there’s been no error! 10001101100100011110011 1101011110101 10110011110101 110011111110101 00110100111001110101 000011000111100100001110101 0010011111100100001001110101 100100111001000010011110101 1000101110010000100111110101 10111111100100001001111110101 110101111001000010011111110101 00000
FRAME FORMATS Page 124Chapter 5CS 447 When formatting the Data Link Layer’s frames for transmission on the Physical Layer, it’s necessary to mark the frame with a header so the receiving network node will recognize the beginning of the frame. Network Layer Packet Special Data Link Header To enable the receiver to recognize the end of the frame, several options exist. Network Layer Packet Special Data Link Header Include a size field in the header Network Layer Packet Special Data Link Header Use a standard size for all frames Network Layer Packet Special Data Link Header Include a special trailer coded with a bit sequence that’s guaranteed not to occur in the rest of the frame Special Trailer
SPECIFIC DATA LINK PROTOCOLS Page 125Chapter 5CS 447 A variety of Data Link Layer framing formats have been developed. Developed by the OSI folks, the High-Level Data Link Control protocol is commonly used in traditional packet-switching networks, like X.25. Developed by the TCP/IP folks, the Serial Line Internet Protocol and the Point-To-Point Protocol are used to send IP datagrams across slow serial lines. Asynchronous Transfer Mode was developed to address the transition of communication data from voice and text to multimedia.
HIGH-LEVEL DATA LINK CONTROL Page 126Chapter 5CS 447 0111111001111110AddressAddressControlControlDataData CRC Checksum 0111111001111110 AddressAddressControlControlDataData 01111110011111100111111001111110 Delimiting fields to mark the beginning and ending of the frame. Require bit stuffing! Address field to identify the specific node with which communication is occurring in a multipoint line. (Not used in a meaningful way in a point-to-point line.) Control field to identify the type of frame being transmitted: Information frames start with a zero, followed by a 3- or 7-bit sequence number (for sliding window purposes), a bit to indicate whether this is a polling frame (from the multipoint primary station) or a final frame in a sequence (from a multipoint secondary station), and a 3- or 7-bit ACK sequence number. Supervisory frames start with a 10, followed by a 2-bit type (ACK, NAK/Go- Back-N, ACK/Halt, or NAK/S-R), a Poll/Final bit, and an ACK sequence number. Unnumbered frames start with a 11, followed by a 1-bit Poll/Final bit, and a 5-bit command (Frame Reject, Disconnect, Set Up Link w/Asynchronous Response Mode, Set Up Link w/Normal Response Mode, etc.) Data field containing the Network Layer bits that were handed down to it. Checksum field to perform the good ol’ Cyclic Redundancy Check!
SERIAL LINE INTERNET PROTOCOL Page 127Chapter 5CS 447 1100000011000000 “Stuffed” IP Datagram 1100000011000000 Delimiting fields at the beginning and ending of the frame. Require byte stuffing! The Network Layer’s data (i.e., IP’s datagram), stuffed to ensure that the delimiter never occurs: whenever 11000000 occurs in the data, it’s replaced with 11011011 11011100, and whenever 11011011 occurs in the data, it’s replaced with 11011011 11011101. “Stuffed” IP Datagram 11000000110000001100000011000000 Note that SLIP has several problems: It only works with IP; no other Network Layer protocol is supported.It only works with IP; no other Network Layer protocol is supported. It does no error checking, leaving such problems to the higher layers.It does no error checking, leaving such problems to the higher layers. Addresses must be known in advance by both communicating nodes, since no address fields are available.Addresses must be known in advance by both communicating nodes, since no address fields are available. It isn’t an approved IP standard, so numerous, incompatible versions exist.It isn’t an approved IP standard, so numerous, incompatible versions exist. Why is SLIP popular in spite of these problems? There are free versions readily available, all working with the ubiquitous EIA-232D modem interface!There are free versions readily available, all working with the ubiquitous EIA-232D modem interface!
POINT-TO-POINT PROTOCOL Page 128Chapter 5CS 447 Delimiting fields at the beginning and ending of the frame. Just require bit stuffing! Address field always uses the value 11111111, signifying that every transmission is a broadcast! Control field always uses the value 00000011, signifying that every transmission is unnumbered (i.e., sliding windows are not supported!). Payload field containing the Network Layer bits that were handed down to it, or the link control or network control message being relayed. Checksum field to again perform our old friend, the Cyclic Redundancy Check! 0111111001111110AddressAddressControlControlPayloadPayload CRC Checksum 0111111001111110ProtocolProtocol AddressAddressControlControlPayloadPayload 01111110011111100111111001111110 ProtocolProtocol Protocol field to identify the type of data in the Payload field: Protocol 00000000 00100001 means the payload is an IP datagram. Protocol 11000000 00100001 means the payload is link control data, used to establish, configure, and test the particular link being used. Protocol 10000000 00100001 means the payload is network control data, used to identify the Network Layer protocol being used (e.g., IP, AppleTalk, OSI, DECnet). Protocol field to identify the type of data in the Payload field: Protocol 00000000 00100001 means the payload is an IP datagram. Protocol 11000000 00100001 means the payload is link control data, used to establish, configure, and test the particular link being used. Protocol 10000000 00100001 means the payload is network control data, used to identify the Network Layer protocol being used (e.g., IP, AppleTalk, OSI, DECnet).
ASYNCHRONOUS TRANSFER MODE Page 129Chapter 5CS 447 The Virtual Path Identifier (VPI) specifies the number of a particular path that several virtual circuits take through the network node; by hierarchically identifying such routes, individual nodes may just use this prefix to forward a cell, rather than having to examine the entire path/circuit sequence. The Virtual Circuit Identifier (VCI) completes the identification of the particular virtual circuit being used. The Payload Type Identifier (PTI) signifies the sort of data being transmitted: 000 and 001 signify uncongested user data cells (with a Final bit on the end). 010 and 011 signify congested user data cells (with a Final bit on the end). 100 and 101 signify maintenance info (locally or end-to-end). 110 signifies the cell is relaying end-to-end congestion info. The Payload Type Identifier (PTI) signifies the sort of data being transmitted: 000 and 001 signify uncongested user data cells (with a Final bit on the end). 010 and 011 signify congested user data cells (with a Final bit on the end). 100 and 101 signify maintenance info (locally or end-to-end). 110 signifies the cell is relaying end-to-end congestion info. The Header Error Check (HEC) byte is a CRC remainder for just the header. The 48-byte Payload includes the data and any AAL (ATM Adaptation Layer) headers that might have been added at the protocol layer above ATM. VPIVCIPTIHECPayloadCLP The Cell Loss Priority (CLP) bit is used to distinguish high- and low-priority traffic. VPIVCIPTIHECPayloadCLP
MEDIUM ACCESS CONTROL Page 130Chapter 5CS 447 Various algorithms have been formulated for providing access to a shared transmission channel to multiple independent stations. frameframe frameframe frameframeframeframe Contention Systems Carrier Sense Systems frameframe Reservation Systems frameframe reserv. 00:00:0500:00:0400:00:0300:00:0500:00:0400:00:0300:00:0200:00:0500:00:0400:00:0300:00:0200:00:0100:00:00 frameframe frameframe frame w/reserv.
CSMA/CD Page 131Chapter 5CS 447 I haven’t heard anything for a while, so I’m sending! 110100010101001010101010 Everything I’ve heard so far is exactly what I’ve been sending! 0011100100001010111100101001011011110100010101001010101010 I haven’t heard anything for a while, so I’m sending! 111000111110100111100 That’s not what I sent! COLLISION!!! COLLISION!!! 100010101110100101010101101001011010101000010110101010101010101001010111010101000110111001010
IEEE 802 STANDARDS Page 132Chapter 5CS 447 The IEEE 802 Local and Metropolitan Area Network Standards Committee has the basic charter to create, maintain, and encourage the use of IEEE/ANSI and equivalent IEC/ISO JTC 1 standards primarily within layers 1 and 2 of the OSI (Open System Interconnection) Reference Model. The committee was formed in February 1980 and met at least three times per year as a Plenary body ever since that time. An explicit objective since inception has been the goal of establishing international standards in JTC 1. The IEEE series of standards are known as IEEE 802.xxx and the JTC 1 series of equivalent standards are known as ISO 8802-nnn. In the IEEE 802 context, "local" means campus and "metropolitan" means intra-city.
IEEE 802.1: HIGHER-LAYER LAN PROTOCOLS Page 133Chapter 5CS 447 Internetworking standards for bridging different LAN and MAN protocols.
IEEE 802.2: LOGICAL LINK CONTROL Page 134Chapter 5CS 447 The LLC sits on top of the Medium Access Control sublayer of the Data Link Layer, and is responsible for: Framing Network Layer packets Link synchronization Message acknowledgement Error detection and possible recovery Flow control Physical Layer Data Link Layer Network Layer Medium Access Control Sublayer Logical Link Control Sublayer Transport Layer Session Layer Presentation Layer Application Layer Current Status: INACTIVE
IEEE 802.3: ETHERNET Page 135Chapter 5CS 447 10Base-T twisted pair Ethernet connection with RJ-45 jack 10Base-2 coax Ethernet connection with T-junction tap 10Base-5 coax Ethernet cable, capable of 10Mbps 10Base-F fiber optics Ethernet hub
ETHERNET FRAME FORMAT Page 137Chapter 5CS 447 Preamble: Seven Manchester-encoded 10101010-bytes to enable synchronization. Start: One Manchester-encoded 10101011-byte to delimit the start of the frame. Destination Address: 2- or 6-byte Ethernet card address, burned into the card. Data: The actual data handed down from the Network Layer. Checksum: 4-byte Cyclic Redundancy Check. Length: 2-byte length of the data field (range: 0-1500 bytes). PreamblePreambleStartStartDestinationAddressDestinationAddressDataDataPaddingPaddingChecksumChecksumSourceAddressSourceAddressLengthLength Source Address: 2- or 6-byte Ethernet card address, burned into the card. Padding: 0-46 bytes of dummy info, to ensure a 64-byte minimum frame length. PreamblePreambleStartStartDestinationAddressDestinationAddressDataDataPaddingPaddingChecksumChecksumSourceAddressSourceAddressLengthLength
BINARY EXPONENTIAL BACKOFF ALGORITHM Page 138Chapter 5CS 447 When a collision does occur on Ethernet, each station must retransmit, but they’d like to avoid another collision, so they independently generate random wait times before their attempted retransmissions. 00:00:00 00:00:0100:00:00 00:00:0100:00:00 00:00:0200:00:0100:00:00 00:00:0500:00:0400:00:0300:00:0200:00:0100:00:00 00:00:0300:00:0200:00:0100:00:00 frame COLLISION! Pick a wait time between 0 and 1: 0 COLLISION! 1 COLLISION! Pick a wait time between 0 and 3: 1 COLLISION! 2 COLLISION! Pick a wait time between 0 and 7: 5 COLLISION! 3
IEEE 802.4: TOKEN BUS Page 139Chapter 5CS 447 P=4;S=7P=7;S=6P=4;S=7P=2;S=9P=1;S=3P=5;S=4 P=8;S=5P=9;S=1P=3;S=8P=6;S=2 To preserve the simplicity of the bus structure, while eliminating the unpleasantness of collisions, 802.4 passes a special “token” from station to station, using a prearranged predecessor/successor numbering system. When a station receives the token, it has “permission” to transmit normally across the bus. It is allowed to transmit for a certain length of time, then it must pass the token to its successor. Current Status: DISBANDED
IEEE 802.5: TOKEN RING Page 140Chapter 5CS 447 Current Status: DISBANDED
IEEE 802.6: DISTRIBUTED QUEUE/DUAL BUS Page 141Chapter 5CS 447 Current Status: DISBANDED Two buses are maintained, with data flowing in opposite directions, and every networked machine connected to both buses. Each bus has a head-end that generates 53-byte cells, which can be filled by the machines that are passed according to an access protocol. Access Node Slot Generator Bus Terminator Slot Generator Bus Terminator empty slot full slot empty slot full slot empty slot full slot empty slot full slot empty slot full slot empty slot full slot
MORE DISBANDED GROUPS Page 142Chapter 5CS 447 IEEE 802.7: Broadband Implementing broadband on LANs using coaxial cable IEEE 802.8: Fiber Optics Physical Layer interfaces and MAC sublayer protocols IEEE 802.9 Integrated Data And Voice Bundling ISDN and Ethernet onto a single cable IEEE 802.10: Interoperable LAN Security Security functions that could be used in LANs and MANs IEEE 802.12: Demand Priority Access Method Effort to combine benefits of Ethernet and Token Ring IEEE 802.13: The Group That Shall Not Be Named Triskaidekaphobia IEEE 802.14: Cable Modems Cable operators ultimately set up their own standard Current Status: DISBANDED
IEEE 802.11: WIRELESS LANS Page 143Chapter 5CS 447 This “Wi-Fi” protocol divide the world into three regions for the purpose of frequency allocation. Region 1 (includes Europe and Africa) Digital European Cordless Telecommunications High Performance European Radio LAN Groupe Speciale Mobile Region 2 (includes United States) FCC-governed Spread Spectrum Personal Communication Services Region 3 (includes Japan and Australia) The standard includes specs on: MAC protocol (no collision detection)MAC protocol (no collision detection) Encryption algorithmEncryption algorithm Minimal battery capabilitiesMinimal battery capabilities Vendor licensingVendor licensing
IEEE 802.15: WIRELESS PANS Page 144Chapter 5CS 447 Personal area networks include Bluetooth’s “piconets”, small localized networks of devices that communicate with each other by perpetually hopping between frequencies in a manner that prevents mutual interference as well as external eavesdropping. By sharing “slave” devices across piconets, “master” devices can form larger “scatternets”.
IEEE 802.16: BROADBAND WIRELESS ACCESS Page 145Chapter 5CS 447 WirelessHUMAN (Wireless High-Speed Unlicensed Metropolitan Network) Systems Local Multipoint Distribution System With new high-speed wireless techniques being developed, it’s possible to advance from the small wireless LAN system to a more sophisticated wireless MAN system, potentially supplying powerful, upgradeable communications systems to residential and industry customers.
IEEE 802.17: RESILIENT PACKET RING Page 146Chapter 5CS 447 A ring-based protocol with prioritization and fairness built in, it eliminates the token used in FDDI and the need for master nodes of DQDB. TDM channels are established dynamically.TDM channels are established dynamically. Channel bandwidths are allowed to change dynamically.Channel bandwidths are allowed to change dynamically. Multicasting is built in to the protocol.Multicasting is built in to the protocol. Simplex channels are used, supporting asymmetric communication and high bandwidth utilization simultaneously.Simplex channels are used, supporting asymmetric communication and high bandwidth utilization simultaneously.
AND THE REST... Page 147Chapter 5CS 447 IEEE 802.18: Radio Regulatory Technical Advisory Group Monitor and actively participate in ongoing radio regulatory activities, at the national and international levels. IEEE 802.20: Mobile Broadband Wireless Access Develop the specification for an efficient packet-based air interface that is optimized for the transport of IP-based services. The goal is to enable worldwide deployment of affordable, ubiquitous, always-on and interoperable multi-vendor mobile broadband wireless access networks that meet the needs of business and residential end user markets. IEEE 802.19: Coexistence Technical Advisory Group Develop and maintain policies defining the responsibilities of 802 standards developers to address issues of coexistence with existing standards and other standards under development. IEEE 802.21: Media Independent Handoff Develop and supports algorithms enabling seamless handover between networks of the same type as well as handover between different network types (e.g., cellular, mobile, packet radio, wireless LAN, and wireless PAN). IEEE 802.22: Wireless Regional Area Network Develop a standard for a cognitive radio- based PHY/MAC/air interface for use by license-exempt devices on a non- interfering basis in spectrum that is allocated to the TV Broadcast Service. IEEE 802.23: Emergency Service Working Group Define a media-independent framework to provide consistent access and data that facilitate compliance to applicable civil authority requirements for transferring data required by an emergency services request.
VIRTUAL LANS Page 148Chapter 5CS 447 There are occasions when it is beneficial to give a collection of endstations the characteristics of a LAN, in spite of their lack of physical proximity. The Benefits of the VLAN Approach: VLANs improve security by isolating groups. High-security users can be grouped into a VLAN, possibly on the same physical segment, and no users outside that VLAN can communicate with them. VLANs facilitate broadcast control by allowing stations to be grouped by functionality instead of physical location. VLANs also facilitate network management by allowing configuration changes to take place without recabling. VLANSwitchVLANSwitch VLANSwitchVLANSwitch RouterRouter VLAN 1 VLAN 2 VLAN 3 VLAN 4 VLAN 1 VLAN 2 VLAN 3 VLAN 1 VLAN 2 VLAN 1 VLAN 2 VLAN 4 VLAN 1 VLAN 2 VLAN 4
MULTIPROTOCOL LABEL SWITCHING Page 149Chapter 5CS 447 MPLS was originally designed as a mechanism for speeding up the routing of IP packets over ATM networks. Advances in switching hardware have transformed the main advantage of MPLS into its ability to support multiple service models and to perform traffic management.
MPLS LABEL STACK Page 150Chapter 5CS 447 Internal MPLS routers examine only the top label in a packet’s label stack, disregarding all lower level information (ATM, PPP, Frame Relay, etc.). LabelTCBSTTLLabel TCBSTTL Label: Label lookup ID number, which is swapped as the packet progresses from router to router within the MPLS network. Traffic Class:Signifies quality of service priority and explicit congestion notification. Bottom-of-Stack Flag: When set, indicates the last label in the packet’s label stack. Time-to-Live: 8-bit hop countdown before packet is discarded as undeliverable. The label stack essentially establishes a hierarchical virtual private network (VPN) that provides traffic isolation and differentiation without substantial overhead.
TRACING A WEB PAGE REQUEST Page 151Chapter 5CS 447 Having examined the protocol stack from the Application Layer, through the Transport and Network Layers, and all the way down to the Data Link Layer, let’s pull it all together and trace what happens as a student attaches a laptop to the campus network and accesses Google... browser web page
router (runs DHCP) STUDENT CONNECTS TO INTERNET Page 152Chapter 5CS 447 1. The connecting laptop needs to get its own IP address, the address of a first-hop router, and the address of a DNS server: use DHCP (Dynamic Host Configuration Protocol) DHCPUDPIPEthPhy DHCP DHCP DHCP DHCP DHCPUDPIPEthPhy DHCP DHCP DHCP DHCP The DHCP request is encapsulated in UDP, then in IP, and ultimately in Ethernet The DHCP request is encapsulated in UDP, then in IP, and ultimately in Ethernet An Ethernet frame is broadcast (with destination FFFFFFFFFFFF) on the LAN, and is received at the router running the DHCP server An Ethernet frame is broadcast (with destination FFFFFFFFFFFF) on the LAN, and is received at the router running the DHCP server The Ethernet payload is demultiplexed to IP, then to UDP, and finally to DHCP The Ethernet payload is demultiplexed to IP, then to UDP, and finally to DHCP
router (runs DHCP) STUDENT CONNECTS TO INTERNET (continued) Page 153Chapter 5CS 447 2. The DHCP server formulates a DHCP ACK, containing the client’s IP address, the IP address of the first-hop router for client, and the name and IP address of the DNS server DHCP UDP IP Eth Phy DHCP UDP IP Eth Phy DHCP The DHCP server encapsulates the ACK, that frame is forwarded through the LAN, back to the student’s machine, where it is demultiplexed The DHCP client (i.e., the student’s laptop) has now received the DHCP ACK reply, with its own IP address, the IP address of its first-hop router, and the name and address of the DNS server
RETRIEVING GOOGLE’S ADDRESS Page 154Chapter 5CS 447 3. Before sending its HTTP request, the student’s laptop needs the IP address of www.google.com: Use DNS DNSUDPIPEthPhy DNS DNS DNS A DNS query is created and encapsulated in UDP, IP, and Ethernet. In order to send the frame to the router, the MAC address of the router interface is needed: use ARP A DNS query is created and encapsulated in UDP, IP, and Ethernet. In order to send the frame to the router, the MAC address of the router interface is needed: use ARP An ARP query is broadcast and received by the router, which replies with an ARP reply giving the MAC address of the router interface An ARP query is broadcast and received by the router, which replies with an ARP reply giving the MAC address of the router interface The client now knows the MAC address of its first-hop router, so it can now send a frame containing DNS query The client now knows the MAC address of its first-hop router, so it can now send a frame containing DNS query ARP query EthPhyARP ARP ARP reply
RETRIEVING GOOGLE’S ADDRESS (continued) Page 155Chapter 5CS 447DNS DNS An IP datagram containing the DNS query is forwarded via the LAN switch from the client to its first-hop router An IP datagram containing the DNS query is forwarded via the LAN switch from the client to its first-hop router The IP datagram is forwarded from the campus network into the Charter network, and then routed (via tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to the DNS server The IP datagram is forwarded from the campus network into the Charter network, and then routed (via tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to the DNS server The datagram is demultiplexed to the DNS server, which replies to the client with the IP address of www.google.comDNSUDPIPEthPhy DNS DNS DNS DNS
ESTABLISHING TCP CONNECTION Page 156Chapter 5CS 447HTTPTCPIPEthPhy HTTP To send its HTTP request, the client first opens a TCP socket to the web server To send its HTTP request, the client first opens a TCP socket to the web server A TCP SYN segment (step 1 in the 3-way handshake) is inter-domain routed to the web server SYN TCP IP Eth Phy SYN The TCP connection is now established SYNACK The web server responds with a TCP SYNACK (step 2 in the 3-way handshake)
INVOKING THE APPLICATION Page 157Chapter 5CS 447HTTPTCPIPEthPhy HTTP The HTTP request is sent into the TCP socket The HTTP request is sent into the TCP socket An IP datagram containing the HTTP request routed to Goggle’s web server An IP datagram containing the HTTP request routed to Goggle’s web serverHTTPTCPIPEthPhy HTTP HTTP HTTP That web server responds with the HTTP reply (containing the Google web page) That web server responds with the HTTP reply (containing the Google web page)HTTP HTTP HTTP HTTPHTTP An IP datagram containing the HTTP reply is routed back to the client An IP datagram containing the HTTP reply is routed back to the client HTTP HTTPHTTPHTTP HTTP The Google web page is displayed The Google web page is displayed