Sunteți pe pagina 1din 214

Industrial Networking I

The Technical Fundamentals

CB1e_1_General.831

The Certification courses Industrial Networking I and Industrial Networking II represent one Notes: unit. Industrial Networking I mainly deals with Ethernet in all its speeds and on all its media, hubs and switches, CSMA/CD, Spanning Tree and VLAN. In addition it contains network management. Industrial Networking II extends the knowledge of course CB1e with layers 3 and above, i.e. routing, TCP/IP.

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.

Agenda
9:00 h Welcome and Introduction Check your knowledge Network structure and wiring Lunch Data Link Layer Layer 2 Discussion Redundancies on Layer 2 Traffic Control Part 1: QoS Lunch Traffic Control Part 2: VLANs Network management with SNMP Discussion
2

1st day 2nd day

9:15 h 9:30 h 12:00 h 13:00 h 16:30 h 9:00 h 11:00 h 12:00 h 13:00 h 14:15 h 16:30 h

CB1e_1_General.831

Notes:

HiComCenter

The Hirschmann Competence Center

Innovative Value Added Services around the Network Technology firsthand!

Consulting Planning Projects


CB1e_1_General.831

Basics Product Introduction Workshops

Commissioning Hotline Maintenance Concepts

Technology Know-how Product Know-how

Your Contact to Training Department: E-Mail: Web: Telefax: Telephone: HAC-Hi-Train@hirschmann.de www.hicomcenter.com +49 71 27 14 - 15 51 +49 71 27 14 - 15 27

Notes:

List of Literature
ETHERNET
R. Breyer, S. Riley: Switched, Fast, and Gigabit Ethernet. Macmillan Technical Publishing 1999. ISBN 1-57870-073-6 Saunders, S.: Gigabit Ethernet Handbook. McGraw-Hill 1998. ISBN 0-07-057971-7

NETWORK MANAGEMENT
Harnedy, Sean: Total SNMP. Prentice-Hall 1998. ISBN 0-13-646994-9 Rose, M.T.: The Simple Book. Prentice-Hall 1991. ISBN 0-13-812611-9 Stallings, William: SNMP, SNMPv2, SNMPv3, and RMON1 and 2. AddisonWesley 1999. 3. edit. ISBN 0-201-48534-6 Zeltserman, David: A Practical Guide to SNMPv3 and Network Management. Prentice Hall 1999. ISBN 0-13-021453-1.

CB1e_1_General.831

Further literature Magazine: The Industrial Ethernet Book. GGH Marketing Communications. www.ggh.co.uk

Notes:

List of Literature
INTERNETWORKING
Seifert, Rich: The Switch Book. Wiley 2000. ISBN 0-471-34586-5

TCP/IP
Stevens, W.R.: TCP/IP Illustrated, Vol.1: The Protocols. Addison-Wesley 1994. 85,71 EUR, ISBN 0-201-63346-9

www.ietf.org www.ieee.org
CB1e_1_General.831

Notes:

Acronyms
AC AP AUI BC BFOC BPDU CRC CSMA/CA CSMA/CD DSAP DSCP DTE ELED FCS FDB FDX FLP F/O FTP GARP GVRP HDX IFG IP IPX LAN LC LD LED LLC Access Client Access Point Attachment Unit Interface Broadcast Bayonet Fiber Optical Connector Bridge Protocol Data Unit Cyclic Redundancy Check Carrier Sense Multiple Access Collision Avoidance Carrier Sense Multiple Access Collision Detection Destination Service Access Point Differentiated Services Code Point Data Terminal Equipment (end device) Edge-emitting LED Frame Check Sequence Forwarding Data Base Full Duplex Fast Link Pulse optical fiber Foiled Twisted Pair File Transfer Protocol Generic Attribute Registration Protocol GARP VLAN Registration Protocol Half Duplex - Halbduplex Inter Frame Gap (also: IPG) Internet Protocol Industrial Protection Internet Packet Exchange (Novell protocol, like IP) Local Area Network Lucent or Lampert Connector Laser Diode Light Emitting Diode Logical Link Control OSI OUI PoE POF QoS RJ RSTP SC SCADA SMF SNMP SSAP STP TOS TP UC UDP UTP VLAN WDS WFQ WLAN NIC NLP NMS OID OPC MAC MC MDI MIB MMF MTU Media Access Control Multicast Medium Dependent Interface Management Information Base Multimode Fiber Maximum Transmission Unit (max. packet size) Network Interface Card Normal Link Pulse Network Management Station Object Identifier Openness, Productivity Connectivity (former: OLE for Process Control) Open Systems Interconnection Organizationally Unique Identifier Power over Ethernet Polymer Optical Fiber Quality of Service Registered Jack Rapid Spanning Tree Protocol Subscriber Connector Supervisory Control And Data Acquisition Singlemode Fiber Simple NetworkNotes: Management Protocol Source Service Access Point Shielded Twisted Pair Spanning Tree Protocol Type of Service Twisted-Pair Unicast User Datagram Protocol Unshielded Twisted Pair Virtual LAN Wireless Distribution System Weighted Fair Queuing Wireless LAN

Layer 1: Physical

CB1e_2_Layer_1.831

Content: Standardization bodies ISO/OSI Reference model Media: F/O, TP, PoE Media converter Half duplex and Full duplex Ethernet: Access method Design of a collision domain Network structures Hub Repeater Starcoupler Ethernet: 10 Mbit/s 100 Mbit/s 1000 Mbit/s Autonegotiation

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.

Standardization Bodies
Institute of Electrical and Electronics Engineers (IEEE) Internet Engineering Task Force (IETF) International Organization for Standardization (ISO) International Telecommunications Union (ITU) European Committee for Electrotechnical Standardization (CENELEC)

CB1e_2_Layer_1.831

IEEE, the Institute of Electrical and Electronics Engineers today is the most important organization regarding local data networks with its standard Ethernet. IETF, the Internet Engineering Task Force, creates the TCP/IP standards (Request For Comments RFC). http:// www.ietf.org/rfc ISO, the International Organization for Standardization developed the Open Systems Interconnection (OSI) reference model. Important for networks are the ISO standards for wiring. The approved Ethernet standards are not important anymore due to the international reputation of IEEE. International Telecommunications Union (ITU) is a global organization in which governments and telecoms corporations coordinate the construction and operation of telecommunications networks and services. CENELEC, the European Committee for Electrotechnical Standardization, is responsible for European standardization in the electrical engineering and electronics field. Important for industrial networks are the standards regarding wiring EN 50173, electrical safety EN 50174 and EMC EN 55022.

Notes:

ISO/OSI Reference Model


7 Processing Application HTTP, FTP, TFTP SNMP, SNTP,

Presentation

Presentation

Comms. control

Session

Transport

Transport

TCP / UDP

Mediation

Network

IP

Frame&Protection Bit transfer

Data Link

Ethernet
1 Physical

CB1e_2_Layer_1.831

The OSI (Open Systems Interconnection) reference model views communication independently of specific manufacturer implementations. Seven layers were defined to that end. Each layer provides services for the next-higher layer and utilizes services from the underlying layers. The services are accessed by way of Service Access Points (SAPs). Each layer offers functions which can be realized as hardware or software solutions, or a combination of the two. Physical Layer The Physical Layer (bit transfer layer) specifies the rules for physical transfer between two devices. It converts bits into signals for transmission, and incoming signals into bits. This layer specifies the connection media and their interfaces. On this layer hubs are operating. Data Link Layer The Data Link Layer (security layer) groups the data bits being transferred into a frame and adds control data (e.g. type or length, destination and source MAC address) and a checksum field for detection of errors in bit transfer. Layer 2 controls access to the physical transmission medium. Switches offer the functionality of L2.

Notes:

Network Layer The Network Layer (mediation layer) controls subnets. Its key task is to forward packets from the source to the destination by way of subnets (routing). These paths can be defined by static tables or dynamically by routing protocols. Layer 3 components are routers. Transport Layer In layers 1 to 3 the protocols only exist between two neighboring machines. The Transport Layer is the first end-to-end layer. Its task is to receive data from the communications control layer, break it down into small units as necessary, and by way of the Network Layer ensure that all parts arrive correctly at the end. The Transport Layer makes and breaks the connection, and monitors it. That means the packets are compiled in the right sequence and, depending on the protocol used, erroneous or lost data is rerequested. Session Layer The Session Layer (communication control layer) allows users to converge in different sessions. Sessions are used, for example, to transfer files between two computers (ftp) or to provide users with access to remote systems. Sessions offer additional services such as synchronization. Fixed points are inserted into the data stream so as to resume the transfer from the last such point if the link is broken at any time. Presentation Layer The Presentation Layer concerns itself with the composition and content significance of data. A typical service is converting data to make it readable for the recipient. Other information presentation services include data compression and cryptography (e.g. data encryption) to attain authenticity and security. Application Layer The Application Layer (processing layer) provides applicationoriented services for standard applications such as file transfer, email or databases, with corresponding data structures. Without them no data or messages can be sent. The computer would not know what to do with the information if it received it.

Notes:

Peer to Peer Communications


http://www.hirschmann.com

7 6 5 4 3 2 1

Application

Application

HTTP
Presentation Presentation

Session

Session

TCP
Transport Transport

IP
Network Network

Data Link Physical

Ethernet

Data Link Physical

CB1e_2_Layer_1.831

This slide shows a general communication between two end devices. Communication takes place at several corresponding layers. Each layer is responsible for a specific task in the communication process: HTTP is used to exchange web site data. TCP is used to facilitate reliable end to end data transfer. IP is used to plot a path through various networks. Ethernet specifies the rules for physically transporting the data By splitting the functionality into different layers with specific responsibilities, it is easy to change between different physical media, transport protocols, etc. For example, changing from Ethernet to WLAN only requires amendments to the lower two layers.

Notes:

Exercise: True or false?


The Physical Layer checks for errors.

The Data Link Layer controls access to the media.

The Transport Layer provides safe data traffic.

The Application Layer ensures security and encryption.

CB1e_2_Layer_1.831

Notes:

Multimode vs. Singlemode Fiber-Optic Cable

Primary coating 250 m

Cladding 125 m
9 m 50 m Core 62.5 m ...

CB1e_2_Layer_1.831

Fiber-optic cables have advantages over copper: Immune to electromagnetic interference Long distances Fiber-optic cables are made from: Silica for long distances or high speeds Plastic cheap, only for short distances, low speeds Silica core + plastic sheath: HCS, PCS only field buses 2 fiber types: Multimode fiber (MMF), used for short distances Singlemode fiber (SMF), used for long distances There are 3 types of light source: LEDs low-cost, only for multimode fibers ELEDs value, for SMF, cheaper than LDs, no laser protection measures required Laser, laser diode LD for SMF over long distances

Notes:

F/O Connectors
BFOC (ST)
BFOC

DSC
DSC

LC Industry connectors for IP 67


M12 for F/O DSC or LC with sleeve nut

LC

CB1e_2_Layer_1.831

The BFOC connector is standardized at 10 Mbit/s Ethernet, DuplexSC (DSC) at Fast and Gigabit Ethernet. Additionally at Gigabit Ethernet the LC connector is used if a small form factor is needed, especially with modular transceivers, so called SFPs. The BFOC sometimes is also used in industrial Fast Ethernet devices. In the past other connectors were used, like F-SMA at 10 Mbit/s and still today MTRJ at 100 Mbit/s.

Notes:

Twisted Pair
RJ45

M12
2 wires twisted as a pair 1 foil screen around each pair = PIMF (Pair In Metal Foil) 1 cable screen of wire mesh Halogen free and flame retardant cable outer sheath

CB1e_2_Layer_1.831

A Twisted Pair (TP) cable consists of 8 wires, grouped into pairs. The wire pairs are twisted together. Categorization of TP cable: Cat. 3: min. transmission frequency 20 MHz Minimum quality for 10 Mbit Ethernet Cat. 5: min. transmission frequency 125 MHz Minimum quality for Fast and Gigabit Ethernet Cat. 6: min. transmission frequency 250 MHz Cat. 7: min. transmission frequency 600 MHz Connectors in industry require mechanical stability and should be viibration-proof. Sometimes IP protection (IP64 or IP67) is demanded. For this only proprietary solutions exist: M12: Proposed by IAONA for Ethernet, known in the field bus sector VS-RJ45 from Phoenix Contact: Modified RJ45 RJ45 connector with coupling nut from Woodhead:

Notes:

Pin Assignment, RJ45 Connector

CB1e_2_Layer_1.831

10

Medium Dependent Interface (MDI) Terminal devices such as PCs, PLCs, servers and routers have an MDI interface. The transmission path is located at pins 1-2, and the reception path at pins 3-6. Medium Dependent Interface - Crossover (MDI-X) System components such as hubs and switches have an MDIX interface. The transmission path is located at pins 3-6, and the reception path at pins 1-2. There are two standards for the color coding of wires: T568A specified by TIA/EIA T568B specified by AT&T

Notes:

Patch and Crossover Cables

Patch cable 1:1


PIN PIN PIN

Crossover cable
PIN

