The Link Layer and LANs Overview

Router Router 1. Datalink Services Raj Jain 2. Error Detection Washington University in Saint Louis 3. Multiple Access Saint Louis, MO 63130 4. Bridging [email protected] 5. MPLS Audio/Video recordings of this lecture are available on-line at: Note: This class lecture is based on Chapter 6 of the textbook http://www.cse.wustl.edu/~jain/cse473-20/ (Kurose and Ross) and the figures provided by the authors.

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-1 6-2

Link Layer Services Line Duplexity

‰ Simplex: Transmit or receive, Router Router e.g., Television

1111110111010111011101010110101001110111010 T R

‰ Link = One hop ‰ Full Duplex: Transmit and receive simultaneously, ‰ Framing: Bit patterns at begin/end of a frame e.g., Telephone ‰ Multiple Access: Multiple users sharing a wire ‰ Optional (On Lossy wireless links) T/R T/R ¾ Flow Control ¾ Error Detection/Correction T Half-Duplex: Transmit and receive alternately, ¾ Reliable Delivery e.g., Police Radio ‰ Duplex Operation

Ref: Section 6.1, Review question R1 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-3 6-4 Overview Error Detection Parity Checks

‰ Parity Checks 1 0 1 1 1 0 1 0 1 2 3 4 5 6 7 8 9 ‰ Check Digit Method ‰ Odd Parity ‰ Modulo 2 Arithmetic ‰ Cyclic Redundancy Check (CRC) 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 0 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 ‰ Popular CRC Polynomials 1-bit error 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 3-bit error 2-bit error ‰ Even Parity 1 0 1 1 1 0 1 1 0 1 2 3 4 5 6 7 8 9

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-5 6-6

Two Dimensional Parity Check Digit Method ‰ Make a number divisible by 9 ‰ Detect and correct single bit errors Example: 823 is to be sent 1. Left-shift: 8230 2. Divide by 9, find remainder: 4 3. Subtract remainder from 9: 9-4=5 4. Add the result of step 3 to step 1: 8235 5. Check that the result is divisible by 9. Detects all single-digit errors: 7235, 8335, 8255, 8237 Detects several multiple-digit errors: 8765, 7346 Does not detect some errors: 7335, 8775, ... Does not detect transpositions: 2835 0 0 Credit card numbers are protected via a similar method called “Luhn Algorithm” which detects most transpositions.

Ref: http://en.wikipedia.org/wiki/Luhn_algorithm Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-7 6-8 Modulo 2 Arithmetic Cyclic Redundancy Check (CRC)

1111 11001 110 ‰ Binary Check Digit Method +1010 u 11 11 | 1010 ‰ Make a number divisible by P=110101 (n+1=6 bits) ------/ 11 Example: M=1010001101 is to be sent 0101 11001 ------010 2 11001 x11 011 3 1. Left-shift M by n bits 2nM= 101000110100000 ------11 ------2. Divide 2nM by P, find remainder: R=01110 101011 ------001 1 Mod 2 3. Subtract remainder from P m Not required in Mod 2 101 5 Binary x00 4. Add the result of step 2 to step 1 : 00 T=101000110101110 ----- 5. Check that the result T is divisible by P. x0

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-9 6-10

Modulo 2 Division Checking At The Receiver

Q=1101010110 1101010110 P=110101)101000110100000=2nM 110101)101000110101110 110101 110101 010110 111011 111011 010111 000000 110101 110101 000000 101100 011101 011101 101111 110101 000000 000000 110101 110010 111010 111010 110101 110101 110101 110101 110101 001110 011111 011111 00000 000000 000000 000000 01110 = R 111110 111110 110101 110101

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-11 6-12 Error Detection: Review Homework 6A: CRC

‰ [4 points] Find the CRC of 1001100 using a generator 1. Parity bits can help detect/correct errors 1011. Use mod 2 division. Show all steps including the checking at the receiver. 2. Remainder obtained by diving by a prime number provides good error detection 3. CRC uses mod 2 division

