Вы находитесь на странице: 1из 82

Ethernet in Half Duplex

CT1e_04_Ethernet_Half_Duplex_07.0.00 1

Notes:

Hirschmann Automation and Control GmbH


This presentation, and the material here in, have been prepared for the purposes of education
and training. These slides are the sole property of Hirschmann and its subsidiaries, and are not
to be altered, duplicated or distributed in any way without express written permission by
Hirschmann.

1
Media Converters

TP FO TP

CT1e_04_Ethernet_Half_Duplex_07.0.00 2

Media converters usually are used to bridge long distances by fiber- Notes:
optic cable.

They offer a transparent conversion between different media, usually


TP to fiber-optic.
Please note that F/O ports support one speed only and thus also the
TP port can support only this speed.

Operating mode: Half/full duplex


Please note the maximum distance of the collision domain at a HDX
link!

Media converter regenerate the amplitude but dont offer the repeater
function.

2
Hubs Repeaters Star Couplers

CT1e_04_Ethernet_Half_Duplex_07.0.00 3

Hubs offer the functions of OSI layer 1. Notes:


The repeater/hub sends the data it receives at one port to all other
ports. The data signal is regenerated in the process.

The ports of a repeater/hub work in half-duplex mode. In that mode,


collisions of data frames can occur. Networks operated in half-duplex
mode are termed collision domains. Repeaters/hubs connect devices
to a collision domain, or interconnect multiple collision domains. The
access to the network is carried out according the principle while one
is talking all others have to listen, thus the bandwidth statistically
seen is shared.

The advantages of a hub are its small latency and the simple
installation, usually plug-and-play.

The disadvantage is that the more participants are transmitting, the


more often collisions occur and the less bandwidth could be used.
Rule of thumb: in industry automation ca. 8 % are usable,
else ca. 40 %.

The maximum distance of a collision domain at Ethernet is limited by


its access method. Thus larger networks are based on switches, which
due to FDX transmission have no limits.

3
CSMA/CD - IEEE 802.3 Access Method

Station is ready to send

Listen to channel Wait as per


backoff strategy
no
Channel free?
yes

Send data and Collision 32-bit jam signal


listen to channel detected (usually 5 MHz signal)

No collision

Data correctly
transferred

CT1e_04_Ethernet_Half_Duplex_07.0.00 4

Ethernet components in half-duplex mode use the CSMA/CD access Notes:


method to the medium.
Carrier sense: Network users "listen" for whether the medium
is free.
Multiple access: As soon as the medium is free, any user can
start sending. A minimum distance of 12 byte must be kept (IFG
or IPG).
Collision detection: If multiple users start sending
simultaneously, a data collision occurs. The participating users
detect this, stop their send and restart it after a random period
of time.

The jam signal usually consists of a 1-0 sequence, but may also
comprise any other bit sequences. The only important factor is that the
bus is occupied, thereby generating a send abort for the devices
involved in the collision.

Binary Exponential Backoff Algorithm BEB:


One station waits i x collision window (25.6 s)
i = random number from 0 < i < 2k
k = min (n, 10)
n = number of send attempts already made

4
Size of a Collision Domain at 10 MBit/s

Smax = 5120 m

CT1e_04_Ethernet_Half_Duplex_07.0.00 5

The sender must detect a collision before it has ended the send Notes:
operation.
Consequently, the standard stipulates the minimum size of an Ethernet
frame as 64 bytes or 512 bits.

To send 512 bits, at a transfer rate of 10 Mbit/s a repeater or a network


card takes 51.2 s.

To send half an Ethernet frame it takes 25.6 s. This time is termed


the slot time. After this time the frame must have reached the most
distant device, so that a collision can be detected reliably.

The signal propagation rate of the data over a copper or fiber-optic


cable is assumed to be two thirds the speed of light (approx. 200,000
km/s).

This results in a maximum distance between any two points


("diameter") of:
25.6 s * 200,000 km/s = 5,120 m
In practice the delays of hubs and of both Ethernet controllers of the
end devices must be subtracted.
This limitation is valid only in HDX operation!

5
Appendix

CT1e_04_Ethernet_Half_Duplex_07.0.00 6

Notes:

6
Ethernet 10 Mbit/s

10BASE2
BNC T piece

Terminator 50
Segment
min. 0.5 m
max. 185 m

10BASE5

Transceiver Transceiver cable


max. 50 m

Terminator 50
Segment
min. 2.5 m
max. 500 m
CT1e_04_Ethernet_Half_Duplex_07.0.00 7

Today coax and AUI are used in industry networks for completion. Notes:

10BASE2 - Cheapernet or Thinwire


Maximum 185 m segment length
Maximum 30 user ports
Transceivers are integrated into the Network Interface Card
(NIC)
At least 0.5 m distance between two ports
Transmission medium: 50 Ohm coax HDX
Repeaters can be used to connect additional segments
(10BASE2 or 10BASE5).
The maximum length of a Cheapernet is 925 m.

10BASE5 - Yellow cable


Transmission medium: 50 Ohm coax HDX
Maximum 500 m segment length
At least 2.5 m distance between 2 transceivers
Maximum 100 transceivers (user ports)
Maximum 50 m AUI cable from transceiver to user
A maximum of 3 additional segments may be connected to one
segment by repeaters.

7
Design of a Collision Domain Model 1: 5-4-3 Rule

Repeater

CT1e_04_Ethernet_Half_Duplex_07.0.00 8

Model 1 to IEEE 802.3 section 13 Notes:


The 5-4-3 rule:
y A maximum of 5 segments
y may be connected to 4 repeaters,
y but devices may only be connected to 3 segments.
This does not bring a network up to its limit.

The 5-4-3 rule was introduced to simplify the complex computations


necessary to calculate the maximum number of hubs/repeaters within
a collision domain.

8
Maximum Network Size, Fast ETHERNET

100 m DTEDTE via TP


412 m DTEDTE via optical fiber

200 m over repeater class I via TP


260 m over class I repeater via TP+optical fiber
272 m over class I repeater via optical fiber
200 m over 1 class II repeater via TP
320 m over 1 class II repeater via optical fiber

205 m over 2 class II repeaters via TP


228 m over 2 class II repeaters via optical fiber

CT1e_04_Ethernet_Half_Duplex_07.0.00 9

Repeater classification for Fast Ethernet: Notes:


Class I repeater
Within a collision domain only one repeater of this class may be
used.
Class II repeater
Within a collision domain two repeaters of this class, with short
internal delays, may be used.

The theoretical maximum network size of the collision domain at a


transfer rate of 100 Mbit/s is 512 m.

9
Ethernet in Full Duplex

CT1e_05_Ethernet_Full_Duplex_07.0.00 1

Notes:

Hirschmann Automation and Control GmbH


This presentation, and the material here in, have been prepared for the purposes of education and
training. These slides are the sole property of Hirschmann and its subsidiaries, and are not to be
altered, duplicated or distributed in any way without express written permission by Hirschmann.

1
Autonegotiation

Autonegotiation Autonegotiation
FLP
FDX FDX
FLP

Fixed to HDX Autonegotiation


FLP
HDX HDX

CT1e_05_Ethernet_Full_Duplex_07.0.00 2

