Table of Contents Layer 2 Bridging and Switching dr. C. P. J. Koymans Informatics Institute University of Amsterdam (version 1.1, 2010/02/19 12:37:51) Thursday, February 11, 2010 Refinement Devices and sublayers Frame formats DIX Extended Unique Identifiers Ethernet Types 802.3 Bridges Basics VLANs Refinement (1) Refinement (2)
Refinement (2) Layer 1 and 2 devices Layer 1 (physical) Repeaters, Hubs (multiport repeaters) Single collision domain Layer2 (data link) Bridges, Switches (multiport bridges) Single broadcast domain Layer 2 sublayer: MAC DIX Ethernet frames Also known as Ethernet II frames Media Access Control Most important example is Ethernet CSMA/CD Carrier Sense, Multiple Access, with Collision Detection Backoff and Retransmission 7 1 6 6 2 46-1500 4 Preamble SFD DstAddr SrcAddr Type PDU (with PAD) FCS Preamble, SFD, FCS handled by physical layer 6 byte destination and source address 2 byte type field PAD used to get a minimum PDU of 46 bytes Maximum size of PDU is 1500 bytes
MAC addresses (1) MAC addresses (2) 6 bytes == 48 bits MAC-48 (physical) EUI-48 (virtual) 64 bit Extended Unique Identifier (EUI-64)? 3 first bytes: OUI Organizationally Unique Identifier I/G bit: Individual (0) / Group (1) bit First bit on the wire Broadcast or multicast U/L bit: Universal (0) / Local (1) bit Second bit on the wire Represented as LSB bits of first byte (sic(k)!) EUI-48 EUI-64 Modified EUI-64 Embedding of EUI-48 addresses OUI:extension OUI:FF:FE:extension 00:30:65:7E:9D:5E 00:30:65:FF:FE:7E:9D:5E Embedding of MAC-48 addresses OUI:extension OUI:FF:FF:extension IPv6 uses EUI-48 embedding for automatic address assignment The 64 bit host part of an IPv6 address Modified EUI-64 address U/L bit flipped 0030:65FF:FE7E:9D5E 0230:65FF:FE7E:9D5E The same happens to locally assigned IPv6 addresses 0200:0000:0000:0001 0000:0000:0000:0001 which immediately explains the reason for the modification
Ethernet Types (1) Ethernet Types (2) Used for multiplexing Common ethertypes 0x0800 0x0806 0x8035 0x8137 0x86DD IP ARP RARP IPX (Novell) IPv6 Less common ethertypes 0x0BAD Banyan Vines 0x0805 X.25 level 3 0x809B,0x80F3 AppleTalk 0x8847,0x8848 MPLS 0x8863,0x8864 PPPoE 802.3 frames LLC 7 1 6 6 2 1 1 1 43-1497 4 Preamble SFD DstAddr SrcAddr Length DSAP SSAP Ctrl LLC data (with PAD) FCS Introduces LLC layer 2 sublayer Replaces type field by length field Used in EtherTalk packets (Apple) Disjoint values from ether types Later old DIX format also officially allowed In some cases Ctrl is 2 bytes and hence LLC data is between 42 and 1496 bytes Logical Link Control DSAP: Destination Service Access Point SSAP: Source Service Access Point Control: 1 or 2 control bytes Work from the 802.2 committees Upper data link sublayer
LLC/SNAP IPX frames Sub Network Access Protocol DSAP = 0xAA SSAP = 0xAA Control = 0x03 (UI, connectionless) Adds 5 extra bytes Organization Identifier (0x000000) Type (guess what: ether type :-) There are four variants... DIX Ethernet with ethertype 0x8137 802.3 SNAP with protocol type 0x8137 802.3 with DSAP = SSAP = 0xE0 Raw 802.3 IPX packet starts with an (unimplemented) checksum looking like broadcast SAP DstAddr SrcAddr Length 0xFFFF... Transparent Bridges VLANs No-Frills Copies frames between the two sides Uses Store and forward Separates collision domains Learning and filtering Remembers on which side a station resides By looking (promiscuously) to all addresses Builds a filtering database Separating a physically bridged LAN Separating into logical (virtual) LANs Each VLAN has its own ID Standardized as 802.1Q Ether type for VLANs: 0x8100 Conflicted with Wellfleet allocation http://www.iana.org/assignments/ethernet-numbers
802.3 modifications VLAN membership Add 4 extra bytes (VLAN tag) between MAC source address and type/length field 2 bytes 0x8100 (VLAN type) 3 bits priority (used by 802.1p) 1 bit CFI (Ethernet/Token Ring, usually 0 (Ethernet)) 12 bits VLAN ID Port based easy, static MAC based administrative burden, dynamic Protocol and IP address based wrong layer, not transparent Nested VLANs Q-in-Q Provider Backbone Bridging M-in-M or Mac-in-Mac Add a second Service-VLAN-tag (S-tag) Used by a PBN (Provider Backbone Network) Ether type for S-VLANs: 0x88a8 (not in IANA database) Separates backbone VLAN assignments from customer VLAN assignments Placed between source MAC address and customer VLAN tag Standardized as 802.1ad Add a complete second ethernet header with extended tags Used by a PBBN (Provider Backbone Bridging Network) Adds provider MAC source and destination addresses Ether type for B-VLANs: 0x88a8 Adds an I-Tag (48 bits) between provider header and customer frame Ether type for provider backbone data: 0x88e7 (not in IANA database) Contains a 24 bit Service Instance Identifier Standardized as 802.1ah