Ref: Section 6.2, Review questions R2, R3 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-13 6-14

Overview Multiple Access Links and Protocols Multiple Access 1. Multiple Access 2. CSMA/CD 3. IEEE 802.3 CSMA/CD 4. CSMA/CD Performance (a) Aloha Multiple Access 5. Access

(b) Carrier-Sense Multiple Access with Collision Detection Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-15 6-16 Multiple Access CSMA/CD

‰ How multiple users can share a link? ‰ Aloha at Univ of Hawaii: ‰ Time Division Multiplexing Transmit whenever you like Frequency Worst case utilization = 1/(2e) =18% 1 2 3 4 5 6 7 8 ‰ Slotted Aloha: Fixed size transmission slots Time Worst case utilization = 1/e = 37% ‰ CSMA: Carrier Sense Multiple Access ‰ Frequency Division Multiplexing Listen before you transmit ‰ p-Persistent CSMA: If idle, transmit with probability p. Delay 1 2 by one time unit with probability 1-p 3 4 Frequency 5 ‰ CSMA/CD: CSMA with Collision Detection 6 7 Listen while transmitting. Stop if you hear someone else 8 Time

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-17 6-18

IEEE 802.3 CSMA/CD IEEE 802.3 CSMA/CD Flow Chart

‰ If the medium is idle, transmit (1-persistent). Wait Backoff Start No ‰ If the medium is busy, wait until idle and then transmit Yes immediately. Counter > 16? Abort Counter m 0 ‰ If a collision is detected while transmitting, ¾ Transmit a jam signal for one slot Counter++ (= 51.2 Ps = 64 byte times) Medium No Wait ¾ Wait for a random time and reattempt (up to 16 times) Jam Idle? 1 Slot ¾ Random time = Uniform[0,2min(k,10)-1] slots Yes Truncated Binary Backoff Yes ‰ Collision detected by monitoring the voltage Collision Start No High voltage Ÿ two or more transmitters Ÿ Collision During Done Transmission Ÿ Length of the cable is limited to 2 km Transmission?

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-19 6-20 CSMA/CD Operation Cable Access Network

Cable Headend ‰ Collision window = 2 u One-way Propagation delay = 51.2 Ps MAP frame for Interval [t1, t2]

Downstream channel i

One way delay Upstream channel j = 25.6 Ps Cable Modem Termination System Max Distance t (CMTS) 1 t2 Residences with cable modems <2.5 km Minislots containing Assigned minislots containing cable request frames modem upstream data frames ‰ DOCSIS: Data Over Cable Service Interface Specification ‰ Frequency Division Multiplexed channels over upstream and downstream ‰ Time Division Multiplexed slots in each upstream channel: ¾ Some slots assigned, some have contention ¾ Downstream MAP frame: Assigns upstream slots ¾ Request for upstream slots (and data) transmitted random access (binary backoff) in selected slots

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-21 6-22

Switched Local Area Multiple Access Links and Protocols: Review Overview Networks 1. Standards 2. IEEE 802 Address Format 1. Multiple users can share using TDMA or FDMA 2. Random access is better for data traffic. 3. Address Resolution Protocol 3. Aloha has an efficiency of 1/2e. Slotted Aloha makes it 1/e. 4. Bridging 4. Carrier sense and collision detection improves the efficiency 5. Virtual LANs further. 5. IEEE 802.3 uses CSMA/CD with truncated binary exponential backoff 6. DOCSIS used in cable access networks has frequency division multiplexed channels. With each channel time division multiplexed with some slots reserved for random access. Ref: Section 6.3, Review question R4-R8 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-23 6-24 Structure Ethernet Standards

type data ‰ 10BASE5: 10 Mb/s over coaxial cable (ThickWire) preamble dest. source (payload) CRC address address ‰ 10BROAD36: 10 Mb/s over cable, 3600 m max 64b 48b 48b 16b Variable length 32b segments

