Westermo White Paper Viper-X08
Westermo White Paper Viper-X08
Switch operation
Introduction
A switch has to forward and receive packets from one LAN or device to another. The switch could forward all pack-
ets, but if this were the case it would have similar behavior to a hub.
It would be more intelligent if the switch only forwarded packets, which need to travel from one LAN or device to
another. To do this, the switch must learn which devices or LANs are connected to each port. In simplistic terms; it
needs to learn the destination and source ports of each and every packet received on each individual Switch port.
Once learnt, any identically addressed packet will be automatically be forwarded.
Error Detection
The switch stores every incoming packet and scans this for errors, usually by checking the frame CRC (cyclic redun-
dancy check sum). If any errors are found or detected the packet is discarded. In addition each frame is checked for
size. Undersized packets (less than 64 Bytes) and oversized packets (more than 1518 bytes (*)) are also discarded.
Once these basic checks have been carried out the switch can then start learning packet source and destination
information.
(*) When implementing Ethernet MAC tagging maximum Ethernet packet length is increased to 1522 bytes.
Flooding
The switch needs to make a decision regarding which port(s) the packet is to be forwarded to. This decision is
based upon the MAC tables that are maintained and updated automatically by the Switch. The process is known as
Layer 2 Switching.
When first powered on the MAC tables within the Switch are empty. When a packet is received on a port the
Switch does not know where the destination MAC address is located. The Switch learns the address by ‘flooding’
the packet out to all ports. Eventually, the destination node responds, the address is located and the Switch remem-
bers the destination port. In simplistic terms; when a Switch receives a packet on a port it stores the source MAC
address in the MAC table that corresponds to that Port. The flooding technique is always used with Broadcast and
Multicast packets. If the switch is equipped with multicast management then multicast packets will not be flooded.
MDI/MDI-X
There are two types of copper Ethernet ports available; MDI (Medium Dependant Interface) and MDI-X (Medium
Dependant Interface Crossover). The MDI port types are associated with copper interfaces available on NICs
(Network Interface Cards), PLCs, VSDs and DCSs etc. The latter type of interface (MDI-X) is found on Hubs or
Switches.
In addition there are two types of Ethernet cable available. These are referred to as a ‘straight through cable’ or
‘crossed cable’.
Auto MDI/MDI-X
Some switches have auto MDI/MDI-X this eliminates the need to source two types of patch cable (crossed and
straight through). An auto MDI/MDI-X function detects the connected interface and if needed change the switch
interface ether to MDI or MDI-X, therefore only one type of patch cable is needed.
Electrical Isolation
The copper (TX) ports incorporate high electrical isolation between the signal lines and the internal electronics. In
addition, the switch can also withstand over 500 Amps through the shield for short periods of time (20-30mS) with-
out effecting the operation and communication of the Switch. However, this is not advisable. Each TX port is isolated
to chassis and other ports. Isolation is rated 1500Vrms (1 minute).
Auto-Negotiation
Auto-Negotiation is a protocol that controls the speed and duplex of a copper cable when a connection is estab-
lished between two Ethernet devices. Auto-Negotiation detects the various modes that exist in the device on the
other end of the cable and highlights its own abilities to automatically configure itself. Therefore, it will automatically
operate at the highest performance in relation to speed and duplex. This allows simple and automatic connection of
devices that support a variety of modes from a variety of manufacturers. The auto-negotiation protocol only func-
tions on copper ports.
SNMP
SNMP software
Software used to communicate with the agent is called Network Management Solution (NMS). The exchange of
data with the agents is similar to communication between a master and slaves, i.e. communication with the underly-
ing devices takes place through polling. The manager can request information from or perform an action on the
agent, this responds to the enquiries or actions requested. Another option is for the agent to set a “trap” i.e. an
event controlled function that is activated by a predetermined condition. When this occurs the agent sends data
back to the manager.
Devices or Ethernet Switches that support SNMP are usually referred to as Managed Switches.
     … There are currently three different versions of SNMP available; SNMPv1, SNMPv2 and SNMPv3. A SNMP
        enabled node incorporates a SNMP agent that is responsible for the following:
     …  Collecting and maintaining information about the local environment and network.
     …  Providing that information to a SNMP Master, either responding to a request or in an unsolicited fashion, or,
        when an event the managed device has been configured to monitor occurs.
     …  Responding to manager commands to alter the local configuration or operating parameters.
