Lecture 11: Addressing, Framing, and Switching in the Link Layer CS 3035/GZ01: Networked Systems Kyle Jamieson

Size: px
Start display at page:

Download "Lecture 11: Addressing, Framing, and Switching in the Link Layer CS 3035/GZ01: Networked Systems Kyle Jamieson"

Transcription

1 Lecture 11: Addressing, Framing, and Switching in the Link Layer CS 05/GZ01: Networked Systems Kyle Jamieson Department of Computer Science University College London

2 The link layer: FuncFonality IP datagram Link- layer protocol Sending host frame frame Receiving host Enables the exchange of messages (frames) between end hosts FuncAonality: 1. Framing: Determine start and end of bits and frames. Error control: Detect and/or correct errors. Reliable delivery: Deliver frames exactly once 4. Medium access control: Control hosts access to a shared medium, if applicable (medium access control) Networked Systems 05/GZ01

3 Today We finish the funcaonality of the link layer, and Ae it in to IP 1. Framing and addressing. Repeaters, hubs, and switches. Bootstrapping a host Networked Systems 05/GZ01

4 Framing frames We have seen how to frame bits on a link Ethernet s Manchester encoding Result: An infinite stream of bits on a link But, two hosts connected on the same physical medium need to be able to exchange frames Service provided by the link layer Implemented by the network adaptor Problem: how does the link layer determine where each frame begins and ends? ( how hard can that be?) Networked Systems 05/GZ01 4

5 Simple approach to framing: count bytes Sender includes number of bytes in header Receiver extracts this number of bytes of body 5 Body 80 Body 5 bytes of data 1 bytes of data But what if the Count field is corrupted? L will frame the wrong bytes This is called a framing error With high probability, CRC will detect the framing error and discard that frame, but: 61 Body 80??? Body Bogus count field 61 bytes of data misdelivered??? bytes of data misdelivered This state of persistent framing errors is called desynchroniza1on Networked Systems 05/GZ01 5

6 DesynchronizaFon Once framing on a link is desynchronized, it can stay that way Need a method to resynchronize But once we have that method, why use counang? Networked Systems 05/GZ01 6

7 Framing with senfnel bytes Delineate beginning of frame with special byte (SYN) Delineate end of frame with another special byte (ETX) SYN Frame contents ETX What if senanel occurs in data? Byte stuffing: insert another special escape byte DLE before senanel What if any of the above escape characters occur in data? Byte stuffing again: Stuff DLE before DLE occurring in data Example: SYN Can we be more efficient? DLE, SYN, DLE, DLE, DLE, ETX ETX Networked Systems 05/GZ01 7

8 Framing with senfnel bits Delineate frame with special bit pafern e.g., start, end Frame contents Problem: what if senanel occurs within frame? SoluAon: bit stuffing Sender always inserts a 0 ager five 1s in the frame contents Receiver always removes a 0 appearing ager five 1s Networked Systems 05/GZ01 8

9 When receiver sees five 1s Frame content If next bit 0, remove it, and begin counang again Because this must be a stuffed bit; we can t be at beginning/ end of frame (those had six or seven 1s) If next bit 1 (i.e., we ve seen six 1s) then: If following bit is 0, this is start of frame Because the receiver has seen If following bit is 1, this is end of frame Because the receiver has seen Networked Systems 05/GZ01 9

10 Example: senfnel bits Original data, including start/end of frame: ! Sender rule: five 1s à insert a 0 Ager bit stuffing at the sender: ! Receiver rule: five 1s and next bit 0 à remove ! Networked Systems 05/GZ01 10

11 Comparing addressing schemes Network layer address (IP address) FuncAon: move datagram to desanaaon network - bit address, dofed quad notaaon a.b.c.d where each component is an eight- bit unsigned integer Hierarchical address space Link layer address (MAC address, Ethernet address): FuncAon: move frame from one point to another point on the same network Unique 48- bit address (in most LANs) Burned in NIC ROM, also someames sogware sefable Usually a flat address space Networked Systems 05/GZ01 11

12 Ethernet addresses 48- bit source and desanaaon addresses Receiver s link layer passes frame up to network- level protocol: If desanaaon address matches the adaptor s Or the desanaaon address is the broadcast address (ff:ff:ff:ff:ff:ff) Or the card is in a mode of operaaon that receives all frames (promiscuous mode) Addresses are globally unique Assigned by NIC vendors (top three bytes specify vendor) Networked Systems 05/GZ01 1

13 Today We finish the funcaonality of the link layer, and Ae it in to IP 1. Framing and addressing. Repeaters, hubs, and switches Comparison Self- learning switches The Spanning Tree Protocol. Bootstrapping a host Networked Systems 05/GZ01 1

14 Message, segment, datagram, and frame HTTP host HTTP message host HTTP TCP TCP segment TCP router router IP IP datagram IP IP datagram IP IP datagram IP Ethernet interface Ethernet interface SONET interface SONET interface Ethernet interface Ethernet interface Ethernet frame SONET frame Ethernet frame Networked Systems 05/GZ01 14

15 Different devices switch on different informafon Routers: forward IP datagrams based on network- layer addresses in the IP header H H H H data Network Link Physical Router IP datagram H H data Switches (Bridges): forward link- layer frames based on link- layer addresses in the link- layer header H H H H Repeaters/Hubs: rebroadcast all bits in the physical- layer frame data Link Physical Switch Link layer frame H H H data Hub Physical- layer frame H H H H data Physical H H H H data Networked Systems 05/GZ01 15

16 Physical Layer: Repeaters Distance limitaaon in local- area networks Electrical signal becomes weaker as it travels Imposes a limit on the length of a LAN In addiaon to limit imposed by collision detecaon Repeaters join LANs together Analog electronic device ConAnuously monitors electrical signals on each LAN Transmits an amplified copy Repeater Networked Systems 05/GZ01 16

17 Physical Layer: Hubs Joins mulaple input lines electrically Do not necessarily amplify the signal Very similar to repeaters Also operate at the physical layer hub hub hub hub Networked Systems 05/GZ01 17

18 LimitaFons of repeaters and hubs One large place where packets collide (collision domain), since every bit is sent everywhere So, aggregate throughput is limited e.g., three departments each get 10 Mbps independently and then if connect via a hub must share 10 Mbps Cannot support mulaple LAN technologies Repeaters/hubs do not buffer or interpret frames So, can t interconnect between different rates or formats e.g., no mixing 100 Mbit/s Ethernet and Gigabit Ethernet LimitaAons on maximum nodes and distances Does not circumvent limitaaons of the shared medium e.g., sall cannot go beyond 500 m in commercial Ethernet Networked Systems 05/GZ01 18

19 Link Layer: Switches Switches also connect two or more LANs at the link layer Extracts desanaaon address from the frame Looks up the desanaaon in a table Forwards the frame to the appropriate LAN segment Or point- to- point link, for higher- speed Ethernet Each port is its own collision domain (if not just a link) Switch collision domain hub Extended LAN Networked Systems 05/GZ01 19

20 Switches and concurrent communicafon Host A can talk to C, while B talks to D B A switch C If host has (dedicated) point- to- point link to switch: Full duplex: each connecaon can send in both direcaons Completely avoids collisions ü No need for carrier sense, collision detecaon, and so on ü Change in medium access control, but same framing D Networked Systems 05/GZ01 0