‰ Preamble: 7 bytes with pattern 10101010 followed by one byte with ‰ 1BASE5: 1 Mb/s over 2 pairs of UTP pattern 10101011. To synchronize receiver, sender clocks ‰ 10BASE2: 10 Mb/s over thin RG58 coaxial cable (ThinWire), ‰ Addresses: 6 byte source, destination MAC addresses 185 m max segments ‰ Type: indicates higher layer protocol ‰ IP : 0x0800 ‰ 10BASE-T: 10 Mb/s over 2 pairs of UTP ‰ ARP: 0x0806 ‰ 100BASE-T4: 100 Mb/s over 4 pairs of CAT-3, 4, 5 UTP ‰ CRC: Cyclic Redundancy Check ‰ 100BASE-TX: 100 Mb/s over 2 pairs of CAT-5 UTP or STP ‰If error detected: frame is silently dropped at the receiver ‰ Connectionless: No need to ask the receiver ‰ 1000BASE-T: 1 Gbps () ‰ Unreliable: No ack, nack, or retransmissions ‰ 10GBASE-T: 10 Gbps ‰ 40GBASE-T: 40 Gbps Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-25 6-26

Ethernet vs. IEEE 802.3 Ethernet and 802.3 Frame Formats

IP IPX IP IPX ‰ Ethernet IP IPX AppleTalk Logical Link Control (LLC) Dest. Source Ethernet Type Info CRC Media Access Control (MAC) Address Address Size in ‰ In 802.3, datalink was divided into two sublayers: 66 2 4 LLC and MAC bytes IP IPX AppleTalk ‰ LLC provides protocol multiplexing. MAC does not. ‰ IEEE 802.3 ‰ MAC does not need a protocol type field. Dest. Source Length LLC Info Pad CRC Address Address 66 2 Length 4 ‰ Length > 1518 Ÿ It is a protocol type Ÿ Ethernet

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-27 6-28 IEEE 802 Address Format Bridges

‰ 48-bit:1000 0000 : 0000 0001 : 0100 0011 : 0000 0000 : 1000 0000 : 0000 1100 LAN A = 80:01:43:00:80:0C F addresses 11 through 20 are accepted and Organizationally Unique Station 1 Station 2 Station 10 repeated on LAN B Identifier (OUI) 24 bits assigned by Individual/ Universal/ OUI Owner Bridge

Group Local F addresses 1 through 10 are accepted and 11 22 24 repeated on LAN A LAN B ‰ Multicast = “To all bridges on this LAN”

‰ Broadcast = “To all stations” Station 11 Station 12 Station 20 = 111111....111 = FF:FF:FF:FF:FF:FF Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-29 6-30

Bridge: Functions Full-Duplex Ethernet

‰ Monitor all frames on LAN A ‰ Pickup frames that are for stations on the other side ‰ Retransmit the frames on the other side ‰ Uses point-to-point links between TWO nodes ‰ Knows or learns about stations are on various sides ‰ Full-duplex bi-directional transmission ŸTransmit any time Learns by looking at source addresses ŸSelf-learning ‰ Standardized in IEEE 802.3-2018 ‰ Makes no modification to content of the frames Ÿ Transparent ‰ All vendors are shipping switch/bridge/NICs with full duplex May change headers. ‰ No collisions Ÿ 50+ km on fiber. ‰ Provides storage for frames to be forwarded ‰ Between servers and switches or between switches ‰ Improves reliability (less nodes per LAN) ‰ CSMA/CD is no longer used (except in old 10/100 hubs) ‰ Improves performance (more bandwidth per node) ‰ 1G Ethernet standard allows CSMA/CD but not implemented. ‰ Security (Keeps different traffic from entering a LAN) ‰ 10G and higher speed Ethernet standards do not allow ‰ May provide flow and congestion control (in Token Rings) CSMA/CD

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-31 6-32 Interconnection Devices Address Resolution Protocol

