Unsynchronized Networks Peter Puschner, Institut für Technische Informatik Wilfried Steiner, TTTech AG
Ethernet Basics Peter Puschner, TU Wien 2
Ethernet Devices • Today we mainly know two Ethernet devices: – End Stations and Bridges • End stations are also called “end systems” or “end points” or “network interface cards” • Bridges are also called switches – Note, “bridge” is the correct technical term while “switch” is a marketing brand. – However, as bridge and switch are today mostly used synonymously we use both terms also in this tutorial. • End stations are connected to bridges through ports and communication links. Port Bridge A1 Communication Link Multi-hop Communication Link End End End End Synchronization Station 1 Station 2 Station 3 Station 4 SM Master Synchronization SC Client Compression CM Master Bridge B1 Bridge B2 Peter Puschner, TU Wien 3
Closer Look at an End Station* *TTTech’s TTE PMC Card • PMC – PCI Mezzanine Card – Peripheral Component Interconnect This is the area of this tutorial • Data Link Layer – OSI Layer 2 – Media Access Control (MAC) – e.g., IEEE 802.3 Ethernet Media Independent Interface (MII) • Physical Layer – OSI Layer 3 – e.g., IEEE 802.3, 802.11, 802.15 Peter Puschner, TU Wien 4
Ethernet Frame Format • Some important aspects: – Frames contain address information regarding their source and their destination. – The destination address may be either unicast, multicast, or broadcast. – The 802.1Q header is more prominently known as VLAN tag. – The Payload is between 46 and 1500 octets. • We will not discuss Jumbo Frames in this tutorial (can discuss in Q/A). – Ethernet uses a 4 octets CRC called the Frame Check Sequence. Peter Puschner, TU Wien 5
Ethernet = Unsynchronized Communication NIC NIC NIC SWITCH X SWITCH NIC X NIC NIC NIC NIC X SWITCH NIC Asynchronous Communication § Transmission Points in Time are not predictable à à Transmission Latency and Jitter accumulate NIC à à Number of Hops has a significant impact NIC Peter Puschner, TU Wien 6
Basic Operation • CSMA/CD (Carrier-Sense Multiple-Access / Collision Detection) – All end stations are connected to a physical bus (no bridges). – In case multiple end stations start to transmit at about the same point in time – the signals collide on the wire. – End points realize this collision and send a jamming signal. – Retry of transmission after random timeout. • Switched Ethernet – All end stations are connected to bridges. Bridges can be connected to each other. – Physical collisions cannot happen any more – but “logical collisions” remain. – Multiple end stations may send messages to the same receiver. – As the bridge has limited frame buffer, this buffer may overflow and frames may be lost. Peter Puschner, TU Wien 7
Operation – Basic Switch Basic Switch 8 7 6 5 Best Effort 4 3 2 1 Peter Puschner, TU Wien 8
Operation – Basic Switch Basic Switch 2 5 1 Best Effort 4 7 3 6 8 Best-effort frame delivery (standard Ethernet traffic) is NOT guaranteed ! Peter Puschner, TU Wien 9
Selection of Standards and Solutions • IEEE 802.3: “ Ethernet” • IEEE 802.1Q: “ IEEE Standard for Local and metropolitan area networks--Media Access Control (MAC) Bridges and Virtual Bridged Local Area Networks ” Peter Puschner, TU Wien 10
Ethernet and Real-Time Communication Peter Puschner, TU Wien 11
Ethernet = Unsynchronized Communication NIC NIC NIC SWITCH X SWITCH NIC X NIC NIC NIC NIC X SWITCH NIC Asynchronous Communication § Transmission Points in Time are not predictable à à Transmission Latency and Jitter accumulate NIC à à Number of Hops has a significant impact NIC Peter Puschner, TU Wien 12
Priorities • Frames with a high priority can overtake frames with a lower priority. Basic Switch + Priorities Basic Switch + Priorities L2 L1 H2 H1 Best Effort Best Effort H2 H1 Prio High Prio High . . . . . . L3 L2 L1 L3 Prio Low Prio Low Problems with priorities: • High priority frames may “starve” low priority frames. • Too many high priority frames: à performance of high priority frames becomes insufficient. Peter Puschner, TU Wien 13
Traffic Shaping I: Credit-Based Shaping t 8 t 0 t 1 t 2 t 3 t 4 t 5 t 6 t 7 Class A Queue frame frame frame frame Queue with lower priority frame high credit idle slope Class A credit t send slope low credit Class A queued frames Class A Queue transmit allowed Class A Queue transmit output port frame frame frame frame frame Peter Puschner, TU Wien 14
Traffic Shaping I: Credit-Based Shaping • Credit-based shaping is realized in the IEEE 802.1Q Audio/Video Bridging Standard. • The aim is to guarantee 2ms network latency for SR Class A traffic over seven hops (=six bridges), considering several assumptions, e.g., – 100 Mbit/sec network – SR Class A may be sent with a period of 125us – Limited number of AVB streams • Sum of AVB traffic may not exceed 75% of the port transmit rate. • 75% of 125us = 93.75us • Minimum Ethernet frame size is 6.72us à int(93.75us/6.72us) = 13 frames max. per port • The credit-based shaper operates on one or many outgoing queues per port in the bridge. • It guarantees “fairness” properties wrt. lower priority traffic than AVB traffic, i.e., it is guaranteed that bursts of AVB traffic will be interrupted and low priority non-AVB (standard Ethernet) traffic will be served. Peter Puschner, TU Wien 15
Traffic Shaping I: Rate-Constrained Traffic Rate-Constrained Traffic (RC) Switch/Router Receiver Sender min. duration min. duration min. duration Peter Puschner, TU Wien 16
Traffic Shaping I: Rate-Constrained Traffic • Rate-constrained traffic is implemented in ARINC 664-p7. • It operates on a per stream basis – in ARINC 664-p7 called Virtual Link (VL) • Strong scientific foundation of latency analysis and several implementations of tools. – e.g., network calculus, trajectory approach, response-time analysis • Latency is typically calculated as a function of: – Number, size, and rate of frames – Network topology – Switch model (e.g., switching delay) • In the process of calculating the latency often the required buffer sizes in the bridges are derived. • à If done right, then it buffer overflows can be excluded and latencies can be guaranteed. Peter Puschner, TU Wien 17
AFDX / ARINC 664 AFDX … Avionics Full Duplex Switched Ethernet • Quality of Service – Bandwidth guarantee – Transmission jitter and latency – Bit Error Ratio (BER) • Weight • Cost (development, deployment) builds on ARINC 429, MIL-STD 1553 Peter Puschner, TU Wien 18
AFDX Characteristics • Serial data transfer • Based on Ethernet IEEE802.3 • 10-100 Mbit/s • Medium: copper or optic fiber • Traffic control – Bandwidth guarantees for Virtual Links • Reliability – Dual redundancy for each AFDX channel Peter Puschner, TU Wien 19
AFDX Network Architecture Switch End End End End System System System System Switch • two independent redundant networks • at least 20 ports per switch Peter Puschner, TU Wien 20
AFDX System Components Avionics Computer System AFDX Network Controllers Partition 1 AFDX Partition 2 AFDX End Sensors Switch System Partition 3 Actuators Avionics Subsystem • Each port (ES, switch) consists of Rx and Tx port • Cable contains two twisted-wire pairs Peter Puschner, TU Wien 21
AFDX Communication Ports • Communication ports – end points of communication – Supported by OS API • Sampling Ports – Buffer stores a single message – New message overwrites buffer, non-consuming read • Queuing Ports – Stores a up to a max. number of messages – FIFO queue • Operations: send_msg(port_ID, msg), recv_msg(port_ID, msg) Peter Puschner, TU Wien 22
Virtual Link (VL) • Defines logical communication link • determines frame routing – Must originate at a single defined End System – Delivers packets to a fixed set of End Systems – Carries messages from one or more comm. ports • 16-bit Virtual Link ID • Uses Ethernet Destination Address field Constant Field: 32 bits Virtual Link ID 0000 0011 0000 0000 0000 0000 0000 0000 16-bit unsigned integer Peter Puschner, TU Wien 23
Virtual Link Scheduling • Traffic shaping by ES’s VL scheduler • VL scheduler multiplexes all VLs of ES • Bandwidth Allocation Gap (BAG) – Per VL – Defines minimum gap between frames – Range 1-128 ms, power of 2 frame frame max. jitter max. jitter BAG BAG Peter Puschner, TU Wien 24
Sub Virtual Links • VLs regulate flow onto physical link • Sub-VLs regulate flow into VL • VL must be able to handle 4 Sub-VL queues • Sub-VL queues are served in round-robin Peter Puschner, TU Wien 25
AFDX Frame Structure AFDX Payload Payload Padding or up to 1471 bytes 1-17 bytes 0-16 bytes UDP Hdr 8 bytes IP Hdr 20 bytes MAC Dest MAC Src Type IPv4 SN FCS 6 bytes 6 bytes 2 bytes 4 bytes 4 bytes Preamble SFD IFG 7 bytes 1 byte 12 bytes Peter Puschner, TU Wien 26
Recommend
More recommend