Link Layer w/ much credit to Cisco CCNA and Rick Graziani (Cabrillo)
Administra>via How are the labs going? Telnet- ing into Linux as root In /etc/pam.d/remote comment out line auth required pam_securely.so Run service xinetd restart NMO posi>on SoRware Development for Cisco Advanced Services Extract informa>on from data gathered from Cisco devices, Apply analy>cs to the extracted informa>on and present it in a format for end user consump>on Good networking background with programming and database skills, and good knowledge of search techniques. This week Single Segment Network lab due Friday Next week Link Layer quiz Thursday, 4/18 Sta>c Rou>ng lab due Wednesday, 4/17 Project proposal due Tuesday 4/30 Spring 2013 CE 151 - Advanced Networks 2
Recall IP designed to interconnect diverse networks Local Area Networks Packet radio networks Satellite networks Anything else people might dream up (cup and string!) Communica>on across a set of Interconnected Networks (an InterNet!) While making minimal assump>ons about the networks IP dis>lled from monolithic TCP due to insight that reliability was to be implemented in the hosts (due to minimal assump>ons of networks) not a service needed by all network applica>ons We now study the requirements of a subnet in the Internet Architecture This is the Link Layer Spring 2013 CE 151 - Advanced Networks 3
Role of Link Layer Internet is composed of subnets Subnets are composed of channels The Link Layer manages communica>on across a subnet Framing Sharing channels that compose the subnet ( media access control ) Rou>ng across the subnet Examples Ethernet, 802.11, ATM, etc. Following focuses on Ethernet as the classic subnet technology it is everywhere, and serves as a de- facto reference for the link layer Spring 2013 CE 151 - Advanced Networks 4
Review The Internet is composed of subnets. Subnets are composed of channels. The Link Layer manages communica>on across a subnet: Framing, Sharing channels that compose the subnet ( media access control ), Rou>ng across the subnet. Spring 2013 CE 151 - Advanced Networks 5
Ethernet Media Access Control Original Ethernet CSMA/CD Repeaters, hubs, bridges, and switches Rou>ng Selec>ve Forwarding Spanning Tree Protocol (STP) VLANs Spring 2013 CE 151 - Advanced Networks 6
Original Ethernet Shared Bus When an Ethernet frame is sent all devices on the bus receive it. What do they do with it? 1111 2222 3333 nnnn Abbreviated MAC Addresses 3333 1111 Spring 2013 CE 151 - Advanced Networks 7
Original Ethernet Shared Bus When informa>on (frame) is transmiled, every PC/NIC on the shared media copies part of the transmiled frame to see if the des3na3on address matches the address of the NIC. If there is a match, the rest of the frame is copied If there is NOT a match the rest of the frame is ignored. Nope Hey, that s me! Nope 1111 2222 3333 nnnn Abbreviated MAC Addresses 3333 1111 Spring 2013 CE 151 - Advanced Networks 8
Original Ethernet Shared Bus What happens when mul>ple computers try to transmit at the same >me? 1111 2222 3333 nnnn Abbreviated MAC Addresses 3333 1111 Spring 2013 CE 151 - Advanced Networks 9
Original Ethernet Shared Bus Collision! 1111 2222 3333 nnnn Abbreviated MAC Addresses X Spring 2013 CE 151 - Advanced Networks 10
CSMA/CD CSMA/CD Let everyone have access whenever they want and we will work it out somehow. Spring 2013 CE 151 - Advanced Networks 11
CSMA/CD Carrier Sense Mul3ple Access/Collision Detec3on 1. Listen for transmission ( carrier ). 2. If no transmission is sensed, transmit data immediately. 3. Monitor channel for collision. Sta>ons sense the collision by being unable to deliver the en>re frame. (This is why there are minimum frame lengths, cable distance and speed limita>ons. This includes the 5-4- 3 rule.) 4. If collision detected, transmit a jamming signal. 5. Back off a random, exponen>ally increasing amount of >me. 6. Go back to Step 1. Spring 2013 CE 151 - Advanced Networks 12
CSMA/CD - Minimum Frame Size Remember, for CSMA/CD to work, minimum transmission >me must be twice maximum propaga>on >me. Before sending last bit of frame, sending sta>on must detect collision. Frame transmission >me must be twice maximum propaga>on >me. Minimum frame size determines maximum LAN size. Minimum Ethernet frame size (called slot 3me): 512 bits (64 bytes) S R Spring 2013 CE 151 - Advanced Networks 13
CSMA/CD Slot Time For Ethernet and Fast Ethernet is 512 bits 2800m @ 10Mbps 205m @ 100Mbps (10baseT cabling limit is 100m) ARer 512bits sender assumes no collision Minimum payload of 46bytes (368bits) 512 48 (Src) 48 (Dst) 16 (Type) 32 (FCS) Why maximum frame size? Spring 2013 CE 151 - Advanced Networks 14
Collision Domain Collision Domain: a set of ports interconnected at the physical layer (are a part of the same signal >ming domain ). Simultaneous transmissions will result in a collision. Bandwidth is shared by all sta>ons in the domain. Transmission is half- duplex. Wikipedia: A logical network segment where data packets can "collide" with one another for being sent on a shared medium. Only implemented in Ethernet (10Mb) and Fast Ethernet (100Mb) Spring 2013 CE 151 - Advanced Networks 15
Original Ethernet CSMA/CD Shared collision domains Problems Channel length limita>ons far short of slot >me Only one sta>on can transmit at a >me Shared collision domain (CSMA/CD) limited to 50-60% bandwidth u>liza>on Spring 2013 CE 151 - Advanced Networks 16
Channel Length Limita>ons Channel technologies had limited range Original Ethernet (10Mbps) 1980 to 1995 500 meters for 10base5 200 meters for 10base2 (really 185 meters) 100 meters for 10baseT Fast Ethernet (100Mbps) 1995 to 1998 100 meters for 100baseTX Far short of slot >mes 2800m for Ethernet 205m for Fast Ethernet Solu>on was repeaters, hubs, and the 5/4/3 rule Spring 2013 CE 151 - Advanced Networks 17
Review Collision Domain A logical network segment where data packets can "collide" with one another for being sent on a shared medium simultaneous transmissions will result in a collision. Bandwidth is shared by all sta>ons in the domain. Transmission is half- duplex. Original Ethernet (10Mbps) and Fast Ethernet (100Mbps) CSMA/CD Shared collision domains Problems 500m & 100m segment limita>ons vs. 2500m & 205m slot >mes Only one sta>on can transmit at a >me Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60% bandwidth u>liza>on Spring 2013 CE 151 - Advanced Networks 18
Repeaters Repeaters are Layer 1 devices used to combat alenua>on. They do NOT look at Layer 2 (MAC, Ethernet) or Layer 3 (IP) addresses. CSMA/CD. Repeaters: take in weakened signals clean them up or regenerate them send them on their way along the network Repeaters Increase the distance a LAN can reach Introduce delay Spring 2013 CE 151 - Advanced Networks 19
5/4/3 Rule Enforce slot >me limit on Ethernet subnet in presence of repeaters. The rule mandates that between any two nodes on the network, there can only be a maximum of five segments, connected through four repeaters, or concentrators, and only three of the five segments may contain user connec3ons. Webopedia.com Alterna>vely, specified algorithms for custom network configura>ons Spring 2013 CE 151 - Advanced Networks 20
5/4/3 Rule Ethernet and IEEE 802.3 implement a rule, known as the 5-4- 3 rule, for the number of repeaters and segments on shared access Ethernet backbones in a tree topology. The 5-4- 3 rule divides the network into two types of physical segments: populated (user) segments, and unpopulated (link) segments. User segments have users' systems connected to them. Link segments are used to connect the network's repeaters together. The rule mandates that between any two nodes on the network, there can only be a maximum of five segments, connected through four repeaters, or concentrators, and only three of the five segments may contain user connec>ons. The Ethernet protocol requires that a signal sent out over the LAN reach every part of the network within a specified length of =me. The 5-4- 3 rule ensures this. Each repeater that a signal goes through adds a small amount of =me to the process, so the rule is designed to minimize transmission =mes of the signals. The 5-4- 3 rule - - which was created when Ethernet, 10Base5, and 10Base2 were the only types of Ethernet network available - - only applies to shared- access Ethernet backbones. A switched Ethernet network should be exempt from the 5-4- 3 rule because each switch has a buffer to temporarily store data and all nodes can access a switched Ethernet LAN simultaneously. Spring 2013 CE 151 - Advanced Networks 21
Hubs Hub is a repeater with more than 2 ports. Layer 1 device. Signals receved on one port are regenerated and sent out all other. CSMA/CD. Hubs were also called Ethernet concentrators Mul>port repeaters Spring 2013 CE 151 - Advanced Networks 22
Review Repeaters and hubs Physical layer - regenerate signal Solve Range limita>on - extend range (5/4/3 rule for 10Mbps) to support full slot >me Remaining problems Only one sta>on can transmit at a >me Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60% bandwidth u>liza>on Spring 2013 CE 151 - Advanced Networks 23
Transmitng via a hub 3333 1111 1111 2222 Nope The hub will flood it out all ports (except for the incoming port) of all interconnected hubs in the subnet! 5555 Nope 3333 For me! 4444 Nope Spring 2013 CE 151 - Advanced Networks 24
Transmitng via a hub 2222 1111 1111 2222 For me! 5555 Nope The hub will flood it out all ports (except for the incoming port) of all interconnected hubs in the subnet! This may result in wasted bandwidth! Wasted bandwidth 3333 Nope 4444 Nope Spring 2013 CE 151 - Advanced Networks 25
Transmitng via a hub 2222 1111 1111 2222 Collision X 5555 The hub will flood it out all ports (except for the incoming port) of all interconnected hubs in the subnet! This may result in wasted bandwidth! Or collisions when sta=ons transmit at the same =me. 4444 3333 3333 4444 Spring 2013 CE 151 - Advanced Networks 26
Original Ethernet Par>al Solu>on Problem: only one sta>on can transmit at a >me. Solu>on: Buffering and selec3ve forwarding Introduce a device that Buffers frames Only forwards on interfaces it needs to More efficient use of bandwidth Allows simultaneous transmissions Splits a collision domain Called a bridge Spring 2013 CE 151 - Advanced Networks 27
Bridges A bridge is a Layer 2 device Collects frames. Selec>vely forwards frames through the network. CSMA/CD on each interface Bridges segment collision domains! Don t forward collision signals. Bridges do not restrict broadcast or mul>cast traffic. Therefore broadcast domains are not affected. Bridges implement selec>ve forwarding by Learning the MAC address of all devices on connected segments. Builds a bridging table and forwards frames based on this table. Result is fewer collisions and therefore improved bandwidth u>liza>on. Spring 2013 CE 151 - Advanced Networks 28
Broadcast Domain Broadcast Domain: a set of ports interconnected at the link layer. A broadcast will reach all sta>ons in the domain. Equivalent to (defines) a subnet in the Internet Architecture. Wikipedia: a logical division of a computer network, in which all nodes can reach each other by broadcast at the data link layer. Bridges allow a broadcast domain to be segmented into many collision domains; however shared collision domains (CSMA/CD) are limited to at most 50-60% u=liza=on of the channel Elimina>on of shared collision domains enables 100% channel u>liza>on. To eliminate CSMA/CD requires elimina>ng the sharing of a medium Accomplish this by moving from half- duplex to full- duplex communica3on Spring 2013 CE 151 - Advanced Networks 29
Review Broadcast Domain A logical division of a computer network, in which all nodes can reach each other by broadcast at the data link layer. Equivalent to (defines) a subnet in the Internet Architecture. Bridges Link layer buffer frames Selec>ve forwarding Mul>ple collision domains per broadcast domain Solves Mul>ple sta>ons can transmit at the same >me Remaining problem Shared collision domain (CSMA/CD) limited to 50-60% bandwidth u>liza>on Spring 2013 CE 151 - Advanced Networks 30
Duplex Transmissions Half- duplex Transmission: Either way, but only one way at a >me. Two way street, but only one way at a >me Full- duplex Transmission: Both ways at the same >me. Two way street Spring 2013 CE 151 - Advanced Networks 31
Half- Duplex In half- duplex transmission only one end can send at a >me. CSMA/CD transmissions are, by defini>on, half- duplex. All ports in a collision domain must be in half- duplex mode Original Ethernet is half- duplex. Half-duplex Spring 2013 CE 151 - Advanced Networks 32
Full- Duplex In full- duplex transmission both ends can send simultaneously. CSMA/CD is not needed for full- duplex transmission. Full- duplex Ethernet specified in IEEE 802.3x in March 1997 Original (half- duplex) Ethernet usually can only use 50%- 60% of the available 10 Mbps of bandwidth due to collisions. Full- duplex Ethernet offers 100% of the bandwidth in both direc>ons. Spring 2013 CE 151 - Advanced Networks 33
Switches Latest step in evolu>on of link layer. A full- duplex bridge Operates at link layer on frames. Selec>ve forwarding. Full- duplex transmission. Poten>ally no CSMA/CD! Mul>ple devices on a switch can communicate simultaneously. Benefits of a switch Fewer (poten>ally no!) collisions. Improved (poten>ally 100%!) bandwidth u>liza>on. Spring 2013 CE 151 - Advanced Networks 34
Full- Duplex Ethernet IEEE 802.3x full- duplex standard requires: The medium must have independent transmit and receive data paths that can operate simultaneously. There are exactly two sta>ons connected with a full- duplex point- to- point link. There is no CSMA/CD mul>ple access algorithm, since there is no conten>on for a shared medium. Both sta>ons on the LAN are capable of, and have been configured to use, the full- duplex mode of opera>on. Handling carrier detec>on and collision detect In half- duplex a sta>on will not transmit if carrier is detected, and will abort if a collision is detected. In full- duplex a sta>on ignores the carrier sense and collision detect signals. Spring 2013 CE 151 - Advanced Networks 35
Review Switches Full duplex No CSMA/CD Solves Limit of 50-60% bandwidth u>liza>on allows up to 100% bandwidth u>liza>on Spring 2013 CE 151 - Advanced Networks 36
Summary of Devices Repeaters and hubs Forward bits within a collision domain using regenera=on. Physical layer. Forward regenerated bits. Half- duplex, CSMA/CD transmission. Single collision domain. Bridges Divide collision domains using buffering. Link layer. Selec=vely forward frames. Half- duplex, CSMA/CD transmission. Collision domain per port. Switches Eliminate collision domains using full- duplex channels. Link layer. Selec>vely forward frames Full duplex transmission over dedicated medium. Collision domain per port. Spring 2013 CE 151 - Advanced Networks 37
Summary of Devices Switches provide the opportunity to Eliminate distance limita>ons (subnets span the whole campus) All sta>ons can transmit simultaneously (limit is switch buffering) No CSMA/CD so full channel bandwidth can be used Spring 2013 CE 151 - Advanced Networks 38
Cut- through Switching Store- and- forward The en>re frame is received before any forwarding takes place. CRC Check done Cut- through The frame is forwarded before the en>re frame is received. Decreases the latency of the transmission, but also reduces error detec>on. Spring 2013 CE 151 - Advanced Networks 39
Cut- through Switching Cut- through Fast- forward Offers the lowest level of latency. Fast- forward switching immediately forwards a packet arer reading the des>na>on address. There may be >mes when packets are relayed with errors. Although this occurs infrequently and the des>na>on network adapter will discard the faulty packet upon receipt. Spring 2013 CE 151 - Advanced Networks 40
Cut- through Switching Cut- through Fragment- free Fragment- free switching filters out collision fragments before forwarding begins. Collision fragments are the majority of packet errors. Collision fragments must be smaller than 64 bytes (512 bits slot >me). Greater than 64 bytes is a valid packet and is usually received without error. Fragment- free switching confirms not a collision fragment before forwarding. Spring 2013 CE 151 - Advanced Networks 41
Routers vs. Switches Routers - forward packets between broadcast domains. Network layer Forward packets Interconnect broadcast domains Un>l early 1990s: most LANs were interconnected by routers Since mid1990s: LAN switches replace most routers Spring 2013 CE 151 - Advanced Networks 42
A Routed Enterprise Network Internet Router Hub FDDI FDDI Spring 2013 CE 151 - Advanced Networks 43
A Switched Enterprise Network Internet Router Switch Spring 2013 CE 151 - Advanced Networks 44
Switches/Bridges versus Routers Performance Ease of administra>on Routers Each host s IP address must be configured If network is reconfigured, IP addresses may need to be reassigned Rou>ng done via RIP or OSPF Each router manipulates packet header (e.g., reduces TTL field) Switches/Bridges MAC addresses are hardwired No network configura>on needed No rou>ng protocol needed (sort of) learning bridge algorithm spanning tree algorithm Bridges do not manipulate frames Spring 2013 CE 151 - Advanced Networks 45
Challenges of Link Layer Switching Problem: selec>ve forwarding Solu>on: address learning Problem: one broadcast domain per switch. Solu3on: Virtual LANs (VLANs) Problem: loops in the topology. Solu3on: spanning- tree protocol (STP) Spring 2013 CE 151 - Advanced Networks 46
Challenges of Link Layer Switching Problem: selec>ve forwarding Solu>on: address learning Problem: one broadcast domain per switch. Solu3on: Virtual LANs (VLANs) Problem: loops in the topology. Solu3on: spanning- tree protocol (STP) Spring 2013 CE 151 - Advanced Networks 47
Selec>ve Forwarding How do switches/bridges allow mul>ple simultaneous transmissions?
Address Learning: Learn Source Address Source Address Table Port Source MAC Add. Port Source MAC Add. 1 1111 3333 1111 switch A switch has a source address table (or MAC Address Table) in cache (RAM) where it stores a source MAC address arer it learns about them. How does it learn source MAC addresses? 1111 3333 When a frame enters a switch, the switch first checks if the source address (1111) is in it s source address table. Abbreviated MAC addresses 2222 4444 If it is, it resets the 3mer. If it is NOT in the table it adds it, with the port number. Spring 2013 CE 151 - Advanced Networks 49
Address Learning: Filter or Flood Source Address Table Port Source MAC Add. Port Source MAC Add. 1 1111 3333 1111 switch The switch then examines the source address table for the des3na3on MAC address. If it finds a match, it forwards the frame by only sending it out that port. If there is not a match if floods it out all ports. 1111 Abbreviated MAC addresses 2222 3333 4444 In this scenario, the switch will flood the frame out all other ports, because the des>na>on address is not in the source address table. Spring 2013 CE 151 - Advanced Networks 50
Address Learning: Learn, Filter or Flood Source Address Table Port Source MAC Add. Port Source MAC Add. 1 1111 6 3333 1111 3333 switch 1111 Abbreviated MAC addresses 2222 3333 4444 Most communica>ons involve some sort of client- server rela>onship or exchange. Now 3333 responds to 1111. The switch sees if it has the source address stored. It does NOT so it adds it. Next, it checks the des3na3on address and in our case it can forward the frame, by sending it only out port 1. Future traffic between 1111 and 3333 is forwarded on the correct port. Spring 2013 CE 151 - Advanced Networks 51
No Collisions in Switch, Buffering Source Address Table Port Source MAC Add. Port Source MAC Add. 1 1111 6 3333 3333 3333 1111 4444 switch 1111 Abbreviated MAC addresses 3333 Unlike a hub, a collision does NOT occur, which would cause the two PCs to have to retransmit the frames. Collision domains end at the switch Instead the switch buffers the frames and sends them out port #6 one at a >me. 2222 4444 Spring 2013 CE 151 - Advanced Networks 52
Full Duplex No collisions Source Address Table Port Source MAC Add. Port Source MAC Add. 1 1111 6 3333 9 4444 No Collision Domains 1111 3333 3333 4444 switch 1111 Abbreviated MAC addresses 3333 When there is only one device on a switch port, the collision domain is only between the PC and the switch, which is non- existent with full- duplex. With a full- duplex PC and switch port, there will be no collision, since the devices and the medium can send and receive at the same >me. 2222 4444 Spring 2013 CE 151 - Advanced Networks 53
Address Learning Parameters Source Address Table Port Source MAC Add. switch 1111 Abbreviated MAC addresses Port Source MAC Add. 1 1111 6 3333 9 4444 3333 How long are addresses kept in the Source Address Table? 5 minutes is common on most vendor switches. How many addresses can be kept in the table? Depends on the size of the cache, but 1,024 addresses is common. What about Layer 2 broadcasts? Layer 2 broadcasts (DA = all 1 s) and mul>casts are flooded out all ports. 2222 4444 Spring 2013 CE 151 - Advanced Networks 54
Receive Packet Transparent Bridge Process - Jeff Doyle Learn source address or refresh aging >mer Is the des>na>on a broadcast, mul>cast or unknown unicast? No Yes Flood Packet Are the source and des>na>on on the same interface? No Yes Filter Packet Forward unicast to correct port Spring 2013 CE 151 - Advanced Networks 55
Review Address Learning Remember sources seen on each port. On receipt of a frame Always flood broadcast and mul>cast If des>na>on previously seen as source on a port, use that port Otherwise flood What happens if host moves? Timeout Spring 2013 CE 151 - Advanced Networks 56
Challenges of Link Layer Switching Problem: selec>ve forwarding Solu>on: address learning Problem: one broadcast domain per switch. Solu3on: Virtual LANs (VLANs) Problem: loops in the topology. Solu3on: spanning- tree protocol (STP) Spring 2013 CE 151 - Advanced Networks 57
Virtual LANs (802.1q) How do we avoid separate hardware infrastructure per subnet?
Why Virtual LANs? The basic bridge/switch concept would have all ports on a switch belong to the same broadcast domain To support mul>ple broadcast domains need mul>ple switches Not scalable IEEE 802.1Q From Virtual Networking for Dummies :) Spring 2013 CE 151 - Advanced Networks 59
VLANs VLANs support mul3ple broadcast domains/switch Assign ports to broadcast domains. VLAN = Subnet VLANs can logically segment switched networks based on: Physical loca>on (Example: Building) Organiza>on (Example: Marke>ng) Func>on (Example: Staff) Default vlan 1 vlan 10 Default vlan 1 Spring 2013 CE 151 - Advanced Networks 60
VLANs VLANs are created to provide segmenta>on services tradi>onally provided by physical routers in LAN configura>ons. VLANs address scalability, security, and network management. Spring 2013 CE 151 - Advanced Networks 61
Two Subnets, No VLANs Layer 2 Broadcasts What happens when 10.1.0.10 sends an ARP Request for 10.1.0.30? 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 62
Two Subnets, No VLANs Layer 2 Broadcasts Switch floods it out all ports. All hosts receive broadcast, even those on different subnet. Layer 2 broadcast should be isolated to only that subnet. 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 63
Two Subnets, No VLANs Layer 2 Unknown Unicasts 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 64
Two Subnets, No VLANs Even though hosts are connected to the same switch (or even hub), devices on different subnets must communicate via a router. Remember a switch is a layer 2 device, it forwards by examining Destination MAC addresses, not IP addresses. Fa 0/0 Fa 0/1 10.1.0.1/16 10.2.0.1/16 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 65
A Solution: Multiple Switches The tradi>onal solu>on is have devices on the same subnet connected to the same switch. This provides broadcast and unknown unicast segmenta>on, but is also less scalable. Fa 0/0 Fa 0/1 10.1.0.1/16 10.2.0.1/16 ARP Request 10.1.0.10/16 DG: 10.1.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 66
VLANs and Broadcast Domains A VLAN is a broadcast domain created by one or more switches. Ports on the switch are assigned to VLANs. Each switch port can be assigned to a different VLAN. Port 1 VLAN 10 Port 4 VLAN 20 Port 9 VLAN 10 Port 12 VLAN 20 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 67
VLANs and Broadcast Domains Ports assigned to the same VLAN share the same broadcast domain. Ports in different VLANs do not share the same broadcast domain. Port 1 VLAN 10 Port 4 VLAN 20 Port 9 VLAN 10 Port 12 VLAN 20 10.1.0.10/16 DG: 10.1.0.1 10.2.0.20/16 DG: 10.2.0.1 10.1.0.30/16 DG: 10.1.0.1 10.2.0.40/16 DG: 10.2.0.1 Spring 2013 CE 151 - Advanced Networks 68
VLAN Trunking/Tagging VLAN Tagging is used when a link carries traffic for more than one VLAN. Trunk link: As packets are received by the switch from any alached end- sta>on, a unique packet iden3fier is added in each header. This iden>fies designates the VLAN membership of each packet. Spring 2013 CE 151 - Advanced Networks 69
VLAN Trunking/Tagging The packet is then forwarded to the appropriate switches or routers based on the VLAN iden>fier and MAC address. Upon reaching the des>na>on node (Switch) the VLAN ID is removed from the packet by the adjacent switch and forwarded to the alached device. Spring 2013 CE 151 - Advanced Networks 70
VLAN Trunking/Tagging VLAN Tagging is used when a single link needs to carry traffic for more than one VLAN. No VLAN Tagging VLAN Tagging Spring 2013 CE 151 - Advanced Networks 71
802.1q Frame Format Preamble Start of frame delimiter MAC destination 7 octets 1 octet 6 octets MAC source 6 octets 802.3 Ethernet frame structure 802.1Q tag (optional) Ethertype (Ethernet II) or length (IEEE 802.3) Payload Frame check sequence (32- bit CRC) Interframe gap (4 octets) 2 octets 42 [note 2] 1500 octets 4 octets 12 octets 72 1530 octets 64 1522 octets 84 1542 octets Wikipedia By Arkrishna (Own work) [Public domain], via Wikimedia Commons For Ethernet, VLAN tags are part of frame same type field loca>on Minimum frame size = 64 bytes w/ or w/o VLAN tag Minimum payload size = 42 bytes w/ VLAN tag, 46 bytes w/o Standard defined for up to one nes>ng (two tags) some implementa>ons all 3 Spring 2013 CE 151 - Advanced Networks 72
Review VLAN (802.1q) technology allows mul>ple broadcast domains to be supported on a single switch or link. For Ethernet VLAN tags are embedded in Ethernet frame VLANs on a switch allows ports to be assigned to a VLAN VLAN trunking allows mul>ple VLAN s to be carried on single network segment VLAN trunking can be supported on host interfaces A VLAN ID corresponds to a broadcast domain, which corresponds to an IP subnet Spring 2013 CE 151 - Advanced Networks 73
STP in future lecture.