1 2 3 6 4 5 7 8

1 2 3 6 4 5 7 8

1 2 3 4 5 6 7 8

1 2 3 4 5 6 7 8

CB1e_2_Layer_1.831

11

To interconnect two devices with different ports (MDI and MDI-X) a straight Twisted-Pair cable (patch cable) is used. To interconnect two devices with the same port (MDI and MDI / MIDX and MDI-X) a crossed Twisted-Pair cable (crossover cable) is needed. Caution: There are also part-crossover cables on the market: 1-2/3-6 crossover, 4-5/7-8 1:1. They will not necessarily work with Gigabit Ethernet!

Notes:

PoE - Power over Ethernet (IEEE 802.3af)


Power Supply via TP cable Advantages:
only one cable necessary and central operation of UPS possible

Power insertion at
hub / switch / router or patch field (Midspan Insertion)

CB1e_2_Layer_1.831

12

Standardized under IEEE 802.3af:2003 Devices are supplied by power over the TP cable. Connector: RJ45 Voltage: 48 at <= 350 mA (ca. 14 W due to wire losses) over 2 wire pairs transmitter (source) selects pairs, receiver (destination) must accept Applications: Video cameras IP telephones WLAN Access Points Sensors/Actuators Access Control Lighting control PDAs loading Game and entertainment devices ...

Notes:

Media Converters

HIRSCHMANN

HIRSCHMANN

TP LWL

TP

CB1e_2_Layer_1.831

13

Media converters usually are used to bridge long distances by fiberoptic 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. In addition F/O ports dont transmit the autonegotiation signals. Therefore both communication partners should be manually configured to FDX. 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.

Notes:

Exercise: Interfaces and Cables

CB1e_2_Layer_1.831

14

Define the interfaces (MDI / MDI-X) of the individual components and the required cable (patch/crossover). Hub Switch

Notes:

Half-duplex and Full-duplex


Half duplex
Tx Rx

or
Rx Tx

Full duplex
Tx Rx

and
Rx Tx

CB1e_2_Layer_1.831

15

For data transmission there are two communication modes: Half duplex - HDX Either send or receive possible, never simultaneously. A conductor pair or an optical fiber is used as the data path for communication. If there are two paths, one is used for each direction. Full duplex - FDX Send and receive possible simultaneously. Two separate data paths, i.e. 2 TP pairs or 2 F/O fibers, are needed. Also over a single conductor pair, using special techniques, such as echo cancellation (see 1000BASE-T).

Notes:

Collision Domain CSMA/CD - IEEE 802.3 Access Method


Station is ready to send

Listen to channel no

Wait as per backoff strategy

Channel free? yes Send data and listen to channel No collision

Collision

32-bit jam signal (usually 5 MHz signal) detected

Data correctly transferred


CB1e_2_Layer_1.831

16

Ethernet components in half-duplex mode use the CSMA/CD access 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 icollision window (25.6 s) i = random number from 0 < i < 2k k = min (n, 10) n = number of send attempts already made

Notes:

Size of a Collision Domain at 10 MBit/s

Smax = 5120 m
CB1e_2_Layer_1.831

17

The sender must detect a collision before it has ended the send 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 packet 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!

Notes:

Network Topologies

Bus

Ring

Star

Double line Mesh

CB1e_2_Layer_1.831

18

The structure of the first networks to use Ethernet was a bus structure 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. Example: VNET/IP

Notes:

Hubs Repeaters Star Couplers

CB1e_2_Layer_1.831

19

Hubs offer the functions of OSI layer 1. 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 packets can occur. Networks operated in halfduplex 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.

Notes:

Ethernet 10 Mbit/s Point to Point

Star Structure

10BASE-T

10BASE-FL

CB1e_2_Layer_1.831

20

Today for building networks twisted pair and fiber optics are used. Due to the point-to-point structure a faulty end device cannot paralyze the whole segment. In addition a high quality cable can also used at the faster releases. 10BASE-T Transmission medium: 100 (Twisted Pair) Maximum length: 100 m (90m + 2 * 5m Patch cable) Maximum 1024 terminals 10BASE-FL Optical cabling offers a high degree of data security based on its insensitivity to radiated interference and its high transfer rate. The use of multimode cables enables a minimum segment length of 2000 meters to be attained. Using singlemode fiber, distances of up to 40 km can be bridged.

Notes:

Fast Ethernet: 100 Mbit/s

100BASE-FX

100BASE-TX

CB1e_2_Layer_1.831

21

Fast Ethernet Transfer rate: 100 Mbit/s Operating mode: Half-duplex and Full-duplex 100BASE-TX Transmission medium: 100 ( Twisted Pair Maximum length: 100 m (90m + 2 * 5m Patch cable) 100BASE-FX Transmission medium: 2* fiber-optic cable Ranges Multimode (1300 nm): > 3 km Singlemode (1310 nm): up to 30 km (not standardized) Singlemode (1550 nm): up to 100 km (not standardized)

Notes:

Gigabit Ethernet: 1000BASE-T


1st wire pair
RX TX RX TX

2nd wire pair


RX TX RX TX

3rd wire pair


RX TX RX TX

4th wire pair


RX TX RX TX

CB1e_2_Layer_1.831

22

Gigabit Ethernet multiplies the data rate of Fast Ethernet by ten. HDX is standardized, but there are no hubs available, so only FDX is in operation. To be able to also use existing copper cabling for a 1000 Mbit/s transfer rate, all four wire pairs of a Twisted Pair cable are used. Parallel processing distributes the data across all the wire pairs. So-called echo cancellation enables data to be transmitted and received over a single wire pair simultaneously. 1000BASE-T Transmission medium: 100 (Twisted Pair) Maximum length: 100 m (90m + 2 * 5m Patch cable)

Notes:

Gigabit via Fiber: 1000BASE-SX, 1000BASE-LX

G62.5/125 G50/125 Multimode G62.5 Multimode G50 Singlemode 275 m 550 m 5000 m

CB1e_2_Layer_1.831

23

Transmission medium: Duplex fiber-optic cable 1000BASE-SX (850 nm) range Multimode G62.5/125: Multimode G50/125: 1000BASE-LX (1300 nm) Multimode G62.5/125: Multimode G50/125: Singlemode E10/125: Proprietary solutions (1550 nm) not standardized but wide available Singlemode E10/125: up to 120 km 550 m 550 m at least 5000 m 275 m 550 m

Notes:

Autonegotiation:
Autonegotiation FLP Autonegotiation

FDX
FLP

FDX

Fixed to FDX FLP

Autonegotiation

FDX

HDX

Fixed to HDX FLP

Autonegotiation

HDX

HDX

CB1e_2_Layer_1.831

24

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.

Exercise: Autonegotiation
Auto Auto

Auto 100Mbit/s HDX Auto 100Mbit/s FDX Auto 100Mbit/s HDX

Auto 10Mbit/s HDX

CB1e_2_Layer_1.831

25

Some ports in the example above have fixed transfer rates and modes, 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

Notes:

Appendix

CB1e_2_Layer_1.831

26

Notes:

Solution: Interfaces and Cables


MDI Crossover MDI

MDI-X

Patch

MDI

MDI-X

Crossover MDI-X Patch

MDI-X

MDI

MDI-X

Crossover

MDI-X

CB1e_2_Layer_1.831

27

Define the interfaces (MDI / MDI-X) of the individual components and the required cable (patch/crossover). Hub Switch

Notes:

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

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

100Mbit/s FDX Auto 100Mbit/s HDX

Patch (or Corssover) 100Mbit/s HDX

Auto 10Mbit/s HDX

Crossover (or Patch) 10Mbit/s HDX

CB1e_2_Layer_1.831

28

Some ports in the example above have fixed transfer rates and modes, 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

Notes:

ETHERNET in OSI Reference Model


OSI Reference Model Referenz Model APPLICATION PRESENTATION SESSION TRANSPORT NETWORK DATA LINK PHYSICAL
PMA PHYSICAL MEDIUM ATTACH. MAU MDI

LAN CSMA/CD HIGHER LAYERS


LLC LOGICAL LINK CONTROL MAC MEDIA ACCESS CONTROL PLS PHYSICAL SIGNALING DTE DTE AUI

MEDIUM
Transceiver = MAU

CB1e_2_Layer_1.831

29

Ethernet is standardized under IEEE 802.3. Ethernet offers several speeds: 10 Mbit/s 100 Mbit/s Fast Ethernet 1 Gbit/s Gigabit Ethernet 10 Gigabit Ethernet and coming soon 100 Gigabit Ethernet (development of standard just started) Ethernet was developed further from a shared net with CSMA/CD access method (HDX) to switch based nets in FDX mode. Currently in industry the trend is Gigabit Ethernet, due to its smaller packet delay in switches compared to Fast Ethernet. The higher speed/bandwidth has only a subordinate role. Ethernet supports different media: Fiber optics: multimode and singlemode fiber Twisted pair and at 10 Mbit/s coax as well as AUI.

Notes:

Ethernet 10 Mbit/s
10BASE2 BNC T piece

Segment max. 185 m

Terminator 50 min. 0.5 m

10BASE5
Transceiver Transceiver cable max. 50 m

Segment max. 500 m


CB1e_2_Layer_1.831

Terminator 50 min. 2.5 m 30

Today coax and AUI are used in industry networks for completion. 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.

Notes:

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

Repeater

CB1e_2_Layer_1.831

31

Model 1 to IEEE 802.3 section 13 The 5-4-3 rule: A maximum of 5 segments may be connected to 4 repeaters, 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.

Notes:

Design of a Collision Domain: Model 2: Runtime Equivalent & Path Variability Value
5 4 3 2

10 Mbit/s

10 Mbit/s

Runtime delay

CB1e_2_Layer_1.831

32

To reach the limit of a collision domain, two calculations as per 802.3 section 13 are required. Propagation equivalent The delay of a signal due to a component in the data path is converted into a distance. The overall length of permissible cable, after deducting all the delays due to active components, results as 5120 meters. Hub delay: 150m - 300m NIC delay: 100m - 140m Path variability value Another delay occurs because a repeater extends the preamble of an incoming packet by a number of bits. This is the path variability value, and is given in bit times (BT). The maximum number of bit times in a collision domain is 49. As no value is usually obtainable for terminal devices, 40 BT should be assumed as the limit for the rest of the data path.

Notes:

Exercise: 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

CB1e_2_Layer_1.831

33

Repeater classification for Fast Ethernet: 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. Calculate the theoretical maximum network size of the collision domain at a transfer rate of 100 Mbit/s:

Notes:

Solution: 64 byte = 512 bit 10 ns/bit 2.56 s * 200,000 km/s = 512 m

Slottime = 2.56 s;

Acronyms
AUI BFOC BT CSMA/CD DSC DTE ELED EMC EN FDX FLP F/O FTP HCS HDX IEEE IETF IFG IP IPG ISO Attachment Unit Interface Bayonet Fiber Optical Connector = ST Bit Time Carrier Sense Multiple Access Collision Detection Duplex Subscriber Connector Data Terminal Equipment Edge-emitting LED Electro-magnetic Compatibility European standard Full duplex Fast Link Pulse Fiber Optics File Transfer Protocol Hard polymer Cladded Silica F/O half-duplex Institute of Electrical and Electronics Engineers Internet Engineering Task Force Inter Frame Gap (also IPG) Internet Protocol, Industry Protection Inter Packet Gap International Organization for Standardization LAN LD MAC MAU MDI MMF NIC NLP OSI PiMF PCS PVV RJ SAP SMF TP UPS WDS WLAN Local Area Network Laser diode Media Access Control Medium Attachment Unit Medium Dependent Interface Multimode Fiber Network Interface Card Normal Link Pulse Open Systems Interconnection Pair in Metal Foil Polymer cladded silica; s. HCS Path Variability Value Registered Jack Service Access Points Singlemode Fiber Twisted Pair Uninterruptible Power Supply Wireless Distribution System Wireless LAN

CB1e_2_Layer_1.831

34

Notes:

Layer 1: Physical

CB1e_2_Layer_1.831

Content: Standardization bodies ISO/OSI Reference model Media: F/O, TP, PoE Media converter Half duplex and Full duplex Ethernet: Access method Design of a collision domain Network structures Hub Repeater Starcoupler Ethernet: 10 Mbit/s 100 Mbit/s 1000 Mbit/s Autonegotiation

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.

Standardization Bodies

Institute of Electrical and Electronics Engineers (IEEE) Internet Engineering Task Force (IETF) International Organization for Standardization (ISO) International Telecommunications Union (ITU) European Committee for Electrotechnical Standardization (CENELEC)

CB1e_2_Layer_1.831

IEEE, the Institute of Electrical and Electronics Engineers today is the most important organization regarding local data networks with its standard Ethernet. IETF, the Internet Engineering Task Force, creates the TCP/IP standards (Request For Comments RFC). http:// www.ietf.org/rfc ISO, the International Organization for Standardization developed the Open Systems Interconnection (OSI) reference model. Important for networks are the ISO standards for wiring. The approved Ethernet standards are not important anymore due to the international reputation of IEEE. International Telecommunications Union (ITU) is a global organization in which governments and telecoms corporations coordinate the construction and operation of telecommunications networks and services. CENELEC, the European Committee for Electrotechnical Standardization, is responsible for European standardization in the electrical engineering and electronics field. Important for industrial networks are the standards regarding wiring EN 50173, electrical safety EN 50174 and EMC EN 55022.

Notes:

communication ?!?

Igel

EAGLE

CB1e_2_Layer_1.831

Connection is not communication 3

Notes:

7 layer modell

http://www.hirschmann.com

7 6 5 4 3 2 1

Application

Application

HTTP
Presentation Presentation

Session

Session

TCP
Transport Transport

IP
Network Network

Data link Physical

Ethernet

Data link Physical

CB1e_2_Layer_1.831

The OSI (Open Systems Interconnection) reference model views communication independently of specific manufacturer implementations. Seven layers were defined to that end. Each layer provides services for the nexthigher layer and utilizes services from the underlying layers. The services are accessed by way of Service Access Points (SAPs). Each layer offers functions which can be realized as hardware or software solutions, or a combination of the two.

Notes:

Physical Layer The Physical Layer (bit transfer layer) specifies the rules for physical transfer between two devices. It converts bits into signals for transmission, and incoming signals into bits. This layer specifies the connection media and their interfaces. On this layer hubs are operating. Network Layer The Network Layer (mediation layer) controls subnets. Its key task is to forward packets from the source to the destination by way of subnets (routing). These paths can be defined by static tables or dynamically by routing protocols. Layer 3 components are routers. Transport Layer In layers 1 to 3 the protocols only exist between two neighboring machines. The Transport Layer is the first end-toend layer. Its task is to receive data from the communications control layer, break it down into small units as necessary, and by way of the Network Layer ensure that all parts arrive correctly at the end. The Transport Layer makes and breaks the connection, and monitors it. That means the packets are compiled in the right sequence and, depending on the protocol used, erroneous or lost data is re-requested. Session Layer The Session Layer (communication control layer) allows users to converge in different sessions. Sessions are used, for example, to transfer files between two computers (ftp) or to provide users with access to remote systems. Sessions offer additional services such as synchronization. Fixed points are inserted into the data stream so as to resume the transfer from the last such point if the link is broken at any time. Presentation Layer The Presentation Layer concerns itself with the composition and content significance of data. A typical service is converting data to make it readable for the recipient. Other information presentation services include data compression and cryptography (e.g. data encryption) to attain authenticity and security. Application Layer The Application Layer (processing layer) provides application-oriented services for standard applications such as file transfer, e-mail or databases, with corresponding data structures. Without them no data or messages can be sent. The computer would not know what to do with the information if it received it.

Data Link Layer The Data Link Layer (security layer) groups the data bits being transferred into a frame and adds control data (e.g. type or length, destination and source MAC address) and a checksum field for detection of errors in bit transfer. Layer 2 controls access to the physical transmission medium. Switches offer the functionality of L2.

Example of 3-layer-modell

Philosoph 1 living in: India language: Telugu

Philosoph 2 living in: Kenia language: Kisuaheli

translater

translater

bearer

bearer

CB1e_2_Layer_1.831

Notes:

Peer to Peer Communications

http://www.hirschmann.com

7 6 5 4 3 2 1

Application

Application

Presentation

HTTP

Presentation

Session Transport

Session

TCP IP

Transport

Network

Network

Data Link Physical

Ethernet

Data Link Physical

CB1e_2_Layer_1.831

This slide shows a general communication between two end devices. Communication takes place at several corresponding layers. Each layer is responsible for a specific task in the communication process: HTTP is used to exchange web site data. TCP is used to facilitate reliable end to end data transfer. IP is used to plot a path through various networks. Ethernet specifies the rules for physically transporting the data By splitting the functionality into different layers with specific responsibilities, it is easy to change between different physical media, transport protocols, etc. For example, changing from Ethernet to WLAN only requires amendments to the lower two layers.

Notes:

Exercise: True or false?

The Physical Layer checks for errors.

The Data Link Layer controls access to the media.

The Transport Layer provides safe data traffic.

The Application Layer ensures security and encryption.

CB1e_2_Layer_1.831

Notes:

Multimode vs. Singlemode


Fiber-Optic Cable m
Rodent protection and Strain relief made of strain relief aramide fiber Filler Supporting element (GFRP)

PE sheath

PE intermediate sheath Single/multiple fiber with water repelling filler

Glass fibers with primary coating with single fiber or multiple fibers

Primary coating 250 m

Cladding 125 m 10 m 50 m Core 62.5 m ...

CB1e_2_Layer_1.831

Fiber-optic cables have advantages over copper: Immune to electromagnetic interference Long distances Fiber-optic cables are made from: Silica for long distances or high speeds Plastic cheap, only for short distances, low speeds Silica core + plastic sheath: HCS, PCS only field buses 2 fiber types: Multimode fiber (MMF), used for short distances Singlemode fiber (SMF), used for long distances There are 3 types of light source: LEDs low-cost, only for multimode fibers ELEDs value, for SMF, cheaper than LDs, no laser protection measures required Laser, laser diode LD for SMF over long distances

Notes:

F/O Connectors
BFOC

BFOC (ST) DSC


DSC

LC
LC

Industry connectors for IP 67


M12 for F/O DSC or LC with sleeve nut

CB1e_2_Layer_1.831

The BFOC connector is standardized at 10 Mbit/s Ethernet, DuplexSC (DSC) at Fast and Gigabit Ethernet. Additionally at Gigabit Ethernet the LC connector is used if a small form factor is needed, especially with modular transceivers, so called SFPs. The BFOC sometimes is also used in industrial Fast Ethernet devices. In the past other connectors were used, like F-SMA at 10 Mbit/s and still today MTRJ at 100 Mbit/s.

Notes:

Optical characteristics fiber cable

CB1e_2_Layer_1.831

10

Notes:

Optical characteristics Data sheet switches

CB1e_2_Layer_1.831

11

Notes:

Optical characteristics Data sheet switches

CB1e_2_Layer_1.831

12

Notes:

measurement

1.)