21 Switches: Advantages over hubs and repeaters Only forwards frames as needed Filters frames to avoid unnecessary load on segments Sends frames only to segments that need to see them Extends the geographic span of the network Separate collision domains allow longer distances Improves privacy by limiang scope of frames Hosts can snoop the traffic traversing their segment but not all the rest of the traffic Applies CSMA/CD in segment (not whole net) Smaller collision domain Joins segments using different technologies Networked Systems 05/GZ01 1

22 Disadvantages over hubs and repeaters Higher cost More complicated devices that cost more money Delay in forwarding frames Bridge/switch must receive and parse the frame and perform a look- up to decide where to forward Introduces store- and- forward delay Can ameliorate using cut- through switching Start forwarding ager only header received Need to learn where to forward frames Bridge/switch needs to construct a forwarding table Ideally, without intervenaon from network administrators SoluAon: Self- learning algorithm Networked Systems 05/GZ01

23 MoFvaFon for self learning Benefit if switch forwards frame only on segment(s) that need it Allows concurrent use of other links Switch forwarding table Maps desfnafon link- layer address to outgoing interface Goal: construct the switch table automaacally B A switch C Networked Systems 05/GZ01 D

24 Self learning algorithm: Building the table When a frame (e.g., from A to B) arrives at the switch: Inspect the source link- layer address Associate that address with the incoming switch port Store the mapping in the switch table Use 1me- to- live field to eventually forget the mapping an amount of Ame later equal to its value This is an example of soe state A A à B data 1 switch Switch just learned how to reach A. Networked Systems 05/GZ B D Switch forwarding table: Address Port Time- to- live A 1 minutes C

25 Self learning algorithm: Handling misses When frame arrives with unfamiliar desanaaon (e.g., B) Forward the frame out all ports except for the one on which the frame arrived This is called flooding Hopefully, this case won t happen very ogen When e.g. B replies, switch will learn that node, too Switch forwarding table: B Address Port Time- to- live A 1 minutes A à B data 1 A switch 4 C Networked Systems 05/GZ01 5 D

26 Self- learning algorithm When switch receives a frame: index into the forwarding table using link- layer desfnafon address if entry found for desanaaon { if dest on segment from which frame arrived then drop frame else forward frame on interface indicated } else flood the frame Forward on all ports except the port on which the frame arrived Problems? Networked Systems 05/GZ01 6

27 Flooding can lead to loops Switches someames need to flood frames: Upon receiving a frame with an unfamiliar desanaaon Upon receiving a frame sent to the broadcast address Flooding can lead to forwarding loops e.g., if the network contains a cycle of switches Either accidentally, or by design for higher reliability How can we revise the bridge learning This is catastrophic, algorithm for two to reasons: avoid broadcast storms? 1. Unlike IP, layer has no way of prevenang frame looping. Ethernet duplicates frames, leading to an exponenaal increase, quickly crashing the extended LAN (this is called a broadcast storm) Networked Systems 05/GZ01 7

28 The spanning tree protocol (STP) Early 1980s: Digital Equipment CorporaAon, a key Ethernet vendor, wanted to leverage the benefits of loops while avoiding broadcast storms Radia Perlman s idea: Switches agree on a loop- free and connected spanning tree Spanning tree: a sub- graph that touches all veraces but contains no cycles Graph with cycles Spanning tree has no cycles Once the spanning tree is formed: Switches use the switch learning algorithm to forward data frames over the tree links only Networked Systems 05/GZ01 8

29 Spanning Tree Protocol (STP): Overview Users connect Ethernet switches and shared- medium Ethernet LANs together Arbitrarily, possibly creaang forwarding loops 4 Need a distributed algorithm so that: 1. Switches cooperate to build the spanning tree. Switches adapt automaacally when failures occur 1 Networked Systems 05/GZ01 9

30 STP: Key ingredients of the algorithm Switches elect one root switch from which to build the tree Switch idenafier = link- layer address on one port 4 Switches block some ports from sending or receiving frames of Ethernet type Let s IP (or begin other with L data) a simplified version of the full STP distributed algorithm To form tree, switches exchange configura1on messages (R, d, X): From switch X Proposing switch R (which is d hops away) as the root ConfiguraAon messages are never blocked B Blocked ports 1 B Root switch Networked Systems 05/GZ01 0

31 Simplified STP: State at each switch Each switch X keeps the following state: 1. Its view of who the root is IniAally, itself: X X Root id: X Networked Systems 05/GZ01 1

32 Simplified STP: Startup and calculafng the root Note: IniAally, each switch X periodically sends (X, 0, X) from all its ports Root ID rule: Root ID r at switch X is the minimum of X and root IDs received at all ports Root id: 4 Root id: 4 Root id: 1 Networked Systems 05/GZ01

33 Simplified STP: Startup and calculafng the root Note: IniAally, each switch X periodically sends (X, 0, X) from all its ports Root ID rule: Root ID r at switch X is the minimum of X and root IDs received at all ports Switch sends (, 0, ); switch sets its root id to 1, switch 1 ignores Root id: ß (, 0, ) 4 Root id: 4 Root id: 1 Networked Systems 05/GZ01

34 Simplified STP: Startup and calculafng the root Note: IniAally, each switch X periodically sends (X, 0, X) from all its ports Root ID rule: Root ID r at switch X is the minimum of X and root IDs received at all ports Switch 1 sends (1, 0, 1); switches and set their root ids to 1 4 Root id: 4 ß (1, 0, 1) 1 Networked Systems 05/GZ01 4

35 Simplified STP: Startup and calculafng the root Note: IniAally, each switch X periodically sends (X, 0, X) from all its ports Root ID rule: Root ID r at switch X is the minimum of X and root IDs received at all ports Switch sends (, 0, ); switch 4 sets its root id to, others ignore 4 Root id: 1 Networked Systems 05/GZ01 5

36 STP: Startup and calculafng the root Note: IniAally, each switch X periodically sends (X, 0, X) from all its ports Root ID rule: Root ID r at switch X is the minimum of X and root IDs received at all ports 4 Root id: Switch Not yet 4 sends agreeing (4, 0, 4); on switch the idenfty of the root: Root let s id: now 1 see ignores how switches propagate informafon through the network 1 Networked Systems 05/GZ01 6

37 Simplified STP: State at each switch Each switch X keeps the following state: 1. Its view of who the root is IniAally, itself: X. Its configurafon message to send IniAally, announcing itself as root with zero distance to root: (X, 0, X) X Root id: X Msg: (X, 0, X) Networked Systems 05/GZ01 7

38 Simplified STP: CalculaFng the message Switch X finds its distance from the root (d): 1. If X thinks it is the root, d ß 0. Otherwise, d ß the minimum distance from messages received matching X s root id (call it r), plus one ConfiguraFon message rule: Switch X sets its configuraaon message to (r, d, X). If configuraaon message changes, sends updated message immediately Root id: Msg: (, 0, ) 4 Root id: 4 Msg: (4, 0, 4) Root id: Msg: (, 0, ) 1 Msg: (1, 0, 1) Networked Systems 05/GZ01 8

39 Simplified STP: CalculaFng the message Switch X finds its distance from the root (d): 1. If X thinks it is the root, d ß 0. Otherwise, d ß the minimum distance from messages received matching X s root id (call it r), plus one ConfiguraFon message rule: Switch X sets its configuraaon message to (r, d, X). If configuraaon message changes, sends updated message immediately Switch 1 sends (1, 0, 1), switches and update their root ids and msgs Msg: (1, 1, ) 1 Msg: (1, 0, 1) 4 Root id: Msg: (4, 0, 4) Msg: (1, 1, ) Networked Systems 05/GZ01 9