MIB
Each agent in the network has a set of MIBs (Management Information Base), a MIB is an object that can be called
by a manager. Information can either be standard information such as port status or port state, or company specific
MIBs (private) for example the temperature inside the device. MIBs are structured tables made up of the different
objects that can be called. The structure can be compared to a tree with a root and underlying directories. On the
lowest level are directories for the standard MIB and for private MIBs.
SNMP Traps
One feature of SNMP is that the SNMP agent can send SNMP traps to one or more SNMP Hosts. SNMP traps
means system alarms such as a port link up/down or a port enabled for port alarms. When a trap is detected from
an SNMP agent (e.g link loss in Viper) the agent will send the trap to the SNMP manager.
The address to the manager is defined by the trap host address. In Viper two host addresses is available.
FRNT
Introduction
The Westermo industrial managed switch series are available with redundant ring technology. This eliminates network
failure caused by copper failures on the trunk ports (ring ports). The speed of ring recovery is an essential part of
designing your network. The FRNT (Fast Re-configuration of Network Topology) version 0 protocol can recover
from a failure in only 20ms if such a failure does occur. When used in conjunction with redundant power supplies a
very reliable system can be designed.
Standard Ethernet networks would collapse and fail if normal office based Ethernet Switches were formed into a
complete ring. This failure is commonly referred to as a ‘broadcast storm’ as Ethernet Packets have multiple routes
on a network to communicate to devices. Usually, an incorrect type of packet broadcasts (or floods) over a network
and causes hosts to respond all at once, typically with wrong responses. This starts the process over and over again;
hence your network crashes.
X3 X7
                                                                                                         ST1
                                                                                                         ST2
                                                                                                         PWR            X4         X8
                                                                                  X3         X7
                                                                                                                                                         X3         X7
                                                                         ST1
                                                                                                                                                ST1
                                                                         ST2
                                                                                                                                                ST2
I.e. not only to its neighboring switches as is the case for STP.
                                                                         PWR            X4         X8
                                                                                                                                                PWR            X4         X8
SERVICE
                                                                                                                  X3
                                                                                                                       X1
X2
                                                                                                                             X7
                                                                                                                                  X5
X6
ST1
                                                            X1         X5
                                                                                                     X1         X5
                                              FRNT
                                                                                       FRNT
                                                             X2         X6
                                             SERVICE                                                  X2         X6
                                                                                      SERVICE
                                                       X3         X7
                                                                                                X3         X7
                                              ST1
                                                                                       ST1
                                              ST2
                                                                                       ST2
                                              PWR            X4         X8
                                                                                       PWR            X4         X8
   Focal Point
                            X1         X5
                                                                                                                                     X1         X5
              FRNT
                                                                                                                       FRNT
                                                                             Member
                             X2         X6
             SERVICE                                                                                                                  X2         X6
                                                                                                                      SERVICE
                       X3         X7
                                                                                                                                X3         X7
              ST1
              ST2                                                                                                      ST1
 Breake
                                                                                                                       ST2
              PWR            X4         X8
                                                                                                                       PWR            X4         X8
                                                            X1         X5
                                              FRNT
                                                             X2         X6                           X1         X5
                                             SERVICE
                                                                                       FRNT
                                                                                                      X2         X6
                                                                                      SERVICE
                                                       X3         X7
                                              ST1
                                              ST2                                               X3         X7
                                              PWR            X4         X8             ST1
                                                                                       ST2
                                                                                       PWR            X4         X8
When a fault occurs, the switches closest to the fault indicate that something has happed, the first level of detection
is link detection, the second level is, lost health packages (according to LHP, see above). Normally there is idle traffic
between all switches, if there is a brake in the idle traffic the switches will indicate this as a fault and send an error
package to the focal point. The focal point then will re-configure the topology of the network and remove the virtual
brake since here is a “real” brake in the system. Because of the reconfiguration the topology have now been changed
from ring to bus. This is displayed in the tool, the exclamation mark also indicates where the fault is.
                                                            X1         X5
                                                                                                                   X1         X5
                                              FRNT
                                                                                                     FRNT
                                                             X2         X6
                                             SERVICE                                                                X2         X6
                                                                                                    SERVICE
                                                       X3         X7
                                                                                                              X3         X7
                                              ST1
                                                                                                     ST1
                                              ST2
                                                                                                     ST2
                                              PWR            X4         X8
                                                                                                     PWR            X4         X8
   Focal Point
                            X1         X5
                                                                                                                                                   X1         X5
              FRNT
                                                                                                                                     FRNT
                             X2         X6
             SERVICE
                       X3         X7
                                                                                                                                              X3         X7
              ST1
              ST2                                                                                                                    ST1
 Breake
                                                                                                                                     ST2
              PWR            X4         X8
                                                                                                                                     PWR            X4         X8