Reference test lead

Result of the reference measurement.

660 nm 850 nm 1300 nm

- 15,0 dBm

P0 =

dBm
850nm

Sender

Leistungspegelmesser

2.)

Result of the level measurement Link to be tested

P1 =
660 nm 850 nm 1300 nm

dBm
850nm

- 17,0 dBm

attenuation A = P0 - P1

Sender
Leistungspegelmesser

example: A = 2 dB

CB1e_2_Layer_1.831

13

Notes:

Measurement - OTDR

OTDR

Launching fiber

Link to be tested

End faser

screen

attenuation length

CB1e_2_Layer_1.831

14

Notes:

Twisted Pair

RJ45

M12
2 wires twisted as a pair 1 foil screen around each pair = PIMF (Pair In Metal Foil) 1 cable screen of wire mesh Halogen free and flame retardant cable outer sheath

CB1e_2_Layer_1.831

15

A Twisted Pair (TP) cable consists of 8 wires, grouped into pairs. The wire pairs are twisted together. Categorization of TP cable: Cat. 3: min. transmission frequency 20 MHz Minimum quality for 10 Mbit Ethernet Cat. 5: min. transmission frequency 125 MHz Minimum quality for Fast and Gigabit Ethernet Cat. 6: min. transmission frequency 250 MHz Cat. 7: min. transmission frequency 600 MHz Connectors in industry require mechanical stability and should be viibration-proof. Sometimes IP protection (IP64 or IP67) is demanded. For this only proprietary solutions exist: M12: Proposed by IAONA for Ethernet, known in the field bus sector VS-RJ45 from Phoenix Contact: Modified RJ45 RJ45 connector with coupling nut from Woodhead:

Notes:

Twisted Pair - types of connectors

IAONA Planning & Installation Guide (Version 4.0)

Installation Guideline PROFInet (Version 1.8)

Ethernet/IP Media Planning and Installation Manual (Draft 2.0)

D - Code

CB1e_2_Layer_1.831

16

Notes:

Twisted Pair -

RJ45

Whatever housing concept is used, RJ 45 connectors do not reach the demands of industrial applications:

Left: RJ45 connector socket damaged by corrosion Middle/right: X-ray of an RJ45 engaged contact set. Note the very small contact area and the effect of mechanical vibration on the Plug / socket contacts wearing away gold flashing
CB1e_2_Layer_1.831

17

Notes:

Pin Assignment, RJ45 Connector

MDI (EIA/TIA T568A)

MDI-X

CB1e_2_Layer_1.831

18

Medium Dependent Interface (MDI) Terminal devices such as PCs, PLCs, servers and routers have an MDI interface. The transmission path is located at pins 1-2, and the reception path at pins 3-6. Medium Dependent Interface - Crossover (MDI-X) System components such as hubs and switches have an MDIX interface. The transmission path is located at pins 3-6, and the reception path at pins 1-2. There are two standards for the color coding of wires: T568A specified by TIA/EIA T568B specified by AT&T

Notes:

Patch and Crossover Cables

Patch cable 1:1


PIN

Crossover cable
PIN

1 2 3 6 4 5 7 8

1 2 3 6 4 5 7 8

PIN

1 2 3 4 5 6 7 8

PIN

1 2 3 4 5 6 7 8

CB1e_2_Layer_1.831

19

To interconnect two devices with different ports (MDI and MDI-X) a straight Twisted-Pair cable (patch cable) is used. To interconnect two devices with the same port (MDI and MDI / MIDX and MDI-X) a crossed Twisted-Pair cable (crossover cable) is needed. Caution: There are also part-crossover cables on the market: 1-2/3-6 crossover, 4-5/7-8 1:1. They will not necessarily work with Gigabit Ethernet!

Notes:

Exercise: Interfaces and Cables

CB1e_2_Layer_1.831

20

Define the interfaces (MDI / MDI-X) of the individual components and the required cable (patch/crossover). Hub Switch

Notes:

Half-duplex and Full-duplex

Half duplex
Tx Rx

or
Rx Tx

Full duplex
Tx Rx

and
Rx Tx

CB1e_2_Layer_1.831

21

For data transmission there are two communication modes: Half duplex - HDX Either send or receive possible, never simultaneously. A conductor pair or an optical fiber is used as the data path for communication. If there are two paths, one is used for each direction. Full duplex - FDX Send and receive possible simultaneously. Two separate data paths, i.e. 2 TP pairs or 2 F/O fibers, are needed. Also over a single conductor pair, using special techniques, such as echo cancellation (see 1000BASE-T).

Notes:

Exercise: Autonegotiation

Auto

Auto

Auto 100Mbit/s HDX Auto 100Mbit/s FDX Auto 100Mbit/s HDX Auto 10Mbit/s HDX

CB1e_2_Layer_1.831

22

Some ports in the example above have fixed transfer rates and modes, 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

Notes:

PoE - Power over Ethernet (IEEE 802.3af)

Power Supply via TP cable Advantages:


only one cable necessary and central operation of UPS possible

Power insertion at
hub / switch / router or patch field (Midspan Insertion)

CB1e_2_Layer_1.831

23

Standardized under IEEE 802.3af:2003 Devices are supplied by power over the TP cable. Connector: RJ45 Voltage: 48 at <= 350 mA (ca. 12,95 W due to wire losses) over 2 wire pairs transmitter (source) selects pairs, receiver (destination) must accept Applications: Video cameras IP telephones WLAN Access Points Sensors/Actuators Access Control Lighting control PDAs loading Game and entertainment devices ...

Notes:

PoE Supply Techniques


1. Supply on the data pairs (Center Taps) 1 2 4 5 7 8 3 6

48V

CB1e_2_Layer_1.831

24

Notes:

PoE Supply Techniques


2. Supply on the unused pairs (Spare Pairs)

1 2 4 5 48V 7 8 3 6

CB1e_2_Layer_1.831

25

Notes:

Medias in Ethernet
copper: Coax 10Base5 or 10Base 2 500m (10Base5) 185m (10Base2) for bus structure
BNC

N-Connector

RJ45 M12

copper: Twisted Pair 10BaseT, 100BaseTX, connector RJ45 up to 100m for star structure fiber Multimode 10BaseF, 100BaseFX BFOC (ST), SC 50 / 125 m and 62,5 / 125 m Up to 2.000m/5.000m for ring-, bus- and star structure fiber Monomode/singlemode 9 / 125 m and 10 / 125 m Up to 40km or 200km
26

BFOC/ ST

Duplex-LC

D-SC

CB1e_2_Layer_1.831

Notes:

Media Converters

HIRSCHMANN

HIRSCHMANN

TP LWL

TP

CB1e_2_Layer_1.831

27

Media converters usually are used to bridge long distances by fiberoptic 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. In addition F/O ports dont transmit the autonegotiation signals. Therefore both communication partners should be manually configured to FDX. 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.

Notes:

Collision Domain CSMA/CD


IEEE 802.3 Access Method

Station is ready to send Wait as per backoff strategy no

Listen to channel

Channel free? yes Send data and listen to channel No collision

Collision