‰ Repeater: PHY device that restores data and collision ‰ Problem: Given an IP address find the MAC address signals ‰ Solution: Address Resolution Protocol (ARP) ‰ Hub: Multiport repeater + fault detection, notification ‰ The host broadcasts a request (Dest MAC=FFFFFFFF): and signal broadcast “What is the MAC address of 127.123.115.08?” ‰ The host whose IP address is 127.123.115.08 replies back: ‰ Bridge: Datalink layer device connecting two or more “The MAC address for 127.123.115.08 is collision domains 8A:5F:3C:23:45:5616” ‰ Router: Network layer device (does not propagate ‰ Nodes cache the MAC-IP mapping in a “ARP table” MAC multicasts) Broadcast You can list ARP table using “arp –a” command domain ‰ Frame Format: Hardware (HW): 0x0001 = Ethernet, =LAN ¾ Protocol (Prot): 0x0800 = IP, ¾ Operation: 1 = Request, 2=Response H H B H H Collision HW Prot HW Addr Prot Addr Oper- Sender Sender Target Target Router Type Type Length Length ation HW Addr Prot Addr HW Addr Prot Addr Domain 16b 16b 8b 8b 16b 48b32b 48b 32b Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-33 6-34

IP over Multiple Hops Homework 6B: Collision Detection

AB CD ‰ [6 Points] Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and the propagation delay between the two nodes RouterSwitch Router is 325 bit times. Suppose node A begins transmitting a frame Application Application and, before it finishes, node B begins transmitting a frame. Can TCP TCP A finish transmitting before it detects that B has transmitted? IP IP IP IP Why or why not? In the worst case when does B’s signal reach Ethernet Ethernet Ethernet Ethernet A? (Minimum frame size is 512+64 bits).

MACA to MACB IPA to IPD MACC to MACD IPA to IPD

MAC to MAC IP to IP B C A D A B ‰ Switches = Transparent Bridges Ÿ No changes to frames ‰ ARP required only for nodes on the same “subnet” Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-35 6-36 Lab 6: Ethernet and ARP Lab 6 (Cont)

[32 points] Download the Wireshark traces from D. How many bytes from the very start of the Ethernet frame http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip does the ASCII “G” in “GET” appear in the Ethernet frame? Open ethernet--ethereal-trace-1 in Wireshark. Select View o How many bytes are used up in Ethernet header, IP header, Expand All. This trace shows a HTTP exchange between end and TCP header before this first byte of HTTP message. host A and Server B via Router R as shown below: 2. Examine Frame 16. This is the HTTP OK response. R ABA.What is the Ethernet source address? Who does it belong to: A, B, or R? 1. Examine HTTP request Frame 10. Answer the following B.What is the destination address in the Ethernet frame? Who questions. does it belong to: A, B, or R? A. What is the 48-bit Ethernet source address? Who does it C.What is the hexadecimal value for the two-byte Frame type belong to: A, B, or R? field. What upper layer protocol does this correspond to? B. What is the 48-bit Ethernet destination address? Who does D.How many bytes from the very start of the Ethernet frame it belong to: A, B, or R? does the ASCII “O” in “OK” appear in the Ethernet frame? C. What is the hexadecimal value for the two-byte Frame How many bytes are used up in Ethernet header, IP header, type field. What upper layer protocol does this correspond and TCP header before the first byte of HTTP message. to? Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-37 6-38

Lab 6 (Cont) Lab 6 (Cont)