Autonegotiation offers the devices to select the best possible data Notes:
throughput for the connection.
By upgrading the Normal Link Pulse (NLP), which tells the opposite
port of its existence, to Fast Link Pulses (FLPs), the best possible
transfer rate (10BASE-T, 100BASE-TX, 100BASE-T4) and the mode
(HDX, FDX) are negotiated. The FLPs are only transmitted at
connection setup, so as not to impair the connection performance.

With Autocrossing a port can automatically configured to MDI or


MDI-X. This then makes the distinction between patch and crossover
cables irrelevant. This feature is often only usable if a port is
configured for autonegotiation.

Parallel detection
Status of autonegotiation when only one of the two connected
devices supports autonegotiation.
The autonegotiation device detects the speed of the opposite
party and configures itself to that speed and half-duplex mode
in order to detect collisions.

Media converters cannot forward autonegotiation signals, because a


fiber-optic port does not support FLPs or NLPs.
Workaround: Set both devices permanently to FDX.

2
Duplex Mismatch

Fixed to FDX Autonegotiation


FLP
FDX HDX

CRC errors and Fragments Collission and Late Collisions

CT1e_05_Ethernet_Full_Duplex_07.0.00 3

A duplex mismatch can occur Notes:


because of a configuration failure, if one port of a connection is
configured fixed to FDX and the other one to autonegotiation.
Because of an incompatibility, for example caused by a faulty
driver.

A duplex mismatch can be detected by the error statistics of a switch


port or a network interface card.
If a port operates in HDX, collisions in combination with late
collisions (a collision, which is detected after the first 64 bytes
of a frames were sent) indicates a duplex mismatch.
If a port operates in FDX, CRC errors in combination with
fragments indicates a duplex mismatch.

Media converters cannot forward autonegotiation signals, because a


fiber-optic port does not support FLPs or NLPs.
Workaround: Set both devices permanently to FDX to avoid a
duplex mismatch.

3
Exercise: Autonegotiation
Auto Auto

Auto

100Mbit/s HDX

Auto
100Mbit/s FDX

Auto

100Mbit/s HDX

Auto
10Mbit/s HDX

CT1e_05_Ethernet_Full_Duplex_07.0.00 4

Some ports in the example above have fixed transfer rates and modes, Notes:
and others are set to autonegotiation (Auto). The switches support the
autocrossing function when autonegotiation is active.

Enter the transfer rate and mode for the ports set to autonegotiation.

Define the cable to use (patch/crossover).

Hub

Switch

4
Exercise: Duplex Mismatch

Late Duplex
Port CRC Fragmente Collision Duplex Mode?
Collision Mismatch?
1 0 0 15 0
2 32 18 0 0
3 0 0 115 85
4 60 44 0 0
5 2 0 0 0
6 0 0 64 53

CT1e_05_Ethernet_Full_Duplex_07.0.00 5

Determine which port has a duplex mismatch and in which duplex Notes:
mode (FDX or HDX) the port.

5
Switches

A
B

Po 2
rt 1 o rt
P
Port 3 C

CT1e_05_Ethernet_Full_Duplex_07.0.00 6

The switch is a device on layer 2 of the ISO/OSI reference model. Notes:


Each port of a switch can operate in half-duplex or full-duplex mode.
This means each port comprises its own segment (collision domain).

The switch checks incoming framess for their destination and for any
errors. By means of an address table (Forwarding Database) the
switch learns during online operation which addresses (devices) are
connected to which port. This means frames are forwarded to specific
destinations and do not unnecessarily place load on segments in
which the frame's destination is not located. If the destination is not yet
known to the switch, however, the frame is sent to every segment.
This ensures that the destination receives the frame (termed
"flooding").

Erroneous framess or collisions in connected segments are not


forwarded by a switch and do not reach other connected segments.

6
Forwarding Database and Aging Timer

Port: MAC address


1 00:08:74:E9:C8:4E
2

3 00:08:74:D3:04:5D
4

old

tAging

CT1e_05_Ethernet_Full_Duplex_07.0.00 7

Each switch has a forwarding database where it stores which port, or Notes:
ports, conceal(s) which MAC address (or multiple addresses). This
enables the switch to forward frames directly to the destination without
placing data load on other network segments.

If a switch receives a frame from a sender not known to it, it enters the
MAC address dynamically in its table. MAC address entries may be
permanent (e.g. system or static addresses) or dynamic (learned).

If the destination of a frame is not known to the switch (Unknown


Unicast), the frame is sent to all ports except the receiving port
(flooding).

As soon as a new address is learned, the aging timer is started