40 Simplified STP: CalculaFng the message Switch X finds its distance from the root (d): 1. If X thinks it is the root, d ß 0. Otherwise, d ß the minimum distance from messages received matching X s root id (call it r), plus one ConfiguraFon message rule: Switch X sets its configuraaon message to (r, d, X). If configuraaon message changes, sends updated message immediately Switch sends (1, 1, ), switch 4 updates its root id and message Msg: (1, 1, ) 1 Msg: (1, 0, 1) 4 Msg: (1,, 4) Msg: (1, 1, ) Networked Systems 05/GZ01 40

41 Simplified STP: CalculaFng the message Switch X finds its distance from the root (d): 1. If X thinks it is the root, d ß 0. Otherwise, d ß the minimum distance from messages received matching X s root id (call it r), plus one 4 Msg: (1,, 4) ConfiguraFon message rule: Now Switch all X switches sets its configuraaon agree the root idenffier. Root But id: 1 how do they message decide to (r, which d, X) ports to block to form the Msg: spanning (1, 1, ) tree? Msg: (1, 1, ) 1 Msg: (1, 0, 1) Networked Systems 05/GZ01 41

42 STP: Port status All switches connected to a Ethernet LAN (or the two at the ends of a cable) agree on a single designated port 4 Msg: (1,, 4) Designated port: The port on the shortest path from the LAN or cable to the root is the designated port (D) D Msg: (1, 1, ) D The designated port forwards frames from the LAN to the root Only designated ports send configuraaon messages D 1 Msg: (1, 0, 1) Msg: (1, 1, ) D Networked Systems 05/GZ01 4

43 STP: Port status Root port: Each non- root switch notes which of its port is on the shortest path to the root; this port is the root port (R) R D D R Msg: (1, 1, ) 1 Msg: (1, 0, 1) 4 Msg: (1,, 4) Msg: (1, 1, ) D D R Networked Systems 05/GZ01 4

44 STP: Port status Blocked port: If neither designated nor root, a port is a blocked port (B), not forwarding data traffic. R 4 Msg: (1,, 4) R D D Msg: (1, 1, ) B 1 Msg: (1, 0, 1) B Msg: (1, 1, ) D D R Networked Systems 05/GZ01 44

45 STP: State at each switch Each switch X keeps the following state: 1. Its view of who the root is IniAally, itself: X. Its configurafon message to send IniAally, announcing itself as root with zero distance to root: (X, 0, X) X Root id: X Msg: (X, 0, X) D: (X, 0, X). For each of X s ports: Whether designated (D), root (R), or blocking (B) data traffic IniAally, designated (D) Best configuraaon message heard on that port IniAally, its own configuraaon message (X, 0, X) Networked Systems 05/GZ01 45

46 STP: Designated port rule At a switch, for each port p: Consider all configuraaon messages received on port p and the configuraaon message the switch would send If switch receives a befer configuraaon message on a port p, don t send configurafon messages on port p Else, p is designated: send configurafon message on p Rule for comparing configuraaon messages: (R 1, d 1, X 1 ) beker than (R, d, X ) if R 1 < R or (R 1 = R and d 1 < d ) or (R 1 = R and d 1 = d and X 1 < X ) Networked Systems 05/GZ01 46

47 STP: Complete example All switches begin thinking they are root with all ports in the designated state D: (4,0,4) 4 Root id: 4 Msg: (4,0,4) D: (,0,) D: (,0,) Root id: Msg: (,0,) D: (,0,) D: (,0,) D: (,0,) Root id: Msg: (,0,) D: (,0,) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 47

48 STP: Complete example All switches begin thinking they are root with all ports in the designated state D: (4,0,4) 4 Root id: 4 Msg: (4,0,4) Switch 1 sends (1,0,1), switches and update their root ids, ports, and msgs Switch breaks Ae between the two copies of (1,0,1) locally by numbering its ports Each switch s port remembers the best configuraaon message seen so far R: (1,0,1) D: (1,0,1) D: (,0,) Msg: (1,1,) B: (1,0,1) 1 Msg: (1,0,1) D: (,0,) D: (,0,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 48 ß (1, 0, 1) (1, 0, 1) à

49 STP: Complete example Switch sends (1,1,) from its designated ports, switch 4 updates its root id and message Switch, port remains designated because Switch s message (1,1,) is befer than (1,1,) Switch 1, port 1 remains designated because Switch 1 s message (1,0,1) is befer than (1,1,) R: (1,0,1) (1,1,) à R: (1,1,) D: (,0,) Msg: (1,1,) B: (1,0,1) 1 4 Msg: (1,,4) D: (,0,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) Networked Systems 05/GZ01 49

50 STP: Complete example Switch sends (1,1,) from port only Switch blocks its port since (1,1,) is befer than its message (1,1,) 1 R: (1,0,1) R: (1,1,) D: (,0,) Msg: (1,1,) B: (1,0,1) 4 Msg: (1,,4) B: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 50

51 STP: Dynamics When do switches send configuradon messages? If you think you re the root, send periodically with parameter hello Dme (two seconds recommended in 80.1d) Other switches send on all designated ports upon receiving root s message How does the algorithm adapt to topology changes? State table contains age field, which is updated conanuously Aging rule: If age reaches a threshold max age (0 sec in 80.1d), discard that table entry and recalculate using all rules What happens if max age is too big? Too small? Recalculate when receive befer or newer configuraaon message on port p (resulang in a table entry being overwrifen) Networked Systems 05/GZ01 51

52 STP: Handling failures Suppose the Ethernet LAN fails R: (1,1,) 4 Msg: (1,,4) 1 R: (1,0,1) D: (,0,) Msg: (1,1,) B: (1,0,1) B: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 5

53 STP: Handling failures Suppose the Ethernet LAN fails Switch : Stops hearing the root s messages through port 1, so it becomes designated Port becomes root Updates its own message 1 D: (1,,) R: (1,1,) D: (,0,) Msg: (1,,) B: (1,0,1) 4 Msg: (1,,4) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 5

54 STP: Handling failures Suppose the Ethernet LAN fails Switch 4: Updates message heard on root port Updates its own message Switch : Stops hearing the root s messages through port, so it becomes designated 1 D: (1,,) R: (1,,) D: (,0,) Msg: (1,,) D: (1,1,) 4 Msg: (1,,4) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 54

55 STP: Handling topology change Suppose we fix the LAN. Now we have created (temporary) forwarding loops R: (1,,) 4 Msg: (1,,4) This also happens when switches are powered- up 1 D: (1,,) D: (,0,) Msg: (1,,) D: (1,1,) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) D: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 55

56 STP: Pre- forwarding port state Suppose any of the following apply to a port: 1. TransiAon from B à D. Any newly- connected port (detect Ethernet carrier). Any port on a freshly- powered switch The port then enters the pre- forwarding (PF) state, where: It sends configuraaon messages and transiaons to blocked and root states as if designated 1 PF: (1,,) R: (1,,) D: (,0,) Msg: (1,,) PF: (1,1,) 4 Msg: (1,,4) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) But it does not forward data frames, so can t create loops PF: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 56

57 STP: Pre- forwarding port state Switches returns to old state R: (1,,) 4 Msg: (1,,4) 1 R: (1,0,1) D: (,0,) Msg: (1,1,) PF: (1,1,) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) PF: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 57