FRNT
                                             SERVICE
                                                            X1
                                                             X2
                                                                       X5
                                                                        X6
                                                                                                     FRNT
                                                                                                    SERVICE
                                                                                                                   X1
                                                                                                                    X2
                                                                                                                              X5
                                                                                                                               X6
                                                                                                                                              Event package
                                                       X3         X7
                                              ST1
                                              ST2                                                             X3         X7
                                              PWR            X4         X8                           ST1
                                                                                                     ST2
                                                                                                     PWR            X4         X8
VLAN
A physical Ethernet network can be divided into several overlapping Virtual LANs (VLAN) without having
IEEE802.1Q tagging support on the Ethernet end nodes.
                  Layer 2 prority with 802.1p
                                           Canonical – 1 bit
Tagged frame                                                    12-bit 802.1Q VLAN Identifier
Type Interpretation – 16 bit
                                       3-bit Priority Field (802.1p)
All Ethernet trunk ports (FRNT or white ports) are member of all of the seven legal VLANs. A trunk port means a
switch port connected to another switch; where a network redundancy protocol is running (e.g. FRNT). This means
that the VLAN tables on each switch are dynamically updated during a network topology change. The VLAN imple-
mentation in Viper is meant for both Ethernet end nodes that support tagging and for those that do not.
White ports
If a port is defined as a white VLAN it becomes a trunk port, port 1 is always defined as white (see note 1 below)
also the configured FRNT ports will become white.
Note 1: Port 1 has the white VLAN id as the default and this cannot be changed. This port is configured in order
to connect a node that is used for network management (SNMP or IP configuration). This type of node must always
use the white VLAN (port 1) in order to communicate with the switch CPUs. The switch CPUs can always be
accessed via port 1 with untagged packets.
This means that red, blue, green, yellow, brown and pink packets never will be sent to the switch CPUs.
This is important in order to avoid that the port between the switch fabric and the CPU becomes a bottleneck,
where important packets might be lost (e.g. FRNT control packets). Example: a non-white broadcast load close to
full wire speed is not a problem for correct switch CPU operation!
A VLAN id for a given (defined by the VLAN colour) default port will be associated to each untagged packet. This
VLAN id will be added to packet as an IEEE802.1Q tag. This tag can be removed at the output port(s) if the
port(s) is configured for tag removal.
The tag is not removed on packets sent on a trunk port, and each trunk port is member of all seven VLANs. This
means that the user does not need to set any VLAN parameters on the trunk ports, and that any network topology
change will be handled automatically.
The legal VLAN id range is [1 .. 4094]. A few VLAN ids in this range are reserved for other use. These id:s can be
set in the Web tool but not in the IP configuration tool.
The network should only be based on switches enabled for VLAN or not. A mix of switches with and without
VLAN support will not provide the user with the capability of tag removal on all parts of the network.
The figure below shows an example of a VLAN setup with three VLANs (red, blue and green VLAN) in a network
with ring topology.
IGMP
Multicast filtering
Several applications are based on multicast communication. Data is only sent once even though the data is meant
for more than one receiver. However, the multicast packets will be sent on every drop link in the network unless the
Ethernet switches support multicast filtering. The Viper 408 support IP multicast filtering based on IGMP snooping.
This means that IP multicast "join" and "leave" requests will be trapped by the switches, and the multicast filters will
be set based on which drop links where these requests are received.
FRNT integration
The IP multicast filter implementation is integrated with the Fast Re-configuration of Network Topology (FRNT)
protocol. This means that the multicast filters will be updated as fast the FRNT implementation handles a topology
change, i.e. approx. 20 ms.
Description
Always querier: This unit will always act as a querier
Proxy: The unit will never act as querier but will forward membership queries and reports
Auto-mode: The switch with the lowest IP address will be selected as querier.
With the Mac filter function it is possible to allow certain mac addresses to pass through the switch.
This function can be found in the menu under Configuration- > Mac filter.
The mac addresses can be added in 3 types of format as described below:
1.  A single mac address in the format like 00:07:7c:12:34:56.
2.  An address range can be added by using a star, *, as a wild card like 00:07:7c:12:34:**.
   This will allow addresses between 00:07:7c:12:34:00 to 00:07:7c:12:34:ff.