32-bit jam signal (usually 5 MHz signal) detected

Data correctly transferred


CB1e_2_Layer_1.831

28

Ethernet components in half-duplex mode use the CSMA/CD access 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 icollision window (25.6 s) i = random number from 0 < i < 2k k = min (n, 10) n = number of send attempts already made

Notes:

Length in a collision domain


St1 St2

Free channel for Station St1 Data transmit of message M1

M1

Free channel for ST2 Data transmit of M2

M1 M2 M1 M2 M1 M2 M1 M2

collision between M1 and M2

ST2 recognize a collision (M2 + M1)

ST2 send a JAM signal

ST1 recognize collision (M2 + M1)

M1 M2

51,2s/2 = 25,6 s
CB1e_2_Layer_1.831

(5120m)

29

Min Lnge of a 10Mbit/s Ethernet network 64 bytes (512 bits) => to 10Mbps, in a periode of 51.2 s. CSMA/CD Die Kollision kann von der ST1 nur festgestellt werden, wenn die Nachricht gerade bertragen wird. Dann wird die ST1 von der ST2 ber die Kollision informiert . => the transmission time of a packet have to be not longer than: T = 51,2s / 2 = 25,6s Speed propagation of signals V = Propagationscoeffizient x light speed => V = 0.66 x 300000km/s = 20.0000 km/s Max Length of a network (collision domain) S=VxT S = 20.0000 km/s x 25,6s = 5120 meter

Notes:

CSMA/CD

access method in hub technology


J M A

Hub

Hub

Hub

Hub

1
collision

Switch

Network A

CB1e_2_Layer_1.831

30

Notes:

Size of a Collision Domain at 10 MBit/s

Smax = 5120 m
CB1e_2_Layer_1.831

31

The sender must detect a collision before it has ended the send 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 packet 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!

Notes:

Network Topologies

Bus

Ring

Star

Double line Mesh

CB1e_2_Layer_1.831

32

The structure of the first networks to use Ethernet was a bus structure 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. Example: VNET/IP

Notes:

Hubs Repeaters Star Couplers

CB1e_2_Layer_1.831

33

Hubs offer the functions of OSI layer 1. 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 packets can occur. Networks operated in halfduplex 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.

Notes:

Ethernet 10 Mbit/s Point to Point Star Structure

10BASE-T

10BASE-FL

CB1e_2_Layer_1.831

34

Today for building networks twisted pair and fiber optics are used. Due to the point-to-point structure a faulty end device cannot paralyze the whole segment. In addition a high quality cable can also used at the faster releases. 10BASE-T Transmission medium: 100 (Twisted Pair) Maximum length: 100 m (90m + 2 * 5m Patch cable) Maximum 1024 terminals 10BASE-FL Optical cabling offers a high degree of data security based on its insensitivity to radiated interference and its high transfer rate. The use of multimode cables enables a minimum segment length of 2000 meters to be attained. Using singlemode fiber, distances of up to 40 km can be bridged.

Notes:

Fast Ethernet: 100 Mbit/s

100BASE-FX

100BASE-TX

CB1e_2_Layer_1.831

35

