Reference Model Application Application (virtual network service) Presentation Presentation Session Transport (virtual session) (messages) (end-to-end packets) Session Transport Data link control Physical interface (modem) (packets) (packets) (packets) (bit pipe) Physical Physical interface interface (bit pipe) Physical Physical interface interface (bit pipe) Data link control Physical interface (modem) waveforms waveforms waveforms Physical link Physical link Physical link user's machine node of subnet node of subnet user's machine 1
Physical (modem) modulator & demodulator interface (RS-232-C,X.21) Data link control (bit pipe) Data link control modem modem modem modem Physical interface Physical interface modem Physical link Service provided to : (unreliable) bit pipe. Function: waveform design Timing of the bit sequence (1) Synchronous bit pipe ^ ^ ^ LQIR LGH LQIR (2) Intermittent bit pipe XVXD\ WKH FDVH LQ KLJKVSHHG QHWZRUN ^ LQIR LGH ^ LQIR (3) Asynchronous characters RFD DUHD QHWZRUNV E\WHV RU FKDUDFWHUV 2 VRZ FRPPXQLFDWLRQ HJ WHUPLQD WR FRPSXWHU
Interface between the module & modem DTE to DCE communications DTE 1 Local interface Control and signaling DCE 1 Transmission media DCE 2 Local interface Control and signaling DTE 2 DTE = Data Termination Equipment DCE = Data Communications Equipment Packets Packets Date link Date link control control Frames Frames Virtul synchronous unreliable bit pipe RS-232-C interface Modem Modem RS-232-C interface Interface wires Communication link Interface wires 3
Data link control () packet reliable packet link frame packet unreliable bit pipe header trailer Modem Black box Modem Function: framing, error control, retransmissions. Packets are accepted from the network adds header & trailer to form a frame supplies frames (and idle fill for a synchronous bit pipe) to lower also detects error and requests retransmission. 4
Each network node (PSE) or host (external site) has a network module, plus one module for each part. PH Packet Packet Transport & higher s of link 1 of link 2 of link 3 FH PH Packet FT PH = Packet Header FH = Flame Header FT = Frame Trailer Service it provides: end-to end packet transfer. Functions: routing & flow control. can also generate its own packets The network may be missing (e.g. in multiaccess communication systems.) 5
Function of network Routing: Source host Transport Destination host Transport end-to end packet link PSE PSE PSE PSE PSE network Packets may be delivered to the higher s in the correct order (virtual circuit service) or out of order (datagram service). FLW CNTRL: make sure the destination can absorb packets; withhold flow of packets when congestion arises. INFRMATIN BRADCAST: congestion + queueing delays, status of links and node, etc.. 6
MAC sub (Medium Access Control) user 1 user 2... user N multiaccess channel Virtul reliable packet link MAC MAC MAC Virtual bit pipe Modem Modem Modem multiaccess channel (possible collisions) Service: intermittent synchronous bit pipe. Function: MAC sub allocates the channel to each node, resolves collision, etc.. 7
Transport Source host (sesssion ) Transport virtual end-to-end message link message virtual end-to-end packet link Destination host (sesssion ) Transport 1 packet 2 packet Functions: 1. Break messages into packets (and reassemble at the destination). 2. Multiplex sessions with same destination node. 3. Split high rate sessions into multiple sessions. 4. Error control. 5. Flow control. 8
Internet sub Needed at node ( called gateways ) where two incompatible networks are joined together. Gateway Internet sub "usual" network "usual" network Function: routing and flow control between networks, conversion of packet format etc. Usually viewed as the top part of the network If gateways connect two LANs of the same type they are called bridges 9
Routing in an internet Source host Destination host Gateways s 10
Session : provides billing, access right, login functions. Presentation : provides character code conversion, data encryption, data compression. Application : provides specific information transfer services to user (e.g. ftp, rlogin, e-mail, telnet, etc) 11
Headers at each +RVW message 7UDQSRUW D\HU +RVW 7UDQSRUW D\HU message 7+ 3DFNHW 7+ 3DFNHW 7+ 3DFNHW 7+ 3DFNHW 7+ 3DFNHW 7+ 3DFNHW 1HWZRUN D\HU 1HWZRUN D\HU 1HWZRUN D\HU 3+ 7+ 3DFNHW 3+ 7+ 3DFNHW 3+ 7+ 3DFNHW '/& '/& '/& '/& )+ 3+ 7+ 3DFNHW )+ 3+ 7+ 3DFNHW )+ 3+ 7+ 3DFNHW )+ 3+ 7+ 3DFNHW Each looks only at its own header. 12
Internet's protocol graph FTP HTTP NV TFTP TCP UDP IP NET NET... NET 1 2 n FTP = File Transfer Protocol HTTP = Hyper-Text Transport Protocol NV = Video TFTP = Trivial File transport Protocol TCP = Transport Control Protocol UDP = User Datagram Protocol IP = Internet Protocol 13
ARQ: Retransmission Strategies ARQ = Automatic Repeat request. (transport ) Assume: 1. Error detection is infallible. 2. Channel preserves order of packets. 3. Packets may be arbitrarily delayed or even lost. 4. Feedback channel is error prone also. A B We want B to accept all packets sent by A only once, and in the correct order. 14
Model of frame transmission Packet departure time at A A packet 1 packet 2 packet 3 (transmitter) packet 4 packet 5 time B (receiver) Packet arrival time at B Packet 2 is lost. Packet 4 contains errors. Packet 1, 3, 5 are accepted by node B. 15
Pure Stop and Wait Protocol A packet 0 (transmitter) CRC packet 1 CRC packet 1 CRC time ACK NAK B (receiver) packet 0 accepted packet 1 accepted After sending a packet, A waits for ACK or NAK. if ACK received, A sends next packet. if NAK received, A sends same packet. If neither ACK or NAK arrives, A times-out and retransmits same packet(frame). ACK = acknowledge NAK = negative acknowledge CRC = cyclic redundancy check code 16
The use of timeouts for lost packets requires sequence numbers. A packet 0 (transmitter) CRC time out packet 0 CRC time B (receiver) ACK time packet 0 accepted packet 1 or 0? Request numbers are required on ACKs to distinguish packet asked: A 0 packet 0 timeout 0 packet 0 1 packet 1 (transmitter) B (receiver) packet 0 accepted ACK ACK? time time 17
Example using sequence number A $ 0 packet 0 0 packet 0 1 packet 1 2 packet 2 3 packet 3 B # 1 1 2 3 Request Numbers Instead of sending ACK or NAK, the receiver sends the number of the packet currently awaited. Sequence numbers and request numbers can be sent module 2 (because packets n & n+2 cannot be simultaneously in the system.) A $ 0 packet 0 0 packet 0 1 packet 1 0 packet 2 1 packet 3 B # 1 1 0 1 18
This works correctly for all combinations of delay and timeout assuming that: 1. packets travel in order on links. 2. CRC never fails to detect errors. 3. The system is correctly initialized B accepts 1,0 packet 1 but A doesn't know it 0,0 1,1 Initial state with B looking for what A is sending 0,1 B accepts packet but A doesn't know it yet Node A discovers that B has accepted packet 0 and stars to send packet 1 61 RI $ 51 RI % 19