58 STP: Pre- forwarding port state Switch returns to old state Switch returns to old state R: (1,,) 4 Msg: (1,,4) 1 R: (1,0,1) D: (,0,) Msg: (1,1,) B: (1,0,1) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) PF: (1,0,1) 1 Msg: (1,0,1) D: (1,0,1) Networked Systems 05/GZ01 58

59 STP: Pre- forwarding port state Switch returns to old state Switch returns to old state Switch 4 returns to old state R: (1,1,) 4 Msg: (1,,4) Now switch 1, port 1 remains in the pre- forwarding state 1 R: (1,0,1) D: (,0,) Msg: (1,1,) B: (1,0,1) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) 1 1 PF: (1,0,1) D: (1,0,1) Msg: (1,0,1) Networked Systems 05/GZ01 59

60 STP: Leaving the pre- forwarding state If sall in PF state ager some number of seconds (forwarding delay parameter) then the port becomes designated (D) How long should forwarding delay be? Long enough for the enare spanning tree to re- form, i.e.: Twice the maximum transit Ame across the extended LAN 0 seconds in 80.1d 1 R: (1,0,1) R: (1,1,) D: (,0,) Msg: (1,1,) B: (1,0,1) 4 Msg: (1,,4) R: (1,1,) D: (1,1,) Msg: (1,1,) 1 R: (1,0,1) 1 1 D: (1,0,1) D: (1,0,1) Msg: (1,0,1) Networked Systems 05/GZ01 60

61 The evolufon of Ethernet From the coaxial cable shared medium to switches Even more capacity, with simultaneous conversaaons From Mbit/s experimental Ethernet to 100 Gbit/s recent standards From electrical signaling to opacal Changed everything except the frame format Lesson: The right interface can accommodate many changes ImplementaAon is hidden behind interface Networked Systems 05/GZ01 61

62 Today We finish the funcaonality of the link layer, and Ae it in to IP 1. Framing and addressing. Repeaters, hubs, and switches. Bootstrapping a host Protocols for bootstrapping: DHCP, ARP CommunicaAng over the same, different networks Networked Systems 05/GZ01 6

63 What does a host need to know? What IP address should the host use? What local DNS server to use? How to tell which desanaaons are local? How to address them using the local network? How to send packets to remote desanaaons???? host host... DNS host host... DNS 1...0/ / router router router Networked Systems 05/GZ01 6

64 Avoiding manual configurafon Dynamic Host ConfiguraAon Protocol (DHCP) End host learns how to send packets Learn IP address, DNS servers, gateway, what s local Address ResoluAon Protocol (ARP) For local desanaaons, learn the mapping between IP address and MAC address host host... DNS 1A- F- BB AD host host... DNS 1...0/ router router router /4 Networked Systems 05/GZ01 64

65 Key ideas in both protocols BroadcasFng: when in doubt, shout! Broadcast query to all hosts in the local- area- network when you don t know how to idenafy the right one Caching: remember the past for a while Store the informaaon you learn to reduce overhead Remember your own address and other host s addresses Soe state: eventually forget the past Associate a 1me- to- live field with the informaaon On expiry either refresh or discard the informaaon This is key for robustness in the face of unpredictable change Networked Systems 05/GZ01 65

66 Bootstrapping problem Host doesn t have an IP address yet So, host doesn t know what source address to use Host doesn t know whom to ask for an IP address So, host doesn t know what desfnafon address to use host host router router Networked Systems 05/GZ01 66

67 DHCP discovery, from the client DHCP SoluFon: shout to discover a server that can help Client broadcasts a DHCP discover message (to the broadcast IP address, ) Two possibiliaes: 1. Server on same subnet sends a reply offering an address. Or: a DHCP relay agent (configured only with DHCP server s IP address) unicasts to a DHCP server on another network DHCP server replies unicast to relay agent; agent forwards replies to the new host s network host host DHCP server DHCP server DHCP relay router router Networked Systems 05/GZ01 67

68 Response from the DHCP server The server responds with a DHCP offer message Contains configuraaon parameters (including proposed IP address, mask, gateway router, DNS server) Contains lease 1me (duraaon the informaaon remains valid) MulAple servers may respond MulAple servers on the same subnetwork Each may respond with an offer AccepAng one of the offers Client sends a DHCP request echoing the parameters The DHCP server responds with a DHCP ACK to confirm The other servers see they were not chosen They can then safely offer those same parameters to other clients Networked Systems 05/GZ01 68

69 Dynamic Host ConfiguraFon Protocol Arriving client DHCP discover (broadcast) DHCP offer (broadcast) DHCP ACK (broadcast) DHCP request (broadcast) DHCP server Why all the broadcasts? Discover broadcast: client doesn t know DHCP server s idenaty Offer, ACK broadcast: client doesn t have an IP yet Request broadcast: so other servers can see Networked Systems 05/GZ01 69

70 Soe state: Refresh or forget Why is a lease Ame necessary? Client can release the IP address (DHCP release) e.g., clean shutdown of the computer But, host might not release the address e.g., the host crashes e.g., buggy client sogware And you don t want the address to be allocated forever Performance trade- offs Short lease Ame: returns inacave addresses quickly Long lease Ame: avoids overhead of frequent renewals & lessens frequency of lease being denied Networked Systems 05/GZ01 70

71 So, now the host knows things ü IP address ü Mask ü Gateway router ü DNS server And can send packets to other IP addresses But: how to use the local network to do this? Networked Systems 05/GZ01 71

72 Figuring out where to send locally Two cases: 1. DesAnaAon is on the local network: need to address it directly. DesAnaAon is not local (remote): need to figure out the first hop on the local network Determining if it s local: use the netmask e.g., bitwise- AND the desanaaon IP address with Is it the same value as when we do the same with own IP address? Yes à desanaaon IP is local; no à desanaaon IP is remote host host... DNS 1A- F- BB AD host host... DNS 1...0/ router router router /4 Networked Systems 05/GZ01 7

73 Figuring out where to send locally () If it s remote, look up the first hop in a (very small) local rouang table e.g., by default, route via Now do the local case but for rather than ulamate desanaaon IP address host host... DNS 1A- F- BB AD host host... DNS 1...0/ router router router /4 For the local case, need to determine the desanaaon s link- layer address How does a host translate the next hop IP address to a link- layer address? Networked Systems 05/GZ01 7

74 Address ResoluFon Protocol (ARP) Every node maintains an ARP table (IP address, link- layer address) pairs Consult the table when sending a packet Map desanaaon IP address to desanaaon MAC address Encapsulate and transmit the data packet But: what if IP address not in the table? Sender broadcasts: Who has IP address ? Receiver responds (unicast, to the source of the broadcast): link- layer address D7- FA- 0- B0 Sender caches result in its ARP table Sender may include its own <IP, link- layer> address mapping in request, so that receiver can reply back to the sender Networked Systems 05/GZ01 74

75 Example: Puong it all together How does host A send a datagram to host B? 1. A sends packet to R. R sends packet to B A host 74:9:9c:e8:ff: netmask 0xfffff000 49:bd:d:C7:56:a B host Network /0 e6:e9:00:17:bb:4b router R 1a::f9:cd:06:9b Network /0 Networked Systems 05/GZ01 75

76 Host A decides to send through R Host A constructs an IP packet to send to B IP source , IP desanaaon Host A has a gateway router R Used to reach any desanaaon outside of /0 Address for R learned via DHCP A host 74:9:9c:e8:ff: netmask 0xfffff000 49:bd:d:C7:56:a B host Network /0 e6:e9:00:17:bb:4b router R 1a::f9:cd:06:9b Network /0 Networked Systems 05/GZ01 76

