Download Unsynchronized Networks - Institute of Computer Engineering

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Cracking of wireless networks wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

IEEE 1355 wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Power over Ethernet wikipedia , lookup

Network tap wikipedia , lookup

CAN bus wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Spanning Tree Protocol wikipedia , lookup

IEEE 802.11 wikipedia , lookup

Virtual LAN wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
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
End
Station 1
End
Station 2
End
Station 3
End
Station 4
Multi-hop
Communication Link
SM Synchronization
Master
SC
CM
Bridge B1
Peter Puschner, TU Wien
Bridge B2
Synchronization
Client
Compression
Master
3
Closer Look at an End Station*
*TTTech’s TTEPMC Card
• PMC
–  PCI Mezzanine Card
–  Peripheral Component Interconnect This is the area of this
• Data Link Layer
–  OSI Layer 2
–  Media Access Control (MAC)
–  e.g., IEEE 802.3 Ethernet
tutorial
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
SW
ITC
H
SW
ITC
H
X
X
NIC
NIC
NIC
XIC
N
NIC
SW
ITC
H
NIC
Asynchronous Communication
§  Transmission Points in Time are not predictable
à Transmission Latency and Jitter accumulate
à Number of Hops has a significant impact
Peter Puschner, TU Wien
NIC
NIC
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
8
Peter Puschner, TU Wien
7
3
6
Best-effort frame delivery
(standard Ethernet traffic) is NOT guaranteed !
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
SW
ITC
H
SW
ITC
H
X
X
NIC
NIC
NIC
XIC
N
NIC
SW
ITC
H
NIC
Asynchronous Communication
§  Transmission Points in Time are not predictable
à Transmission Latency and Jitter accumulate
à Number of Hops has a significant impact
Peter Puschner, TU Wien
NIC
NIC
12
Priorities
• Frames with a high priority can overtake frames with a lower priority.
Basic Switch + Priorities
Basic Switch + Priorities
L2
Best Effort
Prio High
L3
H2 H1
Prio High
L2
Prio Low
L1
H2
H1
Best Effort
...
Prio Low
L1
...
L3
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
t0
Class A Queue
t1
t2
frame
t3
t4
frame
Queue with lower priority
t5
t6
t8
t7
frame
frame
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
Peter Puschner, TU Wien
frame
frame
frame
frame
frame
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)
Sw
n
Se
de
itc
h /R
ou
ter
Re
iv
ce
er
r
min. duration
Peter Puschner, TU Wien
min. duration
min. duration
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
System
End
System
End
System
End
System
Switch
•  two independent redundant networks
•  at least 20 ports per switch
Peter Puschner, TU Wien
20
AFDX System Components
Avionics Computer System
Controllers
Sensors
AFDX Network
Partition 1
Partition 2
Partition 3
AFDX
End
System
AFDX
Switch
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
BAG
Peter Puschner, TU Wien
max. jitter
BAG
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
up to 1471 bytes
or
Payload
1-17 bytes
Padding
0-16 bytes
UDP Hdr
8 bytes
IP Hdr
20 bytes
MAC Dest
6 bytes
Preamble
7 bytes
MAC Src
6 bytes
SFD
1 byte
Peter Puschner, TU Wien
Type IPv4
2 bytes
SN
FCS
4 bytes 4 bytes
IFG
12 bytes
26
Reliability Support
•  Integrity Checking
–  Per network and VL
–  Uses Sequence Numbers (SN) of messages
–  Sender: consecutive SNs per VL, SN=0 on startup
–  Receiver accepts:
•  SN = 0: reset
•  SN = SN_old + 1 oder SN = SN_old + 2
•  Other frames are discarded
•  Redundancy Management
–  Discard duplicates received from IC
–  SkewMax determines duplicate-elimination interval
Peter Puschner, TU Wien
27
AFDX Switch
•  Switching function
–  Filtering and policing
–  Only valid frames are forwarded to right ports
–  Uses static configuration tables
•  Monitoring function
–  Logs all operations and events
–  Communicates with Network Management Function
Peter Puschner, TU Wien
28
AFDX Frame Filtering
Only valid frames are forwarded
•  Valid VL identifier
•  Use VL ID to forward to allowed destination ports
•  FCS validity
•  Ethernet frame size alignment
•  Ethernet frame size range
•  Adherence to MTU of VL
(MTU … maximum transfer unit, max. number of
bytes transmitted in VL frame; Lmax)
Peter Puschner, TU Wien
29
AFDX Traffic Policing
Checks adherence to specified limits of bandwidth
use
•  Non-complying traffic is discarded
•  Byte-based policing
–  Checks bandwidth use of VL in bits/s
•  Frame-based policing
–  Checks use of VL in frames/s
Peter Puschner, TU Wien
30