cim 2465 fundamentals of ethernet1 fundamentals of ethernet (topic 3) textbook: networking basics,...
Post on 19-Dec-2015
219 views
TRANSCRIPT
CIM 2465 Fundamentals of Ethernet 1
Fundamentals of Ethernet(Topic 3)
Textbook:
Networking Basics, CCNA 1 Companion Guide, Cisco Press
Cisco Networking Academy Program, CCNA 1 and 2, Companion Guide, Cisco Press, Latest Edition
CIM 2465 Fundamentals of Ethernet 2
Introduction (1)
• Created at Xerox at 1970s• Took over by IEEE at 1980s• IEEE 802 committee (standards for LANs)
– 802.1 LAN management and control functions– 802.2 Functions common to several LAN
types– 802.3 Ethernet LANs– 802.4 Token Bus LANs– 802.5 Token Ring LANs
CIM 2465 Fundamentals of Ethernet 3
Introduction (2)
• Ethernet has been very successful– Relatively simple– Adding a new type of Ethernet is easy, many
people already understand other types of Ethernet
– Reliable, with well-tested components and protocols
– Inexpensive
CIM 2465 Fundamentals of Ethernet 4
Naming of Ethernet Types
• Ethernet standards differ in two main respects:– Speed– Type of cabling supported
• IEEE 802.3• 10BASE-T, 100BASET etc.
– Speed– Baseband Transmission– Cabling
• Type of cabling, T stands for twisted pair
CIM 2465 Fundamentals of Ethernet 5
IEEE Standards and the OSI Model
• 802.3 standards define different types of Ethernet concern– Physical transmission details (cables, connectors, enc
oding, speeds)– Media access issues (e.g. CSMA/CD)– Errors handling (e.g. Frame Check Sequence in 802.3
trailer)– MAC addresses (format, location in the 802.3 header)– Ability of NICs to synchronize to the incoming signal b
y providing a Preamble and Start Frame Delimiter (SFD)
CIM 2465 Fundamentals of Ethernet 6
IEEE Standards and the OSI Model
• 802.3 standards define many physical layer details, as well as the lower half of the data link layer, called Media Access Control (MAC)
CIM 2465 Fundamentals of Ethernet 7
IEEE Standards and the OSI Model
• 802.3 includes the MAC protocol to perform several functions that physical layer (layer 1) standards cannot– Communicates with higher layers– Defines physical addressing in the form of
MAC addresses– Defines the structure (and meaning) of data
frame– Manages the process of which device can
send at what time (e.g. CSMA/CD)
CIM 2465 Fundamentals of Ethernet 8
Ethernet Frame (1)
• Framing refers– The process of encapsulating data inside a header
and possibly a trailer– The meaning defined to the bits inside those
headers and trailers
• Ethernet frame structure
Preamble
7
SFD
1
Destination
6
Source
6
Length/Type
2
Data
46-1500
FCS
4
CIM 2465 Fundamentals of Ethernet 9
Ethernet Frame (2)
• Preamble: for synchronization• Start Frame Delimiter (SFD)• Destination MAC Address (48 bits)• Source MAC Address (48 bits)• Length/Type: data length or type of protocol• Data• Frame Check Sequence (FCS): allows the
receiving NIC to decide if the frame had an error
CIM 2465 Fundamentals of Ethernet 10
Encapsulating Packets Inside Ethernet Frames
1. IP software gives the IP packet to the Ethernet software
2. Ethernet software encapsulates the IP packet between an Ethernet header and trailer
3. Ethernet NIC physically sent the bits over an Ethernet LAN
CIM 2465 Fundamentals of Ethernet 11
Format of MAC Address
• MAC addresses are 6-byte (48 bits) hexadecimal numbers that are used to identify NICs and other Ethernet interfaces that connect to a LAN
Organizational Unique Identifier (OUI)
Vendor Assigned (NIC Cards, Interfaces)
Size (bits) 24 bits 24 bits
Example 00 60 2F 3A 07 BC
cisco Particular device
CIM 2465 Fundamentals of Ethernet 12
Ethernet Operation• The 802.3 Media Access Control (MAC) standards
defines the rules how Ethernet devices access the LAN media
• Ethernet use Carrier Sense Multiple Access with Collision Detection (CSMA/CD), the general rules are:– Wait until the LAN is unused, and then send the frame.
However, listen to detect whether the frame being sent collided with another frame. If no collisions occurred, the frame must have made it across the LAN. If a collision did occur, wait, and try to send the frame again.
• Note that the performance degrades as the number of collisions increases
CIM 2465 Fundamentals of Ethernet 13
CSMA/CD Algorithm
1. A device listens until the LAN is silent, that is no device is currently sending data
2. The device sends its frame3. The device listens for collisions while it is transmitting4. If no collisions occurred, the process is ok. If a collision
does occur, the following steps are taken5. All devices whose transmitted frames collided send a
jamming signal, ensure that all devices notice that a collision occurred
6. All devices whose frame collided re-send the frame after an independent random time
CIM 2465 Fundamentals of Ethernet 14
CIM 2465 Fundamentals of Ethernet 15
Preventing Collisions with Switch Buffering
• Switches prevent collisions by buffering frames, it holds the frames in memory (buffering) until it’s OK to send
• Each switch port is a Collision Domain• A Collision domain refers to the set of
Ethernet devices whose frames could possibly collide
• A frame in one Collision Domain does NOT cause collisions in another domain
CIM 2465 Fundamentals of Ethernet 16
CIM 2465 Fundamentals of Ethernet 17
CIM 2465 Fundamentals of Ethernet 18
Deterministic and Nondeterministic Media Access
• CSMA/CD is nondeterministic (probabilistic). The number of times a single device is allowed to use the LAN, or the amount of LAN bandwidth a device can use, CANNOT be determined ahead of time
• Deterministic media access, means that we can accurately predict the bandwidth allowed to the devices on the LAN– E.g. Token passing mechanism
CIM 2465 Fundamentals of Ethernet 19
Token Passing in a Token Ring
• Free token is required to get the right to send data
CIM 2465 Fundamentals of Ethernet 20
Ethernet Technologies
• Most common– 10 Mbps
• 10BASE2, 10BASE5, 10BASE-T
– 100 Mbps• 100BASE-T, 100BASE-TX• 100BASE-FX (optic)
– 1 Gbps• Next major evolution• 1000BASE-T• 1000BASE-LX and 1000BASE-SX (optic)
CIM 2465 Fundamentals of Ethernet 21
10Mbps Ethernet
• 10BASE5– Thicknet, Thick coaxial– 500m– IEEE 802.3
• 10BASE2– Thinnet, Thin coaxial– 185m– IEEE 802.3a
• 10BASE-T– UTP twisted pair– 100m– IEEE 802.3i
CIM 2465 Fundamentals of Ethernet 22
10BASE-T Wiring• Cat3, Cat5, Cat 5e UTP
CIM 2465 Fundamentals of Ethernet 23
10BASE-T Design: Using Hubs, CSMA/CD
• Key design rule (10BASE5, 10BASE2, and 10BASE-T) is called the 5-4-3 rule
• Between an two devices on a LAN, there can be at most:– Five cable segments– Four hubs– Three LAN segments with devices attached to them
• This rule makes sure that CSMA/CD works correctly by ensuring that a collision can be heard in a reasonable amount of time
CIM 2465 Fundamentals of Ethernet 24
5-4-3 Rule
CIM 2465 Fundamentals of Ethernet 25
Good Design Practice
CIM 2465 Fundamentals of Ethernet 26
10BASE-T Design: Using Switches
• Use of switches, instead of hubs, removes the 5-4-3 rule’s design restrictions
• The 5-4-3 rule relates to round-trip time in long collision domains• For switches (or bridges), each interface is a separate collision
domain, thus collision domains are small• The 5-4-3 rule applies to each collision domain
CIM 2465 Fundamentals of Ethernet 27
100Mbps Ethernet (Fast Ethernet)
• 100BASE-T (support Cat3), 100BASE-TX• Designing Ethernets with Two Speeds (autonegotiation)
CIM 2465 Fundamentals of Ethernet 28
Gigabit Ethernet and Beyond
• Gigabit Ethernet was the next major evolution
• Fiber based– 1000BASE-X (1000BASE-SX, 1000BASE-LX)
• Copper UTP-based– 1000BASE-T
• Fiber based 10 G Ethernet– 10GBASE-X, IEEE 802.3ae (2002)
CIM 2465 Fundamentals of Ethernet 29
Ethernet Switching
• Related to how a bridge or switch makes a decision of how and where to forward Ethernet frames
CIM 2465 Fundamentals of Ethernet 30
Layer 2 Bridging and Switching Operations
• Bridges forward Ethernet frames based on the destination MAC address, requiring that bridges be aware of Ethernet framing and MAC addresses defined in IEEE 802.3. Usually are PCs running software that performed the bridging.
• Switches do similar things, but usually in hardware, thus much faster than bridges
CIM 2465 Fundamentals of Ethernet 31
The Forward and Filtering Decision
• Examine the incoming signal, find the destination MAC address
• Examine a table that lists MAC addresses and corresponding bridge/switch interfaces, which identifies the interface to which the frame should be forwarded
• If the frame came in a different interface from the one listed in the table, forward the frame, using a clean regenerated signal (forwarding)
• If the frame came in the same interface as the one listed in the table, discard the frame (filtering)
CIM 2465 Fundamentals of Ethernet 32
Bridge Filtering Decision
• Fig 8-1
CIM 2465 Fundamentals of Ethernet 33
Bridge Forwarding Decision
• Fig 8-2
CIM 2465 Fundamentals of Ethernet 34
Learning CAM Table Entries
• Switches (and bridges) must dynamically learn the entries in the CAM
CIM 2465 Fundamentals of Ethernet 35
Learning CAM Table Entries• When a frame for which a switch does not have the
frame’s destination MAC address in the CAM, the switch floods the frame (forward to all ports except the incoming one)
CIM 2465 Fundamentals of Ethernet 36
Forwarding Broadcasts and Multicasts
• Broadcast frames– Frames sent to a destination MAC address of
FFFF.FFFF.FFFF, such frames should be delivered to all devices on the same LAN
• Multicast frames– Frames sent to one of a range of multicast
MAC addresses (e.g. begin with 0100.5E or 0100.5F, such frames should be delivered to multiple devices on the LAN, but not necessarily to all devices
CIM 2465 Fundamentals of Ethernet 37
LAN Design: Collision Domains and Broadcast Domains
• Collision domain– A set of LAN interfaces for which a frame sent out any
two of these interfaces, at the same time, would cause a collision
– The bandwidth in a single collision domain must be shared
• Disadvantages of having large collision domains– Shared bandwidth: amount of bandwidth available to
each end-user device is smaller– Higher utilization: resulting in varying degrees or wors
ening LAN performance• Large collision domains should not be used
CIM 2465 Fundamentals of Ethernet 38
CIM 2465 Fundamentals of Ethernet 39
CIM 2465 Fundamentals of Ethernet 40
Solution
• Creating many small collision domains
CIM 2465 Fundamentals of Ethernet 41
Advantages of having Small Collision Domains
• 5-4-3 rule applies to smaller part
• Reduce the probability of overutilization (fewer devices)
• Each collision domain gets its own separated switched bandwidth
CIM 2465 Fundamentals of Ethernet 42
How Switches and Bridges Prevent Collisions
• Buffering
CIM 2465 Fundamentals of Ethernet 43
Layer 2 Broadcast Domains• Broadcast domain
– The set of LAN interfaces for which a broadcast frame sent by any one device will be forwarded to all the other interfaces in that same broadcast domain
• More Broadcasts, Less CPU Capacity for End-user work (i.e. negative impact to performance)
CIM 2465 Fundamentals of Ethernet 44
CIM 2465 Fundamentals of Ethernet 45
Data Flow with Layer 1, 2, and 3 Devices
• Fig 8-21