3. Examine Frame 1. This is an ARP request. 4. Examine Frame 2. This is the ARP response. A. What are the hexadecimal values for the source and A. What are the hexadecimal values for the source and destination addresses in the Ethernet frame containing the destination addresses in the Ethernet frame containing the ARP request message? ARP response message? B. What is the hexadecimal value for the two-byte Frame type B. What is the hexadecimal value for the two-byte Frame type field. What upper layer protocol does this correspond to? field. What upper layer protocol does this correspond to? C. How many bytes from the very beginning of the Ethernet C. How many bytes from the very beginning of the Ethernet frame does the ARP opcode field begin? frame does the ARP opcode field begin? D. What is the value of the opcode field within the ARP- D. What is the value of the opcode field within the ARP- payload? payload? E. What is the IP address of the sender? E. What is the IP address of the sender? F. What is the target MAC and IP addresses in the ARP F. What is the target MAC and IP addresses in the ARP “question”? “answer”? For all questions of this lab, please provide numerical answers only. No need to add screen captures. Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-39 6-40 What is a LAN? What is a Virtual LAN ‰ Physical View Server Client 1 Bridge Client n Router Users Switches Servers Switches

LAN 1 LAN 2

Router Router

‰ LAN = Single broadcast domain = Subnet T Logical View Marketing LAN ‰ No routing between members of a LAN ‰ Routing required between LANs Engineering LAN Router Manufacturing LAN Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-41 6-42

Virtual LAN Types of Virtual LANs

R ‰ Layer-1 VLAN = Group of Physical ports

S S S ‰ Layer-2 VLAN = Group of MAC addresses R ‰ Layer-3 VLAN = IP subnet Switch VLAN VLAN1 Port 12 VLAN1 VLAN2 A1B234565600 21B234565600 23.45.6 A1 — D34578923434 634578923434 1345678903333 8345678903333 ‰ Virtual LAN = Broadcasts and multicast A2 — 3438473450555 9438473450555 4387434304343 5387434304343 VLAN2 goes only to the nodes in the virtual LAN A3 — 4780357056135 6780357056135 4153953470641 9153953470641 ‰ LAN membership defined by the network manager B1 3473436374133 0473436374133 IPX — 3403847333412 8403847333412 Ÿ Virtual 3483434343143 8483434343143 B2 — 4343134134234 0343134134234 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-43 6-44 IEEE 802.1Q-2011 Tag Switched Local Area Networks : Review

‰ Tag Protocol Identifier (TPI) 1. IEEE 802.3 uses a truncated binary exponential backoff. ‰ Priority Code Point (PCP): 3 bits = 8 priorities 0..7 (High) 2. Ethernet uses 48-bit addresses of which the first bit is the ‰ Canonical Format Indicator (CFI): 0 Ÿ Standard Ethernet, unicast/multicast, 2nd bit is universal/local, 22-bits are OUI 1 Ÿ IBM format (non-canonical or non-standard) (Organizationally unique identifier). ‰ CFI now replaced by Drop Eligibility Indicator (DEI) 3. Ethernet bridges are transparent and self-learning using ‰ VLAN Identifier (12 bits Ÿ 4095 VLANs) source addresses in the frame ‰ Switches forward based on MAC address + VLAN ID 4. Bridges are layer 2 devices while routers are layer 3 devices Unknown addresses are flooded. and do not forward layer 2 broadcasts Untagged DA SA T/L Data CRC Frame 5. Address Resolution Protocol (ARP) is used to find the MAC address for a given IP address and vice versa. 32b IEEE 802.1Q-2011 Header 6. IEEE 802.1Q tag in Ethernet frames allows a LAN to be Tagged DA SA TPI Priority CFI/DEI VLAN ID T/L Data CRC divided in to multiple VLANs. Broadcasts are limited to each Frame 48b 48b 16b 3b 1b 12b 16b 32b VLAN and you need a router to go from one VLAN to Ref: Canonical vs. MSB Addresses, http://support.lexmark.com/index?page=content&id=HO1299&locale=en&userlocale=EN_US another. Ref: G. Santana, “Data Center Virtualization Fundamentals,” Cisco Press, 2014, ISBN:1587143240 Ref: Section 6.4, Review Questions R9-R16 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-45 6-46

Overview Multiprotocol Label Switching Multiprotocol Label Switching (MPLS)

