Download presentation
Presentation is loading. Please wait.
Published byMelina Blake Modified over 6 years ago
1
Announcement Written Homework Assignment 2: Due Fri. November 18, 11:59pm Programming Assignment 3: Due Mon. Nov ember 14, 11:59pm Group of three students. The shared google sheet is helpful for you to contact your peers. CSci4211: Data Link Layer
2
Recap: Data Link Layer Data Link Layer Functions
deliver frames over a single link framing, media access, error checking (error correction), … Cyclic Redundancy Code for error detection Local Area Networks (LANs) and MAC Addresses MAC addresses (vs. IP address) point-to-point vs. shared access IP Address Resolution Protocol (ARP) and IP datagram forwarding (revisited!) Extending LANs & Switched LANs: Self-learning Spanning tree algorithms CSci4211: Data Link Layer
3
ARP Operation Illustration
Here is an illustration of ARP broadcast by W requesting hardware address of Y. As you can see, every node in the local physical network receive this request. Only Y sends the reply and also only to W. CSci4211: Data Link Layer
4
Forwarding to Another LAN
walkthrough: send datagram from A to B via R focus on addressing – at IP (datagram) and MAC layer (frame) assume A knows B’s IP address assume A knows IP address of first hop router, R (how?) assume A knows R’s MAC address (how?) R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 49-BD-D2-C7-56-2A 88-B2-2F-54-1A-0F B CSci4211: Data Link Layer
5
Forwarding to Another LAN
A creates IP datagram with IP source A, destination B A creates link-layer frame with R's MAC address as destination address, frame contains A-to-B IP datagram MAC src: C-E8-FF-55 MAC dest: E6-E BB-4B IP Eth Phy IP src: IP dest: R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 49-BD-D2-C7-56-2A 88-B2-2F-54-1A-0F B CSci4211: Data Link Layer
6
Forwarding to Another LAN
frame sent from A to R frame received at R, datagram removed, passed up to IP MAC src: C-E8-FF-55 MAC dest: E6-E BB-4B IP src: IP dest: IP src: IP dest: IP Eth Phy IP Eth Phy R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 49-BD-D2-C7-56-2A 88-B2-2F-54-1A-0F B CSci4211: Data Link Layer
7
Forwarding to Another LAN
R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as destination address, frame contains A-to-B IP datagram MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP Eth Phy IP src: IP dest: IP Eth Phy R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 49-BD-D2-C7-56-2A 88-B2-2F-54-1A-0F B CSci4211: Data Link Layer
8
Forwarding to Another LAN
R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as destination address, frame contains A-to-B IP datagram IP src: IP dest: MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP Eth Phy IP Eth Phy R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D C-E8-FF-55 A 49-BD-D2-C7-56-2A 88-B2-2F-54-1A-0F B CSci4211: Data Link Layer
9
Forwarding to Another LAN
R forwards datagram with IP source A, destination B R creates link-layer frame with B's MAC address as dest, frame contains A-to-B IP datagram MAC src: 1A-23-F9-CD-06-9B MAC dest: 49-BD-D2-C7-56-2A IP src: IP dest: IP Eth Phy B A R 49-BD-D2-C7-56-2A C-E8-FF-55 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D 88-B2-2F-54-1A-0F CSci4211: Data Link Layer
10
Self-learning: Filtering/Forwarding
when frame received at switch: 1. record incoming link, MAC address of sending host 2. index switch table using MAC destination address 3. if entry found for destination then { if destination on segment from which frame arrived then drop frame else forward frame on interface indicated by entry } else flood /* forward on all interfaces except arriving interface */ CSci4211: Data Link Layer
11
Self-learning, forwarding: example
Source: A Dest: A’ A A’ B B’ C C’ 1 2 3 4 5 6 A A’ switch learns which hosts can be reached through which interfaces when frame received, switch “learns” location of sender: incoming LAN segment records sender/location pair in switch table MAC addr interface TTL A 1 60 Switch table (initially empty) CSci4211: Data Link Layer
12
Self-learning, forwarding: example
Source: A Dest: A’ A A’ B B’ C C’ 1 2 3 4 5 6 A A’ frame destination, A’, location unknown: flood destination A location known: selectively send on just one link A A’ A A’ A A’ A A’ A A’ A’ A MAC addr interface TTL A 1 60 switch table (initially empty) A’ 4 60 CSci4211: Data Link Layer
13
CSci4211: Network Data Plane: VLANs, VC and MPLS
VLANs: Motivation consider: CS user moves office to EE, but wants connect to CS switch? single broadcast domain: all layer-2 broadcast traffic (ARP, DHCP, unknown location of destination MAC address) must cross entire LAN security/privacy, efficiency issues Computer Science Computer Engineering Electrical Engineering CSci4211: Network Data Plane: VLANs, VC and MPLS
14
VLANs port-based VLAN: switch ports grouped (by switch management software) so that single physical switch …… Virtual Local Area Network 1 7 9 15 2 8 10 16 switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure. … … Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-15) Electrical Engineering (VLAN ports 1-8) … 1 8 2 7 9 16 10 15 Computer Science (VLAN ports 9-16) … operates as multiple virtual switches CSci4211: Network Data Plane: VLANs, VC and MPLS
15
Port-based VLAN router
traffic isolation: frames to/from ports 1-8 can only reach ports 1-8 can also define VLAN based on MAC addresses of endpoints, rather than switch port router forwarding between VLANS: done via routing (just as with separate switches) in practice vendors sell combined switches plus routers 1 7 9 15 2 8 10 16 dynamic membership: ports can be dynamically assigned among VLANs … … Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-15) CSci4211: Network Data Plane: VLANs, VC and MPLS
16
VLANs Spanning Multiple Switches
1 7 9 16 1 15 3 5 7 2 8 10 2 4 6 8 … … Electrical Engineering (VLAN ports 1-8) Computer Science (VLAN ports 9-15) Ports 2,3,5 belong to EE VLAN Ports 4,6,7,8 belong to CS VLAN trunk port: carries frames between VLANS defined over multiple physical switches frames forwarded within VLAN between switches can’t be vanilla frames (must carry VLAN ID info) 802.1q protocol adds/removed additional header fields for frames forwarded between trunk ports CSci4211: Network Data Plane: VLANs, VC and MPLS
17
CSci4211: Network Data Plane: VLANs, VC and MPLS
802.1Q VLAN frame format type dest. address source address preamble data (payload) CRC 802.1 frame type dest. address source preamble 802.1Q frame data (payload) CRC 2-byte Tag Protocol Identifier (value: 81-00) Recomputed CRC Tag Control Information (12 bit VLAN ID field, 3 bit priority field like IP TOS) CSci4211: Network Data Plane: VLANs, VC and MPLS
18
Virtual Circuit vs. Datagram
Objective of both: move packets through routers from source to destination Datagram Model: Routing: determine next hop to each destination a priori Forwarding: destination address in packet header, used at each hop to look up for next hop routes may change during “session” analogy: driving, asking directions at every gas station, or based on the road signs at every turn Virtual Circuit Model: Routing: determine a path from source to each destination “Call” Set-up: fixed path (“virtual circuit”) set up at “call” setup time, remains fixed thru “call” Data Forwarding: each packet carries “tag” or “label” (virtual circuit id, VCI), which determines next hop routers maintain ”per-call” state CSci4211: Network Data Plane: VLANs, VC and MPLS
19
CSci4211: Network Data Plane: VLANs, VC and MPLS
Virtual Circuits “source-to-dest path behaves much like telephone circuit” (but actually over packet network) performance-wise network actions along source-to-dest path call setup/teardown for each call before data can flow need special control protocol: “signaling” every router on source-dest path maintains “state” (VCI translation table) for each passing call VCI translation table at routers along the path of a call “weaving together” a “logical connection” for the call link, router resources (bandwidth, buffers) may be reserved and allocated to each VC to get “circuit-like” performance Compare w/ transport-layer “connection”: only involves two end systems, no fixed path, can’t reserve bandwidth! CSci4211: Network Data Plane: VLANs, VC and MPLS
20
CSci4211: Network Data Plane: VLANs, VC and MPLS
VC Implementation a VC consists of: path from source to destination VC numbers, one number for each link along path entries in forwarding tables in routers along path packet belonging to VC carries VC number (rather than dest address) VC number can be changed on each link. New VC number comes from forwarding table CSci4211: Network Data Plane: VLANs, VC and MPLS
21
VC Translation/Forwarding Table
12 22 32 1 2 3 VC number interface number Forwarding table in northwest router: Incoming interface Incoming VC # Outgoing interface Outgoing VC # … … … … Routers maintain connection state information! CSci4211: Network Data Plane: VLANs, VC and MPLS
22
Virtual Circuit: Signaling Protocols
used to setup, maintain teardown VC used in ATM, frame-relay, X.25 used in part of today’s Internet: Multi-Protocol Label Switching (MPLS) operated at “layer 2+1/2” (between data link layer and network layer) for “traffic engineering” purpose application transport network data link physical 1. Initiate call 2. incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data CSci4211: Network Data Plane: VLANs, VC and MPLS
23
Virtual Circuit Setup/Teardown
Call Set-Up: Source: select a path from source to destination Use routing table (which provides a “map of network”) Source: send VC setup request control (“signaling”) packet Specify path for the call, and also the (initial) output VCI perhaps also resources to be reserved, if supported Each router along the path: Determine output port and choose a (local) output VCI for the call need to ensure that NO two distinct VCs leaving the same output port have the same VCI! Update VCI translation table (“forwarding table”) add an entry, establishing an mapping between incoming VCI & port no. and outgoing VCI & port no. for the call Call Tear-Down: similar, but remove entry instead Previously we were talking about how to forward packets once the virtual circuit has been set up. For setting a VC, a source has to first select a path and send setup request along that path. We will see later how a source can get information about the network and perform path selection. Each router along the path choose a local VCI for the connection. To be precise, a downstream router selects a VCI to be used as output VCI by the upstream node. Basically we have to make sure that two distinct VCs do not have the same VCI when they flow thru the same port. Once the VCI is chosen, forwarding table is updated to reflect the new mapping from an incoming VCI and port no to outgoing VCI and port no. VC setup is essentially the updation of forwarding tables along a selected path. The key thing to note here is that VCI has only local significance and that’s why VCI of a packet is changed at each router along the path. If we want VCI to have global meaning, then we would need a larger VCI to identify every connection in the whole network. Moreover, we need to ensure that each VCI is globally unique. On the other hand, with local VCIs a router has to worry only about the VCs passing thru itself which will be much fewer. Also, some other router can also use the same VCI as long as two VCs do not get switched to the same port with same VCI. So with a smaller VCI also it is possible to have many connections in the network. Another thing to note here is the difference between routing and forwarding. Here the path selection is done the VC setup time, i.e., routing decision is made before any data is sent. And forwarding table along the selected path are updated as part of VC setup. After that each packet gets forwarded by each router/switch along the path as per the routing decision made at the time of VC setup. CSci4211: Network Data Plane: VLANs, VC and MPLS
24
CSci4211: Network Data Plane: VLANs, VC and MPLS
green call four “calls” going thru the router, each entry corresponding one call purple call blue call orange call VCI translation table (aka “forwarding table”), built at call set-up phase 1 2 3 1 2 Here is an example of how VCI translation is done. Forwarding table maps a packet from an input port with input VCI to an output port and output VCI. This forwarding table is set up such that no two packets belonging to different connections (with different input VCIs or from different input ports) get switched to the same output port with same output VCI. In this example, forwarding table says that a packet coming thru input port 1 with VCI 2 should be sent out on port 4 and VCI of the packet be changed to 1. Similarly packets from port 2 with VCI 1 are sent out on port 3 with VCI 2. You can see that no two output VCIs are same if the output port is also same. 2 1 1 During data packet forwarding phase, input VCI is used to look up the table, and is “swapped” w/ output VCI (VCI translation, or “label swapping”) CSci4211: Network Data Plane: VLANs, VC and MPLS
25
Virtual Circuit: Example
“call” from host A to host B along path: host A router 1 router 2 router 3 host B each router along path maintains an entry for the call in its VCI translation table the entries piece together a “logical connection” for the call Exercise: write down the VCI translation table entry for the call at each router Router 4 Router 1 3 1 2 Router 2 2 3 1 5 11 Host A 7 Router 3 1 3 4 Host B 2 CSci4211: Network Data Plane: VLANs, VC and MPLS
26
Multiprotocol Label Switching (MPLS)
initial goal: speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address! PPP or Ethernet header IP header remainder of link-layer frame MPLS header label Exp S TTL 20 3 1 8 CSci4211: Network Data Plane: VLANs, VC and MPLS
27
CSci4211: Network Data Plane: VLANs, VC and MPLS
MPLS Capable Routers a.k.a. label-switched router forward packets to outgoing interface based only on label value (don’t inspect IP address) MPLS forwarding table distinct from IP forwarding tables flexibility: MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to same destination differently (traffic engineering) re-route flows quickly if link fails: pre-computed backup paths (useful for VoIP) CSci4211: Network Data Plane: VLANs, VC and MPLS
28
CSci4211: Network Data Plane: VLANs, VC and MPLS
MPLS versus IP paths R6 D R4 R3 R5 A R2 IP routing: path to destination determined by destination address alone IP router CSci4211: Network Data Plane: VLANs, VC and MPLS
29
CSci4211: Network Data Plane: VLANs, VC and MPLS
MPLS versus IP paths entry router (R4) can use different MPLS routes to A based, e.g., on source address R6 D R4 R3 R5 A R2 IP routing: path to destination determined by destination address alone IP-only router MPLS routing: path to destination can be based on source and destination address fast reroute: precompute backup routes in case of link failure MPLS and IP router CSci4211: Network Data Plane: VLANs, VC and MPLS
30
CSci4211: Network Data Plane: VLANs, VC and MPLS
MPLS Signaling modify OSPF, IS-IS link-state flooding protocols to carry info used by MPLS routing, e.g., link bandwidth, amount of “reserved” link bandwidth entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers RSVP-TE R6 modified link state flooding D R4 R5 A CSci4211: Network Data Plane: VLANs, VC and MPLS
31
MPLS Forwarding Tables
1 A R6 in out out label label dest interface A A D A D A A CSci4211: Network Data Plane: VLANs, VC and MPLS
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.