5 DataLink LAN - Key
5 DataLink LAN - Key
Olivier Bonaventure
http://inl.info.ucl.ac.be/
These slides are licensed under the creative commons attribution share-alike license 3.0. You can obtain detailed
information
about this license at http://creativecommons.org/licenses/by-sa/3.0/
Datalink layer
Ethernet networks
WiFi networks
2
Usage of the physical layer
2 Datalink Datalink
1 Physical Physical
3
Datalink layer
Goals
Provide a reliable transfert of packets although
Physical layer sends/receives bits and not packets
Physical layer service is imperfect
transmission errors
Losses of bits
Creation of bits
Packet Packet
Datalink Datalink
4
Frame delineation
Frame
Unit of information transfer between two entities of
the datalink layer
sequence of N bits
Datalink layer usually supports variable-length frames
Packet Packet
5
Frame delineation
Naïve solutions
Use frame size to delineate frames
Insert frame size in frame header
Issue
What happens when errors affect frame payload and frame
header ?
6
Character stuffing
Character stuffing
Suitable for frames containing an integer number
of bytes
'DLE' 'STX' to indicate beginning of frame
'DLE' 'ETX' to indicate end of frame
When transmitting frame, sender replaces 'DLE' by
'DLE' 'DLE' if 'DLE' appears inside the frame
Receiver removes 'DLE' if followed by 'DLE'
Example
Packet : 1 2 3 'DLE' 4
Frame
'DLE' 'STX' 1 2 3 'DLE' 'DLE' 4 'DLE' 'ETX'
Packet 1 : 1 2 3 'DLE' 4
Frame 1 : 'DLE' 'STX' 1 2 3 'DLE' 'DLE' 4 'DLE' 'ETX'
Packet 2 : 'DLE' 'STX' 'DLE' 'ETX'
Frame 2 : 'DLE' 'STX' 'DLE' 'DLE' 'STX' 'DLE' 'DLE' 'DLE' 'ETX'
Packet 3 : 'STX' 'DLE'
Frame 3 : 'DLE' 'STX' 'STX' 'DLE' 'DLE' 'DLE' 'ETX'
'DLE' 'STX' 1 2 3 'DLE' 'DLE' 4 'DLE' 'ETX' 'DLE' 'STX' 'DLE' 'DLE' 'STX' 'DLE' 'DLE' 'DLE' 'ETX' 'DLE' 'STX' 'STX' 'DLE' 'DLE'
'DLE' 'ETX'
Bit stuffing
Example
Packet : 0110111111111111111110010
Frame
01111110011011111011111011111011001001111110
8
Frame delineation
1 0 1 0 0 1 1 0
InvHInvB
9
Frame delineation in practice
10
PPP : Point-to-Point Protocol
Goal
Allow the transmission of network layer (IP but
also other protocols) packets over serial lines
modems, leased lines, ISDN, ...
Architecture
PPP is composed of three different protocols
1. PPP
transmission of data frames (e.g. IP packets)
2. LCP : Link Control Protocol
• Negotiation of some options and authentication
(username, password) and end of connection
3. NCP : Network Control Protocol
• Negotiation of options related to the network layer
protocol used above PPP
(ex: IP address, IP address of DNS resolver, ...)
11
W. Simpson and Editor. The point-to-point protocol (PPP). Request for Comments 1661, Internet Engineering Task Force, July 1994.
W. Simpson and Editor. PPP in HDLC-like framing. Request for Comments 1662, Internet Engineering Task Force, July 1994.
12
DataLink layer
Ethernet networks
WiFi networks
13
Local area networks
Network topologies
Star-shaped network
Ring-shaped network
Bus-shaped network
14
Local area networks
Problems to be solved
How to identify the hosts attached to the LAN ?
The LAN is a shared resource
How to regulate access to this shared resource to
provide :
fairness
All hosts should be able to use a fair fraction of the shared
resource
performance
The shared resource should be used efficiently
15
Static allocation
A D
B C
T
A B C DA
DA B C D A B C D A B C D A B C D A B C D A B C D
16
Medium access control
Hypotheses
N stations need to share the same transmission
channel
A single transmission channel is available
Definition
Collision
If two stations transmit their frame at the same time, their
electrical signal appears on the channel and causes a collision
Options
Frame transmission
A station can transmit at any time
A station can only transmit at specific instants
Listening while transmitting
A station can listen while transmitting
A station cannot listen while transmitting
17
Medium access control
How to regulate access to the shared
medium ?
Statistical or optimistic solutions
hosts can transmit frames at almost any time
if the low is low, the frames will arrive correctly at destination
if the low is high, frames may collide
distributed algorithm allows to recover from the
collisions
Deterministic or pessimistic solutions
Collisions are expensive and need to be avoided
Distributed algorithm distributes authorisations to
transmit to ensure that a single host is allowed to
transmit at any time
avoids collisions when load is high, but may delay transmission
when load is low
18
DataLink layer
Ethernet networks
WiFi networks
19
ALOHA
Problem
terminals need to exchange data with computer
on main island
terminal
Computer
Solution
Geostationary satellite
satellite antenna on each island
island sends frame to satellite that relays them
towards earth
CNPP/2008.5. © O. Bonaventure, 2008
20
ALOHA is discussed in
N. Abramson, The ALOHA system – another alternative for Computer Communications, Proc. Fall Joint Computer Conference, AFIPCS
Conference 1970
N. Abramson, Development of the Alohanet, IEEE Transactions on Information Theory, Vol IT-31, No. 3, pp. 119-123
ALOHA (2)
Data transmission
Frame forwarded by satellite Frame sent by terminal
Terminal
Acknowledgement Computer
Terminal can check that its frame was forwarded
by listening to satellite channel
Acknowledgement allows to confirm correct
reception of data frame
21
ALOHA (3)
How to organise frame transmission ?
If a host is alone, no problem
If two hosts transmit at the same time, a collision
will occur and it will be impossible to decode their
transmission
A
B
collision
CNPP/2008.5. © O. Bonaventure, 2008
22
ALOHA (3)
N=1;
while ( N<= max) do
send frame;
wait for ack on return channel or timeout:
if ack on return channel
exit while;
else
/* timeout */
/* retransmission is needed */
N=N+1;
end do
/* too many attempts */
23
ALOHA (4)
Drawback
When two stations enter in collision, they may
continue to collide after
T0 T3 T3+timeout
A
B Collision
T1 T2 T2+timeout
24
ALOHA (5)
Improved algorithm
N=1;
while ( N<= max) do
send frame;
wait for ack on return channel or timeout:
if ack on return channel
exit while;
else
/* timeout */
/* retransmission is needed */
wait for random time;
N=N+1;
end do
/* too many attempts */
25
Slotted ALOHA
A
B
collision
26
Carrier Sense Multiple Access
Limitations
Politeness is only possible if all stations can listen to
the transmission of all stations
true when all stations are attached to the same cable, but not in
wireless networks
27
CSMA
CSMA
Carrier Sense Multiple Access
N=1;
while ( N<= max) do
wait until channel becomes free;
send frame immediately;
wait for ack or timeout:
if ack received
exit while;
else
/* timeout */
/* retransmission is needed */
N=N+1;
end do
/* too many attempts */
28
non-persistent CSMA
Idea
Transmitting a frame immediately after the end of
the previous one is a very aggressive behaviour
If the channel is free, transmit
Otherwise wait some random time before listening again
N=1;
while ( N<= max) do
listen channel;
if channel is empty
send frame;
wait for ack or timeout
if ack received
exit while;
else /* retransmission is needed */
N=N+1:
else
wait for random time;
end do
29
p-persistent CSMA
Tradeoff between CSMA and non-persistent
CSMA
N=1;
while ( N<= max) do
listen channel;
if channel is empty
with probability p
send frame;
wait for ack or timeout
if ack received
exit while;
else /* retransmission needed */
N=N+1;
else
wait for random time;
end do
30
Improvements to CSMA
Solution
Stop the transmission of a frame as soon as a
collision has been detected
CSMA/CD
Carrier Sense Multiple Access with Collision
CNPP/2008.5.
Detection © O. Bonaventure, 2008
31
CSMA/CD is described in
R. Metcalfe and D. Boggs. Ethernet: Distributed packet-switching for local computer networks. Communications of the ACM, 19(7):395--404,
1976. available from
http://www.acm.org/pubs/citations/journals/cacm/1976-19-7/p395-metcalfe/
CSMA/CD
32
The interframe delay is used to ensure that the electronics of the receiver can be synchronised to the transmitted signal. A typical interframe
delay is 9.6µsec
CSMA/CD : Example
A B
1
Start of frame
2
Frame is propagated on LAN (5 microsecond per kilometer)
4
Frame leaves the LAN
CNPP/2008.5. © O. Bonaventure, 2008
33
CSMA/CD : Collisions
A B
1
Frame starts at A and B almost at the same time
Collision : at this point on the
shared medium, it is impossible
to decode the signal
34
CSMA/CD : Collisions (2)
Advantages
Improves channel utilisation as stations do not
transmit corrupted frames
a station can detect whether its frame was sent
without collision
implicit acknowledgement if destination is up
when a collision is detected, automatic retransmission
35
CSMA/CD : Collisions (3)
A B
1
A and B send a small frame almost at the same time
2
The two frame collide in the middle of the medium
3
A did not notice any collision
B did not notice any collision
They both consider that their frames were received correctly
36
CSMA/CD : Collisions (4)
A B
2
After τ seconds, Aʼs frame reaches B
A time τ−ε, B starts to transmit its own frame
B notices the collision immediately and stops transmitting
3
A detects collision at time τ+τ−ε
37
CSMA/CD : Collisions (5)
How can a station ensure that it will be able
to detect all the collisions affecting its
frames ?
Each frame must be transmitted for at least a
duration equal to the two way delay (2∗τ)
As the throughput on a bus is fixed, if the two way delay
is fixed, then all frames must be larger than a minimum
frame size
Improvement
To ensure that all stations detect collisions, a station that notices
a collision should send a jamming signal
38
Exponential backoff
Solution
Wait some random time after the collision
After collision, time is divided in slots
a slot = time required to send a minimum sized frame
After first collision, wait 0 or 1 slot before retransmitting
After first collision, wait 0, 1,2 or 3 slots before retransmitting
After first collision, wait 0..2i-1 slots before retransmitting
39
CSMA/CD with exponential backoff
40
CSMA with Collision Avoidance
Goal
Design a medium access control method suitable for
wireless networks
on a wireless network, a sender cannot usually listen to its
transmission (and thus CSMA/CD cannot be used)
Improvements to CSMA
Initial delay before transmitting if channel is empty
Extended Inter Frame Space (EIFS)
Minimum delay between two successive frames
Distributed Coordination Function Inter Frame Space (DIFS)
Delay between frame reception and ack transmission
Short Inter Frame Spacing (SIFS, SIFS< DIFS < EIFS)
41
Sender
N=1;
while ( N<= max) do
if (channel is empty)
{ wait until channel free during t>=EIFS; }
else
{ wait until endofframe;
wait until channel free during t>=DIFS; }
send data frame ;
wait for ack or timeout:
if ack received
exit while;
else
/* timeout retransmission is needed */
N=N+1;
end do
/* too many attempts */
42
CSMA/CA (2)
Receiver
While (true)
{
Wait for data frame;
if not(duplicate)
{ deliver (frame) }
wait during SIFS;
send ack (frame) ;
}
43
CSMA/CA : Example
B C
A
EIFS
Data frame
Busy
SIFS
ACK frame
DIFS
Data frame
44
CSMA/CA : Problem
B C
A
EIFS
EIFS
Timeout Timeout
Data frame
Data frame
Busy
45
CSMA/CA
First improvement (2)
Sender
N=1;
while ( N<= max) do
if (channel is empty)
{ wait until channel free during t>=EIFS; }
else
{ wait until endofframe;
wait until channel free during t>=DIFS; }
backoff_time = int(random[0,min(255,7*2N-1)])*T
wait(backoff_time)
if (channel still free)
{ send data frame ;
wait for ack or timeout:
if ack received
exit while;
else /* timeout retransmission is needed */
N=N+1; }
end do
46
The value T is defined in the standard, but a detailed discussion of this value is outside the scope of this presentation.
CSMA/CA : Example 2
A B C
EIFS
EIFS
Backoff[0,7]
Backoff[0,7]
Data frame
Channel busy!
SIFS Busy
Ack frame
DIFS
Backoff[0,7]
Data frame
CNPP/2008.5. © O. Bonaventure, 2008
47
CSMA/CA
Hidden station problem
Often occurs in wireless networks
B
Hears A and C
C
A
48
CSMA/CA
Second improvement
Principle
Allow the sender to “reserve” some air time
Special (short) RTS frame indicates duration
Using a short RTS frame reduces the risk of collisions while
transmitting this frame
49
CSMA/CA : Example 3
A B C
EIFS+Backoff
SIFS
CTS[100microsec] Busy[
100microsec+
SIFS SIFS+
CTS+
Data [100 microsec] SIFS+
ACK
]
SIFS
ACK frame
50
Datalink layer
Ethernet networks
Basics of Ethernet
IP over Ethernet
Interconnection of Ethernet networks
WiFi networks
51
Ethernet/802.3
52
LAN/MAN Standards Committee of the IEEE Computer Society. IEEE Standard for Information Technology - Telecommunications and
information exchange between systems - local and metropolitan area networks - specific requirements - Part 3 : Carrier Sense multiple access
with collision detection (CSMA/CD) access method and physical layer specification. IEEE, 2000. available from http://standards.ieee.org/
getieee802/802.3.html
Ethernet/802.3
A B C D
Initial configuration
bus-shaped network
53
Ethernet Addresses (2)
Destination address
If high order bit is 0, host unicast address
If high order bit is 0, host multicast address
broadcast address = 111111..111
54
DIX Format
proposed by Digital, Intel and Xerox
Source address
55
This is the most widely used format, it is notably used to carry IP packets.
802.3 Frames
Ethernet 802.3
standardised by IEEE
56
Ethernet and 802.3 : details
IEEE standard
Divide datalink layer in two sublayers
Medium Access Control (MAC)
lower sublayer responsible for the frame transmission and
medium access control (CSMA/CD)
interacts with but does not depend from the physical layer
example : 802.3
Logical Link Control (LLC)
higher sublayer responsible for the exchange of frames with the
higher layers
interacts with the higher layer
does not depend from the MAC layer
several variants of LLC exist
CNPP/2008.5. © O. Bonaventure, 2008
57
802.2 : LLC
LLC Type 1
Unreliable connectionless service
Addition to 802.3
New LLC header allows to identify upper layer protocol
similar to Type field of Ethernet DIX
Packet
LLC Type 2
Reliable transmission with acknowledgements
An example of a protocol developed by a
standardisation body but used by nobody...
CNPP/2008.5. © O. Bonaventure, 2008
58
Ethernet Service
59
Datalink layer
Ethernet networks
Basics of Ethernet
IP over Ethernet
Interconnection of Ethernet networks
WiFi networks
60
IPover PPP and
IP over Ethernet
IP: 10.0.0.1 Ethernet
PPP
IP: 10.0.1.9
IP: 10.0.0.2 R IP: 10.0.1.1
Eth : B
Eth : A
IP IP
PPP PPP Eth Eth
Modem Modem 10base5 10base5
0x0800 IP
CNPP/2008.5. © O. Bonaventure, 2008
61
IP on LANs
Problems to be solved
How to encapsulate IP packets in frames ?
How to find the LAN address of the IP destination ?
LAN efficiently supports broadcast/multicast
transmission
When a host needs to find the LAN address of
another IP host, it broadcasts a request
The owner of the destination IP address will reply and
provided its LAN address
LAN doesnʼt efficiently support broadcast/
multicast
Maintain a server storing IP address:MAC address pairs
Each host knows serverʼs MAC address and registers its
address pair
Each host sends request to server to map IP addresses
62
Address Resolution Protocol
1
IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9
Eth : A Eth : E Eth : C Eth : B
2
IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9
Eth : A Eth : E Eth : C Eth : B
3
IP: 10.0.1.22 IP: 10.0.1.11 IP: 10.0.1.8 IP: 10.0.1.9
Eth : A Eth : E Eth : C Eth : B
10.0.1.8 replies in an Ethernet frame and A knows the MAC address to send
its IP packet
63
D. C. Plummer. Ethernet address resolution protocol: Or converting network protocol addresses to 48.bits ethernet address for transmission on
ethernet hardware. Request for Comments 826, Internet Engineering Task Force, November 1982.
ARP frame format
Preamble
[7 bytes]
Delimiter[1byte]
Destination
Broadcast : 111...111
Address
Source MAC address of the sender
Address
Common header for all ARP frames
Type: 0x806 - Hardware type Ethernet is 1
- Protocol type , IP is 0x0800.
Header
- Hardware length : length of MAC address
- Protocol length : length of network layer
address
Sender MAC - Operation : 1 for request, 2 for reply, 3 for
RARP request, and 4 for RARP reply.
Sender IP
Target MAC
Target IP
64
Optimisations
65
IP over Ethernet : Example
IP: 10.0.1.9/24
IP: 10.0.1.8/24 Default R: 10.0.1.1
IP: 10.0.1.22/24 Default R: 10.0.1.1
Default R: 10.0.1.1 Eth : B
Eth : C ARP Table
Eth : A ARP Table
ARP Table empty
empty
empty
IP: 10.0.1.1/24
Eth : R
ARP Table
empty
R
66
Datalink layer
Ethernet networks
Basics of Ethernet
IP over Ethernet
Interconnection of Ethernet networks
WiFi networks
67
Ethernet today
Ethernet organisation
Not anymore a bus
Ethernet is now a star-shaped network !
68
Ethernet with structured cabling
How to perform CSMA/CD in a star-shaped
network ?
Hub :
receives electrical signal on one port,
regenerates this signal and forwards it over all
other ports besides the port from which it
received it
69
Hub and the reference model
Datalink Datalink
Physical Physical
70
Ethernet with structured cabling (2)
Hub Hub
Hub
71
Ethernet Switch
Can we improve the performance of hubs ?
Ethernet switch
Operates in the datalink layer
understands MAC address and filters frames based on
their addresses
Eth : C
Eth : A
Address Port
Src:A Dst:B
A West
B South
Eth : B C East
CNPP/2008.5. © O. Bonaventure, 2008
72
Network Network
Datalink Datalink
Physical Phys. Phys. Physical
73
Port-address table
74
Frame processing
75
Network redundancy
How to design networks that survive link and
node failures ?
Add redundant switches
Address Port
A West
B South Eth : C
C East
Eth : A
Src:A Dst:C
Address Port
A West
Address Port B South
A North
C North
B South Eth : B
CNPP/2008.5. C East © O. Bonaventure, 2008
76
Network redundancy (2)
Eth : C
Eth : A
Src:A Dst:C
Address Port
Address Port
Eth : B
CNPP/2008.5. © O. Bonaventure, 2008
77
How to solve this problem ?
78
Principle of the solution
Switch 2
Switch 1
Switch 9
Switch 44
79
How to build the spanning tree
80
Root and Designated Switches
Root switch
The Root Switch is the root of the spanning tree
The Root switch may change upon the arrival of
new switches in the network
Switch 1
Designated switch
to avoid loops, only
one switch should
be responsible for Switch 9
Switch 4
forwarding frames
from the root on
any link
Root switch is always
designated switch
for all its links
CNPP/2008.5. © O. Bonaventure, 2008
81
The switch identifiers
82
The link costs
83
Building the spanning tree
802.1d protocol
802.1d uses Bridge PDUs (BPDUs) containing
Root ID : identifier of the current root switch
Cost : Cost of the shortest path between the switch
transmitting the BPDU and the root switch
Transmitting ID : identifier of the switch that transmits
the BPDU
84
Ordering of BPDUs
Example
BPDU1 BPDU2
R1 C1 T1 R2 C2 T2
29 15 35 31 12 32
35 80 39 35 80 40
35 15 80 35 18 38
85
Building the spanning tree (2)
86
802.1d port states
802.1d port state based on received BPDUs
Root port
port on which the best 802.1d BPDU was received
port used to receive the BPDUs sent by the root form
the shortest path
A root port does not transmit BPDUs
Only one root port on each switch
Designated port
port(s) used to send switchʼs BPDU upon reception of a
BPDU from the root via the Root port
Switchʼs BPDU is
current root, cost to reach root, switch identifier
0, one or more designated ports on each switch
a port is designated if the switchʼs BPDU is better than
the best BPDU received on this port
Blocked port (only receives 802.1d BPDUs)
CNPP/2008.5. © O. Bonaventure, 2008
87
802.1d port states (2)
Example
BPDUs received by switch 18
Root Cost Transmitter
port1 12 93 51
port2 12 85 47
port3 81 0 81
port4 15 31 27
Root : switch 12
port2 is the root port
Switchʼs BPDU
R=12, C=86, T=18
This BPDU is better than the BPDUs received on
the other ports. They are thus designated
88
802.1d port states (3)
Example
BPDUs received by switch 92
Root Cost Transmitter
port1 81 0 81
port2 41 19 125
port3 41 12 315
port4 41 12 111
port5 41 13 90
root : 41
root port : port4
Switchʼs BPDU
R=41,C=13, T=92
Port state
port1 and port 2 : designated
port 3 and port 5 : blocked
CNPP/2008.5. © O. Bonaventure, 2008
89
Port activity
90
Port states and activity
Receive Transmit
BPDUs BPDUs
Blocked yes no
Root yes no
Designated yes yes
Inactive no no
Active yes yes
91
Example network
Switch 9
Switch 12
92
Impact of failures
Failure of a link
If the network is redundant, a disabled link should be
enabled to cope with the failure
93
How to deal with failures ?
94
IP over Ethernet
Detailed example
IP: 10.0.1.8/24 IP: 10.0.2.9/24
R default: 10.0.1.1 Eth : B
Eth : C 10.0.1.0/24 via 10.0.2.1
ARP table 10.0.3.0/24 via 10.0.2.2
Empty ARP table
Empty
H1 R1 S2 R2
IP: 10.0.2.2/24
IP: 10.0.1.22/24 Hub IP: 10.0.1.1/24 IP: 10.0.3.2/24
IP: 10.0.3.11/24
R default: 10.0.1.1 IP: 10.0.2.1/24 Eth : F
Eth : R2-West R default:10.0.3.2
Eth : A Eth : R1-West Eth : R2-East
ARP table Eth : R1-East ARP table
ARP table Empty
Empty ARP table Empty
Empty
Examples
IP packet from 10.0.1.22 to 10.0.3.11
IP packet from 10.0.2.9 to 10.0.1.22
IP packet from 10.0.3.11 to 10.0.1.22
95
Ethernet Evolution
MAC sublayer
CSMA/CD unchanged
minimum frame size : 512 bits
slot time : 5.12 micro seconds
Maximum distance : shorter than Ethernet 10 Mbps
Same frame format as 10 Mbps Ethernet
96
R. Seifert. Gigabit Ethernet : Technology and Applications for High-Speed LANs. Addison Wesley, 1998. ISBN 0201185539.
http://www.ethermanage.com/ethernet/ethernet.html
Ethernet Evolution (2)
Gigabit Ethernet
Physical layer
Bandwidth 1 Gbps
Optical fiber or twisted pair
MAC sublayer
CSMA/CD still supported
How was this achieved ?
Two options
Increase minimum frame size : not backward compatible with
Ethernet
Reduce the maximum distance as for FastEthernet : but then
networks would have a diameter of 10 m
Gigabit CSMA/CD hack
minimum frame size is still 512 bits but the sender must
continue to send an electrical signal during the equivalent o
4096 bits
same frame format as Ethernet
but extensions allow to transmit Jumbo frames of up to 9KBytes
CNPP/2008.5. © O. Bonaventure, 2008
97
The Ethernet zoo
98
The 10 Gbps zoo is much larger than this, see e.g. http://en.wikipedia.org/wiki/10_gigabit_Ethernet
Full duplex Ethernet
Observations
In many networks, Ethernet is a often a point-to-
point technology
host-to-switch
switch to switch
S1 S2
HUB
HUB
99
Ethernet full duplex (2)
Advantages
Improves bandwidth
Both endpoints can transmit frames at the same time
CSMA/CD is disabled
No constraint on propagation delay anymore
Ethernet network can be as large as we want !
100
Full duplex Ethernet (3)
Drawback
If CSMA/CD is disabled, access control is
disabled and congestion can occur
Server
S1 S2
Client
101
Ethernet flow control
server
Client
S1
FastEthernet Ethernet
(100 Mbps) (10 Mbps)
Sender blocked
102
Virtual LANs
Allows to build several logical networks on
top of a single physical network
Each port on each switch is
A B associated to a particular VLAN
All the hosts that reside on the same
VLAN can exchange Ethernet
frames
A host on VLAN1 cannot send an
C S F
Ethernet frame towards another
host that belongs to VLAN2
Broadcast and multicast frames are
D E only sent to the members of the
VLAN
VLAN1 : A,E,F
VLAN2 : B,C,D
CNPP/2008.5. © O. Bonaventure, 2008
103
VLANs in campus networks
Possible solutions
A
Place on each switch a table
B
that maps each MAC address
on a VLAN id
difficult to manage this table
VLAN1 : A,E,F
VLAN2 : B,C,D
CNPP/2008.5. © O. Bonaventure, 2008
104
See
105
Datalink layer
Ethernet networks
Basics of Ethernet
IP over Ethernet
Interconnection of Ethernet networks
WiFi networks
106
Modes of operation
Ad hoc
or Independent
Basic Service Set
Infrastructure mode
DS
BSS
BSS
CNPP/2008.5. ESS © O. Bonaventure, 2008
107
The WiFi zoo
108
Source http://en.wikipedia.org/wiki/IEEE_802.11n
WiFi zoo and performance
1 Mbps
11 Mbps
Laptop far away
54 Mbps
Laptop supporting
only 802.11b
CNPP/2008.5. © O. Bonaventure, 2008
109
Practical issues
with WLAN deployments
Home environment
110
Practical issues
with WLAN deployments
Enterprise networks
111
The WiFi channel frequencies
112
Example
113
Datalink layer
Ethernet networks
Basics of Ethernet
IP over Ethernet
Interconnection of Ethernet networks
WiFi networks
114
Ring networks
S2
S1
unidirectional ring
S3
Interface
S5
S4
Problem to be solved
How to share fairly ring transmission capacity
among all devices attached to the ring ?
CNPP/2008.5. © O. Bonaventure, 2008
115
Ring networks (2)
116
Ring networks (3)
Consequence
When there are no data frames sent, stations
should continuously exchange the token
S1 S2
How to achieve this ?
A station must relay the
electrical signal it receives Unidirectional
ring
upstream when not S3
transmitting Interface
it introducing a delay of one S5
bit transmission time
If all stations behave so, S4
and token is small,
token will travel permanently
If token is not small, increase the delay on the
token ring network
CNPP/2008.5. © O. Bonaventure, 2008
117
Ring networks (4)
S1 S2
Sender behaviour
Captures token
Sends data frame
Removes data frame S3
from ring
Sends token S5
S4
118
Ring networks in practice
119
Token Ring (1)
Token
travels permanently on ring when stations are
idle
Size 24 bits
Minimum delay on ring
24 bits transmission times
Actual ring delay
Each station introduces a one-bit transmission time
delay
Physical links have a propagation delay
Each ring contains a monitor station that measures
delay during ring initialisation and adds delay if needed
Interfaces
Two modes of operation
Listen : interface adds a one bit transmission delay
Transmit : only if station owns the token
CNPP/2008.5. © O. Bonaventure, 2008
120
Frame format
Token (24 bits)
SD : starting delimiter
invalid physical layer symbol with
Manchester coding 1 1 1
AC : Access control SD AC ED
ED : ending de fin
invalid physical layer symbol with
Manchester coding
Data frame
1 1 1 (2or)6 (2 or)6 0... (nolimit) 4 1 1
SD AC FC Dest Source Data CRC ED FS
FC : Frame control
Allows to distinguish between control frames and data frames
FS : Frame status
CNPP/2008.5. © O. Bonaventure, 2008
121
Token Ring (3)
Frame transmission
S2
Delay 1 bit S1
Listen mode
Unidirectional Ring
S3
Transmit mode
Interface
To From S5
Station Station
S4
How to capture the token ?
Rely on Token bit of AC field and one bit delay
CNPP/2008.5. © O. Bonaventure, 2008
122
Token Ring (4)
123
Token Ring (5)
124
Token Ring (6)
Monitorʼs responsibilities
Ensure that token is never lost or corrupted
Insert an artificial delay of 24 bit transmission
times on the ring
Remove orphan and looping frames
If the monitor fails, the ring must be bootstrapped
again © O. Bonaventure, 2008
CNPP/2008.5.
125
Token Ring (7)
Token surveillance
Monitor checks how often its sees the token
If there are N stations on the ring, then the monitor should
see the token at worst every N*THT seconds
If token is lost, monitor cuts ring, removes electrical signal
and resend a new token
Orphan frames
Frame with invalid coding or incomplete frame
monitor cuts ring, removes electrical signal and resend a
new token
Looping frames
Every time monitor sees a frame, it sets its Monitor
bit of the AC field to 1
All stations send their frames with Monitor=0
If a frame is seen twice by the monitor, it cuts ring,
removes electrical signal and resend a new token
CNPP/2008.5. © O. Bonaventure, 2008
126
FDDI
Bypass to reroute
around failure Failure
S2
S1
S3
S5
127
FDDI is defined in
ANSI. Information systems - fiber distributed data interface (FDDI) - token ring media access control (mac). ANSI X3.139-1987 (R1997), 1997
FDDI (2)
128
FDDI (3)
Solution
Delay sensitive frames can be supported
provided that a FDDI ring can bound the
transmission delay of such a frame
synchronous frames should be transmitted earlier than
normal frames on each station
Since a station can always transmit when it captures
the token, a solution should bound the Token Rotation
Time to provide strict guarantees to delay sensitive
frames
CNPP/2008.5. © O. Bonaventure, 2008
129
FDDI (4)
130
FDDI (5)
Frame format
Start of Frame
[8 bits]
131
Interconnection of Token Rings
How to interconnect Token Ring networks ?
S1 S2 S7
S5
Bridge/Switch
S4 S9
Possible solutions
Use the spanning tree designed for Ethernet
CNPP/2008.5.
Invent a new protocol © O. Bonaventure, 2008
solution chosen by IBM for Token Ring
132
Interconnection of Token Rings (2)
S1
S7
S5
S9
Basic idea
Use source routing
Problems
How to identify the paths
How to discover the paths ?
CNPP/2008.5. © O. Bonaventure, 2008
133
Interconnection of Token Rings (3)
S1 S7
LAN1 LAN5
B3
S5
S9
B6
B1
LAN3
B4
Identification of paths
Each LAN has one unique identifier
Each bridge has one identifier
Each path is a list of pairs LAN#,bridge#
134
Interconnection of Token Rings (4)
S1 S7
LAN1 B3
LAN5
S5
B6 S9
B1
B4 LAN3
135
Spanning Tree versus
Source Routing
Spanning tree Source routing
complexity in complexity in all
switches/bridges stations
only a subset of the the entire network is
network is used used
entirely transparent requires support on
stations
multicast natively spanning tree
supported required for multicast
few control frames many control frames
(802.1d) can be required
136