ICOM 6115 Computer Networks and the WWW Manuel
- Slides: 26
ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph. D. Lecture 15 ICOM 6115 ©Manuel Rodriguez-Martinez
Lecture Objectives • Understand the services provided by the Data Link Layer (Layer 2) – Flow Control • Stop-and-Wait • Sliding Window • Introduction to the Medium Access Control (MAC) Sublayer ICOM 6115 ©Manuel Rodriguez-Martinez
Flow Control • Problem – How can the sender reliably send frames to receiver without overrunning it? • Key Issues – Reliably • Make sure the frame gets there – Detect error – Possibly retransmit – Overrunning • Make sure receiver has time to handle frames – Otherwise, frames will be lost causing retransmission ICOM 6115 ©Manuel Rodriguez-Martinez
Design Issues • Need a way to mark frames – Sequence numbers – Allows receiver to keep track of has arrived and what is missing • Need a way to acknowledge the receipt of a frame – ACK • Must also be numbered • Need a protocol to govern transmission and retransmission ICOM 6115 ©Manuel Rodriguez-Martinez
Frame Header TYPE • • • SEQ NO ACK NO FLAGS SNDR RECV TYPE – frame type (ACK or REGULAR) SEQNO – sequence number for the frame ACKNO – ACK number FLAGS – other control flags SNDR – address of sender RECV – address of receiver ICOM 6115 ©Manuel Rodriguez-Martinez
ARQ Algorithms • Automatic Repeat Request (ARQ) Algorithms – Used to control flow of frames • Based on these ideas – ACK • Indicate receipt of packet – Timeout • Indicate that an ACK for a packet X has not arrived – Forces retransmission ICOM 6115 ©Manuel Rodriguez-Martinez
Stop and Wait • Sender can send 1 frame at a time • Waits for ACK from receiver • Two modes – Simplex with timeout ICOM 6115 ©Manuel Rodriguez-Martinez
Sender Side Algorithm While there is data to send 1. Read next packet P 2. Get a new frame F • • 3. 4. 5. F. data = P F. seqnum = next_seqno++ % 1; Send frame F Set timer for F Wait for event t • If t is timeout // no ACK got here • • else if t is ACK for F // ACK for this frame • • • Stop timer Goto 1 else // old ACK • ICOM 6115 Goto 3 Goto 5 ©Manuel Rodriguez-Martinez
Some issues … • Here each packet is acknowledge – At least two frames must be exchanged • Client and server must take turns as senders as receivers (dual behavior) – Client request • Client is the sender • Server is the receiver – Server response • Server is the sender • Client is the receive ICOM 6115 ©Manuel Rodriguez-Martinez
Major Limitations is Channel Usage • Consider a 1. 5 Mbps link, with 45 msec RTT where frames can be up to 1 KB • What is the rate at which packets are sent? – Well, when a packet is sent, we must wait 1 RTT to send the next one • Must Wait for ACK – Data rate is then • (1024 * 8) /45 msec = 182 Kpbs ICOM 6115 ©Manuel Rodriguez-Martinez
Receiver Side Algorithm 1. 2. 3. 4. While there is data to receive Get new data frame F Read F If F. seq_no == next_seqno • • Pass F. data to network layer Get new ACK frame A • • • ICOM 6115 A. seqnum = next_seqno; next_seqno= 1 – next_seqno; Send A ©Manuel Rodriguez-Martinez
Lesson here • Stop-And-Wait wastes channel bandwidth • In previous example – Link bandwidth = 1. 5 Mbps – Throughput with Stop-and-Wait = 180 Kbps – Effective utilization is 12% • 88% of bandwidth is wasted • We need to keep pipe full – Send delay x bandwidth worth of frames – If we need to wait for ack, we might as well throw many frames in ICOM 6115 ©Manuel Rodriguez-Martinez
Sliding Window Protocol • Idea is to send a group of frames over the link – Called outstanding frames – Delay x bandwidth worth of them – Must be buffered until they get ACK • As acknowledgments start to arrive, outstanding frames are liberated • Once the window is extended, more frames can be sent ICOM 6115 ©Manuel Rodriguez-Martinez
Sliding Window Algorithm ICOM 6115 1 2 3 4 5 6 7 ©Manuel Rodriguez-Martinez
Sliding Window Sender Basics • Each frame can be assigned a sequence number • Sender must keep the following state – SWS – sender window size • Number of frames I can have outstanding – LAR – Last Acknowledge Frame • Last one receive told me she got! – LFS – Last frame sent • Invariant: LFS – LAR <= SWS ICOM 6115 ©Manuel Rodriguez-Martinez
Sender Side of Sliding Windows Outstanding Frames • Outstanding frames must be kept buffered – In case they must be retransmitted • Sender can only move window to the right when it receive ACK for frame LAR + 1. – In which case LFS = LFS + 1 ICOM 6115 ©Manuel Rodriguez-Martinez
Sender Behavior • Loop – emitting frames up to SWS – Start timers for outstanding frames – When ACK arrives • • If duplicate ACK do nothing If not, then mark packet as ACK and stop timer – Move window to the right by a value X • X is the largest of number contiguous frames that have been ACK – LFS = LFS + X, LAR = LAR + X ICOM 6115 ©Manuel Rodriguez-Martinez
Sliding Window Receiver Basics • Receiver must keep the following state – RWS – receiver window size • Frames that must be buffered before passing to network layer – Server to put frames in order! • LAF – largest acceptable frame – Frames with highest sequence number to be accepted • LFR – last frame received – Last frame to got here and I have ACK • Invariant: LAF – LFR <= RWS ICOM 6115 ©Manuel Rodriguez-Martinez
Receiver side of Sliding Window LFR Outstanding Frames • Outstanding frames must be buffered – To give them in order to network layer – Receiver can move window only when frame with seq number NFE = LFR + 1 arrives • In which case, LFA = LFA + 1 ICOM 6115 ©Manuel Rodriguez-Martinez
Receiver Behavior • Loop – Read frames – When Frames arrives • • If duplicate frame do nothing If not, then store frame and send ACK – Move window to the right by a value X • X is the largest of number contiguous frames that have been RECEIVED – LFA = LFA + X, LFR = LFR + X ICOM 6115 ©Manuel Rodriguez-Martinez
Some issues • Lost frames cause gaps on window • Slow down data transfers since windows can only move when contiguous frames have been ACK ICOM 6115 ©Manuel Rodriguez-Martinez
Medium Access Control (MAC) Sublayer • Lower part of the Data Link Layer for multiaccess networks – e. g. Bus networks like Ethernet • MAC has the protocols to control which host get access to the network • Logical Link Control (LLC) – Actual Data Link Services • Connectionless No ACKs • Connectionless with ACKs • Connection-oriented with ACKs ICOM 6115 ©Manuel Rodriguez-Martinez
A View of the Data Link Layer ICOM 6115 ©Manuel Rodriguez-Martinez
Why have a LLC? • Split Data Link Layer – MAC is specific to the physical network • Various Flavors of Ethernet • Various Flavors of Wi. FI (802. 11 a or 802. 11 b) – LLC is common to all • Build just one version of this • Permits backward compatibility or interoperability • 802. 11 a y 802. 11 b share LLC – MAC is specific to interface with physical layer ICOM 6115 ©Manuel Rodriguez-Martinez
Example MAC sublayers • • • IEEE 802. 3 – Ethernet IEEE 802. 5 – IBM Token Ring IEEE 802. 11 – Wireless LAN IEEE 802. 15 – Personal LAN (Bluetooth) IEEE 802. 16 – Broadband Wireless – Wireless Local Loop • All these share a common LLC – IEEE 802. 2 ICOM 6115 ©Manuel Rodriguez-Martinez
Services provided by MAC sublayer • Addressing – MAC Address • Given to the network interface card • • Frame generation Checksum computation Error detection Arbitration for channel access – Conflict detection and resolution ICOM 6115 ©Manuel Rodriguez-Martinez
- Datagram approach and virtual circuit approach
- Backbone networks in computer networks
- Icom ic-2730a vs kenwood tm-v71a
- Papasys
- ämaps
- Icom model project management
- Diffserv vs intserv
- Checksum in computer networks with example
- Byte stuffing and bit stuffing
- Byte stuffing in computer network
- Arp rarp protocol
- Analog and digital signals in computer networking
- Web and http in computer networks
- Computer networks and internets with internet applications
- Hamming distance in computer network
- Protocols and standards in computer networks
- Error detection computer networks
- Computer networks and internets
- Crc in computer networks
- Crc in computer networks
- Traffic management in computer networks
- Tanenbaum
- What is optimality principle in computer networks
- Snmp ports
- What is optimality principle in computer networks
- Applications of computer networks
- Definition of computer