4/1/2015 Ethernet Basics based on Chapter 4 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers Topics ✦ History ✦ Ethernet Frames ✦ CSMA/CD ✦ Obsolete versions ✦ 10Mbps versions ✦ Segments ✦ Spanning Tree Protocol 1 4/1/2015 Ethernet – Early History ✦ 1970: ALOHAnet, first wireless packet-switched network ‣ ‣ ‣ ✦ 1973: Ethernet prototype developed at Xerox PARC ‣ ‣ ✦ Norman Abramson, Univ. of Hawaii Basis for Ethernet’s CSMA/CD protocol 1972: first external network connected to ARPANET (Palo Alto Research Center) 2.94 Mbps initially 1976: "Ethernet: Distributed Packet Switching for Local Computer Networks" published in Communications of the ACM. ‣ ‣ Bob Metcalfe and David Boggs sometimes considered “the beginning of Ethernet” Ethernet goes Mainstream ✦ 1979: DEC, Intel, Xerox collaborate on a commercial Ethernet specification ‣ ‣ ✦ 1983: IEEE 802.3 specification formally approved ‣ ✦ ✦ Ethernet II, a.k.a. “DIX” Ethernet (Digital Equipment Corporation) Differs from Ethernet II in the interpretation of the third header field 1987: alternatives to coaxial cables ‣ IEEE 802.3d: FOIRL, Fiber Optic Inter-Repeater Link ‣ IEEE 802.3e: 1 Mbps over Twisted Pair wires (whoopee!) 1990: Twisted-Pair wiring takes over ‣ IEEE 802.3i: 10 Mbps over Twisted-Pair – 10Base-TX, 10Base-T4 2 4/1/2015 the Future is Now (next chapter) (and Now is so Yesteryear…) 1995 – Now: speed and cabling improvements ✦ 1995: 100Mbps varieties ✦ 1999: 1Gbps on twisted-pair ✦ 2003-2006: 10Gbps on optical fiber and UTP ✦ 2010: 40Gbps, 100Gbps (802.3ba) ‣ ‣ optical fiber or twinaxial cable point-to-point physical topology; for backbones Ethernet (802.3) relation to OSI 3 4/1/2015 the Ethernet frame format Preamble: 10101010 .. 10101011 ✦ Dest. MAC 6 octets Src. MAC 6 octets Type / length 2 octets Ethernet II header contains: Payload Padding? FCS 0..1500 octets 46..0 octets 4 octets ✦ 6 octets: destination MAC address ‣ 6 octets: source MAC address ‣ 2 octets: payload-type field ‣ ✦ 802.3 differs in the third field: ‣ ✦ payload length instead of type 0-1500 octets: Payload, supplied by a higher protocol layer Could be 802.2 could be layer 3 ‣ 46-0 octets: Padding w/ 0-bytes to insure minimum frame length ‣ ‣ ✦ 4 octets: Ethernet footer contains FCS (Frame Check Sequence) ‣ Physical frame starts with an 8-octet preamble consisting of 1010…10101011 10Mbs versions only ‣ ✦ Maximum frame length is 1518 octets ‣ ‣ ✦ including the FCS excluding the preamble Minimum length is 64 octets ‣ ✦ IFG: 96 bittimes assures collision detection Physical frame is followed by an IFG, InterFrame Gap ‣ a CRC checksum ‣ no signal transitions 96 bit-times in duration Ethernet Addresses ✦ ✦ Also called MAC addresses, hardware or physical addresses, or Layer 2 addresses 6 octets long ‣ ✦ ✦ ✦ ‣ ✦ an “octet” refers to a “byte” and is used in networking First three octets refer to the manufacturer or vendor Last three octets must be unique within a mfr/vendor Written as 6 pairs of hexadecimal digits ✦ separated by colon or dash Examples: ‣ 00:1a:6b:4e:3f:1b • Linux ‣ 40-A8-F0-A2-DD-CE • Windows Broadcast address: ff:ff:ff:ff:ff:ff ‣ As a destination, this means “send to all available nodes” 4 4/1/2015 wireshark activity ✦ start wireshark ✦ Display filter eth.type ‣ ‣ ✦ Display filter: eth.len ‣ ‣ ✦ Any types other than 0x0800? What layer-3 protocol(s)? Observe layer-2 protocol(s) What payload(s)? Display filter: eth.addr==<your MAC address> ‣ What traffic is coming from, going to your machine? Ethernet II versus 802.3 with 802.2 ✦ 802.3 length < 1500 left: an Ethernet II frame specifies a type, and leaves the next layer to find the data’s end ‣ ✦ Ethernet II type > 1500 all types are values greater than 1500 (0x0600) • viz., IP is type 0x0800 right: an 802.3 frame specifies the payload length, and includes 802.2 headers ‣ length is always 1500 or less 5 4/1/2015 Ethernet II frame 4/1/20 15 802.3 frame, with 802.2 headers ✦ This frame shows 802.3 and 802.2 headers. ✦ It also shows the FCS (checksum) field, which happens to be incorrect. 4/1/20 15 6 4/1/2015 So, how does the NIC determine where a frame ends? ✦ ✦ Ethernet II frame doesn’t specify its overall length 10Base5, 10Base2 standards: ‣ ✦ 10BaseT: ‣ ✦ NIC detects end of signal - absence of current NIC listens for a special TP_IDL signal on the wire, followed by InterFrame Gap 100BaseT, GigE, 10GigE: ‣ 4B/5B encoded “start-of-frame signals” and “endof-frame signals” replace preamble and TP_IDL Introduction 10BaseT: The FCS and TP_IDL signal 7 4/1/2015 Ethernet and Cabling – the Coaxial Era ✦ ✦ ✦ ✦ 10Base5 (standard IEEE 802.3, 1983) 10Base2 (standard IEEE 802.3a, 1985) Physical bus topology required a logical bus topology CSMA/CD protocol used in the Collision Domain 10Base5 ✦ 1983: IEEE 802.3 ‣ ✦ The original form “Thick coax” cable ‣ ‣ RG-8/U or RG-11 specified half-inch diameter ✦ “Vampire tap” connection punctures insulation to make electrical connections ✦ “10Base5”: ‣ ‣ ‣ 10 Mbps Baseband signaling 500 meters maximum length 8 4/1/2015 10Base2 ✦ 1985: IEEE 802.3a ‣ ✦ “Thin coax” cable ‣ ‣ ‣ ✦ ✦ Physical update for cheaper cabling RG-58a/u 5mm diameter electrically compatible with thick coax BNC connectors allow easy disconnection, reconnection “10Base2”: ‣ ‣ ‣ 10 Mbps Baseband signaling 200 meters maximum length (actually 185m) CSMA / CD ✦ Carrier-Sense Multiple Access with Collision Detection ✦ Multiple Access: more than one node can transmit on the shared medium ✦ Carrier-Sense: a NIC that wants to transmit must first listen for an active transmission ‣ if it doesn’t hear an idle “carrier signal” it backs off and waits before trying again ✦ Collision Detection: if a NIC hears interference while it is transmitting, it knows that a collision with another transmission has occurred ✦ Colliding nodes attempt to re-transmit using an “Exponential Backoff” approach 9 4/1/2015 Exponential Backoff ✦ When a NIC detects a collision, it: ‣ continues transmitting until at least 64 octets are sent, then stops selects a k equal to 0 or 1, and waits for k "slot times" • slot time equals 512 bit times for 10Mbps, 100Mbps; 4096 bit times for 1Gbps ‣ repeats the CSMA/CD attempt ‣ ✦ If a second collision occurs, it selects k = 0,1,2,or 3; on a third collision, k = 0,1,2,3,4,5,6, or 7… and so on ‣ ‣ ‣ this gives exponentially increasing maximum waiting time, and exponentially decreasing chance of two NICs repeatedly colliding. After 10 collisions the range of k stays at 0..1023 After 16 collisions, the attempt is abandoned Segments and Collision Domains ✦ All the nodes sharing a cable form a segment ✦ The segment defines a collision domain ‣ Frames on this segment may collide with each other… These two segments form separate collision domains 10 4/1/2015 Extended Collision Domains ✦ A repeater, such as this one, connects two segments into a single collision domain ‣ ✦ ✦ Frames on either segment can collide with others. Hubs (a.k.a. multi-port repeaters) do the same thing, with multiple segments Switches don't – they keep collision domains separate Hubs and Extended Collision Domains ✦ A repeater (or hub) joins two (or more) segments ‣ ✦ Layer-1 device These segments share a common collision domain ‣ The hub will broadcast all frames, as if the two segments were one 11 4/1/2015 The (Obsolete) 5-4-3 Rule ✦ The “5-4-3” rule (or “5-4-3-2-1” rule) ‣ ‣ ‣ ‣ ≤ 5 segments (cables) connected by ≤ 4 repeaters ≤ 3 active segments (i.e., with transmitting nodes) 2 passive segments ✦ Single Collision Domain ✦ (Not important in switched networks…) 4/1/20 15 how big can a collision domain be? ✦ ✦ ✦ 5-4-3 rule limits amount of cable in use How far apart could two computers be, using 10Base5 cable? How far apart could two computers be, using 10Base2 cable? 12 4/1/2015 Ethernet on Twisted-Pair ✦ Physical star, but Ethernet is still a bus-oriented protocol ✦ 10Base-T (IEEE 802.3i, 1990) ✦ ‣ Twisted-Pair cables • Cheaper, easier to use than coax ‣ 100m maximum length 100Base-T (IEEE 802.3u, 1995) ‣ ‣ ‣ ✦ “Fast Ethernet” 100Base-T4: Cat3, 4 pairs used 100Base-TX: Cat5, 2 pairs used Full Duplex (IEEE 802.3x, 1997) ‣ Applies to 100BaseT and later Ethernet on Optical Fiber ✦ ✦ Alternate, longer-distance media extend Ethernet's reach 10Base-FL (IEEE 802.3j, 1993) ‣ ‣ ‣ ✦ 10Mbps, multimode optical fiber 2000m maximum length Not common 100Base-FX (IEEE 802.3u, 1995) ‣ ‣ “Fast Ethernet” 100Base-FX: multimode optical fiber 13 4/1/2015 10Base-T and Hubs ✦ ✦ ✦ 10Base-T cables connect one host to a hub Hubs can have dozens of ports, each connected to a separate host Ports are completely interconnected ‣ Hubs are OSI layer-1 devices, no smarts built in 4/1/20 15 CSMA/CD and a Hub – Simulation from Tomsho ✦ Web Link: ‣ http://montcs.bloomu.edu/Networking/Simulations/Tomsho/csmacd.swf 14 4/1/2015 10Base-T and Collision Domains ✦ Hubs are multiport repeaters ‣ ‣ 5-4-3 rule still applies Shorter cables mean smaller collision domains ✦ All nodes in the network on the right are in the same collision domain ✦ Optical fiber (10BaseFL) permits much larger collision domains 4/1/20 15 (other definitions of “segment”) ✦ "Segment" may have other meanings… ✦ Related meanings in Ethernet: ‣ ‣ ✦ "Segment" and "Collision Domain" are sometimes used interchangeably. A "Segment" can refer to a "Broadcast Domain". Unrelated meanings in the TCP/IP world: ‣ "Segment" refers to a "protocol data unit" at the Transport layer of the OSI or TCP/IP stack. • ‣ versus "frame" which refers to a protocol data unit at the Datalink and Physical layers – viz., Ethernet frame "Segment" can mean an IP subnetwork. 15 4/1/2015 Ethernet Switches ✦ ✦ Switches are physically similar to hubs Each cable between a host and a switch is a separate Ethernet segment ‣ ✦ Only two nodes (host and switch) on each segment, so collisions are not much of a problem Switch must be smart enough – and fast enough – to act like a separate node on each of its ports ‣ ‣ More expensive than a hub Switches were very uncommon in 10Base-T 4/1/20 15 Switch Simulation, from Tomsho ✦ Web Link: ‣ http://montcs.bloomu.edu/Networking/Simulations/Tomsho/switch.swf 16 4/1/2015 Switches versus Hubs ✦ Switches don't echo all frames to all segments, so each segment is a separate collision domain ‣ ✦ Broadcast frames are sent to all segments ‣ ✦ Switches are Layer-2 devices Segments connected to the switch form a Broadcast Domain Collisions don't occur between broadcast frames, because the switch sends them one at a time Hubs, Switches, and Collision Domains ✦ Switches form separate collision domains 4/1/20 15 17 4/1/2015 Hubs, Switches, and Broadcast Domains ✦ Switches maintain a single broadcast domain ‣ Hubs and switches both copy broadcast frames to all other ports 4/1/20 15 The Switch In a Wireless Router ✦ Wireless router includes a router, a switch, and a Wireless Access Point (WAP) ✦ Router functionality in the CPU ✦ ✦ Virtual LAN (VLAN) connects WAP and switch's internal ports Another VLAN connects WAN port to router 18
© Copyright 2024