77 Host A sends packet through R Host A learns the MAC address of R s interface ARP request: broadcast request for ARP response: R responds with e6:e9:00:17:bb:4b Host A encapsulates the packet in a link- layer header and sends to R A host 74:9:9c:e8:ff: netmask 0xfffff000 49:bd:d:C7:56:a B host Network /0 To: R A à B data e6:e9:00:17:bb:4b router R 1a::f9:cd:06:9b Network /0 Networked Systems 05/GZ01 77

78 R decides how to forward datagram Router R s leg interface receives the packet R extracts the IP packet from the Ethernet frame R sees the IP packet is desaned to Router R consults its forwarding table Packet matches /0 via right interface A host 74:9:9c:e8:ff: netmask 0xfffff000 49:bd:d:C7:56:a B host Network /0 e6:e9:00:17:bb:4b A à B data router R 1a::f9:cd:06:9b Network /0 Networked Systems 05/GZ01 78

79 R sends datagram to B Router R s right interface learns the link- layer address of host B ARP request: broadcast request for ARP response: B responds with 49:bd:d:C7:56:a Router R encapsulates the packet and sends to B A host 74:9:9c:e8:ff: netmask 0xfffff000 49:bd:d:C7:56:a B host Network /0 e6:e9:00:17:bb:4b router R A à B data 1a::f9:cd:06:9b Network /0 Networked Systems 05/GZ01 79 To: B

80 Security analysis of ARP ImpersonaFon Any node that hears an ARP request can answer and can say whatever they want Actual legit receiver never sees a problem Because even though later packets carry its IP address, its NIC doesn t capture them since not its link- layer address Man- in- the- middle apack Imposter updates frames with correct link- layer address and forwards whatever it receives to the legit desanaaon but gets to inspect (and maybe alter) it first Does the afacker have to win a race? Maybe not, if sender blindly believes ARP responses Networked Systems 05/GZ01 80

81 The problem with extended LANs Switched LANs afford greater scalability, but extended LANs do not isolate traffic Three resulang issues: 1. Security: Allows eavesdropping across LANs, just by puwng an interface in promiscuous mode. Load: Some LANs are more heavily- used than others, may be desirable to separate them at Ames.. Broadcast scalability: Broadcast frames traverse the enare extended LAN; this reduces overall performance Networked Systems 05/GZ01 81

82 Virtual LANs (VLANs) Computer Science Electrical Engineering Switch assigns each port a color, an idenafier designaang the VLAN that port belongs to Traffic isolaaon: colors = broadcast domains Easily reconfigurable port assignments RouAng between VLANs: layer rouang funcaonality Networked Systems 05/GZ01 8

83 VLAN example Configure ports on W, X, Y, and Z to be in appropriate VLANs Trunk ports between B1 and B configured for both VLANs Bridge inserts VLAN header containing color between Ethernet header and payload Trunk link If a packet contains a VLAN header, bridges only forward on matching- color or trunk ports Networked Systems 05/GZ01 8

84 Comparing L switches and L routers Advantages of L switches over L routers No human configuraaon is needed Fast filtering and forwarding of frames Disadvantages of L switches over L routers Topology restricted to a spanning tree Large networks require large ARP tables Broadcast storms can cause the network to collapse Can t accommodate non- Ethernet segments (why not?) Networked Systems 05/GZ01 84

85 Acknowledgement Selected parts adapted from lecture material by Scof Shenker (UC Berkeley) and Kurose and Ross Computer Networking (4/e) Coursework due Friday 15 th November, 4:05 PM Midterm exam in regular lecture Fmeslot, Thursday 14 th November NEXT TIME Networked Systems 05/GZ01 85

Addressing and Switching in the Link Layer

Addressing and Switching in the Link Layer Addressing and Switching in the Link Layer Stefano Vissicchio UCL Computer Science COMP00 Recap: We have done a full pass on the stack email WWW phone...! SMTP HTTP RTP...! TCP UDP!! IP! When and how to

More information

Address and Switching in the Link Layer

Address and Switching in the Link Layer Address and Switching in the Link Layer Brad Karp (slides contributed by Kyle Jamieson, Scott Shenker, and adapted from Kurose and Ross) UCL Computer Science CS 05/GZ01 18 th November 014 1 The link layer:

More information

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Switching and Forwarding Reading: Chapter 3 1/30/14 1 Switching and Forwarding Reading: Chapter 3 1/30/14 1 Switching and Forwarding Next Problem: Enable communication between hosts that are not directly connected Fundamental Problem of the Internet or any

More information

CS 457 Lecture 11 More IP Networking. Fall 2011

CS 457 Lecture 11 More IP Networking. Fall 2011 CS 457 Lecture 11 More IP Networking Fall 2011 IP datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol

More information

ECE 158A: Lecture 13. Fall 2015

ECE 158A: Lecture 13. Fall 2015 ECE 158A: Lecture 13 Fall 2015 Random Access and Ethernet! Random Access! Basic idea: Exploit statistical multiplexing Do not avoid collisions, just recover from them When a node has packet to send Transmit

More information

Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz

Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz Ethernet EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee122/ Materials with thanks

More information

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies Data Link Layer Our goals: understand principles behind data link layer services: link layer addressing instantiation and implementation of various link layer technologies 1 Outline Introduction and services

More information

Missing pieces + Putting the pieces together

Missing pieces + Putting the pieces together Missing pieces + Putting the pieces together EE 122, Fall 2013 Sylvia Ratnasamy http://inst.eecs.berkeley.edu/~ee122/ Material thanks to Ion Stoica, Scott Shenker, Jennifer Rexford, Nick McKeown, and many

More information

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017 CS 43: Computer Networks Switches and LANs Kevin Webb Swarthmore College December 5, 2017 Ethernet Metcalfe s Ethernet sketch Dominant wired LAN technology: cheap $20 for NIC first widely used LAN technology

More information

Communication Networks

Communication Networks Communication Networks Spring 2018 Laurent Vanbever nsg.ee.ethz.ch ETH Zürich (D-ITET) March 19 2018 Materials inspired from Scott Shenker & Jennifer Rexford Last week on Communication Networks Reliable

More information

Principles behind data link layer services

Principles behind data link layer services Data link layer Goals: Principles behind data link layer services Error detection, correction Sharing a broadcast channel: Multiple access Link layer addressing Reliable data transfer, flow control: Done!

More information

Principles behind data link layer services:

Principles behind data link layer services: Data link layer Goals: Principles behind data link layer services: Error detection, correction Sharing a broadcast channel: Multiple access Link layer addressing Reliable data transfer, flow control Example

More information

Principles behind data link layer services:

Principles behind data link layer services: Data link layer Goals: Principles behind data link layer services: Error detection, correction Sharing a broadcast channel: Multiple access Link layer addressing Reliable data transfer, flow control Example

More information

L2 Addressing and data plane. Benjamin Baron

L2 Addressing and data plane. Benjamin Baron L2 Addressing and data plane Benjamin Baron benjamin.baron@lip6.fr Goals of Today s Lecture Devices that shuttling packets at different layers - Repeaters and hubs - Bridges and switches - Routers Switch

More information

Missing pieces + Putting the pieces together

Missing pieces + Putting the pieces together Missing pieces + Putting the pieces together CS 168, Fall 2014 Sylvia Ratnasamy Material thanks to Ion Stoica, Scott Shenker, Jennifer Rexford, Nick McKeown, and many other colleagues Today Switched Ethernet

More information

Link layer: introduction