3.  Instead of adding many addresses one by one it is possible to add a string with addresses on
   the format under the point 1 and 2 and separate each address with a semicolon like
   00:07:7c:00:00:00;00:07:7c:00:01:00;00:07:7c:00:0*:**;00:07:7c:00:00:02;
   Remember to add the mac address of the computer where the web browser is used. To be able
   to upgrade the switches remote all switches mac addresses has to be added to the mac filter
   tables of each switch, an easy way to do this is by adding a range of allowed mac addresses like
   00:07:07:**:**:**, this wide rage will allow all mac addresses from Westermo.
Note: The switch has to be restarted before the Mac filter function will be enabled.
QoS
Principles of Deterministic Ethernet
Westermo switches can operate in full duplex mode. This ensures that an Ethernet controller will never see any col-
lisions occurring when operated in such a manner. The core section of the Network; the redundant ring topology
always runs full duplex and at 100Mbit/s (FE Viper); this cannot be altered.
In addition a very fast switching core is provided to ensure that the switch can handle full wire speed on each port.
Finally, a large buffer is available to store packets destined for a busy port. However, it is very unlikely that the buffers
are used during normal network operation.
It should be noted that if buffers are used in such a network then it is not viable to state that a network is
Deterministic. In practice, the only time such buffers maybe used is when 10 and 100 Mbit/s ports are combined.
When various speeds are in use, a feature called Head of Line Blocking Prevention is automatically implemented to
ensure critical data is received at the destination node.
The switch contains four priority queues. A packet that is identified as a high priority packet is put in the high prior-
ity queue. The switch alternates between the two queues by using strict priority. I.e. packets from the low priority
queue are only sent if the high priority queue is empty. A packet is identified as a high priority packet based on pri-
ority tagging according to IEEE 802.1p (layer 2 priority) or IP Type of Service (ToS -layer 3 priority).
Layer 2 priority
The IEEE 802.1p and IEEE802.1Q standards specify an extra field for the Ethernet MAC header. This field is called
Tag Control Info (TCI) field, and is inserted between the source MAC address and the MAC Type/Length field of an
Ethernet packet, see figure below.
                  Layer 2 prority with 802.1p
                                           Canonical – 1 bit
Tagged frame                                                    12-bit 802.1Q VLAN Identifier
Type Interpretation – 16 bit
                                       3-bit Priority Field (802.1p)
Layer 3 priority
Each IPv4 header contains a ToS field, see figure below. The switch is configured to put IP packets with the following
ToS values in the following priority queues:nm
•  0x04 (IPTOS_RELIABILITY): 	           QoS level 2
•  0x08 (IPTOS_THROUGHPUT) : 	 QoS level 2
•  0x10 (IPTOS_LOWDELAY): 	              QoS level 2
•  0xF1: 	                               QoS level 1 (lowest priority level)
•  0xF2: 	                               QoS level 2
•  0xF3: 	                               QoS level 3
•  0xF4: 	                               QoS level 4 (highest priority level)
High priority setting of the IP ToS field of real time critical packets must be set in the IP protocol of the sending sta-
tion. This can be done on TCP/UDP socket level by a setsockopt( ) command both on the client and server socket
side in most Operating Systems (OS). E.g.:
              tos = 0xF4;
              setsockopt( .., IP_TOS, &tos,...)
Layer 3 IP header
MAC IP
Source IP address
Destination IP address
Options
Flow control
By default the switch is disabled for flow control (IEEE 803.3x), since flow control is a not a good real time property.
STP/RSTP
Spanning tree protocol (STP)
The Viper and switch supports the Spanning Tree Protocol according to IEEE802.1D as an alternative to FRNT.
This is an redundancy alternative within already installed applications using STP/RSTP.
STP is a Layer 2 link management protocol that provides path redundancy while preventing loops in the network.
For a Layer 2 Ethernet network to function properly, only one active path can exist between any two stations.
Multiple active paths among end stations cause loops in the network. If a loop exists in the network, end stations
might receive duplicate messages with broadcast storm and an unstable network as result.
The STP uses a spanning-tree algorithm to select one switch of a redundantly connected network as the root
(focal point) of the spanning tree. The algorithm calculates the best loop-free path through a switched Layer 2 net-
work by assigning a role to each port based on the role of the port in the active topology:
    …  Root – a forwarding port elected for the spanning-tree topology
    …  Designated – a forwarding port elected for every switched LAN segment
    …  Alternate – a blocked port providing an alternate path to the root port in the spanning tree
        	 Best loop-free path in the application above
        	 Redundant path in the application above