Connection-oriented IP: Paths set up in advance PBX PBX Borrowed from the Telephone networks 1 3 5 2 3 ‰ Multiprotocol Label Switching (MPLS) ‰ Label Switching Example ‰ Allows virtual circuits in IP Networks (May 1996) ‰ MPLS Forwarding Tables ‰ Each packet has a virtual circuit ID called ‘label’ ‰ MPLS versus IP Paths ‰ Label determines the packet’s queuing and forwarding ‰ MPLS Label Format ‰ Circuits are called Label Switched Paths (LSPs) ‰ LSP’s have to be set up before use ‰ Label switching routers (LSRs) allows traffic engineering

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-47 6-48 Label Switching Example MPLS Forwarding Tables

Ethernet Header IP Header Payload ‰ Interface numbers are in circles. Label IDs are in rectangles. R6 R4 In In Dest. Out Out In In Dest. Out Out Interface Label Interface Label Interface Label Interface Label Ethernet Header Label IP Header Payload - None A 0 17 317-020 - None D 0 18 318-022 224-118 R3 0 17 64 3 5 In In Dest. Out Out 3 20 R6 18 Interface Label Interface Label 0 2 0 220-117 <64> 0 D 2 1 2 22 - 0 None R1 <3> R5 24 1 22 A R4 R3 <5> 17 2 18 1 R3 C 0 1 0 B R2 <2> R5 A <3> In In Dest. Out Out 24 LER <5> Interface Label Interface Label R2 R1 - None A 0 24 R1 R2 In In Dest. Out Out In In Dest. Out Out Interface Label Interface Label 5 3 2 Interface Label Interface Label 2 17 - 0 None 118-0241 24 - 0 None Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-49 6-50

Notes MPLS Label Switched Paths (LSPs) ‰ Label switched paths (LSPs) are set up before use. ‰ Error in the Book: Ÿ Connection oriented ¾ The tables are per interface not per router. ‰ During set up each router tells the previous router what label it ¾ For compatibility, we have kept table per router but added should put on the frames of that LSP. the input interface column. ‰ The label is actually an index in the MPLS forwarding table. ¾ The book lists no input interface in the table. ‰ Indexing in MPLS table is much faster than searching in IP ¾ Same label #s are allowed to be used in different interfaces of the same router. For example, See Router R3 in the tables. “Label Switching Example” slide. ‰ Although speed was one reason for using MPLS but the main ¾ The textbook notation will not allow this possibility. reason is that the bandwidth can be reserved along the path. ‰ Only one direction of circuits is shown for clarity. ‰ Labels are local. The same label ID may be used by different ¾ There are equal number of reverse circuits that have their routers for different LSPs. own labels not related to forward labels. ‰ The label ID changes along various links of the same LSP. ‰ Out Label=None Ÿ MPLS Tag is removed. ‰ Label IDs are 20-bit long Ÿ 220-1 Labels. In Label=None Ÿ Packet arrives with no MPLS tag Labels 0-15 are reserved.

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-51 6-52 Label Edge Routers (LERs) MPLS versus IP Paths

LER LER LER LER entry router (R4) can use different MPLS routes Non-MPLS MPLS Domain MPLS Domain Non-MPLS to A based, e.g., on source address R6 ‰ Routers connected to non-MPLS routers or nodes or routers of D other MPLS domains are called Label Edge Routers (LERs) R4 R3 ‰ LERs add labels to frames coming from non-MPLS nodes or R5 remove their labels if forwarding to non-MPLS nodes or other A domains. R2 ‰ The labels added by LERs may be based on destination address ‰ IP Routing: Path determined by destination along with other considerations, such as source address, QoS, address alone etc. IP-only ‰ MPLS Routing: Path can be based on source router ‰ Other LSRs forward based solely on the label and the interface and destination address, flow type, … the frame came in. They do not look at the destination address MPLS and ¾ Fast reroute: Precompute backup routes IP router field. in case of link failure

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-53 6-54

MPLS Label Format MPLS: Review