Link layer: introduction Link layer: introduction terminology: hosts and routers: nodes communication channels that connect adjacent nodes along communication path: links wired links wireless links LANs layer-2 packet: frame,

More information

Medium Access Protocols

Medium Access Protocols Medium Access Protocols Summary of MAC protocols What do you do with a shared media? Channel Partitioning, by time, frequency or code Time Division,Code Division, Frequency Division Random partitioning

More information

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request CS 455/555 Intro to Networks and Communications Link Layer Addressing, ernet, and a Day in the Life of a Web Request Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu

More information

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1 Chapter 3 Part 2 Switching and Bridging Networking CS 3470, Section 1 Refresher We can use switching technologies to interconnect links to form a large network What is a hub? What is a switch? What is

More information

CS 3516: Advanced Computer Networks

CS 3516: Advanced Computer Networks Welcome to CS 3516: Advanced Computer Networks Prof. Yanhua Li Time: 9:00am 9:50am M, T, R, and F Location: Fuller 320 Fall 2017 A-term 1 Some slides are originally from the course materials of the textbook

More information

Summary of MAC protocols

Summary of MAC protocols Summary of MAC protocols What do you do with a shared media? Channel Partitioning, by time, frequency or code Time Division, Code Division, Frequency Division Random partitioning (dynamic) ALOHA, S-ALOHA,

More information

CSC 4900 Computer Networks: Link Layer (2)

CSC 4900 Computer Networks: Link Layer (2) CSC 4900 Computer Networks: Link Layer (2) Professor Henry Carter Fall 2017 Link Layer 6.1 Introduction and services 6.2 Error detection and correction 6.3 Multiple access protocols 6.4 LANs addressing,

More information

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Professor Yashar Ganjali Department of Computer Science University of Toronto. Professor Yashar Ganjali Department of Computer Science University of Toronto yganjali@cs.toronto.edu http://www.cs.toronto.edu/~yganjali Announcements Problem Set 1 is posted on class web page. Problems

More information

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 9 The Data Link Layer part II Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Physical Addresses Physical (or LAN or MAC) address: 48 bit string Hexadecimal representation

More information

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Janno< Administrivia Homework I out later today, due next Thursday, Sep 25th Today: Link Layer

More information

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose CSEN 503 Introduction to Communication Networks Mervat AbuElkheir Hana Medhat Ayman Dayf **Slides are attributed to J. F. Kurose 1-2 Link Layer Link Layer: Introduction Some terminology: hosts and routers

More information

Principles behind data link layer services:

Principles behind data link layer services: Data Link Layer Goals: Principles behind data link layer services: Error detection, correction Sharing a broadcast channel: multiple access Link layer addressing Reliable data transfer, flow control: Done!

More information

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging) Administrivia CSC458 Lecture 4 Bridging LANs and IP Homework: # 1 due today # 2 out today and due in two weeks Readings: Chapters 3 and 4 Project: # 2 due next week Tutorial today: Joe Lim on project 2

More information

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Administrivia Homework I out later today, due next Thursday Today: Link Layer (cont.)

More information

CSE 123A Computer Networks

CSE 123A Computer Networks CSE 123A Computer Networks Winter 2005 Lecture 6: Data-Link III: Hubs, Bridges and Switches Some portions courtesy Srini Seshan or David Wetherall Last Time How do multiple hosts share a single channel?

More information

Switching & ARP Week 3

Switching & ARP Week 3 Switching & ARP Week 3 Module : Computer Networks Lecturer: Lucy White lbwhite@wit.ie Office : 324 Many Slides courtesy of Tony Chen 1 Ethernet Using Switches In the last few years, switches have quickly

More information

Interface The exit interface a packet will take when destined for a specific network.

Interface The exit interface a packet will take when destined for a specific network. The Network Layer The Network layer (also called layer 3) manages device addressing, tracks the location of devices on the network, and determines the best way to move data, which means that the Network

More information

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame Links Reading: Chapter 2 CS 375: Computer Networks Thomas Bressoud 1 Goals of Todayʼs Lecture Link-layer services Encoding, framing, and error detection Error correction and flow control Sharing a shared

More information

EPL606. Internetworking. Part 2a. 1Network Layer

EPL606. Internetworking. Part 2a. 1Network Layer EPL606 Internetworking Part 2a The majority of the slides in this course are adapted from the accompanying slides to the books by Larry Peterson and Bruce Davie and by Jim Kurose and Keith Ross. Additional

More information

Some portions courtesy Srini Seshan or David Wetherall

Some portions courtesy Srini Seshan or David Wetherall CSE 123 Computer Networks Fall 2009 Lecture 6: Data-Link III: Hubs, Bridges and Switches Some portions courtesy Srini Seshan or David Wetherall Misc Homework solutions have been posted I ll post a sample

More information

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2.

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2. CS 356: Computer Network Architectures Lecture 14: Switching hardware, IP auxiliary functions, and midterm review [PD] chapter 3.4.1, 3.2.7 Xiaowei Yang xwy@cs.duke.edu Switching hardware Software switch

More information

ECE 4450:427/527 - Computer Networks Spring 2017

ECE 4450:427/527 - Computer Networks Spring 2017 ECE 4450:427/527 - Computer Networks Spring 2017 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.2: IP Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks

More information

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21!

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21! CSE 123: Computer Networks Alex C. Snoeren HW 2 due Thursday 10/21! Finishing up media access Contention-free methods (rings) Moving beyond one wire Link technologies have limits on physical distance Also

More information

LAN Interconnection and Other Link Layer Protocols

LAN Interconnection and Other Link Layer Protocols LAN Interconnection and Other Link Layer Protocols Ethernet dominant link layer technology for local-area networks Ethernet frame structure Kai Shen Dept. of Computer Science, University of Rochester Ethernet

More information

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Janno< Administrivia Homework I out later today, due next ursday, Sep 27th Today: Link Layer

More information

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner Communication Networks (0368-3030) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner Kurose & Ross, Chapters 5.5-5.6 (5 th ed.) Tanenbaum & Wetherall, Chapters 4.3.4

More information

CSC 401 Data and Computer Communications Networks

CSC 401 Data and Computer Communications Networks CSC 401 Data and Computer Communications Networks Link Layer, Switches, VLANS, MPLS, Data Centers Sec 6.4 to 6.7 Prof. Lina Battestilli Fall 2017 Chapter 6 Outline Link layer and LANs: 6.1 introduction,

More information

Network Model. Why a Layered Model? All People Seem To Need Data Processing