Switches that have ports with these assigned roles are called root or designated switches. Spanning-tree forces
redundant data paths into a standby (blocked) state. If a network segment in the spanning-tree fails and a redun-
dant path exists, the spanning-tree algorithm recalculates the spanning-tree topology and activates the standby path.
Switches send and receive spanning-tree frames, called bridge protocol data units (BPDU:s), at regular intervals.
The switches do not forward these frames, but use them to construct a loop-free path. BPDU:s contain information
about the sending switch and its ports, including switch and MAC addresses, switch priority, port priority, and path
cost. Spanning tree uses this information to elect the root switch and root port for
the switched network and the root port and designated port for each switched segment. When two ports on a
switch are part of a loop, the spanning-tree port priority and path cost settings determine which port is put in the
forwarding state and which is put in the blocking state. The spanning-tree port priority value represents the loca-
tion of a port in the network topology and how well it is located to pass traffic. The path cost value represents the
media speed. The stable, active spanning-tree topology of a switched network is determined by these elements:
    … The unique bridge ID (switch priority and MAC address) associated with each VLAN on each switch
    … The spanning-tree path cost to the root switch
    … The port identifier (port priority and MAC address) associated with each port
When the switches in a network are powered up, each switch functions as if is the root switch. Each switch sends
a configuration BPDU through all of its ports. The BPDU:s communicate and compute the spanning-tree topology.
Each configuration BPDU contains this information:
    … The unique bridge ID of the switch that the sending switch identifies as the root switch
    … The spanning-tree path cost to the root
    … The bridge ID of the sending switch
    …  Message age
    … The identifier of the sending port
    … Values for the hello, forward-delay, and max-age protocol timers
When a switch receives a configuration BPDU that contains superior information (lower bridge ID, lower path
cost, and so forth), it stores the information for that port. If this BPDU is received on the root port of the switch,
the switch also forwards it with an updated message to all attached LANs for which it is the designated switch. If
a switch receives a configuration BPDU that contains inferior information to that currently stored for that port, it
discards the BPDU. If the switch is a designated switch for the LAN from which the inferior BPDU was received, it
sends that LAN a BPDU containing the up-to-date information stored for that port. In this way, inferior information
is discarded, and superior information is propagated on the network.
The user can easily set the root of the network by configuring one of the switches in the network as the STP focal
point (see Installation manual). This will result in a lower priority value for this switch than for the other switches in
the network. Propagation delays can occur when protocol information passes through a switched LAN. As a result,
topology changes can take place at different times and at different places in a switched network. When a port transi-
tions directly from no participation in the spanning-tree topology to the forwarding state, it can create temporary
data loops. Ports must wait for new topology information to propagate through the switched LAN before starting
to forward frames. They must allow the frame lifetime to expire for forwarded frames that have used the old topol-
ogy.
Each port on a switch using spanning tree exists in one of these states:
    …  Blocking – the port does not participate in frame forwarding.
    …  Listening – the first transitional state after the blocking state when the spanning tree determines that the
      port should participate in frame forwarding.
    …  Learning – the port prepares to participate in frame forwarding.
    …  Forwarding – the port forwards frames.
    …  Disabled – the port is not participating in spanning tree because of a shutdown port, no link on the port, or
      no spanning-tree instance running on the port.
The typical time it takes to enter forwarding state from blocking state or vice versa (i.e. the network
re-configuration time) is approx. 40 seconds.
The behavior of a “non-edge” RSTP port is: This port is set in to blocking mode then wait for a RSTP packet. If it
has not received a RSTP packet after 30 seconds it will open up the port. If it received a RSTP packet it will make a
decision to open the port or not, depending on configuration.
Timing parameters
Hello time	         2 seconds
Forward delay	      15 seconds
Number of nodes	    20
Root priority	      Priority between 0 and 61440 (where 0 is the highest priority)