‰ MPLS label is inserted after layer 2 header but before layer 3 header Ÿ MPLS is Layer 2.5 Label ¾ 20 bit label 1. Multiprotocol Label Switching (MPLS) allows virtual circuits ¾ 3 bit Experimental: Class of Service called “Label Switched Paths (LSPs)” in IP ¾ 1 bit end-of-stack. A packet may have a stack of labels to allow carrier nesting. 2. Each packet has a Layer 2.5 MPLS tag which includes a 20- ‰ TTL field is decremented for all forwarded packets. When adding label TTL field from IP header is copied to the MPLS tag. bit label ID When removing label TTL field from MPLS tag is copied to IP Header. 3. Label switching routers (LSRs) forward based on input ‰ MPLS Signaling: interface and the label ¾ OSPF has been extended to help prepare label tables ¾ There are several other “Label Distribution Protocols” 4. Label table is prepared by a “Label Distribution Protocol.” OSPF is one example of a LDP. Carrier A 5. MPLS tags can be stacked to allow network nesting Layer 2 MPLS MPLS IP … LER LER LER LER Header Tag Tag Header Carrier B

Add Add Remove Remove Label Exp S TTL Label1 Label2 Label2 Label1 Ref: Section 6.5 20b 3b 1b 8b Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-55 6-56 Homework 6C: MPLS Homework 6C (Cont)

‰ [6 points] Consider the MPLS network shown in “MPLS ‰ Interface numbers are in circles. Label IDs are in rectangles. R6 R4 Forwarding Tables” slide. Suppose that we want to perform In In Dest. Out Out In In Dest. Out Out Interface Label Interface Label Interface Label Interface Label traffic engineering so that packets from R6 destined for A are - None A 0 17 switched to A via R6-R4-R2-R1 and packets from R5 destined - None D 0 18

R3 for A are switched via R5-R4-R3-R1. Show the updated MPLS 0 17 In In Dest. Out Out 3 20 table in R4 that would make this possible. For simplicity, use R6 18 Interface Label Interface Label 0 2 0 220-117 the same label values as shown currently. Only LSP paths 0 D 2 1 2 22 - 0 None R5 1 22 change and the table at Router R4. 24 R4 R3 17 2 18 1 0 1 0 R5 A In In Dest. Out Out 24 LER Interface Label Interface Label R2 R1 - None A 0 24 R1 R2 In In Dest. Out Out In In Dest. Out Out Interface Label Interface Label Interface Label Interface Label 2 17 - 0 None 118-0241 24 - 0 None Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-57 6-58

Homework 6D: MPLS Homework 6D (Cont)

‰ [28 points] The next figure shows the flows on an MPLS ‰ Interface numbers are in circles. Label IDs are in rectangles. R6 R4 network with the reverse direction flows. Using the Labels In In Dest. Out Out In In Dest. Out Out shown, fill in all the tables. Interface Label Interface Label Interface Label Interface Label

0 - 1 R3 17 B In In Dest. Out Out 3 20 R6 18 Interface Label Interface Label 0 2 0 0 D C 2 1 24 1 22 1 R4 R3 R5 17 2 18 1 0 1 0 R5 A In In Dest. Out Out 24 LER Interface Label Interface Label R2 R1 R1 R2 In In Dest. Out Out In In Dest. Out Out Interface Label Interface Label Interface Label Interface Label

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-59 6-60 Google’s Data Center Data Center Networks Topology ‰ 3-Tier Architecture: Top-of-Rack, Aggregation, Core ‰ Middle boxes: Load balancer, Firewall, Intrusion detection, … ‰ Rich Interconnection between switches

Internet

Border Load router Load Access balancer balancer router Tier-1 switches B

A C Tier-2 switches

TOR switches Server racks 1 2 3 4 5 6 7 8 Source: http://webodysseum.com/technologyscience/visit-the-googles-data-centers/ Ref: Section 6.6 Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-61 6-62

