1 netprog 2002 osi reference model networking. 2 network “... communication system for connecting...
TRANSCRIPT
2Netprog 2002 OSI Reference Model
NetworkNetwork
“ “ ... communication system for connecting ... communication system for connecting end-systems”end-systems”
End-systems a.k.a. “hosts”End-systems a.k.a. “hosts”
PCs, workstationsPCs, workstations
dedicated computersdedicated computers
network components network components
3Netprog 2002 OSI Reference Model
Multiaccess vs. Point-to-pointMultiaccess vs. Point-to-point
Multiaccess means shared medium.Multiaccess means shared medium.– many end-systems share the same physical many end-systems share the same physical
communication resources (communication resources (wire, frequency, ...)wire, frequency, ...)– There must be some arbitration mechanism.There must be some arbitration mechanism.
Point-to-pointPoint-to-point– only 2 systems involvedonly 2 systems involved– no doubt about where data came from !no doubt about where data came from !
5Netprog 2002 OSI Reference Model
LAN - Local Area NetworkLAN - Local Area Network connects computers that are physically connects computers that are physically
close together ( < 1 mile).close together ( < 1 mile).– high speedhigh speed– multi-accessmulti-access
Technologies:Technologies:– EthernetEthernet 10 Mbps, 100Mbps10 Mbps, 100Mbps– Token RingToken Ring16 Mbps16 Mbps– FDDI FDDI 100 Mbps100 Mbps– MyrinetMyrinet 2 Gbps2 Gbps
6Netprog 2002 OSI Reference Model
WAN - Wide Area NetworkWAN - Wide Area Network
connects computers that are physically connects computers that are physically far apart. “long-haul network”.far apart. “long-haul network”.– typically slower than a LAN.typically slower than a LAN.– typically less reliable than a LAN.typically less reliable than a LAN.– point-to-pointpoint-to-point
Technologies:Technologies:– telephone linestelephone lines– Satellite communicationsSatellite communications
7Netprog 2002 OSI Reference Model
MAN - Metropolitan Area MAN - Metropolitan Area NetworkNetwork
Larger than a LAN and smaller than a Larger than a LAN and smaller than a WANWAN- example: campus-wide network- example: campus-wide network
- multi-access network- multi-access network Technologies:Technologies:
– coaxial cable coaxial cable – microwavemicrowave
8Netprog 2002 OSI Reference Model
InternetworkInternetwork Connection of 2 or more distinct Connection of 2 or more distinct
(possibly dissimilar) networks.(possibly dissimilar) networks. Requires some kind of network device Requires some kind of network device
to facilitate the connection.to facilitate the connection.
Net A Net B
9Netprog 2002 OSI Reference Model
OSI Reference ModelOSI Reference Model
Layered model:Layered model:7. Application7. Application
6. Presentation6. Presentation
5. Session5. Session
4. Transport4. Transport
3. Network3. Network
2. Data Link2. Data Link
1. Physical1. Physical
10Netprog 2002 OSI Reference Model
The Physical LayerThe Physical Layer
Responsibility:Responsibility:– transmission of raw bits over a transmission of raw bits over a
communication channel.communication channel. Issues:Issues:
– mechanical and electrical interfacesmechanical and electrical interfaces– time per bittime per bit– distancesdistances
11Netprog 2002 OSI Reference Model
The Data Link Layer - The Data Link Layer - Data Link ControlData Link Control
Responsibility:Responsibility:– provide an error-free communication linkprovide an error-free communication link
Issues:Issues:– framing framing (dividing data into chunks)(dividing data into chunks)
» header & trailer bitsheader & trailer bits
– addressingaddressing
10110110101 01100010011 10110000001
12Netprog 2002 OSI Reference Model
The Data Link Layer - The Data Link Layer - The MAC sublayerThe MAC sublayer
Medium Access Control - needed by Medium Access Control - needed by mutiaccess networks.mutiaccess networks.
MAC provides DLC with “virtual wires” MAC provides DLC with “virtual wires” on multiaccess networks.on multiaccess networks.
13Netprog 2002 OSI Reference Model
The Network LayerThe Network Layer
Responsibilities:Responsibilities:– path selection between end-systems (routing).path selection between end-systems (routing).– subnet flow control.subnet flow control.– fragmentation & reassemblyfragmentation & reassembly– translation between different network types.translation between different network types.
Issues:Issues:– packetpacket headers headers– virtual circuitsvirtual circuits
14Netprog 2002 OSI Reference Model
The Transport LayerThe Transport Layer Responsibilities:Responsibilities:
– provides virtual end-to-end links between provides virtual end-to-end links between peer processes.peer processes.
– end-to-end flow controlend-to-end flow control Issues:Issues:
– headersheaders– error detection error detection – reliable communicationreliable communication
15Netprog 2002 OSI Reference Model
The Session LayerThe Session Layer
Responsibilities:Responsibilities:– establishes, manages, and terminates establishes, manages, and terminates
sessions between applications.sessions between applications.– service location lookupservice location lookup
Many protocol suites do not include a Many protocol suites do not include a session layer.session layer.
16Netprog 2002 OSI Reference Model
The Presentation LayerThe Presentation Layer
Responsibilities:Responsibilities:– data encryptiondata encryption– data compressiondata compression– data conversiondata conversion
Many protocol suites do not include a Many protocol suites do not include a Presentation Layer.Presentation Layer.
17Netprog 2002 OSI Reference Model
The Application LayerThe Application Layer
Responsibilities:Responsibilities:– anything not provided by any of the other anything not provided by any of the other
layerslayers Issues:Issues:
– application level protocolsapplication level protocols– appropriate selection of “type of service”appropriate selection of “type of service”
18Netprog 2002 OSI Reference Model
Layering & Headers Layering & Headers Each layer needs to add some control Each layer needs to add some control
information to the data in order to do it’s job. information to the data in order to do it’s job. This information is typically prepended to This information is typically prepended to
the data before being given to the lower the data before being given to the lower layer.layer.
Once the lower layers deliver the the data Once the lower layers deliver the the data and control information - the peer layer uses and control information - the peer layer uses the control information.the control information.
19Netprog 2002 OSI Reference Model
HeadersHeaders
Process
Transport
Network
Data Link
Process
Transport
Network
Data Link
DATA
DATA
DATA
DATA
H
H
H
H
HH
20Netprog 2002 OSI Reference Model
What are the headers?What are the headers?
PhysicalPhysical: no header - just a bunch of bits.: no header - just a bunch of bits.
Data Link:Data Link: – address of the receiving endpointsaddress of the receiving endpoints– address of the sending endpointaddress of the sending endpoint– length of the datalength of the data– checksum.checksum.
21Netprog 2002 OSI Reference Model
Network layer header - Network layer header - examplesexamples
protocol suite protocol suite versionversion
type of service type of service length of the datalength of the data packet identifierpacket identifier fragment numberfragment number time to livetime to live
protocolprotocol header checksumheader checksum source network source network
addressaddress destination network destination network
addressaddress
22Netprog 2002 OSI Reference Model
Important SummaryImportant Summary
Data-Link: communication between Data-Link: communication between machines on the same network.machines on the same network.
Network: communication between Network: communication between machines on possibly different machines on possibly different networks.networks.
Transport: communication between Transport: communication between processes (running on machines on processes (running on machines on possibly different networks).possibly different networks).
23Netprog 2002 OSI Reference Model
Connecting NetworksConnecting Networks
Repeater: Repeater: physical layerphysical layer
Bridge: Bridge: data link layerdata link layer
Router: Router: network layernetwork layer
Gateway: Gateway: network layer and network layer and
above.above.
24Netprog 2002 OSI Reference Model
RepeaterRepeater
Copies bits from one network to anotherCopies bits from one network to another Does not look at any bitsDoes not look at any bits Allows the extension of a network Allows the extension of a network
beyond physical length limitationsbeyond physical length limitations
REPEATER
25Netprog 2002 OSI Reference Model
BridgeBridge Copies frames from one network to anotherCopies frames from one network to another Can operate selectively - does not copy all frames Can operate selectively - does not copy all frames
(must look at data-link headers).(must look at data-link headers). Extends the network beyond physical length Extends the network beyond physical length
limitations.limitations.
BRIDGE
26Netprog 2002 OSI Reference Model
RouterRouter Copies packets from one network to another.Copies packets from one network to another. Makes decisions about what Makes decisions about what routeroute a packet a packet
should take (looks at network headers).should take (looks at network headers).
ROUTERROUTER
27Netprog 2002 OSI Reference Model
GatewayGateway
Operates as a routerOperates as a router Data conversions above the network Data conversions above the network
layer.layer. Conversions:Conversions:
encapsulation - use an intermediate network encapsulation - use an intermediate network translation - connect different application translation - connect different application
protocolsprotocolsencryption - could be done by a gatewayencryption - could be done by a gateway
28Netprog 2002 OSI Reference Model
Encapsulation ExampleEncapsulation Example
Gateway Gateway
Provides service connectivity even Provides service connectivity even though intermediate network does though intermediate network does not support protocols.not support protocols.
29Netprog 2002 OSI Reference Model
TranslationTranslation
Translate from green protocol to brown Translate from green protocol to brown protocolprotocol
Gateway
30Netprog 2002 OSI Reference Model
Encryption gatewayEncryption gateway
Encryption/DecryptionGateways
SecureNetwork
Secure Network
GWGW ??
?
Insecure Network
31Netprog 2002 OSI Reference Model
Hardware vs. SoftwareHardware vs. Software
Repeaters are typically hardware devices.Repeaters are typically hardware devices. Bridges can be implemented in hardware or Bridges can be implemented in hardware or
software.software. Routers & Gateways are typically Routers & Gateways are typically
implemented in software so that they can be implemented in software so that they can be extended to handle new protocols.extended to handle new protocols.
Many workstations can operate as routers or Many workstations can operate as routers or gateways. gateways.
32Netprog 2002 OSI Reference Model
Byte OrderingByte Ordering
Different computer architectures use Different computer architectures use different byte ordering to represent different byte ordering to represent multibyte values.multibyte values.
16 bit integer:16 bit integer:
Low Byte
High Byte
High Byte
Low Byte
Address AAddress A
Address A+1Address A+1
33Netprog 2002 OSI Reference Model
Byte OrderingByte Ordering
Low ByteHigh Byte
Addr A Addr A+1
High ByteLow Byte
Addr A Addr A+1
Big-EndianBig-Endian
IBM 370IBM 370
Motorola 68000Motorola 68000
SunSun
Little-EndianLittle-Endian
IBM 80x86IBM 80x86
DEC VAXDEC VAX
DEC PDP-11DEC PDP-11
34Netprog 2002 OSI Reference Model
Byte Order and NetworkingByte Order and Networking
Suppose a Big Endian machine sends a Suppose a Big Endian machine sends a 16 bit integer with the value 2:16 bit integer with the value 2:
A Little Endian machine will think it got A Little Endian machine will think it got the number 512:the number 512:
0000000000000010
0000001000000000
35Netprog 2002 OSI Reference Model
Network Byte OrderNetwork Byte Order
Conversion of application-level data is Conversion of application-level data is left up to the presentation layer.left up to the presentation layer.
But hold on !!! How do lower level layers But hold on !!! How do lower level layers communicate if they all represent values communicate if they all represent values differently ? (data length fields in differently ? (data length fields in headers)headers)
A fixed byte order is used (called A fixed byte order is used (called network byte ordernetwork byte order) for all control data.) for all control data.
36Netprog 2002 OSI Reference Model
MultiplexingMultiplexing
““.. to combine many into one”. .. to combine many into one”. Many processes sharing a single Many processes sharing a single
network interface.network interface. A single process could use multiple A single process could use multiple
protocols.protocols. More on this when we look at TCP/IP.More on this when we look at TCP/IP.
37Netprog 2002 OSI Reference Model
Modes of ServiceModes of Service
connection-oriented vs. connectionlessconnection-oriented vs. connectionless sequencingsequencing error-controlerror-control flow-controlflow-control byte stream vs. message basedbyte stream vs. message based full-duplex vs. half-duplex.full-duplex vs. half-duplex.
38Netprog 2002 OSI Reference Model
Connection-Oriented vs. Connection-Oriented vs. Connectionless ServiceConnectionless Service
A connection-oriented service includes A connection-oriented service includes the establishment of a logical the establishment of a logical connection between 2 processes.connection between 2 processes.– establish logical connectionestablish logical connection– transfer datatransfer data– terminate connection.terminate connection.
Connectionless services involve Connectionless services involve sending of independent messages.sending of independent messages.
39Netprog 2002 OSI Reference Model
SequencingSequencing
Sequencing provides support for an Sequencing provides support for an order to communications.order to communications.
A service that includes sequencing A service that includes sequencing requires that messages (or bytes) are requires that messages (or bytes) are received in the same order they are received in the same order they are sent.sent.
40Netprog 2002 OSI Reference Model
Error ControlError Control
Some services require error detection (it Some services require error detection (it is important to know when a is important to know when a transmission error has occured).transmission error has occured).
Checksums provide a simple error Checksums provide a simple error detection mechanism.detection mechanism.
Error control sometimes involves Error control sometimes involves notification and retransmission.notification and retransmission.
41Netprog 2002 OSI Reference Model
Flow ControlFlow Control
Flow control prevents the sending Flow control prevents the sending process from overwhelming the process from overwhelming the receiving process.receiving process.
Flow control can be handled a variety of Flow control can be handled a variety of ways - this is one of the major research ways - this is one of the major research issues in the development of the next issues in the development of the next generation of networks (ATM).generation of networks (ATM).
42Netprog 2002 OSI Reference Model
Byte Stream vs. MessageByte Stream vs. Message
Byte stream implies an ordered Byte stream implies an ordered sequence of bytes with no message sequence of bytes with no message boundaries.boundaries.
Message oriented services provide Message oriented services provide communication service to chunks of communication service to chunks of data called datagrams. data called datagrams.
43Netprog 2002 OSI Reference Model
Full- vs. Half-DuplexFull- vs. Half-Duplex
Full-Duplex services support the Full-Duplex services support the transfer of data in both directions.transfer of data in both directions.
Half-Duplex services support the Half-Duplex services support the transfer of data in a single direction.transfer of data in a single direction.
44Netprog 2002 OSI Reference Model
End-to-End vs. Hop-toHopEnd-to-End vs. Hop-toHop
Many service modes/features such as Many service modes/features such as flow control and error control can be flow control and error control can be done either:done either:
between endpoints of the communication.between endpoints of the communication.
-or--or-
between every 2 nodes on the path between between every 2 nodes on the path between the endpoints.the endpoints.
47Netprog 2002 OSI Reference Model
BufferingBuffering
Buffering can provide more efficient communications. Buffering can provide more efficient communications. Buffering is most useful for byte stream services.Buffering is most useful for byte stream services.
Process A Process BSendBuffer
Recv.Buffer
48Netprog 2002 OSI Reference Model
AddressesAddresses
Each communication endpoint must Each communication endpoint must have an address.have an address.
Consider 2 processes communicating Consider 2 processes communicating over an internet:over an internet:– the network must be specifiedthe network must be specified– the host (end-system) must be specifiedthe host (end-system) must be specified– the process must be specified.the process must be specified.
49Netprog 2002 OSI Reference Model
Addresses at LayersAddresses at Layers
Physical Layer: no address necessaryPhysical Layer: no address necessary Data Link Layer - address must be able Data Link Layer - address must be able
to select any host on the network.to select any host on the network. Network Layer - address must be able Network Layer - address must be able
to provide information to enable routing.to provide information to enable routing. Transport Layer - address must identify Transport Layer - address must identify
the destination process.the destination process.
50Netprog 2002 OSI Reference Model
BroadcastsBroadcasts
Many networks support the notion of Many networks support the notion of sending a message from one host to all sending a message from one host to all other hosts on the network.other hosts on the network.
A special address called the “broadcast A special address called the “broadcast address” is often used.address” is often used.
Some popular network services are Some popular network services are based on broadcasting (YP/NIS, rup, based on broadcasting (YP/NIS, rup, rusers)rusers)