Transcript pptx
Link Layer
w/ much credit to Cisco CCNA and
Rick Graziani (Cabrillo)
Administrativia
•
•
How are the labs going?
Telnet-ing into Linux as root
– In /etc/pam.d/remote comment out line “auth required pam_securetty.so”
– Run “service xinetd restart”
•
NMO position… Software Development for Cisco Advanced Services
– “Extract information from data gathered from Cisco devices, Apply analytics to the
extracted information and present it in a format for end user consumption”
– 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
– Static Routing 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!)
• Communication across a set of Interconnected Networks (an InterNet!)
• While making minimal assumptions about the networks
• IP distilled from monolithic TCP due to insight that reliability was…
– …to be implemented in the hosts (due to minimal assumptions of networks)
– …not a service needed by all network applications
• 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 communication across a subnet
– Framing
– Sharing channels that compose the subnet (“media access control”)
– Routing 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 communication across a subnet:
– Framing,
– Sharing channels that compose the subnet (“media access control”),
– Routing across the subnet.
Spring 2013
CE 151 - Advanced Networks
5
Ethernet
• Media Access Control
– Original Ethernet – CSMA/CD
– Repeaters, hubs, bridges, and switches
• Routing
– Selective 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 information (frame) is transmitted, every PC/NIC on the shared
media copies part of the transmitted frame to see if the destination
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
1111
2222
Hey, that’s
me!
3333
Nope
nnnn
Abbreviated
MAC
Addresses
3333 1111
Spring 2013
CE 151 - Advanced Networks
8
Original Ethernet – Shared Bus
• What happens when multiple computers try to transmit at the same time?
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 Multiple Access/Collision Detection
1.
Listen for transmission (“carrier”).
2.
If no transmission is sensed, transmit data immediately.
3.
Monitor channel for collision. Stations sense the collision by being
unable to deliver the entire frame. (This is why there are minimum
frame lengths, cable distance and speed limitations. This includes the 54-3 rule.)
4.
If collision detected, transmit a jamming signal.
5.
Back off a random, exponentially increasing amount of time.
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 time must be
twice maximum propagation time.
• Before sending last bit of frame, sending station must detect collision.
• Frame transmission time must be twice maximum propagation time.
• Minimum frame size determines maximum LAN size.
• Minimum Ethernet frame size (called slot time): 512 bits (64 bytes)
S
Spring 2013
R
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)
• After 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 timing domain”).
– “Simultaneous” transmissions will result in a collision.
– Bandwidth is shared by all stations 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 limitations far short of slot time
– Only one station can transmit at a time
– Shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization
Spring 2013
CE 151 - Advanced Networks
16
Channel Length Limitations
• 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 times
– 2800m for Ethernet
– 205m for Fast Ethernet
• Solution 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 stations in the domain.
– Transmission is half-duplex.
• Original Ethernet (10Mbps) and Fast Ethernet (100Mbps)
– CSMA/CD
– Shared collision domains
– Problems
• 500m & 100m segment limitations vs. 2500m & 205m slot times
• Only one station can transmit at a time
• Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60%
bandwidth utilization
Spring 2013
CE 151 - Advanced Networks
18
Repeaters
• Repeaters are Layer 1 devices used to combat attenuation.
– 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 time 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
connections.” Webopedia.com
• Alternatively, specified algorithms
for custom network configurations
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 connections.
The Ethernet protocol requires that a signal sent out over the LAN reach every part
of the network within a specified length of time. The 5-4-3 rule ensures this. Each
repeater that a signal goes through adds a small amount of time to the process, so
the rule is designed to minimize transmission times 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-43 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
– Multiport repeaters
Spring 2013
CE 151 - Advanced Networks
22
Review
• Repeaters and hubs
– Physical layer - regenerate signal
– Solve
• Range limitation - extend range (5/4/3 rule for 10Mbps) to support full slot time
– Remaining problems
• Only one station can transmit at a time
• Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60%
bandwidth utilization
Spring 2013
CE 151 - Advanced Networks
23
Transmitting 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!
Spring 2013
4444 Nope
CE 151 - Advanced Networks
24
Transmitting via a hub
2222 1111
1111
2222
For me!
5555
Nope
3333 Nope
Spring 2013
• 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
4444 Nope
CE 151 - Advanced Networks
25
Transmitting via a hub
2222 1111
1111
Collision
2222
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 stations
transmit at the same time.
4444 3333
3333
Spring 2013
4444
CE 151 - Advanced Networks
26
Original Ethernet – Partial Solution
• Problem: only one station can transmit at a time.
• Solution: Buffering and selective 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.
– Selectively 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 multicast traffic.
– Therefore broadcast domains are not affected.
• Bridges implement selective 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 utilization.
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 stations 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%
utilization of the channel
• Elimination of shared collision domains enables 100% channel utilization.
– To eliminate CSMA/CD requires eliminating the sharing of a medium
– Accomplish this by moving from half-duplex to full-duplex communication
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
– Selective forwarding
– Multiple collision domains per broadcast domain
• Solves
– Multiple stations can transmit at the same time
• Remaining problem
– Shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization
Spring 2013
CE 151 - Advanced Networks
30
Duplex Transmissions
• Half-duplex Transmission: Either way, but only one way at a time.
– Two way street, but only one way at a time
• Full-duplex Transmission: Both ways at the same time.
– Two way street
Spring 2013
CE 151 - Advanced Networks
31
Half-Duplex
•
•
•
•
In half-duplex transmission only one end can send at a time.
CSMA/CD transmissions are, by definition, 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 directions.
Spring 2013
CE 151 - Advanced Networks
33
Switches
• Latest step in evolution of link layer.
• A full-duplex bridge
– Operates at link layer on frames.
– Selective forwarding.
– Full-duplex transmission.
• Potentially no CSMA/CD!
• Multiple devices on a switch can communicate simultaneously.
• Benefits of a switch
– Fewer (potentially no!) collisions.
– Improved (potentially 100%!) bandwidth utilization.
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 stations connected with a full-duplex point-to-point link.
– There is no CSMA/CD multiple access algorithm, since there is no contention
for a shared medium.
– Both stations on the LAN are capable of, and have been configured to use, the
full-duplex mode of operation.
• Handling carrier detection and collision detect
– In half-duplex a station will not transmit if carrier is detected, and will abort if
a collision is detected.
– In full-duplex a station 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 utilization… allows up to 100% bandwidth utilization
Spring 2013
CE 151 - Advanced Networks
36
Summary of Devices
•
Repeaters and hubs
–
–
–
–
–
•
Bridges
–
–
–
–
–
•
Forward bits within a collision domain using regeneration.
Physical layer.
Forward regenerated bits.
Half-duplex, CSMA/CD transmission.
Single collision domain.
Divide collision domains using buffering.
Link layer.
Selectively forward frames.
Half-duplex, CSMA/CD transmission.
Collision domain per port.
Switches
–
–
–
–
–
Spring 2013
Eliminate collision domains using full-duplex channels.
Link layer.
Selectively forward frames
Full duplex transmission over dedicated medium.
Collision domain per port.
CE 151 - Advanced Networks
37
Summary of Devices
• Switches provide the opportunity to
– Eliminate distance limitations (subnets span the whole campus)
– All stations 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 entire frame is received before any forwarding
takes place.
– CRC Check done
• Cut-through – The frame is forwarded before the entire frame is received.
– Decreases the latency of the transmission, but also reduces error detection.
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 after reading the
destination address.
– There may be times when packets are relayed with errors.
– Although this occurs infrequently and the destination 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.
–
–
–
–
Spring 2013
Collision fragments are the majority of packet errors.
Collision fragments must be smaller than 64 bytes (512 bits… slot time).
Greater than 64 bytes is a valid packet and is usually received without error.
Fragment-free switching confirms not a collision fragment before forwarding.
CE 151 - Advanced Networks
41
Routers vs. Switches
• Routers - forward packets between broadcast domains.
– Network layer
– Forward packets
– Interconnect broadcast domains
• Until 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
Router
Internet
Hub
FDDI
FDDI
Spring 2013
CE 151 - Advanced Networks
43
A Switched Enterprise Network
Router
Internet
Switch
Spring 2013
CE 151 - Advanced Networks
44
Switches/Bridges versus Routers
• Performance
• Ease of administration
Routers
Switches/Bridges
• Each host’s IP address must be
configured
• If network is reconfigured, IP
addresses may need to be
reassigned
• Routing done via RIP or OSPF
• Each router manipulates packet
header (e.g., reduces TTL field)
Spring 2013
• MAC addresses are hardwired
• No network configuration
needed
• No routing protocol needed (sort
of)
– learning bridge algorithm
– spanning tree algorithm
• Bridges do not manipulate frames
CE 151 - Advanced Networks
45
Challenges of Link Layer Switching
• Problem: selective forwarding
– Solution: address learning
• Problem: one broadcast domain per switch.
– Solution: Virtual LANs (VLANs)
• Problem: loops in the topology.
– Solution: spanning-tree protocol (STP)
Spring 2013
CE 151 - Advanced Networks
46
Challenges of Link Layer Switching
• Problem: selective forwarding
– Solution: address learning
• Problem: one broadcast domain per switch.
– Solution: Virtual LANs (VLANs)
• Problem: loops in the topology.
– Solution: spanning-tree protocol (STP)
Spring 2013
CE 151 - Advanced Networks
47
Selective Forwarding
How do switches/bridges allow
multiple simultaneous
transmissions?
Address Learning: Learn Source Address
Source Address Table
Port Source MAC Add. Port Source MAC Add.
1
1111
3333 1111
• A switch has a source address
table (or MAC Address Table) in
cache (RAM) where it stores a
source MAC address after it
learns about them.
• How does it learn source MAC
addresses?
switch
1111
3333
Abbreviated
MAC
addresses
2222
Spring 2013
4444
CE 151 - Advanced Networks
– When a frame enters a switch,
the switch first checks if the
source address (1111) is in it’s
source address table.
– If it is, it resets the timer.
– If it is NOT in the table it adds it,
with the port number.
49
Address Learning: Filter or Flood
Source Address Table
Port Source MAC Add. Port Source MAC Add.
1
1111
switch
1111
3333
Abbreviated
MAC
addresses
2222
Spring 2013
4444
3333 1111
• The switch then examines the
source address table for the
destination 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.
• In this scenario, the switch will
flood the frame out all other
ports, because the destination
address is not in the source
address table.
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
switch
1111
3333
Abbreviated
MAC
addresses
2222
Spring 2013
4444
1111 3333
• Most communications involve
some sort of client-server
relationship 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 destination
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.
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 1111
3333 4444
switch
1111
• 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 time.
3333
Abbreviated
MAC
addresses
2222
Spring 2013
4444
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
1111 3333
No Collision Domains
switch
1111
• When there is only one device on
a switch port, the collision
domain is only between the PC
and the switch, which is nonexistent 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 time.
3333
Abbreviated
MAC
addresses
2222
Spring 2013
3333 4444
4444
CE 151 - Advanced Networks
53
Address Learning Parameters
Source Address Table
Port Source MAC Add. Port Source MAC Add.
1
1111
6
3333
9
4444
• How long are addresses kept in
the Source Address Table?
switch
– 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.
1111
• What about Layer 2 broadcasts?
3333
– Layer 2 broadcasts (DA = all 1’s)
and multicasts are flooded out all
ports.
Abbreviated
MAC
addresses
2222
Spring 2013
4444
CE 151 - Advanced Networks
54
Receive Packet
Transparent Bridge Process Jeff Doyle
Learn source address or refresh aging timer
Is the destination a broadcast, multicast or unknown unicast?
No
Yes
Flood Packet
Are the source and destination 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 multicast
• If destination 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: selective forwarding
– Solution: address learning
• Problem: one broadcast domain per switch.
– Solution: Virtual LANs (VLANs)
• Problem: loops in the topology.
– Solution: 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 multiple broadcast domains need multiple switches
• Not scalable
• IEEE 802.1Q
From “Virtual Networking for Dummies”:)
Spring 2013
CE 151 - Advanced Networks
59
VLANs
• VLANs support multiple broadcast domains/switch
– Assign ports to broadcast domains.
• VLAN = Subnet
• VLANs can logically segment switched networks based on:
– Physical location (Example: Building)
– Organization (Example: Marketing)
– Function (Example: Staff)
Default
vlan 1
Spring 2013
CE 151 - Advanced Networks
vlan Default
10 vlan 1
60
VLANs
• VLANs are created to provide segmentation services traditionally provided
by physical routers in LAN configurations.
• 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
Spring 2013
10.2.0.20/16
DG: 10.2.0.1
10.1.0.30/16
DG: 10.1.0.1
CE 151 - Advanced Networks
10.2.0.40/16
DG: 10.2.0.1
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
Spring 2013
10.2.0.20/16
DG: 10.2.0.1
10.1.0.30/16
DG: 10.1.0.1
CE 151 - Advanced Networks
10.2.0.40/16
DG: 10.2.0.1
63
Two Subnets, No VLANs
• Layer 2 Unknown Unicasts
10.1.0.10/16
DG: 10.1.0.1
Spring 2013
10.2.0.20/16
DG: 10.2.0.1
10.1.0.30/16
DG: 10.1.0.1
CE 151 - Advanced Networks
10.2.0.40/16
DG: 10.2.0.1
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
10.1.0.1/16
10.1.0.10/16
DG: 10.1.0.1
Spring 2013
Fa 0/1
10.2.0.1/16
10.2.0.20/16
10.1.0.30/16
DG: 10.2.0.1
DG: 10.1.0.1
CE 151 - Advanced Networks
10.2.0.40/16
DG: 10.2.0.1
65
A Solution: Multiple Switches
• The traditional solution is have devices on the same subnet connected to
the same switch.
• This provides broadcast and unknown unicast segmentation, but is also
less scalable.
Fa 0/0
10.1.0.1/16
Fa 0/1
10.2.0.1/16
ARP Request
10.1.0.10/16
DG: 10.1.0.1
Spring 2013
10.1.0.30/16
DG: 10.1.0.1
10.2.0.20/16
DG: 10.2.0.1
CE 151 - Advanced Networks
10.2.0.40/16
DG: 10.2.0.1
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
10.1.0.10/16
DG: 10.1.0.1
Spring 2013
Port 4
VLAN 20
10.2.0.20/16
DG: 10.2.0.1
Port 9
VLAN 10
10.1.0.30/16
DG: 10.1.0.1
CE 151 - Advanced Networks
Port 12
VLAN 20
10.2.0.40/16
DG: 10.2.0.1
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
10.1.0.10/16
DG: 10.1.0.1
Spring 2013
Port 4
VLAN 20
10.2.0.20/16
DG: 10.2.0.1
Port 9
VLAN 10
10.1.0.30/16
DG: 10.1.0.1
CE 151 - Advanced Networks
Port 12
VLAN 20
10.2.0.40/16
DG: 10.2.0.1
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 attached endstation, a unique packet identifier is added in each header.
• This identifies 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 identifier and MAC address.
• Upon reaching the destination node (Switch) the VLAN ID is removed from
the packet by the adjacent switch and forwarded to the attached 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
Wikipedia
By Arkrishna (Own work) [Public domain], via Wikimedia Commons
•
•
•
•
For Ethernet, VLAN tags are part of frame… same type field location
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 nesting (two tags)… some implementations all 3…
Spring 2013
CE 151 - Advanced Networks
72
Review
• VLAN (802.1q) technology allows multiple 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 multiple 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.