Network Model. Why a Layered Model? All People Seem To Need Data Processing Network Model Why a Layered Model? All People Seem To Need Data Processing Layers with Functions Packet Propagation Each router provides its services to support upper-layer functions. Headers (Encapsulation

More information

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD Review Error Detection: CRC Multiple access protocols Slotted ALOHA CSMA/CD LAN addresses and ARP Ethernet Some slides are in courtesy of J. Kurose and K. Ross Overview Ethernet Hubs, bridges, and switches

More information

Transla'ng Addresses. Goals of Today s Lecture

Transla'ng Addresses. Goals of Today s Lecture Transla'ng ddresses 1 Goals of Today s Lecture Three different kinds of addresses Host names (e.g., www.cnn.com) IP addresses (e.g., 64.236.16.20) MC addresses (e.g., 00-15- C5-49- 04-9) Protocols for

More information

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner Communication Networks (0368-3030) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner Kurose & Ross, Chapter 4 (5 th ed.) Many slides adapted from: J. Kurose & K. Ross

More information

7010INT Data Communications Lecture 7 The Network Layer

7010INT Data Communications Lecture 7 The Network Layer Introduction 7010INT Data Communications Lecture 7 The Layer Internetworking & Devices Connecting LANs Routing Backbone networks Virtual LANs Addressing Application Presentation Session Data Link Physical

More information

CSCI Computer Networks

CSCI Computer Networks CSCI-1680 - Computer Networks Link Layer III: LAN & Switching Chen Avin Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti, Peterson & Davie, Rodrigo Fonseca Today: Link Layer (cont.)

More information

Lecture 9: Bridging & Switching"

Lecture 9: Bridging & Switching Lecture 9: Bridging & Switching" CSE 123: Computer Networks Alex C. Snoeren HW 2 due Wednesday! Lecture 9 Overview" Finishing up media access Contention-free methods (rings) Moving beyond one wire Link

More information

A primer on modern LANs

A primer on modern LANs Advanced Networks http://disi.unitn.it/locigno/index.php/teaching-duties/ A primer on modern LANs Renato Lo Cigno Copyright Quest opera è prote1a dalla licenza: Crea&ve Commons A-ribuzione- Non commerciale-

More information

Cisco Cisco Certified Network Associate (CCNA)

Cisco Cisco Certified Network Associate (CCNA) Cisco 200-125 Cisco Certified Network Associate (CCNA) http://killexams.com/pass4sure/exam-detail/200-125 Question: 769 Refer to exhibit: Which destination addresses will be used by Host A to send data

More information

CompSci 356: Computer Network Architectures. Lecture 7: Switching technologies Chapter 3.1. Xiaowei Yang

CompSci 356: Computer Network Architectures. Lecture 7: Switching technologies Chapter 3.1. Xiaowei Yang CompSci 356: Computer Network Architectures Lecture 7: Switching technologies Chapter 3.1 Xiaowei Yang xwy@cs.duke.edu Types of switching Datagram Virtual circuit Source routing Today Bridges and LAN switches

More information

Goals of Today s Lecture. Transla'ng Addresses. Separa'ng Names and IP Addresses. Separa'ng IP and MAC Addresses

Goals of Today s Lecture. Transla'ng Addresses. Separa'ng Names and IP Addresses. Separa'ng IP and MAC Addresses Goals of Today s Lecture Transla'ng ddresses Three different kinds of addresses Host names (e.g., www.cnn.com) IP addresses (e.g., 64.236.16.20) MC addresses (e.g., 00-15- C5-49- 04-9) Protocols for transla'ng

More information

Introduction to Internetworking

Introduction to Internetworking Introduction to Internetworking Stefano Vissicchio UCL Computer Science COMP0023 Internetworking Goal: Connect many networks together into one Internet. Any computer can send to any other computer on any

More information

Computer Networks. Wenzhong Li. Nanjing University

Computer Networks. Wenzhong Li. Nanjing University Computer Networks Wenzhong Li Nanjing University 1 Chapter 2. Direct Link Networks Link Service and Framing Error Detection and Reliable Transmission HDLC, PPP, and SONET Token Ring Ethernet Bridges and

More information

CSCD 330 Network Programming Spring 2017

CSCD 330 Network Programming Spring 2017 CSCD 330 Network Programming Spring 2017 Lecture 18 Link Layer Protocols Continued Who is this? Reading: Chapter 5 Some slides provided courtesy of J.F Kurose and K.W. Ross, All Rights Reserved, copyright

More information

The Link Layer and LANs: Ethernet and Swiches

The Link Layer and LANs: Ethernet and Swiches The Link Layer and LNs: Ethernet and Swiches EECS3214 2018-03-21 Link layer, LNs: outline 6.1 introduction, services 6.2 error detection, correction 6.3 multiple access protocols 6.4 LNs addressing, RP

More information

EEC-484/584 Computer Networks

EEC-484/584 Computer Networks EEC-484/584 Computer Networks Lecture 13 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline 2 Review of lecture 12 Routing Congestion

More information

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

Hubs. twisted pair. hub. 5: DataLink Layer 5-1 Hubs Hubs are essentially physical-layer repeaters: bits coming from one link go out all other links at the same rate no frame buffering no CSMA/CD at : adapters detect collisions provides net management

More information

Layer 2 functionality bridging and switching

Layer 2 functionality bridging and switching Layer 2 functionality bridging and switching BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013 Overview Layer 2 functionality Error detection Bridges Broadcast and collision domains How

More information

EEC-684/584 Computer Networks

EEC-684/584 Computer Networks EEC-684/584 Computer Networks Lecture 14 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline 2 Review of last lecture Internetworking

More information

Floodless in SEATTLE: A Scalable Ethernet Architecture for Large Enterprises

Floodless in SEATTLE: A Scalable Ethernet Architecture for Large Enterprises Floodless in SEATTLE: A Scalable Ethernet Architecture for Large Enterprises Full paper available at http://www.cs.princeton.edu/~chkim Changhoon Kim, Matthew Caesar, and Jennifer Rexford Outline of Today

More information

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing Last time Network layer Introduction forwarding vs. routing Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding tables, longest prefix matching IP: the Internet Protocol

More information

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs.

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs. Internetworking Multiple networks are a fact of life: Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs. Fault isolation,

More information

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 5 The Data Link Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Link Layer: setting the context two physically connected devices: host-router, router-router, host-host,

More information

Internetworking Part 1

Internetworking Part 1 CMPE 344 Computer Networks Spring 2012 Internetworking Part 1 Reading: Peterson and Davie, 3.1 22/03/2012 1 Not all networks are directly connected Limit to how many hosts can be attached Point-to-point:

More information

Top-Down Network Design

Top-Down Network Design Top-Down Network Design Chapter Seven Selecting Switching and Routing Protocols Original slides by Cisco Press & Priscilla Oppenheimer Selection Criteria for Switching and Routing Protocols Network traffic

More information

Telecommunication Protocols Laboratory Course. Lecture 3

Telecommunication Protocols Laboratory Course. Lecture 3 Telecommunication Protocols Laboratory Course Lecture 3 Course map Last time: we discussed protocols of the Medium Access Control (MAC) sub-layer Deal with broadcast channels and their (multi-party) protocols

More information

CSC 4900 Computer Networks: Network Layer

CSC 4900 Computer Networks: Network Layer CSC 4900 Computer Networks: Network Layer Professor Henry Carter Fall 2017 Chapter 4: Network Layer 4. 1 Introduction 4.2 What s inside a router 4.3 IP: Internet Protocol Datagram format 4.4 Generalized

More information

Link Layer Review. CS244A Winter 2008 March 7, 2008 Ben Nham

Link Layer Review. CS244A Winter 2008 March 7, 2008 Ben Nham Link Layer Review CS244A Winter 2008 March 7, 2008 Ben Nham Announcements PA3 due today PS3 due next Wednesday PA4 due next Friday Final Exam Review session next Friday 7-10 PM on Thursday, March 20 Multiple

More information

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Today: Link Layer (cont.) Framing Reliability Error correction Sliding window Medium

More information

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang CompSci 356: Computer Network Architectures Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch 3.1.5 & 3.2 Xiaowei Yang xwy@cs.duke.edu Review Past lectures Single link networks Point-to-point,

More information

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8 CIS 551 / TCOM 401 Computer and Network Security Spring 2007 Lecture 8 Announcements Reminder: Project 1 is due on tonight by midnight. Midterm 1 will be held next Thursday, Feb. 8th. Example midterms

More information

Introduction to OSPF

Introduction to OSPF Campus Networking Introduction to OSPF Workshop Campus Layer-2 Networking Network Workshop Design These materials are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license

More information

CSCI 466 Midterm Networks Fall 2011

CSCI 466 Midterm Networks Fall 2011 CSCI 466 Midterm Networks Fall 2011 Name: This exam consists of 7 problems on the following 9 pages. You may use your single- sided hand- written 8 ½ x 11 note sheet and a calculator during the exam. No

More information

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols High Level View EE 122: Ethernet and 802.11 Ion Stoica September 18, 2002 Goal: share a communication medium among multiple hosts connected to it Problem: arbitrate between connected hosts Solution goals:

More information

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48 Computer Networks VU MIF CS 1/48 Today Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs 2/48 1 Link layer: introduction terminology: hosts and routers: nodes

More information

ECE 4450:427/527 - Computer Networks Spring 2017

ECE 4450:427/527 - Computer Networks Spring 2017 ECE 4450:427/527 - Computer Networks Spring 2017 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 6.1: Internetworking Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer

More information

CMPE 150 Winter 2009

CMPE 150 Winter 2009 CMPE 150 Winter 2009 Lecture 9 February 3, 2009 P.E. Mantey CMPE 150 -- Introduction to Computer Networks Instructor: Patrick Mantey mantey@soe.ucsc.edu http://www.soe.ucsc.edu/~mantey/ / t / Office: Engr.

More information

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 6 The Data Link Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Link Layer: setting the context two physically connected devices: host-router, router-router, host-host,

More information

2. LAN Topologies Gilbert Ndjatou Page 1

2. LAN Topologies Gilbert Ndjatou Page 1 2. LAN Topologies Two basic categories of network topologies exist, physical topologies and logical topologies. The physical topology of a network is the cabling layout used to link devices. This refers

More information

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks.

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks. Computer Networks Prof: Sujoy Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 21 Local Internetworking Good day. Today we will be talking about

More information

Telematics I. Chapter 6 Internetworking. (Acknowledement: These slides have been compiled from H. Karl s set of slides)

Telematics I. Chapter 6 Internetworking. (Acknowledement: These slides have been compiled from H. Karl s set of slides) Telematics I Chapter 6 Internetworking (Acknowledement: These slides have been compiled from H. Karl s set of slides) 1 Goals of This Chapter So far: we can communicate between nodes all connected directly

More information

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115 CCM 4300 Lecture 5 Computer Networks, Wireless and Mobile Communications Dr Shahedur Rahman s.rahman@mdx.ac.uk Room: T115 1 Recap of Last Session Described the physical layer Analogue and Digital signal

More information

Lecture 7. Reminder: Homework 2, Programming Project 1 due today. Homework 3, Programming Project 2 out, due Thursday next week. Questions?

Lecture 7. Reminder: Homework 2, Programming Project 1 due today. Homework 3, Programming Project 2 out, due Thursday next week. Questions? Lecture 7 Reminder: Homework 2, Programming Project 1 due today. Homework 3, Programming Project 2 out, due Thursday next week. Questions? Thursday, September 15 CS 475 Networks - Lecture 7 1 Outline Chapter

More information

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control Links EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee122/ Announcements Homework

More information

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address ARP, IP Chong-Kwon Kim Routing Within a LAN MAC Address Each station (or network interface) should be uniquely identified Use 6 byte long address Broadcast & Filter Broadcast medium Signals are transmitted

More information

1 Connectionless Routing

1 Connectionless Routing UCSD DEPARTMENT OF COMPUTER SCIENCE CS123a Computer Networking, IP Addressing and Neighbor Routing In these we quickly give an overview of IP addressing and Neighbor Routing. Routing consists of: IP addressing

More information

Chapter 2. Switch Concepts and Configuration. Part I

Chapter 2. Switch Concepts and Configuration. Part I Chapter 2 Switch Concepts and Configuration Part I CCNA3-1 Chapter 2-1 Note for Instructors These presentations are the result of a collaboration among the instructors at St. Clair College in Windsor,

More information

ICS 451: Today's plan

ICS 451: Today's plan ICS 451: Today's plan ICMP ping traceroute ARP DHCP summary of IP processing ICMP Internet Control Message Protocol, 2 functions: error reporting (never sent in response to ICMP error packets) network

More information

Links. CS125 - mylinks 1 1/22/14

Links. CS125 - mylinks 1 1/22/14 Links 1 Goals of Today s Lecture Link-layer services Encoding, framing, and error detection Error correction and flow control Sharing a shared media Channel partitioning Taking turns Random access Shared

More information

PUCPR. Internet Protocol. Edgard Jamhour E N G L I S H S E M E S T E R

PUCPR. Internet Protocol. Edgard Jamhour E N G L I S H S E M E S T E R PUCPR Internet Protocol Address Resolution and Routing Edgard Jamhour 2014 E N G L I S H S E M E S T E R 1. Address Resolution The IP address does not identify, indeed, a computer, but a network interface.

More information

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved

More information

Introduction to Communication Networks Spring Unit 13 Network extensions Bridges.

Introduction to Communication Networks Spring Unit 13 Network extensions Bridges. Introduction to Communication Networks Spring 2007 Unit 13 Network extensions Bridges. Acknowledgements slides coming from: The book by Peterson/Davie The book by Wiliam Stallings Slides from lectures

More information

EXAM - HP0-Y52. Applying HP FlexNetwork Fundamentals. Buy Full Product.

EXAM - HP0-Y52. Applying HP FlexNetwork Fundamentals. Buy Full Product. HP EXAM - HP0-Y52 Applying HP FlexNetwork Fundamentals Buy Full Product http://www.examskey.com/hp0-y52.html Examskey HP HP0-Y52 exam demo product is here for you to test the quality of the product. This

More information

EE 122: Ethernet and

EE 122: Ethernet and EE 122: Ethernet and 802.11 Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose) High Level View Goal: share a communication medium among multiple hosts

