Upload
jasper-weaver
View
245
Download
0
Tags:
Embed Size (px)
Citation preview
CHAPTER 5: LINK LAYER & LANS
• Flow Control• Error Control• Data Link Protocols• Medium Access Control• IEEE 802 Standards• Multiprotocol Label Switching• Example: Tracing A Web Page Request
FLOW CONTROL
Page 2Chapter 5CS 447
frame frameframeframeframeframeframe frame frame frame
NetworkNode
NetworkNode
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 3Chapter 5CS 447
ACK #6ACK #5ACK #4 frame #6frame #5frame #4ACK #3ACK #2ACK #1 frame #3frame #2frame #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.
• 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.
SLIDING WINDOWS
Page 4Chapter 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
F4ACK(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 5Chapter 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.
NetworkNode
NetworkNode
frameNetworkNode
NetworkNode
ERROR DETECTION:PARITY CHECK
Page 6Chapter 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 ___
010
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!
101100101001111100100011Network
NodeNetwork
Node
ERROR DETECTION:CYCLIC REDUNDANCY CHECK
Page 7Chapter 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:
1000110110010001110000010001101100100011100000110101 1 1
110101
101100101100
1111
110101
110011110011
111111
1101010011010000110100
111001111001
110101
00001100010000110001
1110010000111100100001
1101010010011000100110
1110010000100111100100001001
110101
100110100110
111001000010011111001000010011
110101100110100110
11100100001001111110010000100111
110101
100110100110
1110010000100111111100100001001111
110101100110100110
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 8Chapter 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!
10001101100100011110011110101
1
110101
101100
11
110101110011
111
11010100110100
111001
1101010000110001
11100100001
11010100100111
11100100001001
110101100100
111001000010011
110101100010
1110010000100111
110101101111
11100100001001111
110101110101
111001000010011111
11010100000
FRAME FORMATS
Page 9Chapter 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 PacketSpecial Data Link Header
To enable the receiver to recognize the end of the frame, several options exist.
Network Layer PacketSpecial Data Link Header
Include a size field in the header
Network Layer PacketSpecial Data Link
Header
Use a standard size for all frames
Network Layer PacketSpecial 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 10Chapter 5CS 447
A variety of Data Link Layer framing formats have been developed.
HDLCDeveloped by the OSI folks, the High-Level
Data Link Control protocol is commonly used in traditional packet-switching networks, like
X.25.
SLIP
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.
PPP
ATMAsynchronous Transfer Mode was
developed to address the transition of communication data from voice and text
to multimedia.
HIGH-LEVEL DATA LINK CONTROL
Page 11Chapter 5CS 447
01111110 Address Control Data CRC Checksum 01111110Address Control Data CRC Checksum01111110 01111110
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 12Chapter 5CS 447
11000000 “Stuffed” IP Datagram 11000000
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.
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 Datagram11000000 11000000
Note that SLIP has several problems:• It only works with IP; no other Network Layer protocol is
supported.• 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.• 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!
POINT-TO-POINT PROTOCOL
Page 13Chapter 5CS 447
Delimiting fields at the beginning and ending of the frame. Just require bit stuffing!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!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!).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.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!Checksum field to again perform our old friend, the Cyclic Redundancy Check!
01111110 Address Control Payload CRC Checksum 01111110ProtocolAddress Control Payload CRC Checksum01111110 01111110Protocol
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 14Chapter 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 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 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 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.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.
VPI VCI PTI HEC PayloadCLP
The Cell Loss Priority (CLP) bit is used to distinguish high- and low-priority traffic.The Cell Loss Priority (CLP) bit is used to distinguish high- and low-priority traffic.
VPI VCI PTI HEC PayloadCLP
MEDIUM ACCESS CONTROL
Page 15Chapter 5CS 447
Various algorithms have been formulated for providing access to a shared transmission channel to multiple independent stations.
frame frame frame
Contention Systems
Carrier Sense Systems
Reservation Systems
framereserv.
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
frame w/reserv.
CSMA/CD
Page 16Chapter 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!!!That’s not what I sent!
COLLISION!!!
100010101110100101010101101001011010101000010110101010101010101001010111010101000110111001010
IEEE 802 STANDARDS
Page 17Chapter 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 18Chapter 5CS 447
Internetworking standards for
bridging different LAN and MAN
protocols.
IEEE 802.2:LOGICAL LINK CONTROL
Page 19Chapter 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 20Chapter 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 CONFIGURATIONS
Page 21Chapter 5CS 447
ETHERNET FRAME FORMAT
Page 22Chapter 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).
Preamble StartDestination
AddressData Padding Checksum
SourceAddress
Length
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.
Preamble StartDestination
AddressData Padding Checksum
SourceAddress
Length
BINARY EXPONENTIAL BACKOFF ALGORITHM
Page 23Chapter 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:0000:00:0100:00:00
00:00:0100:00:0000:00:0200:00:0100:00:00
00:00:0500:00:0400:00:0300:00:0200:00:0100:00:0000:00:0300:00:0200:00:0100:00:00
frame frameframe frameframe frameframe
COLLISION!Pick a wait time
between 0 and 1:0
COLLISION!Pick a wait time
between 0 and 1:1
COLLISION!Pick a wait time
between 0 and 3:1
COLLISION!Pick a wait time
between 0 and 3:2
COLLISION!Pick a wait time
between 0 and 7:5
COLLISION!Pick a wait time
between 0 and 7:3
IEEE 802.4:TOKEN BUS
Page 24Chapter 5CS 447
P=4;S=7
P=7;S=6
P=4;S=7P=2;S=9
P=1;S=3
P=5;S=4
P=8;S=5
P=9;S=1
P=3;S=8
P=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 25Chapter 5CS 447
Current Status: DISBANDED
IEEE 802.6:DISTRIBUTED QUEUE/DUAL BUS
Page 26Chapter 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
Access Node
Access Node
Access Node
Access Node
Access Node
Slot Generator
Bus Terminator
Slot Generator
Bus Terminator
empty slot full slot empty slot full slotempty slot full slot
empty slotfull slot empty slot full slotempty slot full slot
MORE DISBANDED GROUPS
Page 27Chapter 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 28Chapter 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)• Encryption algorithm• Minimal battery capabilities• Vendor licensing
IEEE 802.15:WIRELESS PANS
Page 29Chapter 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 30Chapter 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 31Chapter 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.
• Channel bandwidths are allowed to change dynamically.
• Multicasting is built in to the protocol.
• Simplex channels are used, supporting asymmetric communication and high bandwidth utilization simultaneously.
AND THE REST...
Page 32Chapter 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 33Chapter 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.
VLANSwitch
VLANSwitch
Router
VLAN 1
VLAN 2
VLAN 3
VLAN 4
VLAN 1
VLAN 2
VLAN 3
VLAN 1 VLAN 2
VLAN 1VLAN 2VLAN 4
MULTIPROTOCOL LABEL SWITCHING
Page 34Chapter 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 35Chapter 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.).
Label TC BS TTLLabel TC BS TTL
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.
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 36Chapter 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...
Charter network 142.45.0.0/15
Google’s network 64.233.160.0/19 64.233.169.105
web server
DNSserver
SIUE network148.63.13.0/11
browser
web page
router(runs DHCP)
STUDENT CONNECTS TO INTERNET
Page 37Chapter 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)
DHCPUDPIP
EthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDPIP
EthPhy
DHCP
DHCP
DHCP
DHCPDHCP
• 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
• The Ethernet payload is demultiplexed to IP, then to UDP, and finally to DHCP
router(runs DHCP)
STUDENT CONNECTS TO INTERNET (continued)
Page 38Chapter 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
DHCPUDPIP
EthPhy
DHCP
DHCP
DHCP
DHCP
DHCPUDPIP
EthPhy
DHCP
DHCP
DHCP
DHCP
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 39Chapter 5CS 447
3. Before sending its HTTP request, the student’s laptop needs the IP address of www.google.com: Use DNS
DNSUDPIP
EthPhy
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
• 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
ARP query
EthPhy
ARP
ARP
ARP reply
DNSUDPIP
EthPhy
DNS
DNS
DNSUDPIP
EthPhy
DNS
DNS server
Charter network 142.45.0.0/15
RETRIEVING GOOGLE’S ADDRESS (continued)
Page 40Chapter 5CS 447
DNS
DNS
• 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 datagram is demultiplexed to the DNS server, which replies to the client with the IP address of www.google.com
DNSUDPIP
EthPhy
DNS
DNS
DNS
DNS
64.233.169.105web server
ESTABLISHING TCP CONNECTION
Page 41Chapter 5CS 447
HTTPTCPIP
EthPhy
HTTP
• 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
SYN
SYN
SYN
TCPIP
EthPhy
SYN
SYN
SYN
• The TCP connection is now established
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
• The web server responds with a TCP SYNACK (step 2 in the 3-way handshake)
64.233.169.105web server
INVOKING THE APPLICATION
Page 42Chapter 5CS 447
HTTPTCPIP
EthPhy
HTTP • The HTTP request is sent into the TCP socket
• An IP datagram containing the HTTP request routed to Goggle’s web server
HTTPTCPIP
EthPhy
HTTP
HTTP
HTTP
• That web server responds with the HTTP reply (containing the Google web page)
HTTP
HTTP
HTTP
HTTP
HTTP
• An IP datagram containing the HTTP reply is routed back to the client
HTTP
HTTP
HTTP
HTTP
HTTP
• The Google web page is displayed