Fast Ethernet Transfer rate: 100 Mbit/s Operating mode: Half-duplex and Full-duplex 100BASE-TX Transmission medium: 100 ( Twisted Pair Maximum length: 100 m (90m + 2 * 5m Patch cable) 100BASE-FX Transmission medium: 2* fiber-optic cable Ranges Multimode (1300 nm): > 3 km Singlemode (1310 nm): up to 30 km (not standardized) Singlemode (1550 nm): up to 100 km (not standardized)

Notes:

Gigabit Ethernet: 1000BASE-T


RX TX

1st wire pair

RX TX

2nd wire pair


RX TX

RX TX

3rd wire pair


RX TX

RX TX

4th wire pair


RX TX

RX TX

CB1e_2_Layer_1.831

36

Gigabit Ethernet multiplies the data rate of Fast Ethernet by ten. HDX is standardized, but there are no hubs available, so only FDX is in operation. To be able to also use existing copper cabling for a 1000 Mbit/s transfer rate, all four wire pairs of a Twisted Pair cable are used. Parallel processing distributes the data across all the wire pairs. So-called echo cancellation enables data to be transmitted and received over a single wire pair simultaneously. 1000BASE-T Transmission medium: 100 (Twisted Pair) Maximum length: 100 m (90m + 2 * 5m Patch cable)

Notes:

Gigabit via Fiber: 1000BASE-SX, 1000BASE-LX

G62.5/125 G50/125 Multimode G62.5 Multimode G50 Singlemode 275 m 550 m 5000 m

CB1e_2_Layer_1.831

37

Transmission medium: Duplex fiber-optic cable 1000BASE-SX (850 nm) range Multimode G62.5/125: Multimode G50/125: 1000BASE-LX (1300 nm) Multimode G62.5/125: Multimode G50/125: Singlemode E10/125: Proprietary solutions (1550 nm) not standardized but wide available Singlemode E10/125: up to 120 km 550 m 550 m at least 5000 m 275 m 550 m

Notes:

Autonegotiation:

Autonegotiation FLP

Autonegotiation

FDX
FLP Fixed to FDX FLP

FDX

Autonegotiation

FDX

HDX

Fixed to HDX FLP

Autonegotiation

HDX

HDX

CB1e_2_Layer_1.831

38

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.

Appendix

CB1e_2_Layer_1.831

39

Notes:

Solution: Interfaces and Cables

MDI

Crossover

MDI

MDI-X

Patch

MDI

MDI-X

Crossover

MDI-X

MDI-X

Patch

MDI

MDI-X

Crossover

MDI-X

CB1e_2_Layer_1.831

40

Define the interfaces (MDI / MDI-X) of the individual components and the required cable (patch/crossover). Hub Switch

Notes:

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

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

100Mbit/s FDX Auto 100Mbit/s HDX

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

Crossover (or Patch) 10Mbit/s HDX

CB1e_2_Layer_1.831

41

Some ports in the example above have fixed transfer rates and modes, 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

Notes:

ETHERNET in OSI Reference Model

OSI Reference Model Referenz Model APPLICATION PRESENTATION SESSION TRANSPORT NETWORK DATA LINK PHYSICAL

LAN CSMA/CD HIGHER LAYERS


LLC LOGICAL LINK CONTROL MAC MEDIA ACCESS CONTROL PLS PHYSICAL SIGNALING DTE DTE AUI PMA PHYSICAL MEDIUM ATTACH. MAU MDI

MEDIUM
Transceiver = MAU

CB1e_2_Layer_1.831

42

Ethernet is standardized under IEEE 802.3. Ethernet offers several speeds: 10 Mbit/s 100 Mbit/s Fast Ethernet 1 Gbit/s Gigabit Ethernet 10 Gigabit Ethernet and coming soon 100 Gigabit Ethernet (development of standard just started) Ethernet was developed further from a shared net with CSMA/CD access method (HDX) to switch based nets in FDX mode. Currently in industry the trend is Gigabit Ethernet, due to its smaller packet delay in switches compared to Fast Ethernet. The higher speed/bandwidth has only a subordinate role. Ethernet supports different media: Fiber optics: multimode and singlemode fiber Twisted pair and at 10 Mbit/s coax as well as AUI.

Notes:

Ethernet 10 Mbit/s

10BASE2

BNC T piece

Segment max. 185 m

Terminator 50 min. 0.5 m

10BASE5
Transceiver Transceiver cable max. 50 m

Segment max. 500 m


CB1e_2_Layer_1.831

Terminator 50 min. 2.5 m 43

Today coax and AUI are used in industry networks for completion. 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.

Notes:

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

Repeater

CB1e_2_Layer_1.831

44

Model 1 to IEEE 802.3 section 13 The 5-4-3 rule: A maximum of 5 segments may be connected to 4 repeaters, 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.

Notes:

Design of a Collision Domain: Model 2: Runtime Equivalent & Path Variability Value

5 8 7 6

3 1

2 0

10 Mbit/s

10 Mbit/s

Runtime delay

CB1e_2_Layer_1.831

45

To reach the limit of a collision domain, two calculations as per 802.3 section 13 are required. Propagation equivalent The delay of a signal due to a component in the data path is converted into a distance. The overall length of permissible cable, after deducting all the delays due to active components, results as 5120 meters. Hub delay: 150m - 300m NIC delay: 100m - 140m Path variability value Another delay occurs because a repeater extends the preamble of an incoming packet by a number of bits. This is the path variability value, and is given in bit times (BT). The maximum number of bit times in a collision domain is 49. As no value is usually obtainable for terminal devices, 40 BT should be assumed as the limit for the rest of the data path.

Notes:

Exercise: 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

CB1e_2_Layer_1.831

46

Repeater classification for Fast Ethernet: 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. Calculate the theoretical maximum network size of the collision domain at a transfer rate of 100 Mbit/s:

Notes:

Solution: 64 byte = 512 bit 10 ns/bit 2.56 s * 200,000 km/s = 512 m

Slottime = 2.56 s;

Acronyms

AUI BFOC BT CSMA/CD DSC DTE ELED EMC EN FDX FLP F/O FTP HCS HDX IEEE IETF IFG IP IPG ISO

Attachment Unit Interface Bayonet Fiber Optical Connector = ST Bit Time Carrier Sense Multiple Access Collision Detection Duplex Subscriber Connector Data Terminal Equipment Edge-emitting LED Electro-magnetic Compatibility European standard Full duplex Fast Link Pulse Fiber Optics File Transfer Protocol Hard polymer Cladded Silica F/O half-duplex Institute of Electrical and Electronics Engineers Internet Engineering Task Force Inter Frame Gap (also IPG) Internet Protocol, Industry Protection Inter Packet Gap International Organization for Standardization

LAN LD MAC MAU MDI MMF NIC NLP OSI PiMF PCS PVV RJ SAP SMF TP UPS WDS WLAN

Local Area Network Laser diode Media Access Control Medium Attachment Unit Medium Dependent Interface Multimode Fiber Network Interface Card Normal Link Pulse Open Systems Interconnection Pair in Metal Foil Polymer cladded silica; s. HCS Path Variability Value Registered Jack Service Access Points Singlemode Fiber Twisted Pair Uninterruptible Power Supply Wireless Distribution System Wireless LAN

CB1e_2_Layer_1.831

47

Notes:

Data Link Layer

CB1e_3_Layer_2.831

Content: MAC and LLC Layer Packet types: Ethernet II and IEEE 802.3 Address Types MAC Address Switches: Forwarding Database and Aging Timer Switching: Store and Forward / Cut-Through, Latency time Packet Filters Excursion into layer 3: IP address and netmask

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.

MAC and LLC Layer


7 Application

Presentation

Session

Transport

Network LLC 2b

Data Link MAC 2a

Physical

CB1e_3_Layer_2.831

The Data link layer is split into the two sub layers MAC and LLC: 2b: Logical Link Control (LLC) Link make and break, packet traffic control, packet sequencing, packet acknowledgement LLC offers link control independent of medium. 2a: Medium Access Control (MAC) Functions in send direction: Receive the data from the LLC layer Create an Ethernet frame Determine the inter-packet gap Media Access Control (CSMA/CD) Creating Frame Check Sequence Number Receive bit stream from layer 1 Check length Reject invalid frames Check the frame for bit errors Check the Frame Check Sequence Number Forward data to the upper layer (LLC)

Notes:

Functions in receive direction

Ethernet Frame
Ethernet-V2.0 Frame
Preamble SFD Destination Source address address Type field: Value > 1.536

Type

PDU

FCS

IFG

Preamble

IEEE-802.3 frame
Preamble SFD Destination Source address address

Length field: Value < 1.536

Length

LLC

PDU

FCS

IFG

Preamble

LLC field: Value = FF FF FFh

Length: 64 bytes - 1518 bytes


7 bytes 1 byte 6 bytes 6 bytes 2 bytes min. 46 bytes / max. 1500 bytes 4 bytes

CB1e_3_Layer_2.831

Preamble: The preamble is a sequence of 7 bytes with a "10101010" bit sequence (1010101010) for synchronization of the recipient. SFD - Start of Frame Delimiter: The "Start of Frame Delimiter" with a "10101011" bit sequence marks the start of the Ethernet frame. Destination and source address: The physical address of the recipient/sender is shown here. Type: The type only occurs in Ethernet-V2.0 frames, and refers to the protocol (e.g. IP) to which the useful data of the frame belong. Length: This field indicates the length of the data field, and is only given in Ethernet frames to IEEE 802.3. PDU - Protocol Data Unit Here the data to be transported by Ethernet is shown (e.g. packet of Internet Protocol). FCS - Frame Checking Sequence The "Frame Checking Sequence" is a 4-byte checksum of the Ethernet frame. Only error detection is offered, but with a very low probability of error. The IEEE 802.3 packet is used rarely beside the functions RSTP, GMRP and GVRP. IFG -Interframe Gap Minimum gap between two frames - 96 Bit Times (12 bytes)

Notes:

Jumbo Frames
Definition: Packet with oversize usually ca. 9000 byte Standard: max. length untagged = 1,518 byte MTU size Most of available chip sets cannot process jumbo frames and can enter a dead-lock state. Small overhead Increase of jitter of other applications Bit errors generate higher load and larger interferences

CB1e_3_Layer_2.831

Standards care for compatibility of devices and ease planning and installation of a network. If a user later adds devices not capable of jumbos interferences can appear. The overhead part of the bandwidth is reduced from 2.3 to 0.4 %, thats an improvement of 1.9 %. For calculation jumbo frames of 9,180 byte, i.e. 6 regular packets, were assumed. A bit error (BER<= 10^-12) destroys one of 81 mio normal packets. If the packet is re-transmitted load is increased by less than 1 . This will result at use of jumbos in imperceptible increase of load. On the other hand a jumbo covers that much bandwidth to considerably delay other applications such that they are disturbed. Wirespeed router usually cannot fragment, because this would reduce the performance considerably. Experience: Applications with jumbo frames showing an improvement of performance of ca. 20 % indicating problems of the protocol stack.

Notes:

Address Types
Unicast
A Daten Von A An B C B

Broadcast
Daten A C Von A An Alle B

Multicast
B A Daten Von A An Gruppe C

CB1e_3_Layer_2.831

Unicast A unicast is a data packet addressed only to a single device within a LAN and read by it. Broadcast A broadcast is a data packet sent to all the stations in a LAN. This packet must be read and evaluated by all recipients. One address is reserved for broadcasts.

Notes:

Multicast A multicast is a data packet sent to all the stations in a LAN. It is only intended for a specific group of stations, however, which read the packet. A range of addresses is reserved for multicasts.

MAC Address
Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6

x U/L I/G

"0" Individual address "1" Multicast address

0 Globally administered address 1 Locally administered address

Manufacturer ID: Multicast: Broadcast:

00 : 80 : 63 : 01 : 00 : 5e : FF : FF : FF :
6

xx : xx : xx xx : xx : xx FF : FF : FF

CB1e_3_Layer_2.831

The MAC address (Media Access Control) is the hardware address of network devices (especially network cards) used for unique device identification in the network. The MAC address comprises 48 bits / 6 bytes, and is usually written in hexadecimal format. The Least Significant Bit (LSB) of the first byte indicates whether the address is an individual address ("0"), e.g. the address of a network card, or a multicast address ("1"). The second bit of the first byte indicates whether the address is global ("0") or local ("1"). Manufacturers of network components can purchase address ranges from the IEEE. The first three bytes of the network address serve as the manufacturer's identifier (also termed OUI - Organization Unique Identifier). This must comprise global and individual addresses. The remaining three bytes are assigned individually by the manufacturer for each interface. The MAC address in which all 48 bits are set to 1 is used as a broadcast address sent to all the devices in a LAN.

Notes:

Solution: There are several ways. At a Windows computer you can type in ipconfig /all, netstat r, or route print

CB1e_3_Layer_2.831

Exercise: MAC Address

Find out the MAC address of your computer

Notes:

Switches

A B
Po rt 1
2 rt Po

Port 3

CB1e_3_Layer_2.831

The switch is a device on layer 2 of the ISO/OSI reference model. Each port of a switch can operate in half-duplex or full-duplex mode. This means each port comprises its own segment (collision domain).

Notes:

The switch checks incoming packets 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 packet is sent to every segment. This ensures that the destination receives the frame (termed "flooding").

Erroneous packets or collisions in connected segments are not forwarded by a switch and do not reach other connected segments.

Forwarding Database and Aging Timer


Port: 1 2 3 4 00:08:74:D3:04:5D MAC address 00:08:74:E9:C8:4E

old

tAging

CB1e_3_Layer_2.831

Each switch has a forwarding database where it stores which port, or ports, conceal(s) which MAC address (or multiple addresses). This enables the switch to forward data packets directly to the destination without placing data load on other network segments. If a switch receives a data packet 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 data packet is not known to the switch (Unknown Unicast), the packet 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. Advantage: Small address table for improved performance If aging is not to apply, enter address as "static".

Notes:

Switching: Store and Forward / Cut-Through


PA

Ethernet Packet
Store and Forward

Packet is completely read-in and is checked

72-1526 byte

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

14 byte
CB1e_3_Layer_2.831

10

Store and Forward In this mechanism a complete data packet (8 byte PA/SFD + 1518 byte) is read-in at a port and the header evaluated. Then a fault-free and valid packet is forwarded. If an error is detected the packet is rejected. Thus the delay is maximum 10 Mbit/s: 1,221 s 100 Mbit/s: 122 s 1000 Mbit/s: 12.2 s Cut-through In this mechanism an incoming data packet is read-in as far as the destination address. At that point the switch knows which port the packet has to be forwarded to. Only once the complete packet has been received can it be checked for errors. At that point part of the packet has already been sent at the sending port however. Erroneous packets and fragments are transported. The following latency times result for the various transfer rates: 10 Mbit/s: 20.8 s 100 Mbit/s: 2.08 s 1000 Mbit/s: 0.208 s Not contained are the delays caused by another packet, which is already in transmit process.

Notes:

Exercise: Address Table A B


Po rt 1
2 rt Po

Port 3

C
T4: 12:03
Port Address 1 2 3 Aging Timer

T1: 12:00
Port Address 1 2 3 Aging Timer

T2: 12:01
Port Address 1 2 3 Aging Timer

T3: 12:02
Port Address 1 2 3 Aging Timer

CB1e_3_Layer_2.831

11

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

Notes:

Starting point: The switch does not yet have an entry in the Forwarding Database 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.

Packet Filters

Data packet
ck et

Data packet

Data packet

Da t

pa

CB1e_3_Layer_2.831

12

Packets can be filtered by switches based on various criteria. Either data packets are forwarded based on defined criteria (Forward) or they are rejected (Discard). The packets can be filtered by specific destination or source addresses, by packet length and by protocol being transported. It is also possible to set a filter on any bits in a packet by way of a mask. Different criteria can be logically linked. These filters make sense, for example, in order to restrict broadcasts of specific protocols (e.g. IPX), to prevent unauthorized access to a network, or for packet analysis.

Notes:

Network Layer: IP Address and Network Mask


Network ID Host ID

IP address Network mask

192.168.0. 255.255.255.

136 0

Net ID Broadcast
CB1e_3_Layer_2.831

192.168.0. 192.168.0.
13

0 255

The IP address has a fixed length of 4 bytes. These 4 bytes are subdivided into the network ID and the host ID. The network and host IDs have variable sizes, defined by the network mask. The set bits ("1") of the network mask indicate the network ID; non-set bits ("0") indicate the host ID. Always the netmask belongs to the IP address! All existing terminal devices are in a network if they are physically interconnected (linked by hubs/switches) and the network IDs and network masks of all devices are identical. To reach all the hosts in a network, one IP address is reserved for broadcast. At this address all bits of the host ID are set ("1"). The IANA (www.iana.org) is responsible for the administration of the IP addresses and delivered the allocation to three regional organizations. To check a connection on layer 3 the ping operation of the ICMP (Internet Control Message Protocol) can be used: ping <ip address> [t] The extension -t creates an endless ping, to be stopped by ctrl+c.

Notes:

Appendix

CB1e_3_Layer_2.831

14

Notes:

Solution: Address Table A B


Po rt 1
r Po t2

Port 3

C
T4: 12:03
Port Address 1 2 3 A B C Aging Timer 2 min 4 min 5 min

T1: 12:00
Port Address 1 2 3 A Aging Timer 5 min

T2: 12:01
Port Address 1 2 3 A B Aging Timer 4 min 5 min

T3: 12:02
Port Address 1 2 3 A B Aging Timer 3 min 5 min

CB1e_3_Layer_2.831

15

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

Notes:

Starting point: The switch does not yet have an entry in the Forwarding Database 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.

Logical Link Control

Preamble SFD

Destination Source address address

Length

LLC

PDU

FCS

DSAP

SSAP Control

CB1e_3_Layer_2.831

16

Even where IEEE packets are used, the LLC information usually is not evaluated. Logical Link Control:
DSAP Destination Service Access Point SSAP Source Service Access Point Control = Type and Class of Service

Notes:

SAPs offer the facility in Ethernet to define which information is transported in the PDU field. 06h ARPANET Internet Protocol (IP) 42h IEEE 802.1 Bridge Spanning Tree Protocol E0h Novell NetWare F0h IBM NetBIOS Type of Service Type 1 Connectionless Type 2 Connection-oriented Type 3 Acknowledged connectionless Class of Service Class 1 Type 1 Class 2 supports type 1 and type 2 Class 3 supports type 1 and type 3 Class 4 supports type 1, type 2 and type 3 Layer 2 connection-oriented links are faster than layer 4 links.

Redundancy Techniques at Layer 2

CB1e_4_L2-Redundancies.831

Content: Spanning Tree & Rapid Spanning Tree Link Redundancy and Link Aggregation (Trunking) Industrial Ring Redundancy MRP

Notes:

For industrial use RSTP can be recommended only with some limitations, already mentioned in the 1998 edition of standard IEEE 802.1D: short-time loops, packet multiplication and no guaranteed maximum recovery time. In the current edition this sounds: The active topology will, with a high probability, stabilize within a short, known bounded interval,, s. IEEE 802.1D 2004, chapt. 17.1 c Thus ring redundancy methods usually are used. The new MRP protocol offers a fast (<1 s) ring redundancy, but without meshing. To use Link-Aggregation only for redundancy (point-to-point) usually is too expensive, but based on the bandwidth extension acceptable. Only for bandwidth extension its also not really cost effective, because the migration to the next faster technology (10 Mbit/s 100 Mbit/s 1000 Mbit/s) multiplies the bandwidth by 10 and cost only double.

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.

Two Stages of Redundancy


Whichever redundancy method is used, there are two stages Re-establish the physical connection Re-establish the logical connection

CB1e_4_L2-Redundancies.831

Notes:

Re-establishing Physical Communication PC1 A

PC2

CB1e_4_L2-Redundancies.831

Notes:

Re-establishing Logical Communication PC1 A


Learned Address Table Switch D

Device PC1 PC1

Path Port 1 Port 2

C
Port 1

Po rt

PC2

CB1e_4_L2-Redundancies.831

Notes:

Spanning Tree Algorithm (STA)

BC

CB1e_4_L2-Redundancies.831

By means of redundant links between the individual network 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.

Notes:

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
Port1 Port 2 Port 3 Port1

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

CB1e_4_L2-Redundancies.831

Each switch is uniquely described by its bridge ID. This ID is 8 bytes 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.

Notes:

STA and RSTP: Path Costs


Standard before 1998

Path cost to old standard:


1000 Path costs = performance capacity in Mbit/s Standard from 1998 to 2001

Data rate 10 Mbit/s 100 Mbit/s 1 Gbit/s 10 Gbit/s

Path costs 100 19 4 2

Standard since 2001

Data rate 10 Mbit/s 100 Mbit/s 1000 Mbit/s 10 Gbit/s


CB1e_4_L2-Redundancies.831

Recommended path costsRecommended range 2,000,000 200,000 20,000 2,000


7

200,000-20,000,000 20,000-2,000,000 2,000-200,000 200-20,000

Any connection between two switches incurs path costs. The aim of 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.

Notes:

Rapid Spanning Tree: Port States

DISCARDING

FORWARDING

LEARNING

CB1e_4_L2-Redundancies.831

The Rapid Spanning Tree standard (IEEE 802.1D-2004) was adopted 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.

Notes:

STA and RSTP: Port States


RSTP (802.1w) PortState Discarding Discarding Discarding Learning Forwarding IsPort Included InActive Topology? No No Yes Yes Yes IsPort Learning MAC Addresses? No No No Yes Yes

STA(802.1D) PortState Disabled Blocking Listening Learning Forwarding

CB1e_4_L2-Redundancies.831

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

Notes:

Rapid Spanning Tree: Port Roles


Root D D

R A

R B D

Alternate Port

Backup Port R C

CB1e_4_L2-Redundancies.831

10

In Rapid Spanning Tree each switch port is assigned one of the 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.

Notes:

Exercise: Rapid Spanning Tree


Switch 1
1 2 3

Switch 2
1 2 3

32768 00-80-63-04-05-01
4 5 6 4

32768 00-80-63-04-05-02
5 6

Switch 5
1 2 3

Switch 3
1 2 3

00000 00-80-63-04-05-05
4 5 6 4

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

Switch 4
1 2 3

32768 00-80-63-04-05-04
4 CB1e_4_L2-Redundancies.831 5 6

1 Gbit/s 100 Mbit/s

11

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

Notes:

Solution: see Annex of this presentation

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 should be full duplex This can be overridden

CB1e_4_L2-Redundancies.831

12

Notes:

New link is added between Root and A Link is placed in Discarding mode

X X
A

CB1e_4_L2-Redundancies.831

13

Notes:

Synch Operation R A blocks non-edge designated ports

X X
A

X
B

X
C D

CB1e_4_L2-Redundancies.831

14

Notes:

When non-edge ports are blocked, A asks the Root to put the new link into forwarding Network is now blocked below A

X
B

X
C D

CB1e_4_L2-Redundancies.831

15

Notes:

B and C then synch with A B only has edge ports, so it instructs A to open the link

X
B C D

CB1e_4_L2-Redundancies.831

16

Notes:

C blocks the non-edge port, and then instructs A to open the link Final result - loop blocked between C and D

CB1e_4_L2-Redundancies.831

17

Notes:

Link Aggregation (Trunking) IEEE 802.3ad

CB1e_4_L2-Redundancies.831

18

Link Aggregation, often colloquially named trunking, is part of 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!

Notes:

Media Ring Protocol IEC Standardized Ring

Redundancy manager
test packets

CB1e_4_L2-Redundancies.831

19

The concept of the MRP Ring is similar to the one of HIPER ring, nevertheless Notes: both ring types are not compatible to each other. Recovery time of a ring with up to 50 switches typically is 150 ms (maximum 500 ms). MRP in Basic mode uses test packets only for fault detection, MRP in Advanced mode use additional link states on devices in ring. Configuring the MRP-Ring dialog Redundancy MRP-Ring Set up the network to meet your requirements. Note: Before you connect the redundant line, you must complete the configuration of the MRP-Ring. You thus avoid loops during the configuration phase. At exactly one switch, you activate the redundancy manager. Ring ports must be configured either Fast Ethernet FDX or Gigabit Ethernet autoneg Note: When you use 100 Mbit/s and full-duplex with twisted pair cables, usually the autocrossing function is deactivated. You therefore use crossover cables. If a switch in the ring does not support the advanced mode for fast switching times, you deactivate the advanced mode in the redundancy manager. All Hirschmann switches that support the MRP-Ring also support the advanced mode. Note: Deactivate the Spanning Tree protocol for the ports connected to the redundant ring, because Spanning Tree and ring redundancy work with different reaction times. Note: If VLANs are configured (VLAN ID >0) at ring ports then the ring ports of all switches must belong to the same VLAN and forward frames untagged (egress table).

Exercise: Redundancies
Redundancies Backup port IEEE 802.3ad Logical link

Physical link

Bridge ID

Designated port 802.1D RSTP Port states Trunking

Root path costs

Root port Forwarding Discarding


CB1e_4_L2-Redundancies.831

Alternate port

20

Assign the following terms to logically related groups.

Notes:

Solution: see annex of this presentation

Appendix

CB1e_4_L2-Redundancies.831

21

Notes:

Exercise: Spanning Tree


Switch 1
1 2

DP
3

Switch 2
1

RP
2 3

32768 00-80-63-04-05-01
4 5 6

32768 00-80-63-04-05-02

RP
Switch 5
1 2

DP
Switch 3
1

DP

00000 00-80-63-04-05-05
4 5 6 4

32768 00-80-63-04-05-03

Switch 4
1 2

RP DP
3

RP

32768 00-80-63-04-05-04
4 CB1e_4_L2-Redundancies.831 5 6

100 Mbit/s 10 Mbit/s

22

First define the Root Bridge. 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 0, 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

Notes:

Exercise solution: Redundancies


Redundancies

RSTP 802.1D Port states Root port Designated port Alternate port Backup port
CB1e_4_L2-Redundancies.831

Trunking IEEE 802.3ad Forwarding Discarding Physical link Logical link

Bridge ID Root path costs

23

Assign the following terms to logically related groups.

Notes:

Redundancy Techniques at Layer 2

CB1e_4_L2-Redundancies.831

Content: Spanning Tree & Rapid Spanning Tree Link Redundancy and Link Aggregation (Trunking) Industrial Ring Redundancy MRP

Notes:

For industrial use RSTP can be recommended only with some limitations, already mentioned in the 1998 edition of standard IEEE 802.1D: short-time loops, packet multiplication and no guaranteed maximum recovery time. In the current edition this sounds: The active topology will, with a high probability, stabilize within a short, known bounded interval,, s. IEEE 802.1D 2004, chapt. 17.1 c Thus ring redundancy methods usually are used. The new MRP protocol offers a fast (<1 s) ring redundancy, but without meshing. To use Link-Aggregation only for redundancy (point-to-point) usually is too expensive, but based on the bandwidth extension acceptable. Only for bandwidth extension its also not really cost effective, because the migration to the next faster technology (10 Mbit/s 100 Mbit/s 1000 Mbit/s) multiplies the bandwidth by 10 and cost only double.

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.

Two Stages of Redundancy


Whichever redundancy method is used, there are two stages Re-establish the physical connection Re-establish the logical connection

CB1e_4_L2-Redundancies.831

Notes:

Re-establishing Physical Communication PC1 A

PC2

CB1e_4_L2-Redundancies.831

Notes:

Re-establishing Logical Communication PC1 A


Learned Address Table Switch D

Device PC1 PC1

Path Port 1 Port 2

C
Port 1

Po rt

PC2

CB1e_4_L2-Redundancies.831

Notes:

Spanning Tree Algorithm (STA)

BC

CB1e_4_L2-Redundancies.831

By means of redundant links between the individual network 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.

Notes:

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
Port1 Port 2 Port 3 Port1

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

CB1e_4_L2-Redundancies.831

Each switch is uniquely described by its bridge ID. This ID is 8 bytes 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.

Notes:

STA and RSTP: Path Costs


Standard before 1998

Path cost to old standard:


1000 Path costs = performance capacity in Mbit/s Standard from 1998 to 2001

Data rate 10 Mbit/s 100 Mbit/s 1 Gbit/s 10 Gbit/s

Path costs 100 19 4 2

Standard since 2001

Data rate 10 Mbit/s 100 Mbit/s 1000 Mbit/s 10 Gbit/s


CB1e_4_L2-Redundancies.831

Recommended path costsRecommended range 2,000,000 200,000 20,000 2,000


7

200,000-20,000,000 20,000-2,000,000 2,000-200,000 200-20,000

Any connection between two switches incurs path costs. The aim of 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.

Notes:

Rapid Spanning Tree: Port States

DISCARDING

FORWARDING

LEARNING

CB1e_4_L2-Redundancies.831

The Rapid Spanning Tree standard (IEEE 802.1D-2004) was adopted 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.

Notes:

STA and RSTP: Port States


RSTP (802.1w) PortState Discarding Discarding Discarding Learning Forwarding IsPort Included InActive Topology? No No Yes Yes Yes IsPort Learning MAC Addresses? No No No Yes Yes

STA(802.1D) PortState Disabled Blocking Listening Learning Forwarding

CB1e_4_L2-Redundancies.831

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

Notes:

Rapid Spanning Tree: Port Roles


Root D D

R A

R B D

Alternate Port

Backup Port R C

CB1e_4_L2-Redundancies.831

10

In Rapid Spanning Tree each switch port is assigned one of the 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.

Notes:

Exercise: Rapid Spanning Tree


Switch 1
1 2 3

Switch 2
1 2 3

32768 00-80-63-04-05-01
4 5 6 4

32768 00-80-63-04-05-02
5 6

Switch 5
1 2 3

Switch 3
1 2 3

00000 00-80-63-04-05-05
4 5 6 4

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

Switch 4
1 2 3

32768 00-80-63-04-05-04
4 CB1e_4_L2-Redundancies.831 5 6

1 Gbit/s 100 Mbit/s

11

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

Notes:

Solution: see Annex of this presentation

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 should be full duplex This can be overridden

CB1e_4_L2-Redundancies.831

12

Notes:

New link is added between Root and A Link is placed in Discarding mode

X X
A

CB1e_4_L2-Redundancies.831

13

Notes:

Synch Operation R A blocks non-edge designated ports

X X
A

X
B

X
C D

CB1e_4_L2-Redundancies.831

14

Notes:

When non-edge ports are blocked, A asks the Root to put the new link into forwarding Network is now blocked below A

X
B

X
C D

CB1e_4_L2-Redundancies.831

15

Notes:

B and C then synch with A B only has edge ports, so it instructs A to open the link

X
B C D

CB1e_4_L2-Redundancies.831

16

Notes:

C blocks the non-edge port, and then instructs A to open the link Final result - loop blocked between C and D

CB1e_4_L2-Redundancies.831

17

Notes:

Link Aggregation (Trunking) IEEE 802.3ad

CB1e_4_L2-Redundancies.831

18

Link Aggregation, often colloquially named trunking, is part of 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!

Notes:

Media Ring Protocol IEC Standardized Ring

Redundancy manager
test packets

CB1e_4_L2-Redundancies.831

19

The concept of the MRP Ring is similar to the one of HIPER ring, nevertheless Notes: both ring types are not compatible to each other. Recovery time of a ring with up to 50 switches typically is 150 ms (maximum 500 ms). MRP in Basic mode uses test packets only for fault detection, MRP in Advanced mode use additional link states on devices in ring. Configuring the MRP-Ring dialog Redundancy MRP-Ring Set up the network to meet your requirements. Note: Before you connect the redundant line, you must complete the configuration of the MRP-Ring. You thus avoid loops during the configuration phase. At exactly one switch, you activate the redundancy manager. Ring ports must be configured either Fast Ethernet FDX or Gigabit Ethernet autoneg Note: When you use 100 Mbit/s and full-duplex with twisted pair cables, usually the autocrossing function is deactivated. You therefore use crossover cables. If a switch in the ring does not support the advanced mode for fast switching times, you deactivate the advanced mode in the redundancy manager. All Hirschmann switches that support the MRP-Ring also support the advanced mode. Note: Deactivate the Spanning Tree protocol for the ports connected to the redundant ring, because Spanning Tree and ring redundancy work with different reaction times. Note: If VLANs are configured (VLAN ID >0) at ring ports then the ring ports of all switches must belong to the same VLAN and forward frames untagged (egress table).

work with

CB1e_4_L2-Redundancies.831

20

Notes:

Rail Operating voltage

Redundant operating voltage Sense contact


This alarm contact can be used to trigger an external device

CB1e_4_L2-Redundancies.831

21

Notes:

HIPER ring

-----

MRP
0 1

Line structure

2 3 4 5 6 7 8 9

ring structure
redundant link

FDX, Autonegotiation off


CB1e_4_L2-Redundancies.831

22

Notes:

Lets start with four areas of a typical industrial Ethernet network.

0 Production line 3 Process control 1 2 3 4 5 6 7 8 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

23

Notes:

Is this network secure enough ?

ATTENTION If only one of the three backbone connections fails, at least one area will be disconnected.
0 1 2 3 4 5 6 7 8 9

Production line 3

Process control

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

24

Notes:

Creating a redundant ring prevents loss of communication if one connection fails.

Production line 3

Process control

0 1 2 3 4 5 6 7 8 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

25

Notes:

Permanent monitoring by watchdog packets


The Ring Manager sends out watchdog packets (every 20ms) Production the to test the integrity ofline 3ring.
Process control

0 1 2 3 4 5 6 7 8 Ring Manager 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

26

Notes:

Permanent monitoring by watchdog packets


In normal conditions, when no error has occured, no data packet is transmitted over the redundant connection. Production line 3 Only watchdog packets are forwarded.
Process control 0 1 2 3 4 5 6 7 Ring Manager 8 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

27

Notes:

Permanent monitoring by watchdog packets


If the Ring Manager doesnt receive the watchdog packets, it immediately Production line 3 activates the redundant connection to establish the communication. If more than 10 packets are lost.

0 1 2 Process control 3 4 5 6 7 link activ in 30ms Ring Manager ACTIVE 8 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

28

Notes:

Permanent monitoring by watchdog packets


The Ring Manager send now also the information to all attached switches, Production should canceled that they line 3 their MAC-address list at once!

0 1 Process control 2 3 4 5 6 Ring Manager ACTIVE 7 8 9

Production line 2 Production line 1


CB1e_4_L2-Redundancies.831

29

Notes:

Functionality of a switch

MAC Address-list Port 1 Port 2 Port 3 Port 4 Port 5 PC 1 RC 11 PLC 2 MC 20 PLC 1 RC 12 RC 13


From PC 1

To PLC 2

P3 P1 P2
From PC 1

PC 1

P5 P4

To PLC 2

PLC 2 PLC 1 MC 20 RC 11 RC 12 RC 13

CB1e_4_L2-Redundancies.831

30

Notes:

Hirschmann - HIPER-Ring structure


0

Hirschmann HiPER-Ring Structure

1 2 3 4 5 6 7 8 9

Optimized interaction of all product families Ring Manager inside Fast learning in a ring is guaranteed by sending of clear address table messages Reconfiguration time typ. 200 ms/ 10 ms Reduction of machine downtimes cost saving Exchange of devices and network extension is possible during operation Simple and clear topology Up to 100 switches in a ring Plug & Work (without management)

CB1e_4_L2-Redundancies.831

31

Notes:

Redundant Ring Coupling


Objectives
Connection of HIPER Ring networks with fast recovery Connection of a HIPER Ring to other networks with slower recovery

HIRSCHMANN

HIRSCHMANN

HIRSCHMANN

HIRSCHMANN

CB1e_4_L2-Redundancies.831

32

Notes:

Redundant Ring Coupling


Advantages
Predictable recovery times
Average 250ms

Simple to implement Compensates for two faults in a HIPER Ring

Disadvantages
Proprietary

CB1e_4_L2-Redundancies.831

33

Notes:

Subrings
integrated in MACH1000- and RSR - family

Overview
RM SRM

Basis-Ring

Sub-Ring

SRM

2 Sub-Ring Manager (SRM) per Sub-Ring


SRM observes only the associated Sub-Ring MRP supported in Sub-Ring

CB1e_4_L2-Redundancies.831

34

Notes:

Topology

RM

SRM1

Basis-Ring
SRM2

Sub-Ring 1
SRM2

SRM1

Sub-Ring 2

CB1e_4_L2-Redundancies.831

35

Notes:

Topology
SubRing SubRing
RM

SRM

Basis-Ring
SubRing

Sub-Ring

SRM

SubRing

SubRing

CB1e_4_L2-Redundancies.831

36

Notes:

Topology

RM

SRM

Basis Ring
SRM SRM

Sub Ring

SRM

Sub Ring

CB1e_4_L2-Redundancies.831

37

Notes:

Topology
RM SRM SRM

Basis-Ring
SRM SRM

CB1e_4_L2-Redundancies.831

38

Notes:

Topology
RM

Basis-Ring
SRM SRM

CB1e_4_L2-Redundancies.831

39

Notes:

Restriction

Max. SRM instances:

Devices:
05.0.00 RSR, MACH1000 05.1.00 MACH1000GE, MACH4002xgL3P 06.0.00 PowerMICE, MACH4002
CB1e_4_L2-Redundancies.831

40

Notes:

Fast HIPER Ring


Objective
Creation of resilient ring structure

CB1e_4_L2-Redundancies.831

41

Notes:

Fast HIPER Ring


Advantages
Predictable recovery times
10ms with 10 switches 40ms with 100 switches 60ms with 200 switches

Theoretical limit of 20,460 switches in a ring

Disadvantages
Proprietary Only tolerates a single fault

CB1e_4_L2-Redundancies.831

42

Notes:

Exercise: Redundancies

Redundancies

Backup port IEEE 802.3ad Logical link

Physical link

Bridge ID

Designated port 802.1D RSTP Port states Trunking

Root path costs

Root port Forwarding Discarding


CB1e_4_L2-Redundancies.831

Alternate port

43

Assign the following terms to logically related groups.

Notes:

Solution: see annex of this presentation

Appendix

CB1e_4_L2-Redundancies.831

44

Notes:

Exercise: Spanning Tree


Switch 1
1 2

DP
3

Switch 2
1

RP
2 3

32768 00-80-63-04-05-01
4 5 6

32768 00-80-63-04-05-02

RP
Switch 5
1 2

DP
Switch 3
1

DP

00000 00-80-63-04-05-05
4 5 6 4

32768 00-80-63-04-05-03

Switch 4
1 2

RP DP
3

RP

32768 00-80-63-04-05-04
4 CB1e_4_L2-Redundancies.831 5 6

100 Mbit/s 10 Mbit/s

45

First define the Root Bridge. 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 0, 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

Notes:

Exercise solution: Redundancies


Redundancies

RSTP 802.1D Port states Root port Designated port Alternate port Backup port
CB1e_4_L2-Redundancies.831

Trunking IEEE 802.3ad Forwarding Discarding Physical link Logical link

Bridge ID Root path costs

46

Assign the following terms to logically related groups.

Notes:

Traffic Control at Layer 2

CB1e_5_L2-TrafficControl.831

Content: Restricting Broadcasts Flow Control Quality of Service (IEEE 802.1D and Q) Prioritization Virtual LANs (VLAN)

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.

Restricting Broadcasts
Broadcasts

Broadcasts

Broadcasts

CB1e_5_L2-TrafficControl.831

A switch operating on Physical and Data Link Layer only is transparent for higher-level protocols of the Network Layer (e.g. IP, IPX). Thus a broadcast generated by a Network Layer protocol is also sent as an Ethernet broadcast to all the stations in the LAN. To relieve the load on the LAN, there are a range of ways to restrict these broadcasts. The Broadcast Limiter enables the switch to send only a defined number of broadcasts per second at an output port. The remaining broadcasts are discarded. The local network can be subdivided into so-called virtual LANs (VLANs). By this technique a broadcast is no longer distributed across the entire LAN, but only in the virtual LAN in which the broadcast was generated. The use of routers enables a local network to be split into multiple local networks. Alongside routing, the function of a router is also to forward no broadcasts to another network. The router will generate a new broadcast in a connected network as required. At each router port there is a so-called broadcast domain.

Notes:

Flow Control
A
90 %

to

130% to D

B
80%

20% to D
to D

% 20

85 %

to

130% to D

B
40%

5% to D
D

5%

to

CB1e_5_L2-TrafficControl.831

If data is sent from multiple stations to one port, the port may be overloaded. As a consequence, data packets may be lost. The flow control mechanism in IEEE 802.3 (former .3x) prevents this by telling the next transmitting device (switch, hub, or the generating end device) in a line to wait for a certain time. In half-duplex mode this is activated by simulation of a collision. Caution: "Wandering backpressure" phenomenon which causes an undesirable affect to communications between nodes B and C.

Notes:

Ethernet Frame With Tag

Destination Source Address Address

ET PID

TCI

Type / Length

Data

FCS

CB1e_5_L2-TrafficControl.831

With the success of Ethernet in local networks, data volumes in those networks have also increased substantially. As a result, two functions have been added to Ethernet. Firstly, the data packets 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

Notes:

Quality of Service (IEEE 802.1D and Q)


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

high

Attention:
Priority 0 is higher than priority 1 and 2!
CB1e_5_L2-TrafficControl.831

As a result of the tag field being added to the Ethernet frame, the 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).