Protocols: Complete Picture Summary Task: Connect and search in www.google.com DHCP Default DNS Client Server Gateway Server Google Advertiser

DHCP Request DHCP Response ARP Request 1. CRC uses mod-2 division using specially selected numbers for Default Gateway ARP Response 2. IEEE 802.3 uses a truncated binary exponential backoff. DNS Request for Google DNS Response 3. Ethernet uses 48-bit universal addresses TCP Syn TCP Syn Ack HTTP Request 4. Ethernet bridges are transparent and self-learning HTTP Response TCP FIN 5. 802.1Q allows several virtual LANs inside a LAN. TCP FIN Ack FIN TCP FIN Ack 6. Address Resolution Protocol (ARP) is used to find the MAC DNS Request for Advertiser DNS Response for advertiser address for a given IP address and vice versa. TCP Syn TCP Syn Ack 7. MPLS allows virtual circuits (LSPs) on IP networks. HTTP Requests for Objects HTTP Responses with Objects TCP FIN 8. Data centers use a multi-tier switching architecture with TCP FIN Ack FIN TCP FIN Ack redundancy WashingtonRef: Section University6.7 in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-63 6-64 Acronyms Acronyms (Cont)

‰ ARP Address Resolution Protocol ‰ IP Internet Protocol ‰ ASCII American Standard Code for Information Exchange ‰ IPX Internetwork Packet Exchange ‰ CAT Category ‰ LAN ‰ CD Collision Detection ‰ LDP Label Distribution Protocol ‰ CRC Cyclic Redundancy Check ‰ LLC Logical Link Control ‰ CSMA Carrier Sense Multiple Access ‰ LSP Label Switched Path ‰ DA Destination Address ‰ MAC Media Access Control ‰ DEI Drop Eligibility Indicator ‰ MAP Map ‰ DHCP Dynamic Host Control Protocol ‰ MPLS Multiprotocol Label Switching ‰ DNS Domain Name Server ‰ MSB Most Significant Byte First ‰ DOCSIS Data over Cable Service Interface Specification ‰ NIC Network Interface Card ‰ FDMA Frequency Division Multiple Access ‰ OSPF Open Shortest Path First ‰ HTTP Hypertext Transfer Protocol ‰ OUI Organizationally Unique Identifier ‰ ID Identifier ‰ PBX Private Branch Exchange ‰ IEEE Institution of Electrical and Electronic Engineers ‰ PCP Priority Code Point ‰ PHY Physical Layer

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-65 6-66

Acronyms (Cont) Scan This to Download These Slides

‰ SA Source Address ‰ STP Shielded Twisted Pair ‰ TCP Transmission Control Protocol ‰ TDMA Time Division Multiple Access ‰ TOR Top of the Rack ‰ TPI Tag Protocol Identifier ‰ TTL Time to live ‰ TX Transmit ‰ UTP Unshielded Twisted Pair Raj Jain ‰ VLAN Virtual Local Area Network http://rajjain.com

http://www.cse.wustl.edu/~jain/cse473-20/i_6lan.htm Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-67 6-68 Related Modules

CSE 567: The Art of Computer Systems Performance Analysis https://www.youtube.com/playlist?list=PLjGG94etKypJEKjNAa1n_1X0bWWNyZcof

CSE473S: Introduction to Computer Networks (Fall 2011), https://www.youtube.com/playlist?list=PLjGG94etKypJWOSPMh8Azcgy5e_10TiDw CSE 570: Recent Advances in Networking (Spring 2013) https://www.youtube.com/playlist?list=PLjGG94etKypLHyBN8mOgwJLHD2FFIMGq5

CSE571S: Network Security (Spring 2011), https://www.youtube.com/playlist?list=PLjGG94etKypKvzfVtutHcPFJXumyyg93u

Video Podcasts of Prof. Raj Jain's Lectures, https://www.youtube.com/channel/UCN4-5wzNP9-ruOzQMs-8NUw

Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse473-20/ ©2020 Raj Jain 6-69