More information

More on Link Layer. Recap of Last Class. Interconnecting Nodes in LAN (Local-Area Network) Interconnecting with Hubs. Computer Networks 9/21/2009

More on Link Layer. Recap of Last Class. Interconnecting Nodes in LAN (Local-Area Network) Interconnecting with Hubs. Computer Networks 9/21/2009 More on Link Layer Kai Shen Recap of Last Class Ethernet dominant link layer technology for local-area l networks Ethernet frame structure Ethernet multiple access control CSMA/CD, exponential back-off

More information

Managing and Securing Computer Networks. Guy Leduc. Chapter 7: Securing LANs. Chapter goals: security in practice: Security in the data link layer

Managing and Securing Computer Networks. Guy Leduc. Chapter 7: Securing LANs. Chapter goals: security in practice: Security in the data link layer Managing and Securing Computer Networks Guy Leduc Chapter 7: Securing LANs Computer Networking: A Top Down Approach, 7 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2016. (section 8.8) Also

More information

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100

Question Score 1 / 19 2 / 19 3 / 16 4 / 29 5 / 17 Total / 100 NAME: Login name: Computer Science 461 Midterm Exam March 10, 2010 3:00-4:20pm This test has five (5) questions. Put your name on every page, and write out and sign the Honor Code pledge before turning

More information

Chapter 4: Network Layer

Chapter 4: Network Layer Chapter 4: Introduction (forwarding and routing) Review of queueing theory Routing algorithms Link state, Distance Vector Router design and operation IP: Internet Protocol IPv4 (datagram format, addressing,

More information