Notes:

QoS: Assigning Priority to Queue


Default configuration in practice:
Avail. queues user_prio 1 2 0 (default) 3 4 5 6 7 2 4 8 0 1 2 3 4 5 6 7

0 0 1 2 1 3

high

CB1e_5_L2-TrafficControl.831

Queues are named as Traffic Classes by the standard. The smaller 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 packet with priority 3 joins queue 1 of 4 available queues

Notes:

QoS: Concepts to arbitrate Queues


Priority-Scheduling (Starve or Strict) Round-Robin-Scheduling Weighted-Fair-Queuing WFQ
Maintenance Voice Supervision

Control

Control Supervision Voice Maintenance


CB1e_5_L2-TrafficControl.831

Priority 6 5 3 1

Priority-Scheduling (Starve or Strict) Queues arbitrated according to priority Disadvantage: high-priority queues can block low-prioritized ones, no transmission guarantee possible Round-Robin-Scheduling Frequency of access (bandwidth) respective of priority, e.g.: Prio 7: 50 %, Prio 6: 20 %, Prio 5: 10 %, ... Weighted-Fair-Queuing WFQ bandwidth division with additional consideration of frame length

Notes:

Exercise
Using an analyser, you capture a frame with the Tag value: 81:00:a0:36 (Hex-Code) What does this Tag mean? ______________________________ ______________________________ ______________________________