(setting range: 10 s ( tAging ( 1 million s (= 11.5 days)). If the address
is not detected as new within this time, the entry is set to old. After a
further aging time the entry is definitively deleted from the table. The
aging timer is reset when an address that has already been learned
once is re-detected. The default value for the Aging Timer is 300s
(recommendation of the IEEE).

Advantage: Small address table for improved performance


If aging is not to apply, enter address as "static".

7
Exercise: Address Table
A
B

Po 2
rt 1 o rt
P
Port 3 C
T1: 12:00 T2: 12:01 T3: 12:02 T4: 12:03
Aging Aging Aging Aging
Port Address Port Address Port Address Port Address
Timer Timer Timer Timer
1 1 1 1

2 2 2 2

3 3 3 3

CT1e_05_Ethernet_Full_Duplex_07.0.00 8

Starting point: Notes:


The switch does not yet have an entry in the Forwarding
Database.
The Aging Timer is set to 5 min.

Below you see the data exchange between the three computers A, B
and C:
T1 (12:00): "A" sends a frame to "B
T2 (12:01): "B" answers "A
T3 (12:02): "B" sends a frame to "C
T4 (12:03): "C" answers "B"

For each point in time write the complete Forwarding Database of the
switch to the tables provided for the purpose. Think about which point
in time the switch learns which entry.

8
Ethernet Communication Frame Sequence
A

D
B

E
C
Sequence Sequence
Ingress Egress

1. from A to D from B to D 3. from A to D 1.

2. from B to D

3. from C to E from C to E 2.

CT1e_05_Ethernet_Full_Duplex_07.0.00 9

In the Ethernet communication (Switching) the Ethernet frames are Notes:


forwarded packet orientated from the incoming port to the outgoing
port. The individual frames are sent as serial data stream.

If the the switch receives several frames at the same time, it forwards
them in parallel while the egress ports are different.

If the switch receives sevral frames at the same time while the egress
port is the same, the frames needs to wait in the memory of the switch
until it is their turn.

9
Packet Delays in switched Networks

1. Cabel

2. Processing Frames in the switch (Latency)

3. Switching Methods

CT1e_05_Ethernet_Full_Duplex_07.0.00 10

Cable Notes:
In worst case data is transmitted with 2/3 of light speed on a
copper or fiber cable. This will case a delay of 5 s per
kilometer.

Procesing Frames in the switch


An additinal delay (called Latenca) is caused by the switch
While it is analysing and proccessing the header of an Ethernet
frame. I worst case this delay is approximatly 30s, depending
of the used Hardware.

Switching Methods
Next to the Latency of a switch, the biggest delay is caused by
the switching mechism Store and Forward. Using this
mechanism every received frame will be stored in the memory
of the switch until they are forwarded. This dealy based on
Bandwith of a switch port and the size of the Ethernet frame.

10
Switching: Store and Forward / Cut-Through
PA Ethernet Frame
Store and Forward

Frame is completely
read-in and
is checked

72-1526 byte

Cut-Through
Immediately after the
destination address the
frame is transported

14 byte

CT1e_05_Ethernet_Full_Duplex_07.0.00 11

Store and Forward Notes:


In this mechanism a complete frame is read-in at a port and the
header evaluated. Then a fault-free and valid frame is
forwarded. If an error is detected the frame is rejected.
In this case the delay depends of the size of the frame and the
used bandwidth.
In addition 8 Bytes for the Preamble and the SFD with 8 Byte
and the Inter frame gab with 12 Bytes needs to be added to the
frame size, to calculate the delay.
Cut-through
In this mechanism an incoming frame is read-in as far as the
destination address. At that point the switch knows which port
the frame has to be forwarded to.
Only once the complete frame has been received can it be
checked for errors. At that point part of the frame has already
been sent at the sending port however. Erroneous framess and
fragments are transported.
Prioritization and VLANs can not be used together with Cut
through.

Additional techniques like Adaptive-Cut-Through and FragmentFree-


Cut-Through are existing.

11
Excersie: Frame Delays using Store and Forward
Frame size 10 Mbit/s 100 Mbit/s
64 Byte

500 Byte

1000 Byte

1522 Byte

Consider in your calculation the size of the IFG, Prembel and SFD with 20 Bytes.

CT1e_05_Ethernet_Full_Duplex_07.0.00 12

Calculate the delay of the switch to store a frame in the memory for the Notes:
different frame sizes.

12
Propagation Delays
1. Example (All connections using 100 Mbit/s FDX)

A B
Delay: ~ 184 s
From A to B

2. Example (All connections using 100 Mbit/s FDX)


Delay: ~ 307 s
From A to B

A B

C From C to B

CT1e_05_Ethernet_Full_Duplex_07.0.00 13

1. Example Notes:
A sends a frame with the size of 500 Bytes to device B. This is
the only frame in this network.
Each switch and each network interface card cause a delay of
41.6 s by using store and forward.
Because of the Latency of the switches there will be an
additional delay of 30 s (worst case) .
Result: 3* 41,6s + 2 * 30s = 184.8 s

2. Example
Now device C sends a frame with maximum size (1,518 Byte) in
derction to B. The switch receives this frame immideatly before
the frame from A.
First the switch forwards the frame from C. The frame from A
needs to wait in the memory of the switch for 123.02 s
In addition the Latency nwe need to take care of the latency of
the switch like in example 1.
Result: 184.8 s (Result 1) + 123.02 s = 307.82 s

13
Appendix

CT1e_05_Ethernet_Full_Duplex_07.0.00 14

Notes:

14
Solution: Autonegotiation
Auto Auto
Crossover
100Mbit/s FDX 100Mbit/s FDX

Auto
Patch
100Mbit/s HDX
100Mbit/s HDX

Auto Crossover (or Patch)


100Mbit/s HDX 100Mbit/s FDX

Auto
Patch (or Corssover)
100Mbit/s HDX 100Mbit/s HDX

Auto Crossover (or Patch)


10Mbit/s HDX 10Mbit/s HDX

CT1e_05_Ethernet_Full_Duplex_07.0.00 15

Some ports in the example above have fixed transfer rates and modes, Notes:
and others are set to autonegotiation (Auto). The switches support the
autocrossing function when autonegotiation is active.

Enter the transfer rate and mode for the ports set to autonegotiation.

Define the cable to use (patch/crossover).

Hub

Switch

15
Solution: Duplex Mismatch

Late Duplex
Port CRC Fragmente Collision Duplex Mode?
Collision Mismatch?
1 0 0 15 0 No HDX
2 32 18 0 0 Yes FDX
3 0 0 115 85 Yes HDX
4 60 44 0 0 Yes FDX
5 2 0 0 0 No FDX
6 0 0 64 53 Yes HDX

CT1e_05_Ethernet_Full_Duplex_07.0.00 16

Determine which port has a duplex mismatch and in which duplex Notes:
mode (FDX or HDX) the port.

16
Solution: Address Table
A
B

Po 2
rt 1 o rt
P
Port 3 C
T1: 12:00 T2: 12:01 T3: 12:02 T4: 12:03
Aging Aging Aging Aging
Port Address Port Address Port Address Port Address
Timer Timer Timer Timer
1 A 5 min 1 A 4 min 1 A 3 min 1 A 2 min

2 2 B 5 min 2 B 5 min 2 B 4 min

3 3 3 3 C 5 min

CT1e_05_Ethernet_Full_Duplex_07.0.00 17

Starting point: Notes:


The switch does not yet have an entry in the Forwarding
Database.
The Aging Timer is set to 5 min.

Below you see the data exchange between the three computers A, B
and C:
T1 (12:00): "A" sends a frame to "B
T2 (12:01): "B" answers "A
T3 (12:02): "B" sends a frame to "C
T4 (12:03): "C" answers "B"

For each point in time write the complete Forwarding Database of the
switch to the tables provided for the purpose. Think about which point
in time the switch learns which entry.

17
Solution: Frame Delays using Store and Forward
Frame size 10 Mbit/s 100 Mbit/s
64 Byte 67,2 s 6,72 s

500 Byte 416 s 41,6 s

1000 Byte 816 s 81,6 s

1522 Byte 1233,6 s 123,36 s

Consider in your calculation the size of the IFG, Prembel and SFD with 20 Bytes.

CT1e_05_Ethernet_Full_Duplex_07.0.00 18

Calculate the delay of the switch to store a frame in the memory for the Notes:
different frame sizes.

18
Excersise: Propagation Delays

S1 S2 S3
100 Mbit/s 100 Mbit/s 1 Gbit/s 100 Mbit/s
A B

100 Mbit/s 1 Gbit/s

C D

CT1e_05_Ethernet_Full_Duplex_07.0.00 19

In this excersise the delay of the cables will not be included. The Notes:
Latency of each switch is 10 s. Consider in your calculation the size
of the IFG, Prembel and SFD with 20 Bytes.

1. Calculate the propagation delay of a frame from A to B with the size of


230 Bytes. Device C and D are not sending anything.

________________________________

2. Calculate the propagation delay of a frame from A to B with the size of


230 Bytes. Device C and D are not sending anything. Device C and D
sending a frame with the size of 980 Bytes, so that the frame from A
needs to wait in the memory of the switches.

_________________________________

19
Solution: Propagation Delays

S1 S2 S3
100 Mbit/s 100 Mbit/s 1 Gbit/s 100 Mbit/s
A B

100 Mbit/s 1 Gbit/s

C D

CT1e_05_Ethernet_Full_Duplex_07.0.00 20

In this excersise the delay of the cables will not be included. The Notes:
Latency of each switch is 10 s. Consider in your calculation the size
of the IFG, Prembel and SFD with 20 Bytes.
1. Calculate the propagation delay of a frame from A to B with the size of
230 Bytes. Device C and D are not sending anything.
Delay per Switch (100 Mbit/s)
250 Byte * 8 / 100 Mbit/s = 20 s
Delay per Switch (1000 Mbit/s)
250 Byte * 8 / 1000 Mbit/s = 2 s
Delay of NIC B
250 Byte * 8 / 100 Mbit/s = 20 s
Propagation Delay:
20s + 20s + 20s + 2 s + 3 * 10s = 92s

2. Calculate the propagation delay of a frame from A to B with the size of


230 Bytes. Device C and D are not sending anything. Device C and D
sending a frame with the size of 980 Bytes, so that the frame from A
needs to wait in the memory of the switches.
Waiting in the the memory of the switch, till the frame from C
has been sentat 100 Mbit/s:
1000 Byte * 8 / 100 Mbit/s = 80 s
Waiting in the the memory of the switch, till the frame from C
has been sentat 1000 Mbit/s:
1000 Byte * 8 / 1000 Mbit/s = 8 s
Propagation Delay :
92 s (1. result) + 80s + 8s = 180 s

20
Network Availability

CT1e_06_Network_Availability_07.0.00 1

Notes:

Hirschmann Automation and Control GmbH


This presentation, and the material here in, have been prepared for the purposes of education
and training. These slides are the sole property of Hirschmann and its subsidiaries, and are not
to be altered, duplicated or distributed in any way without express written permission by
Hirschmann.

1
Network Topologies

Bus Ring

Star

Double line

Mesh

CT1ed_06_Network_Availability_07.0.00 2

The structure of the first networks to use Ethernet was a bus structure Notes:
using coaxial cables (see 10BASE5 and 10BASE2).

Based on its centralized distributor technique, and the use of network


components such as hubs and switches, the star structure is
becoming more prevalent today.

Although the use of a ring structure or meshed structure for Ethernet is


not permitted, redundancy mechanisms such as Rapid Spanning Tree
or HIPER Ring do allow such networks to be constructed. In this,
additional connections are established between two switches as
standby links, which are activated in case of error.

In process control networks one often find a double redundant line


structure. With special protocols the systems provide a fast switch-
over to the redundant line in case of a link or whole line failure.

2
Two Stages of Redundancy
Whichever redundancy method is used, there are two stages
Re-establish the physical connection
Re-establish the logical connection

CT1ed_06_Network_Availability_07.0.00 3

Notes:

3
Re-establishing Physical Communication
A
PC1

B E

C D PC2

CT1ed_06_Network_Availability_07.0.00 4

The link failure between the devices B and C needs to detected and Notes:
theprevious redundant connection between A and E needs to be
enabled in order to guarantee the communication between the devices
PC1 and PC2.

4
Re-establishing Logical Communication
A
PC1
Learned Address Table
Switch D

Device Path
B E
PC1 Port 1
PC1 Port 2

rt 2
C Po D PC2
Port 1

CT1ed_06_Network_Availability_07.0.00 5

Due to the link down of a coonection tha active tiopology of the Notes:
network has been changed. This cause now a problem to the learned
address table of the switches. The current relation of the port numbers
of the to the MAC addresses of the connected devices is not correct.
The result can be, that the switches will forward frames at the wrong
ports.

To solve this problem the redundancy mechanism needs to take care


to reestablish the logical communication by deleteting all entries in the
learned address tables of the switches located in the redundant
network.

5
Spanning Tree Algorithm (STA)

CT1ed_06_Network_Availability_07.0.00 6

By means of redundant links between the individual network Notes:


components the availability of a network is increased. This creates
loops in the network, which in turn can cause the network to come to a
standstill. Mechanisms are needed to ensure a loop-free network
structure.

Spanning Tree to 802.1D constructs a loop-free tree structure by


means of logical blocking of redundant paths.

Switches configure themselves automatically by sending so-called


Bridge Protocol Data Units (BPDUs) at active and redundant ports.
The BPDUs must be sent to all switches at which the Spanning Tree
protocol is activated. The Hello BPDUs are sent every 2 seconds by
default. For this the multicast address 01:80:c2:00:00:00, which is
reserved for STA, is used.

To implement a Spanning Tree the following preconditions must be


met.
Each switch has a unique bridge ID in the network.
Each path between two switches has path costs.
Each port of a switch has a port- ID.

The old STA standard proposes a maximum cascade of 7 switches


with default timers.

6
STA and RSTP: Bridge ID and Port ID

80:00 00:80:63:04:05:06

Root Bridge
Port1 Port 2 Port 3

Designated Port
Root-Port

Port 4 Port 5
Port 4

Bridge
80:00 00:80:63:55:55:55
Bridge
80:00 00:80:63:99:99:99
Port1 Port 2 Port 3
Port1 Port 2 Port 3

CT1ed_06_Network_Availability_07.0.00 7

Each switch is uniquely described by its Bridge ID. This ID is 8 bytes Notes:
long, and consists of a priority (2 bytes) and the MAC address (6
bytes). To map multiple STAs onto VLANs, the 2 bytes of priority were
divided into 4 bits (MSB) of priority and 12 bits of system ID. Thus the
granularity of the priority is 4096.
The switch with the lowest bridge ID is termed the Root.

The Port ID is 2 bytes long and consists of the priority (1 byte) and the
port number (1byte). The port with the lowest ID has the highest
priority.
This port ID split has since been changed. The new split entails a 4-bit
priority and a 12-bit port number.

The port of a switch having the lowest path costs to the root becomes
the root port. The root port is connected to the designated port.

7
STA and RSTP: Path Costs

Standard before 1998

Path cost to old standard:


1000 Standard from 1998 to 2001
Path costs =
performance capacity in Mbit/s
Data rate Path costs
10 Mbit/s 100
100 Mbit/s 19
1 Gbit/s 4
10 Gbit/s 2

Standard since 2001

Data rate Recommended path costsRecommended range


10 Mbit/s 2,000,000 200,000-20,000,000
100 Mbit/s 200,000 20,000-2,000,000
1000 Mbit/s 20,000 2,000-200,000
10 Gbit/s 2,000 200-20,000

CT1ed_06_Network_Availability_07.0.00 8

Any connection between two switches incurs path costs. The aim of Notes:
STA is that every switch (not root) should reach the root with the
lowest possible path costs.

If there are multiple paths from a switch to the root with identical path
costs, the lower bridge ID of the connected switches is the tie-breaker.

If both ports are on the same switch between the root and the switch,
the port ID decides which port is used.

8
Bridge Protocol Data Unit (BPDU)

CT1ed_06_Network_Availability_07.0.00 9

RSTP uses BPDUs (Bridge Protocol Data Units) to propagate all Notes:
neccessary information calculating the active totpology and changing
the topology.

Bridge Identifier: The Bridge Identifier is the Bridge-ID of the switch,


that sends this BPDU.
Root Identifier: The Root Identifier is the Bridge ID of the root from
point of view of the switch that sends this BPDU.
Root Path Costs: The Root Path Costs are the total path cost from
the switch thats sends this BPDU to the root.
Port Identifier: The Port Identifier is the Port-ID of the port of the
switch thats send this BPDU.
Max. Age: Indicates the maximum number of switches that can
forward the BPDU created by the root. The Max. Age in a RSTP
network is defined by the root.
Message Age: Current age of the BPDU. If the Message Age is equal
to the Max. Age the BPDU will be deleted. The message age in the
BPDU of the root is 0.
Hello Time: Time in seconds the BPDU is sent by the root.
Forward Delay: Delay in seconds of STA to transit from one port state
to the other (e.g. from listening to learning).

9
Excersise: RSTP
You receive BPDU with the Message Age = 3. How many switches are
between your PC and the root?

__________

You receive a BPDU with the Root Path Costs of 460,000. If the default
path costs are used, how many links are between the switch you are
connected to and the Root and what is the current Message Age?

100 Mbit/s: ______

1000 Mbit/s: _____

Message Age: _____

CT1ed_06_Network_Availability_07.0.00 10

Notes:

10
Rapid Spanning Tree: Port States

DISCARDING

FORWARDING LEARNING

CT1ed_06_Network_Availability_07.0.00 11

The Rapid Spanning Tree standard (IEEE 802.1D-2004) was adopted Notes:
in June 2004. This new standard incorporated the former 802.1w
standard. The reason for revising the Spanning Trees was the long
switchover time of at least 30 seconds (default configuration) and
more.

The number of port states for RST was reduced to three: Discarding,
Learning and Forwarding. The Learning state is only assumed in
exceptional cases (in combined operation with Spanning Tree).

Rapid Spanning Tree was designed so that a port can switch from
Discarding to Forwarding in less than a second. A new Root can
switch more rapidly to Forwarding and with an acknowledgement
mechanism between the switches designated ports can rapidly switch
to Forwarding mode. Frame duplications and a change in the frame
sequence may occur in the process, however.

11
STA and RSTP: Port States

Is Port Included
STA (802.1D) RSTP (802.1w) Is Port Learning
In Active
Port State Port State MAC Addresses?
Topology?
Disabled Discarding No No

Blocking Discarding No No

Listening Discarding Yes No

Learning Learning Yes Yes

Forwarding Forwarding Yes Yes

CT1ed_06_Network_Availability_07.0.00 12

RSTP is faster because: Notes:


3 port states instead of 5
Switches actively pass BPDU's as "Keep Alives"
Ports can change more rapidly to Forwarding

12
Rapid Spanning Tree: Port Roles

Root
D D

R R
A B
D

Alternate Port Backup Port


R
C

CT1ed_06_Network_Availability_07.0.00 13

In Rapid Spanning Tree each switch port is assigned one of the Notes:
following port roles: Root Port (R), Designated Port (D), Alternate Port
or Backup Port.

The Root port of a switch is the port which receives frames with the
lowest costs to the root. If there are multiple paths with the same
costs, the port ID decides.

The Designated port is the port which by way of itself offers the most
cost-effective path to the root for the connected LAN. If there are
multiple paths to the root with the same costs, the switch with the
lowest bridge ID is the winner. If there are multiple ports at one switch
with paths having the same costs, the port ID decides.

An Alternate Port offers an alternate path in the direction of the Root


Bridge to that provided by the Bridges own Root Port.

The Backup port offers a backup path when two ports of the switch in
question are connected to one LAN segment.

13
Exercise: Rapid Spanning Tree
Switch 1
1 2 3
Switch 2
1 2 3
32768 00-80-63-04-05-01
32768 00-80-63-04-05-02
4 5 6

4 5 6

Switch 5
1 2 3 Switch 3
1 2 3

12288 00-80-63-04-05-05
32768 00-80-63-04-05-03
4 5 6
4 5 6

Switch 4
1 2 3

1 Gbit/s
32768 00-80-63-04-05-04
100 Mbit/s
4 5 6
CT1ed_06_Network_Availability_07.0.00 14

First define the Root Bridge. Notes:

Define the Root Ports (RP) and the Designated Ports (DP) and mark
the redundant links.

Based on the current Information, is there an other switch intended to


be used and why?

_______________________________________________________

_______________________________________________________

_______________________________________________________

14
Rapid Transition To Forwarding

Rapid transition to forwarding can only be acheived on Edge Ports


and point to point links

Edge Ports
Connected directly to end devices
Cannot create loops
An Edge Port which receives a BDPU immediately loses its Edge Port
status

Link Type
Point to point links operates in full duplex
This can be overridden

CT1ed_06_Network_Availability_07.0.00 15

Notes:

15
RSTP: Changing Topology New Link
Root

X
X
A

B C D

CT1ed_06_Network_Availability_07.0.00 16

New link is added between the switches Root and A Notes:

Both ports of the new link are put into immediately into discarding state
to prevent a loop.

16
RSTP: Changing Topology Sync
Root

X
X
A
X
X

B C D

CT1ed_06_Network_Availability_07.0.00 17

As soon as the switch A receives a BPDU from the root, it blocks all Notes:
its non-edge designated Ports. This operation is called sync.

17
RSTP: Changing Topology - Negotiation
Root

A
X
X

B C D

CT1ed_06_Network_Availability_07.0.00 18

As soon as all non-edge designated ports are blocked, A negotiate Notes:


with the Root to put the new link into forwarding state.

The Network is now blocked below A and no loop can accure.

18
RSTP: Changing Topology Travel down the tree
Root

B C X D

CT1ed_06_Network_Availability_07.0.00 19

Based on the new information in the BPDU of the root, the same Notes:
process will be repeated between the switches B and A and the
switches C and A till the topology change is finished.

The final result is, that the link between the switches C and D will
be blocked.

19
Link Aggregation (Trunking) IEEE 802.3ad

CT1ed_06_Network_Availability_07.0.00 20

Link Aggregation, often colloquially named trunking, is part of Notes:


standard IEEE 802.3. The standard draft was named 802.3ad. It offers
redundancy as a safeguard against failure of a link, and at the same
time it groups together multiple physical links to form a single logical
link. Recovery time according to standard is 1 s.

The links must be operated in full-duplex mode and with the same
transfer speed. Different media can be aggregated.

The Link Aggregation Control Protocol LACP is used for fast


activation/deactivation of all aggregated ports, also the ones of the
other switch. For this a multicast to 01:80:c2:00:00:02 is used. If one of
both switches doesnt support LACP static aggregation can be used.

The traffic distribution algorithm is depending on the respective


manufacturer based on different criteria.
The data transport is organized connection parallel, i.e. a connection
between two devices can use only one of the aggregated links!

20
MRP - Media Redundancy Protocol (IEC 62439-2)
Redundancy Manager

MRP_Test Frames

CT1ed_06_Network_Availability_07.0.00 21

The Media Redundancy Protocol (MRP) is standardized according to Notes:


the IEC 62439-2 standard specifies a recovery protocol based on a
ring topology.

One of the switches has the role of a Redundancy Manager (RM).


The function of the RM is to observe and to control the ring topology in
order to react on network faults. The RM does this by sending
MRP_Test frames on one ring port over the ring and receiving them
from the ring over its other ring port, and vice-versa. These Multicast
frames will be forwarded only via the ring ports of all ring switches. As
long as the RM receives the test frames at both ring ports, one ring
port will be set in FORWARDING state and the other one in
BLOCKED state to prevent a loop. The ring ports of the other ring
switches are in FORWARDING state.
The RM will set both ring ports in FORWARDING state if it does not
receive its own MRP Test frames within a configured time. The RM
indicates this change to the ring switches by sending a
MRP_TopologyChange frame which also indicate the ring switches
to delete their FDB.

MRP supports a recovery time of 500ms (MRP_Test frames every 50


ms) or 200 ms (MRP_Test frames every 20ms) with 50 switches in a
ring.

By using VLANs and prioritization all ring frames will have the priority
value 7.

21
PRP Parallel Redundancy Protocol (IEC 62439-3)

DANP DANP

LAN A LAN B

RedBox RedBox

CT1ed_06_Network_Availability_07.0.00 22

PRP implements redundancy in the end devices (Doubly Attached Notes:


Node implementing PRP - DANP) or in Switches (Redundancy Box
- RedBox).

These devices are connected to two independent LANs (LAN A and


LAN B), which operate in parallel. Each LAN can use a redundancy
mechanism on ist own like MRP or RSTP. But it is not allowed to have
a direct connection between thes two networks.

A source DANP or RedBox sends the same frame over both LANs
and a destination DANP or RedBox receives it from both LANs within
a certain time, consumes the first frame and discards the duplicate.
The result is a zero recovery time.

22
HSR High-availability Seamless Redundancy (IEC 62439-3)

DANH DANH

RedBox RedBox

CT1ed_06_Network_Availability_07.0.00 23

Compared to PRP, HSR needs roughly half of the network structure to Notes:
achieve a zero recovery time with the result, that the available
bandwidth for the network traffic is roughly halved. HSR base on ring
network structure. The nodes within the ring are restricted to be HSR-
capable switching end nodes.

End devices, so called DANH (Double attached node implementing


HSR), have two ports working in parallel. Other end devices with a
single port needs to be connected to the ring via switches, so called
RedBoxes (Redundancy Boxes) supporting HSR.

As soon as a unicast frame needs to be forwarded via the ring, the


DANH or RedBox inserts a HSR tag to identify frame duplicates. Then
the frame will be sent out at both ring ports. The device (DANH or
RedBox) that needs to take the frame of the ring, receives in fault free
state two identical frames at each ring port within a certain interval. It
removes the HSR tag of the first frame, forwards it and discards the
duplicate.

If the frames is a multicast or broadcast all ring devices needs to


forward these frames via the ring ports. At least the device, that
inserted the frame needs to take care, to discard the frame as soon as
it receives it at a ring port, to prevent a loop.

23
Appendix

CT1e_06_Network_Availability_07.0.00 24

Notes:

24
Solution: RSTP
You receive BPDU with the Message Age = 3. How many switches are
between your PC and the root?

You receive a BPDU with the Root Path Costs of 460,000. If the default
path costs are used, how many links are between the switch you are
connected to and the Root and what is the current Message Age?

Solution 1 Solution 2 Solution 3


100 Mbit/s 2 1 0
1000 Mbit/s 3 13 23
Message Age 5 14 23
(Message Age not default)

CT1ed_06_Network_Availability_07.0.00 25

Notes:

25
Exercise: Spanning Tree
Switch 1 DP
1 2 3
Switch 2 RP
1 2 3
32768 00-80-63-04-05-01
32768 00-80-63-04-05-02
4 5 6

RP DP 4 5 6

Switch 5 DP
1 2 3 Switch 3
1 2 3

12288 00-80-63-04-05-05
32768 00-80-63-04-05-03
4 5 6
4 5 6
RP
Switch 4 RP DP
1 2 3

32768 00-80-63-04-05-04 1 Gbit/s


100 Mbit/s
4 5 6

CT1ed_06_Network_Availability_07.0.00 26

First define the Root Bridge. Notes:


The switch with the lowest Bridge ID becomes Root. For manual
configuration the Bridge Priority can be changed.
At switch 5 the priority was set to 12288, thus its Bridge ID is the
lowest and it becomes Root. Backup Root is switch 1.

Determine the Root Ports (RP) and the Designated Ports (DP) and
mark the redundant links.
The port with the lowest overall path costs to the Root (Root Path
Cost) becomes Root Port (RP).
Switch 1: Port 4 = Root Port
Switch 2: Port 2 = Root Port
Switch 3: Port 4 = Root Port
Switch 4: Port 2 = Root Port

Based on the current Information, is there an other switch intended to


be used and why?
Switch 1
The cascade of switches will be reduced und there will be three active
connections in direction to the root. Two of these connections will be
connections with 1 Gbit/s.

26
Sub Ring

1 blue ring = basis ring


2 orange ring = Sub-Ring
SRM = Sub-Ring Manager
RM = Ring Manager
CT1ed_06_Network_Availability_07.0.00 27

The Sub-Ring concept enables you to easily couple new network Notes:
segments to suitable devices in existing redundancy rings (primary
rings). The devices of the primary ring to which the new Sub-Ring is
being coupled are referred to as Sub-Ring Managers (SRMs).
The following devices support the Sub-Ring Manager function:
RSR20/RSR30
MACH 1000
MACH 1040
MACH 4000
PowerMICE
The SRM-capable devices support up to 4 SRM instances and can
thus be the Sub-Ring manager for up to 4 Sub-Rings at the same time.
In a Sub-Ring, you can integrate as participants the devices that
support MRP - the Sub-Ring Manager function is not required.
Each Sub Ring may consist of up to 200 participants. The SRMs
themselves and the switches placed in the Base Ring between the
SRMs do not count. here.
As an MRP-Ring, the switching times of the Sub-Ring in redundancy
cases are typically < 100 ms.

27
Notes:
Note: Connect Sub-Rings only to existing primary rings. Do not
cascade Sub-Rings (i.e., a new Sub-Ring must not be connected to
an existing Sub- Ring).

Note: Sub-Rings use MRP. You can couple Sub-Rings to existing


primary rings with the HIPER-Ring protocol, the Fast HIPER-Ring
protocol and MRP. If you couple a Sub-Ring to a primary ring under
MRP, configure both rings in different VLANs. You configure
either the Sub-Ring Managers Sub-Ring ports and the
devices of the Sub-Ring in a separate VLAN. Here multiple
Sub-Rings can use the same VLAN.
or the devices of the primary ring including the Sub-Ring
Managers primary ring ports in a separate VLAN. This
reduces the configuration effort when coupling multiple Sub-
Rings to a primary ring.

Note: Configure all the devices in the Sub-Ring before you close the
redundant line. In this way, you prevent loops during the
configuration phase.

Notes:

28
Redundant Ring Coupling One Switch

1: Backbone
2: Ring
3: Partner coupling port
4: Coupling port
5: Main Line
6: Redundant Line

CT1ed_06_Network_Availability_07.0.00 29

The redundant coupling is effected by the one-Switch coupling of Notes:


two ports of one device in the first ring/network segment to one port
each of two devices in the second ring/network segment.

One of the two connections the redundant one is blocked for


normal data traffic in normal operation.

If the main line no longer functions, the device opens the redundant
line immediately. If the main line functions again, the redundant line is
again blocked for normal data traffic and the main line is used again.

The ring coupling detects and handles an error within 500 ms.

29
Redundant Ring Coupling Two Switch

1: Backbone
2: Ring
3: Main line
4: Redundant line

CT1ed_06_Network_Availability_07.0.00 30

The redundant coupling is effected by the two-switch coupling of one Notes:


port each from two devices in the first ring/network segment to one
port each of two devices in the second ring/network segment.

The device in the redundant line and the device in the main line use
control framess to inform each other about their operating states, via
the Ethernet or the control line.

If the main line no longer functions, the redundant device (slave)


opens the redundant line immediately. As soon as the main line is
working again, the device in the main line informs the redundant
device of this.

The redundant line is again blocked for normal data traffic and the
main line is used again.

The ring coupling detects and handles an error within 500 ms

30
Traffic Control
at Layer 2

CT1e_07_Traffic_Control_07.0.00 1

Notes:

Hirschmann Automation and Control GmbH


This presentation, and the material here in, have been prepared for the purposes of education
and training. These slides are the sole property of Hirschmann and its subsidiaries, and are not
to be altered, duplicated or distributed in any way without express written permission by
Hirschmann.

1
What is Bandwidth?

50 Mbit/s = 50% Network Load at 100 Mbit/s


A B

When does these 50.000.000 Bits will be sent in a second?

0 sek 1 sek t

0 sek 1 sek t

0 sek 1 sek t
CT1e_07_Traffic_Control_07.0.00 2

The bandwidth of a connection is given in bit / s. For example, 100 Notes:


million bits per second (gross) can be transmitted between two
switches as a serial data stream through a.

Over all these bits are not only application data, for example a file
which will be exchanged between two devices using FTP. The bits on
the cable contains:
20 Byte Inter Frame Gap, Preamble, Start of Frame Delimiter
18 Byte (22 Byte with Tag) Header of an Ethernet frame
Header IP, UDP or TCP
Header FTP, HTTP etc.

For the Real-time behaivor of Ethernet and a fault-free data excange it


is very important to know, when the information is transmiited within a
second or within a communication cycle to avoid bottlenecks and data
loss.

2
Port Memory Usage
A

B D

Discarded
C

Discarded
From C to D

From B to D Port Memory in Direction to D

From A to D

CT1e_07_Traffic_Control_07.0.00 3

Each switch has a memory for each port to store frames. The size of Notes:
this memory depends on the manufacterer. Typically the frames will
not be stored at the ingress port. They will be stored at the egress
ports.

If the switch receives sevral frames at the same time while the egress
port is the same, the frames needs to wait in the port memory (egress)
of the switch until it is their turn.

If the port memory is not sufficient, the switch will discards incoming
valid frames.

3
Flow Control (IEEE 802.3)
A

B D

Pause Frame
C

From C to D Waits in the end device till the end of the pause time.

From B to D

Pause Frame to A, B and C Memory Threshold

Port Memory in Direction to D


From A to D

CT1e_07_Traffic_Control_07.0.00 4

The Flow Control mechanism according IEEE 802.3 (former .3x) Notes:
prevents the overload of a port memory. As soon as the port memory
reaches a specifiy threshold, the switch triggers the devices
connected to the other ports, not to send any frames in its direction.
The switch do this by
sendeing a Pause frame, if the port is runnning full duplex.
Causing a collision, if the port is running in half duplex.

This problem is not dependend to the network load over one second. It
depends on the time (synchronism) the frames are received by the
switch and the numer and size of the frames.

Caution: The "Wandering backpressure" phenomenon which causes


an undesirable affect to communications between the nodes A, B and
C. Because these nodes are not allowed to send any frames, they are
not able to communicate with each other during the waiting period.

4
Excerise: Port Memory
What are the benefits of Flow Control?

_________________

_________________

What are the disadvanteges of Flow Control?

_________________

_________________

Would you use Flow Control in an industrial Network? Why?

CT1e_07_Traffic_Control_07.0.00 5

Notes:

5
Ethernet Frame With Tag

Destination Source Typ/ Type/


Preamble SFD
Addresse Addresse
TAG
Lnge Length
PDU FCS

TPID TCI
Tag Protocol ID User CFI VLAN ID
Priority
16 bit 3 bit 1 bit 12 bit

CT1e_07_Traffic_Control_07.0.00 6

With the success of Ethernet in local networks, data volumes in those Notes:
networks have also increased substantially. As a result, two functions
have been added to Ethernet. Firstly, the frames can be assigned a
priority; and secondly, a local network can now be subdivided into
separate virtual networks.

To accommodate the relevant information in the Ethernet frame, the


frame was extended by 4 bytes by inserting the tag field between the
source address and the type or length field. This causes the Ethernet
frame to grow to a maximum size of 1522 bytes.

The first two bytes contain the Tag Protocol Identifier ETPID (81-00
hex). The recipient signals that the Ethernet frame has been extended
by the tag field.

The next two bytes are termed Tag Control Information (TCI).
Priority (3 bit): 8 priority classes
CFI (1 bit): Canonical Format Indicator CFI signals whether the
addresses are transmitted in canonical (=1; e.g. Token ring) or
non-canonical (=0; e.g. Ethernet) format.
VLAN-ID (12 bit): marks definite the assigned VLAN;
max. 4094
0 = no VLAN defined
4095 = reserved for future use

6
Quality of Service (IEEE 802.1D and Q)

Type of Traffic Acr user_prio


Background BK 1
free - 2
Best-Effort BE 0 (default)
Excellent-Effort EE 3
Controlled-Load CL 4
Video VI 5
Voice VO 6
Network control NC 7 high

Attention:
Priority 0 is higher than priority 1 and 2!

CT1e_07_Traffic_Control_07.0.00 7

As a result of the tag field being added to the Ethernet frame, the Notes:
frames can be assigned one of 8 priority levels. In this, high-priority
data should be prioritized ahead of low-priority data. For this the
switches must have at least two so-called queues. Depending on
priority, the frames received at a port are distributed across different
queues.

By special access methods the queues are worked through according


to the priorities.

The names of the priorities are pre-defined by the standard. This gives
a hint what should be how prioritized.

Please note that the priority 0 is sorted in between 2 and 3. Thus


a frame is already treated with a
certain priority by default (0).

7
QoS: Assigning Priority to Queue (Mapping)
Default configuration in practice:
Avail. queues
user_prio 2 4 8
1 0
0
2 1
0
0 (default) 2
1
3 3
4 4
2
5 5
1
6 6
3
7 7 high

CT1e_07_Traffic_Control_07.0.00 8

Queues are named as Traffic Classes by the standard. The smaller Notes:
the ID of a queue the lower the priority of it.

In practice either no. 2, 4 or 8 queues are available, while the standard


offers the possibility to implement e.g. 5.

Example:
A frame with priority 3 joins queue 1 of 4 available queues

8
QoS: Concepts to arbitrate Queues
Priority Scheduling (Starve or Strict)
Round Robin Scheduling
Weighted Fair Queuing (WFQ)
Mainte-
nance
Voice
Super-
vision
Con-
trol

Control Priority
6
Supervision 5
Voice 3
Maintenance 1

CT1e_07_Traffic_Control_07.0.00 9

Priority Scheduling (Starve or Strict) Notes:


Queues arbitrated according to priority
Disadvantage: high-priority queues can block low-prioritized
ones, no transmission guarantee possible

Round Robin Scheduling


The round robin algorithm will alternate between the queues
sending a number of frames from each queue before moving to
the next queue. The size of the frames is not considered.

Weighted Fair Queuing WFQ


Bandwidth division

9
Exercise: Tag
Using an analyser, you capture a frame with the Tag value:

81:00:a0:36 (Hex-Code)

What does this Tag mean?

CT1e_07_Traffic_Control_07.0.00 10

Notes:

10
Physical LAN

CT1e_07_Traffic_Control_07.0.00 11

Notes:

11
Virtual LANs

CT1e_07_Traffic_Control_07.0.00 12

Definition Notes:
Connection of data terminal equipment to closed, logical LANs
within a physical infrastructure with the aim of broadcasts
limitation.

Nowadays VLANs are more used for security aims than for broadcast
limitation. Nevertheless can be broadcast limitation a point of industry
networks. To make it absolutely clear: VLANs offer only low security,
also with proprietary solutions such as Ciscos private VLAN.

VLANs are defined in the standards IEEE 802.1D (Bridging), .1Q


(port based) and .1v (Layer 3 protocol based).

12
Multiple VLANs per Switch

HIRSCHMANN HIRSCHMANN

CT1e_07_Traffic_Control_07.0.00 13

Notes:

13
Management VLAN

HIRSCHMANN HIRSCHMANN

CT1e_07_Traffic_Control_07.0.00 14

Notes:

14
Port based VLANs: Implementation
1 2 3 4 5 1 2 3 4 5

A B C D E F G H

VLAN2 VLAN3 VLAN2 VLAN3

Switch 1 Switch 1 Switch 2 Switch 2


Ingress Egress Ingress Egress
Station Port PVID VID Port Station Port PVID VID Port
A 1 2 1 2 3 4 5 Uplink 1 N/A 1 2 3 4 5
B 2 2 2 U U - - T E 2 2 2 T U U - -
C 3 3 3 - - U U T F 3 2 3 T - - U U
D 4 3 G 4 3
Uplink 5 N/A H 5 3

CT1e_07_Traffic_Control_07.0.00 15

Port based VLANs are standardized to IEEE 802.1Q. The Notes:


configuration needed for this is restricted to the switches used. To
divide a LAN into virtual LANs, two tables are needed: the Ingress and
Egress tables.

The Ingress table specifies what VLAN ID the frames arriving at a


port are assigned.

The Egress table specifies at which port frames can be sent with
what VLAN ID (VID). The Egress table also specifies whether an
Ethernet frame has to be sent
with a tag field (T = tagged) or
without a tag field (U = Untagged).

Ethernet frames are typically sent tagged via uplink ports in direction
to the next switch or in direction to end devices if they supports VLANs
and are configured to use them. In all other cases the switch should
forward the frames untagged.

There are still end devices in use, which doesnt support VLAN tagging
and delete received tagged frames.

15
GARP VLAN Registration Protocol

Switch 1 Switch 2 Switch 3

1 2 3 4 5 6 1 2 3 1 2 3 4 5

A B C D E F G H

VLAN2 VLAN3 VLAN2 VLAN3

CT1e_07_Traffic_Control_07.0.00 16

The GARP VLAN Registration Protocol, GVRP, is Notes:


standardized in IEEE 802.1Q. GVRP transmits the VLAN information
via the uplink port to automatically configure attached switches per
multicast address 01:80:c2:00:00:21
The Generic Attribute Registration Protocol GARP is as general
protocol standardized in IEEE 802.1D to propagate parameters
between switches.
Parameter (time values in centi-seconds):
Join Time (default: 20 = 0,2 s)
Leave Time (default: 60 = 0,6 s)
LeaveAll Time (default: 1.000 = 10 s)
Each parameter should be identical on all components of a network, to
prevent oscillating effects.

Situation: GVRP enabled at all switches


1. Switch 1 transmits at all ports a frame informing that it has
connected ports in VLANs 2, and 3.
2. Switch 2 learns, configures port 1 to uplink and
VLANs 2 and 3 in ingress/egress rules.
3. Switch 3 informs like switch 1 thus configuring port 3 of switch
2.

A F (forbidden) in the Egress Table of a VLAN prevents that this


VLAN is learned at that port, meaning that frames with this Tag are
transmitted at the port.

16
Exercise: VLAN

Switch 1
1 2 3 4 5 6

VLAN 3
VLAN 2

Switch 2
1 2 3 4 5 6

VLAN 4
VLAN 2

CT1e_07_Traffic_Control_07.0.00 17

Construct the Ingress and Egress tables for the two switches in the Notes:
above example.

17
Appendix

CT1e_07_Traffic_Control_07.0.00 18

Notes:

18
VLANs: Overlapping Groups

VLAN 2 VLAN 3

Server
VLAN 4

CT1e_07_Traffic_Control_07.0.00 19

Shall devices from two VLANs (e.g. VLAN 2 and 3) have access to a Notes:
central device (e.g. a server), you get an intersection like its shown in
the picture.

The device or devices in this intersection needs to communicate to


VLAN 2 and VLAN 3 but it is not am member of these two VLANs. A
separate VLAN (e.g. VLAN 4) needs to be created.

This process is explained in the annex B1.3 of IEEE 802.1Q

The disadvantage of overlapping groups is, that the devices in the


intersections receive the broadcast and multicast from the other
VLANs.

19
VLANs: Overlapping Groups - Implementation
1 2 3 4 5 6

A B C D

VLAN2 VLAN4 VLAN3

Ingress Egress
Station Port PVID VID Port
A 1 2 1 2 3 4 5 6
B 2 2 2 U U U
Server 3 4 3 U U U
C 4 3 4 U U U U U
D 5 3
Uplink 6 N/A

CT1e_07_Traffic_Control_07.0.00 20

Notes:

20
Solution: Port Memory
What are the benefits of Flow Control?
No lost frames

What are the disadvanteges of Flow Control?


Inpredictable delays

Would you use Flow Control in an industrial Network? Why?

CT1e_07_Traffic_Control_07.0.00 21

Notes:

21
Solution: VLAN

Switch 1
1 2 3 4 5 6

VLAN 3
VLAN 2

Switch 2
1 2 3 4 5 6

VLAN 4
VLAN 2

CT1e_07_Traffic_Control_07.0.00 22

Construct the Ingress and Egress tables for the two switches in the Notes:
above example.

Switch 1
Ingress Egress
Port VLAN ID VLAN ID 1 2 3 4 5 6
1 2 1 - - - - - -
2 2 2 U U U T - -
3 2 3 - - - T U U
4 arbitrary 4 - - - T - -
5 3
6 3

Switch 2
Ingress Egress
Port VLAN ID VLAN ID 1 2 3 4 5 6
1 arbitrary 1 - - - - - -
2 2 2 T U U - - -
3 2 3 T - - - - -
4 1 4 T - - - U U
5 4
6 4

22

Вам также может понравиться