10.- osi model i inst… · osi model: structure the osi reference model is composed of seven...
TRANSCRIPT
1
Motion Control for Electric Drives1
Engineering Electronic Department
Technical University of Catalonia, UPCCampus Terrassa, SPAIN
Lecturer: Dr. Luis Romeral
Motion Control for Electric Drives2
Outline Block 3:
Digital Communications and OSI Model
Subject 1.- OSI Model: definitions - General Concepts- Seven layers OSI - Model- Protocols and Service data Units- Repeaters, Bridges, Routers, and Gateways
Subject 2.- Physical Layer- Functions of the Physical Layer- Interfaces RS 232 / RS 485 / Ethernet- Physical media: cables and optical fibers- Modulation - Coding and Synchronization
Subject 3.- Aircraft Buses- TCP/IP- ARINC- CSDB / FDDI
2
Motion Control for Electric Drives3
Engineering Electronic Department
Technical University of Catalonia, UPCCampus Terrassa, SPAIN
Lecturer: Dr. Luis Romeral
Motion Control for Electric Drives4
OSI Model: origin
Over the past couple of decades many of the networks that were built used different hardware and software implementations, as a result they were incompatible and it became difficult for networks using different specifications to communicate with each other.
To address the problem of networks being incompatible and unable to communicate with each other, the ISO (International StandardizationOrganization) recognized there was a need to create a NETWORK MODEL that would help vendors to create interoperable network implementations:
In 1984 in order to aid network interconnection without necessarily requiring complete redesign, the Open Systems Interconnection (OSI) reference model was approved as an international standard for communications architecture.
3
Motion Control for Electric Drives5
OSI Model: concept
The Open System Interconnection (OSI) model is a standard way tostructure communication software that is applicable to any network.
• was developed to structure telecommunication protocols in the ‘70(Pouzin & Zimmermann), and standardized by CCITT and ISO as ISO / IEC 7498 in 1984
• all communication protocols (TCP/IP, Appletalk or DNA) can be mapped to the OSI model.
• mapping of OSI to industrial communication requires some additions
• OSI should be considered as a model, not as an implementation guide
Motion Control for Electric Drives6
OSI Model: concept
• The Open Systems Interconnection (OSI) reference model is a descriptive network scheme. It ensures greater compatibility andinteroperability between various types of network technologies.
• The OSI model describes how information or data makes its way from application programmes (such as spreadsheets) through a network medium (such as wire) to another application programme located on another network.
• The OSI reference model divides the problem of moving data between computers over a network medium into SEVEN smallerand more manageable problems .
• This separation into smaller more manageable functions is known as layering.
4
Motion Control for Electric Drives7
OSI Model: structure
The OSI Reference Model is composed of seven layers, each specifying particular network functions.
The process of breaking up the functions or tasks of networking into layers reduces complexity.
Each layer provides a service to the layer above it in the protocol specification.
Each layer communicates with the same layer’s software or hardware on other computers.
Motion Control for Electric Drives8
OSI-Model (ISO/IEC standard 7498)
Physical
Link
Network
Transport
Session
Presentation6
5
4
3
2
1
Application7
"Transport"protocols
"Application" protocols
Definition and conversion of the dataformats (e.g. ASN 1)
All services directly called by the end user(Mail, File Transfer,...) e.g. Telnet, SMTP
Management of connections(e.g. ISO 8326)
End-to-end flow control and error recovery(e.g. TP4, TCP)
Routing, possibly segmenting(e.g. IP, X25)
Error detection and recovery, Flow control and medium access (e.g. HDLC)
Coding, Modulation, Electrical andmechanical coupling (e.g. RS485)
5
Motion Control for Electric Drives9
Protocol Data Units and Service Data Units
Protocol Data Unit
(PDU)
N - Layer
N+1- Layer
N-1 Layer
Protocol Data Unit
(PDU)
Service-Data Unit
(SDU)
Service-Data Unit
(SDU)
Layer N provides services to Layer N+1; Layer N relies on services of Layer n-1
(n)-layer entity(n)-layer entity
(n+1)-layer entity(n+1)-layer entity
(n-1)-layer entity(n-1)-layer entity
Motion Control for Electric Drives10
OSI Model with two nodes
PhysicalLinkNetworkTransport
SessionPresentationApplication
PhysicalLinkNetworkTransport
SessionPresentationApplication
Physical Medium
node 1 node 2
7
6
5
4
3
2
1
7
6
5
4
3
2
1
6
Motion Control for Electric Drives11
LAYER 7: APPLICATION
• The application layer is the OSI layer that is closest to the user. It Implements the functionality of the application
• It provides network services to the user’s applications.
• It differs from the other layers in that it does not provide services to any other OSI layer, but rather, only to applications outside the OSI model.
• Examples of such applications are spreadsheet programs, word processing programs, and bank terminal programs.
• The application layer establishes the availability of intended communication partners, synchronizes and establishes agreement on procedures for error recovery and control of data integrity.
Motion Control for Electric Drives12
LAYER 6: PRESENTATION
• The presentation layer ensures that the information that the application layer of one system sends out is readable by the application layer of another system.
• Provides a common format of data exchange between different types of peers.
• If necessary, the presentation layer translates between multiple data formats by using a common format.
• Provides encryption and compression of data.
• Examples :- JPEG, MPEG, ASCII, EBCDIC, HTML.
7
Motion Control for Electric Drives13
LAYER 5: SESSION
• The session layer defines how to start, control and endconversations (called sessions) between applications.
• This includes the control and management of multiple bi-directional messages using dialogue control.
• It also synchronizes dialogue between two hosts' presentation layers and manages their data exchange.
• Creates and manages a name space used to link different transports considered part of a single application.
• The session layer offers provisions for efficient data transfer.
• Examples :- SQL, ASP(AppleTalk Session Protocol).
Motion Control for Electric Drives14
LAYER 4: TRANSPORT
• Establishes a process-to-process channel and regulates information flow to ensure end-to-end connectivity between host applications reliably and accurately.
• The transport layer segments data from the sending host's system and reassembles the data into a data stream on the receiving host's system.
• The boundary between the transport layer and the session layer can be thought of as the boundary between application protocols and data-flow protocols. Whereas the application, presentation, and session layers are concerned with application issues, the lower four layers are concerned with data transport issues.
• Layer 4 protocols include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
8
Motion Control for Electric Drives15
LAYER 3: NETWORK
• Performs routing among nodes within a packetswitchednetwork.
• Defines end-to-end delivery of packets.
• Defines logical addressing so that any endpoint can be identified.
• Defines how routing works and how routes are learned so that the packets can be delivered.
• The network layer also defines how to fragment a packet into smaller packets to accommodate different media.
• Routers operate at Layer 3.
• Examples :- IP, IPX, AppleTalk.
Motion Control for Electric Drives16
LAYER 2: DATA LINK
• The data link layer provides access to the networking media and physical transmission across the media.
• The data link layer provides reliable transit of data across a physical link by using the Media Access Control (MAC) addresses.
• The data link layer uses the MAC address to define a hardware or data link address in order for multiple stations to share the same medium and still uniquely identify each other.
• Aggregates a stream of bits into a larger data unit called a frame, which is concerned with network topology, network access, error notification, ordered delivery of frames, and flow control.
• Examples :- Ethernet, Frame Relay, FDDI.
9
Motion Control for Electric Drives17
LAYER 1: PHYSICAL
• The physical layer deals with the physical characteristics of the transmission medium.
• It handles the transmission of raw bits.
• It defines the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between end systems.
• Such characteristics as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other similar attributes are defined by physical layer specifications.
• Examples :- EIA/TIA-232, RJ45, NRZ.
Motion Control for Electric Drives18
Repeater Concept
repeaterEthernet
server
Ethernet
server
To connect a workstation of department A to the printer of department B, a cable becomes too long and the messages are corrupted.
workstationsdepartment A
department B
Physically, there is only one bus carrying both department’s traffic, only one node may transmit at a time.
printer
The repeater restores signal levels and synchronization.It introduces a signal delay of about 1..4 bits
500m
500m
500m
10
Motion Control for Electric Drives19
OSI model with three nodes (bridge)
7
6
5
4
3
2
1
2
1
physical medium (0)
2
1
7
6
5
4
3
2
1Physical
Link
Network
Transport
Session
Presentation
Application
Node 1 bridge Node 2
The subnet on both sides of a bridge have:• the same frame format (except header),• different addresses on both sides of the bridge• the same link layer protocol (if link layer is connection-oriented)
Bridges filter the frames on the base of their link addresses
physical medium (0)
e.g. Ethernet 100 MBit/s e.g. ATM
Motion Control for Electric Drives20
Bridge example
RepeaterEthernet
server
Ethernet
server
BridgeEthernet 1
server
Ethernet 2
In this example, most traffic is directed from the workstations to the department server, there is little cross-department traffic
workstationsdepartment A
department B
There is only one Ethernet which carries both department’s traffic
department A
There are now two Ethernets and only the cross-department traffic burdens both busses
printer
serverdepartment B
printer
11
Motion Control for Electric Drives21
OSI Model with three nodes (router)
physical medium (0)
Frames in transit are handled in the network layer .
The router routes the frames on the base of their network address.
The subnets may have different link layer protocols
Node 1 Router Node 2
PhysicalLink
Network
TransportSessionPresentation
Application
3
2
1
2
1
7
6
5
4
3
2
1
7
6
5
4
3
2
1
Motion Control for Electric Drives22
Repeater, Bridge, Router, Gateway: Topography
same speedsame medium accesssame framesBridge
Router
backbone (e.g. FDDI)
segment
Repeater
subnet (LAN, bus, extended link)
end-to-endtransport protocol
gateway
application-dependent
connects different speed,different medium accessby store-and-forward
same frames and addressesinitially transparent in both ways.
can limit traffic by filtering
devices (nodes, stations) have different link addresses
devices (nodes, stations) have different physical addresses
different subnetworks,same address spacesame transport protocol,segmentation/reassemblyrouters are initially opaque
12
Motion Control for Electric Drives23
Repeaters, Bridges, Routers and Gateways: OSI model
NetTrpSesPreApl
TrpSesPreApl
MDS
LLCNetTrpSesPreApl
MAC
10 Mbit/s coax
MISMDS
Layer 1 MDS
repeateror hub
10 Mbit/s fibre
MDSMIS
MDSMIS
Layer 2
100 Mbit/s Ethernet
bridge( "switch")
(store-and-forward)
MDSMIS
LLCMAC
Layer 3
MDSMIS
LLCMAC
ATM 155 Mbit/s
MDSMIS
LLCMAC
NetTrpSesPre
Apl
MAC MAC
router
MDS
LLCIP
TCP
RPC
gateway
intelligent linking devices can do all three functions
(if the data rate is the same)
Fibre
Motion Control for Electric Drives24
To which level does a frame element belong
destination source final originpreamble
physical link
bridge
LLC NC
network
router
TRP SES PRE APL
application (gateway)
repeater, hub
CRC
A frame is structured according to the ISO model
ED
link
LLC
Net
wor
k C
ontro
l
trans
port
sess
ion
pres
enta
tion
appl
icat
ion
phy
Frame: a frame is data that is transmitted between network points as a unit complete with addressing and necessary protocol control information.
A frame is usually transmitted serial bit by bit and contains a header field and a trailer field that "frame" the data. (Some control frames contain no data).
13
Motion Control for Electric Drives25
Data Encapsulation
Frame
Signal
Error detection
Flag Flag
Link - address
Link control(Acknowledge, Token,etc.)
Network address
Transport header
size
User information
CRC
LinkAdr
LinkCrt
NetAdr
INFO
TrpCrt
Each layer introduces its own header and overhead
Data is Encapsulated with the necessary protocol information as it movesdown the layers before network transit
Motion Control for Electric Drives26
Example: OSI-Stack frame structure
>48
ISO 8473 connectionless network control
5
ISO 8073 class 4 transport control
MA. frame control
MA. destinationaddress(6 octets)
MA. sourceaddress(6 octets)
L_destination SAP
L_source SAP
L_PDU
L_PDU = UI, XID, TEST
LI
TPDU
Protocol Identifier
Header Length
Version/Protocol ID (01)
Lifetime
DT/ER TypeSP MS ER
Checksum
PDU Segment Length
Destination Address(18 octets)
Source Address(18 octets)
ADDRESS PART
Segmentation(0 or 6 octets)
Options(priority = 3 octets)
(CDT)
N(S)ET
MAC_header LNK_hdr NET_header TRP_header
DestinationReference
FIXEDPART
13 3DATA
AFI = 49
IDI, Area ID(7 octets)
PSI
Physical Address(6 octets)
LSAP = FE
NSAP = 00
IDP(initial
domainpart)
DSP(domainspecific
part)
DATA (DT) TPDU (normal format)
LSAP = DSAPFE = network layer18 = Mini-MAP Object Dictionary Client19 = Network Management00 = own link layer
(81)
IEEE 802.4token bus
ISO 8802logical link control
address length
14
Motion Control for Electric Drives27
OSI protocols in industry
ISO-OSI standards should be used since they reduce specification and conformance testing work and commercial components exist
the OSI model is a general telecommunication framework -implementations considers feasibility and economics.
industrial busses use for real-time data a fast response access andfor messages a simplified OSI communication stack
the OSI model does not consider transmission of real-time data
the overhead of the ISO-OSI protocols (8073/8074) is not bearablewith low data rates under real-time conditions.
communication is greatly simplified by adhering to conventionsnegotiating parameters at run-time is a waste in closed applications.
the OSI-conformant software is too complex:simple devices like door control or air-condition have limited power.
•
•
•
•
•
•
Theory:
Reality:
Therefore:
the devices must be plug compatible: there are practically no options.•
•
Motion Control for Electric Drives28
TCP / IP structure
OSI stack has not been able to establish itself against TCP/IP
TCP UDP
IP routing ICMP
FTP SMTP HTTPFiles SNMP Applications
Transport
Network
Ethernet ATM radiomodem Link & Physical
The TCP/IP stack is lighter than the OSI stack, but has about the same complexity
TCP/IP was implemented and used before being standardized.
Internet gave TCP/IP a decisive push
15
Motion Control for Electric Drives29
Conclusions
The OSI model is the reference for all industrial communicationEven when some layers are skipped, the concepts are generally implementedReal-Time extensions to OSI are under consideration
TCP/IP however installs itself as a competitor to the OSI suite, although some efforts are made to integrate it into the OSI model
TCP/IP/UDP is becoming the backbone for all non-time critical industrial communication
Many embedded controllers come with an integrated Ethernet controller, an the corresponding real-time operating system kernel offers TCP/IP services
TCP/IP/UDP is quickly displacing proprietary protocols.
Like OSI, TCP protocols have delays counted in tens or hundred milliseconds, often unpredictable especially in case of disturbances.
Next generation TCP/IP (V6) is very much like the OSI standards.
Motion Control for Electric Drives30
1) Name the layers of the OSI model and describe their function
2) What is the difference between a repeater, a bridge and a router ?
3) What is encapsulation ?
4) How is the TCP/IP structure?
5) How successful are implementations of the OSI standard suite ?
Assessment