CB1e_5_L2-TrafficControl.831

Notes:

Solution: Prio 5, VLAN 54

Physical LAN

CB1e_5_L2-TrafficControl.831

Notes:

Virtual LANs

CB1e_5_L2-TrafficControl.831

10

Definition of a VLAN 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 absolutly clear: VLANs offer only low security, also with proprietary solutions such as Ciscos private VLAN. If overlapping groups are used - what this is youll see later - then this might be an advantage for end devices, but not for centrally connected servers and other components, because these receive (have to) the broadcasts of all the groups. VLANs are defined in the standards IEEE 802.1D (Bridging), .1Q (port based) and .1v (Layer 3 protocol based).

Notes:

Multiple VLANs per Switch


HIRSCHMANN HIRSCHMANN

CB1e_5_L2-TrafficControl.831

11

Notes:

Management VLAN
HIRSCHMANN HIRSCHMANN

CB1e_5_L2-TrafficControl.831

12

Notes:

Different VLANs
VLANs layer 1: port-based (IEEE 802.1Q) VLANs layer 3: protocol based (IEEE 802.1v)

CB1e_5_L2-TrafficControl.831

13

Today's switches usually offer port-based VLANs according to standard. L3 VLANs - even with a standard - are rarely used, because routing is more attractive after its now reasonably priced. L3 VLANs protocol based distinguish between the protocols, e.g. IP, IPX, ... and limit each to its VLAN L2 (MAC address based) and L4 VLANs - even interesting by their idea - are not demanded. Combined VLANs are not used anymore due to their complexity in programming and troubleshooting. Therefore you learn now about L1 VLANs. Information about the others youll find in the appendix.

Notes:

11

VLANs Layer 1 (Port Based)

CB1e_5_L2-TrafficControl.831

14

Advantages: very easy to configure protocol independent best performance low cost solution

Notes:

VLANs Layer 1 (Port Based)

CB1e_5_L2-TrafficControl.831

15

By tagging the next switch can assign the packets to the respective VLANs (ports). Without tagging one needs for every VLAN a specific connection between the switches.

Notes:

VLANs: Tagging
1 2 3 4 5 6

VLAN2 Switch 1 Ingress Station A B C D Uplink Port 1 2 3 4 5 6 PVID 2 2 N/A 3 3 N/A

VLAN3 Switch 1 Egress VID Port 1 2 3 4 5 6 2 U U M 3 U U M

CB1e_5_L2-TrafficControl.831

16

Port based VLANs are standardized to IEEE 802.1Q. The 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 is to be sent with a tag field (M = tagged) or without (U = Untagged) at the port in question.

Notes:

VLANs: Tagging
1 2 3 4 5 6 1 2 3 4 5

VLAN2

VLAN3

VLAN2

VLAN3

Switch 2 Ingress Station Port PVID Uplink 1 N/A E 2 2 F 3 2 G 4 3 H 5 3


CB1e_5_L2-TrafficControl.831

Switch 2 Egress VID Port 1 2 3 4 5 2 M U U 3 M U U

17

Notes:

VLANs: Overlapping
1 2 3 4 5 6

B VLAN4

VLAN2

VLAN3 Switch 1

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

Egress VID Port 1 2 2 U U 3 4 U U

3 4 5 6 U U U U U U U

CB1e_5_L2-TrafficControl.831

18

Shall devices from two VLANs have access to a server, you get mathematically spoken - a cut set like its shown in the slide. The device of the cut set belongs not to two VLANs! The cut set itself is a separate VLAN. This process is explained in the annex B1.3 of IEEE 802.1Q Below the mechanism is explained: 1. A packet of station A is received at port 1 and thus is marked by tag according to the ingress rules with Port-VLAN-ID 2. 2. The packet - now belonging to VLAN 2 - is forwarded according to the egress rules. Of course an entry in the FDB is taken into account before the final transmission at a port.

Notes:

GARP VLAN Registration Protocol

Switch 1 1 2 3 4 5 6

Switch 2 1 2 3 1 2

Switch 3 3 4 5

VLAN2

VLAN3

VLAN2

VLAN3

CB1e_5_L2-TrafficControl.831

19

The GARP VLAN Registration Protocol, GVRP, is 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 packet 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 packets with this Tag are transmitted at the port.

Notes:

Exercise: VLAN
Switch 1 3 4 5

VLAN 3 VLAN 2 Switch 2 3 4 5

VLAN 2
CB1e_5_L2-TrafficControl.831

VLAN 4

20

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

Notes:

Appendix

CB1e_5_L2-TrafficControl.831

21

Notes:

Solution VLAN Exercise


Switch 1 3 4 5

VLAN 3 VLAN 2 Switch 2 3 4 5

VLAN 2
CB1e_5_L2-TrafficControl.831

VLAN 4

22

Construct the Ingress and Egress tables for the two switches in the above example. Switch 1: Ingress Port 1 2 3 4 5 6 VLAN ID 2 2 2 arbitrary 3 3 Egress VLAN ID 1 2 3 4 1 U 2 U 3 U 4 M M M 5 U 6 U -

Notes:

Switch 2: Port 1 2 3 4 5 6 VLAN ID arbitrary" 2 2 1 4 4 VLAN ID 1 2 3 4 1 M M M 2 U 3 U 4 5 U 6 U

Example Tagging

Printscreen with NetXRay:


8100 = ET-PID 2 = Prio 1 aab = VLAN 2731 2dez = 0010 001 = Prio 0 = Canonical Form.I.

CB1e_5_L2-TrafficControl.831

23

Notes:

Network Management

CB1e_6_NM.831

Content: Exercise: Network Management What can you do with Network Management? Managers and Agents SNMP Messages Traps Relieve Network and Management Station Capacity Network Management Classification to ISP MIB Events in the network OPC

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.

Communication: Manager and Agents


NMS
AGENT MANAGER

MIB

MIB MIB

MP SN
MIB

AGENT

AGENT

Workstation

AGENT
MIB

Router
AGENT

Hub

Switch

MIB Management Information Base NMS Network Management Station SNMP Simple Network Management Protocol
CB1e_6_NM.831

A network management system consists of 3 main components: Agent in network device collects data about status, performance and faults and provides this data to Network Management Station configures device Network Management Station NMS collects data from all agents using Polling receives alarm messages from agents central control and visualization of device states central configuration Simple Network Management Protocol SNMP for communication between Agents and NMS SNMPv1 does not use encryption and for example transmits the community (like password) in plain text SNMPv3 offers authentication. To access data of the agents the NMS needs to know their functionality, i.e. existing parameters and the way to address them. The parameters and their implementation are listed in the respective Management Information Base MIB. A NMS must know the MIBs of the agents. Usually an agent has several MIBs, some standardized, some private, which access a specific agent type of a manufacturer.

Notes:

SNMP Operations Agent


GET REQUEST GET NEXT REQUEST SET REQUEST

GET RESPONSE GET RESPONSE SNMPv1 GET RESPONSE TRAP

GET Bulk REQUEST

RESPONSE Inform REQUEST Report


3

RESPONSE Report
CB1e_6_NM.831

additionally at SNMPv2c

SNMP belongs to the TCP/IP protocol family and uses the connectionless protocol UDP. SNMP sends frames to the agents UDP port 161 and traps to the managers port 162. Information is regularly requested from the Agents by the Manager. This is done with Get Requests and is called Polling. If in the meantime a critical situation occurs the Agent can send an alarm message called Trap to the Manager. A GET REQUEST asks for a single parameter of an agent. With the GET NEXT REQUEST further information the next parameter value can be requested. A SET REQUEST of the manager changes a parameter value of the agent. The agent acknowledges it. Response is the answer of the agent to a request or a set command. (v1 till v3) In SNMPv1 this is called a Get Response. SNMPv2c provides an expanded command set: With the GET Bulk REQUEST multiple items of information can be requested in one packet. The Inform REQUEST is used to exchange information between two network management stations or as an acknowledged trap. The Report allows SNMP-compatible devices to communi-cate with each other. E.g. a station can transmit that during processing an incoming message an error occurred.

Notes:

Traps Relieve Network and Management Station Capacity

Load

Without traps: Time

Load

Traps

Special polling After trap

Regular polling

With traps: Time

Load

With gauges:
Traps

Time
CB1e_6_NM.831

Without traps All defined attributes of each agent must be regularly and frequently polled. With traps: The agent signals events immediately by alarms. ( Reduces polling to a minimum) Traps are sent to the management stations UDP port 162. With gauges: The agent itself monitors custom-configured threshold values. (No polling data, only traps) Please note: SNMP uses the connection-less transport protocol UDP. There is no supervision of the connection. Because a trap is not acknowledged information can get lost by interferences.

Notes:

Network Management Classification to ISO

Configuration management Performance management Error management Security management

Accounting management

CB1e_6_NM.831

Some functions cannot be sorted into one of these classes, thus additional classes are generated in practise or they are assigned to one of the mentioned ones.

Notes:

Solution: Detect and optimize net structures, detect and find bottlenecks, avoid interference and failures, manage investments right, shorten trouble-shooting, reduce costs and thus save money!

CB1e_6_NM.831

Name the key points for which network management is important.

Exercise: Network Management

Notes:

MIB 2 branch
1 iso 3 org 6 dod 1 internet 2 mgmt 1 system 2 interfaces 3 at 4 ip 5 icmp 10 transmission 7 Ethernet like ... 15 fddi 16 rmon
CB1e_6_NM.831

1 mib II

1 statistics 2 history
7

A lot functions are standardized and thus offered by public MIBs. The MIB 2 is the most important public MIB offering RMON for Remote MONitoring, i.e. troubleshooting by analyzing received packets. Manufacturer specific functions are defined in private MIBs. A MIB is noted in ASN.1 (Abstract Syntax Notation.One) and thus readable in plain text. Usually each MIB object offers also a detailed description. Each managed object has as address for access: the Object ID OID and the Object Description, a reversibly unambiguous name.

Notes:

RMON MIB RFC 1757


Group
1 statistics 2 history 3 alarm 4 host 5 host TopN 6 matrix 7 filter 8 packetcap 9 event

Meaning
Network statistics counter time interval monitoring threshold monitoring Host supervising Top N of Host table traffic relations defined frames trigger event store defined frames triggering and logging of defined events

CB1e_6_NM.831

9 RMON groups exist For network components the groups 1-3 and 9 are important, the others are for analyzer Some devices support only RMON 1 or RMON 1 and 2. Thus they dont support alarms! Group 3 needs group 9 and vice-versa.

Notes:

RMON Statistics Counters


etherStatsDropEvents etherStatsOctets: counted bytes etherStatsPkts: counted packets etherStatsBroadcastPkts: counted broadcasts etherStatsMulticastPkts: counted multicasts etherStatsCRCAlignErrors: counted CRC and alignment faults etherStatsUndersizePkts: packets smaller than 64 bytes etherStatsOversizePkts: packets larger than 1518 bytes etherStatsFragments: short frames with ALE/FCS error, etherStatsJabbers, etherStatsCollisions, etherStatsPkts64Octets, etherStatsPkts65to127Octets, etherStatsPkts128to255Octets, etherStatsPkts256to511Octets, etherStatsPkts512to1023Octets, etherStatsPkts1024to1518Octets
CB1e_6_NM.831

The name of managed objects must be unique. The consequence is a cryptic naming on first sight. DropEvents: number of events in which packets were dropped by the probe (agent or analyzer) due to lack of resources Attention: not number of packets dropped! Octets: all bytes received - of bad and good frames

Notes:

Question: How about counted unicasts? RMON statistics only include received values.

Answer: packets - BCs - MCs = UCs

Frame and Error on Layers 1 and 2

PA
7 5.6

SFD
1 0.8 0

DA
6 4.8 4.8

SA
6 4.8 9.6

T/L
2 1.6 11.2

Data
46 - 1500 36.8 - 1200

FCS
4 3.2 48 1211.2 Oct. s

51.2 - s 1214.4

SP

SHEV

RNT 8 - 56 s SF < 64 oct. after SFD IFG < 4.7 s

FRG

LC

0.7 - 8 s 0.02 - 0.7 s - 24 bits PL

56 - 1220 s > 1,229 ms

FCS

PF

CB1e_6_NM.831

10

The time values given in the slide are based on 10 Mbit/s. At 100 Mbit/s the dot must be moved one digit to the left. If an event is registered counted as spike (SP), short event (SHEV), runt (RNT), fragment (FRG) or long carrier (LC) only depends on its length and that its not detected as a damaged frame. Between two packets there must be a gap Inter Frame Gap or Inter Packet Gap of 12 byte.

Notes:

LLDP Link Layer Discovery Protocol (IEEE 802.1AB)

CB1e_6_NM.831

11

LLDP is a protocol on LLC layer (2b). Information exchange among neighbors and NMS Chassis ID Port ID TTL Optional information elements Optional for end devices, switches, etc. Each device transmits every 30 s its info on all its LLDP enabled ports. A LLDP packet is labeled by its type field info 88:CC and multicast destination address 01:80:C2:00:00:0E.

Notes:

Exercise Network Management 2 (optional)


Check the statistics of your computer with DOS command netstat-es. Configure the switch port your computer is connected to FDX. What will happen? Your computer: _____________________________________ Switch port: ________________________________________ Produce network load and afterwards check the event counters! What do you recognize? __________________________________________ __________________________________________

CB1e_6_NM.831

12

Notes:

Solutions: a) netstat s displays statistics of the TCP/IP-Stacks, but not the one of Ethernet. b) End device (autonegotiation) configures itself automatically to HDX and to the same speed like the switch port. At high network load at the FDX port CRC errors occur while at the HDX device Late Collisions will be detected.

SNMP and OPC

SNMP Management (HiVision) SNMP SNMP SNMP

SNMP

SNMP/OPC OPC OPC Gateway Server (HiControl)

Visualization System (SCADA) OPC Client OPC OPC

SNMP SNMP SNMP Agent Agent Agent (RS20) (MACH) (...)

OPC OPC Server Server (Actuator) (Sensor)

CB1e_6_NM.831

13

In the area of fieldbusses the communication between systems and control room with its SCADA system usually is done by OPC. Openness Productivity and Connectivity, former named OLE for Process Control, offers a simple possibility to embed parameters of devices into software. The difficulty doing this is that OPC is based on OLE (DCOM) and thus on the Microsoft world. Many controllers and SCADA systems, based on LINUX or UNIX therefore offer own solutions. OPC server (s. SNMP agents) provide information for an OPC client. Its normal that several OPC clients access simultaneously one OPC server. Supervisory Control And Data Acquisition offers a slightly different monitoring and control. At SCADA its normal to influence devices during operation while in data networks intervention is usually only in case of a failure observed. Hirschmann has implemented OPC servers into their SNMP management shells supporting a SCADA system with status information and traps via tags.

Notes:

OPC Functions
OPC DA - Data Access
Similar to SNMP polling

OPC A & E - Alarm and Events


Similar to SNMP Traps

OPC DX - Data Exchange


Gateway

CB1e_6_NM.831

14

Controllers originally talk their own language, like EtherNet/IP, PROFInet, etc. The idea of OPC was to develop a common second language supported by all. Because no manufacturer went to support OPC they do as less as possible not to be compatible with competitors devices and thus not to be replacable. Currently only Iconics support A&E, because this is not important according to the view of SCADA users. All devices constantly are polled, thus a status change will be recognized soon. OPC DX is relatively new, a software gateway between noncompatible devices, e.g. between a Rockwell PLC and a Mitsubishi PLC. OPC is based on Microsofts COM/DCOM. With OPC-UA, OPC Unified Architecture, the successor based on XML already is available. OPC-UA merges the single OPC functions. Also OPC-UA is independent of OLE and thus of Microsoft. As a result OPC-UA can be supported by Linux systems.

Notes:

Typical Tags
Digital I/O Analogue I/O Message I/O Calculations / Process Variables Timers Statistical control functions / Exceptions Alarms

CB1e_6_NM.831

15

A tag can be compared to a Managed Object of SNMP. But with a focus on a good readability of the names. In comparison to SNMP OPC offers the possibility to calculate new parameter by old ones. This offers a large flexibility. The protocol under OPC is DCOM, which runs under Windows only. A difficulty is the communication across firewalls, for which special tunneling SW is offered.

Notes:

Appendix

CB1e_6_NM.831

16

Notes:

SNMPv3
Framework modular concept Security
User Security Model USM Authentication with MD5 or SHA-1 Encryption with CBC-DES View-based Access Control ModelVACM

CB1e_6_NM.831

17

With SNMPv2 new 64 bit counter were introduced and the frame format was changed slightly. SNMPv2 wasnt used widely because of the missing security functionality. SNMPv3 introduced security functions to protect against Manipulation of information Replay Spoofing Sniffing privacy integrity

Notes:

Fault Causes possible reason Display


ALE CD CDLA CDLO CDSH CRC FRG IFG LC LL/S PL RNT SF SHEV
CB1e_6_NM.831

Alignment Error Collision Detection Collision Detection Late Collision Detection Long Collision Detection Short Cyclic Redundancy Check Error Fragment Inter Frame Gap Error Long Carrier Low Light / Segmentation Preamble Loss Runt Short Frame Short Event / Spike

18

This table is based on experience. Today one of the most frequent faults you find in the last column. In today's switched networks on layer 1 dominate at simple problems EMI, autonegotiation, jitter. The most frequent fault is the combination HDX with FDX due to Autonegotiation/Parallel Detection, where at the FDX side unusual many CRC/ALE errors are detected. The HDX port counts between the usual looking CDs a lot of CD-LA (not a RMON counter). Collision Short: Collision shorter than Jam size. After detection of a collision both stations must transmit at least 32 BT before interrupting transmission.

Regular collision product Faulty LAN Controller / Transceiver Faulty Repeater / Starcouppler Too many Repeater Network diameter too large EMI - ElectroMagnetic interference Hubcascading to many Jitter / Wiring weaknesses Autonegotiation problem x x x x x x x x x x x (x) x x x x x x x x (x) x x x x x x x x x x x x x x x x x x x x x x (x) x x x x x x x

Notes:

Acronyms
ASN.1 CRC FCS HTTP IAB ICMP IEEE IETF IFG IP ISO MAC Abstract Syntax Notation No. 1 Cyclic Redundancy Check Frame Check Sequence HyperText Transfer Protocol Internet Activity Board Internet Control Message Protocol Institute of Electrical and Electronics Engineers Internet Engineering Task Force Inter Frame Gap Internet Protocol International Organization for Standardization Medium Access Control PDU RFC RMON SA SFD SNMP TFTP UDP MIB NMS OPC Management Information Base Network Management Station Openness, Productivity, Connectivity former: OLE for Process Control Protocol Data Unit Request For Comment Remote Monitoring Source Address Start Frame Delimiter Simple Network Management Protocol Trivial File Transfer Protocol User Datagram Protocol

CB1e_6_NM.831

19

Notes:

S-ar putea să vă placă și