UW-Madison CS 640 - Lecture 6 - Error-Flow Control

Unformatted text preview:

CS 640: Computer NetworksError CodingParity2-D ParityEffectiveness of 2-D ParitySlide 6Cyclic Redundancy Codes (CRC)Link Flow Control and Error ControlFlow Control: A Naïve ProtocolAdding Flow ControlWindow Flow ControlWindow LimitationsError Control: Stop and Wait CaseWhat is Used in Practice?Switching and Media Access ControlA Switch-based NetworkThree techniques for switchingGlobal Address ExampleGlobal AddressesSimplified Virtual Circuits ExampleVirtual CircuitsSource Routing ExampleSource RoutingComparisonMost Popular: Address Lookup-based ApproachMultiple Access ProtocolsFiber Distributed Data Interface (FDDI)Other “Taking Turn” ProtocolsCS 640: Computer NetworksAditya AkellaLecture 6 -Error/Flow Control&Intro to Switchingand Medium Access ControlError Coding•Transmission process may introduce errors into a message.–Single bit errors versus burst errors•Detection: e.g. CRC–Requires a check that some messages are invalid–Hence requires extra bits–“redundant check bits”•Correction–Forward error correction: many related code words map to the same data word–Detect errors and retry transmissionParity•Even parity–Append parity bit to 7 bits of data to make an even number of 1’s–Odd parity accordingly defined.•1 in 8 bits of overhead?–When is this a problem?•Can detect a single error•But nothing beyond that101010010010111010101011000010102-D Parity•Make each byte even parity•Finally, a parity byte for all bytes of the packet•Example: five 7-bit character packet, even parity 01101001011010001011011101011001011101101000110 1Effectiveness of 2-D Parity•1-bit errors can be detected, corrected•Example with even parity per byte:01101001011010000011011101011001011101101000110 1error bitodd number of 1’s•2-bit errors can also be detected•Example:•What about 3-bit errors? >3-bit errors?011010010110100000111 11101011001011101101000110 1error bitsodd number of 1’sEffectiveness of 2-D Parityeven number of 1’s - OkCyclic Redundancy Codes(CRC)•Commonly used codes that have good error detection properties–Can catch many error combinations with a small number or redundant bits•Based on division of polynomials–Errors can be viewed as adding terms to the polynomial–Should be unlikely that the division will still work•Can be implemented very efficiently in hardware•Examples:–CRC-32: Ethernet–CRC-8, CRC-10, CRC-32: ATMLink Flow Control and Error Control•Dealing with receiver overflow: flow control.•Dealing with packet loss and corruption: error control.•Actually these issues are relevant at many layers.–Link layer: sender and receiver attached to the same “wire”–End-to-end: transmission control protocol (TCP) - sender and receiver are the end points of a connection•How can we implement flow control?–“You may send” (windows, stop-and-wait, etc.)–“Please shut up” (source quench, 802.3x pause frames, etc.)Flow Control: A Naïve Protocol•Sender simply sends to the receiver whenever it has packets.•Potential problem: sender can outrun the receiver.–Receiver too slow, small buffer overflow, ..•Not always a problem: receiver might be fast enough.SenderReceiverAdding Flow Control•Stop and wait flow control: sender waits to send the next packet until the previous packet has been acknowledged by the receiver.–Receiver can pace the sender•Drawbacks: adds overheads, slowdown for long links.SenderReceiverWindow Flow Control•Stop and wait flow control results in poor throughput for long-delay paths: packet size/ roundtrip-time.•Solution: receiver provides sender with a window that it can fill with packets.–The window is backed up by buffer space on receiver–Receiver acknowledges the a packet every time a packet is consumed and a buffer is freedSenderReceiverWindow LimitationsSenderReceiverTimeThroughput = Window SizeRoundtrip TimeRTTWindow Size = 4pktsError Control: Stop and Wait Case•Packets can get lost, corrupted, or duplicated. •Duplicate packet: use sequence numbers.•Lost packet: time outs and acknowledgements.–Positive versus negative acknowledgements–Sender side versus receiver side timeouts•Window based flow control: more aggressive use of sequence numbers (see transport lectures).SenderReceiverWhat is Used in Practice?•No flow or error control.–E.g. regular Ethernet, just uses CRC for error detection•Flow control only.–E.g. Gigabit Ethernet•Flow and error control.–E.g. X.25 (older connection-based service at 64 Kbs that guarantees reliable in order delivery of data)Switching and Media Access Control•How do we transfer packets between two hosts connected to the a switched network?•Switches connected by point-to-point links -- store-and-forward.–Multiplexing and forwarding–Used in WAN, LAN, and for home connections–Conceptually similar to “routing”•But at the datalink layer instead of the network layer•Multiple access networks -- contention based.–Multiple hosts are sharing the same transmission medium–Used in LANs and wireless–Need to control access to the mediumA Switch-based Network•Switches are connected by “point-to-point” links.•Packets are forwarded hop-by-hop by the switches towards the destination.–Many forms of forwarding•Many datalink technologies use switching.–Virtual circuits: Frame-relay, ATM, X.25, ..–Packets: Ethernet, MPLS, …PC atHomeSwitchPoint-PointlinkPCs atWorkThree techniques for switching•Global addresses - connection-less–Routers keep next hop for destination–Packets carry destination address•Virtual circuits – connection oriented–Connection routed through network to set up state–Packets forwarded using connection state •Source routing–Packet carries pathGlobal Address ExampleReceiverPacketRSender234123412341S2S3S1RRR  3R  4R  3RGlobal Addresses•Advantages–Stateless – simple error recovery•Disadvantages–Every switch knows about every destination•Potentially large tables–All packets to destination take same route–Need special approach to fill tableSimplified Virtual CircuitsExampleReceiverPacketconn 5  3Sender2341conn 5  423412341conn 5  3S2S3S15 555Virtual Circuits•Advantages–Efficient lookup (simple table lookup)–Can reserve bandwidth at connection setup–Easier for hardware implementations•Disadvantages–Still need to route connection setup request–More complex failure recovery – must recreate connection


View Full Document

UW-Madison CS 640 - Lecture 6 - Error-Flow Control

Documents in this Course
Security

Security

21 pages

Mobile IP

Mobile IP

16 pages

Lecture 7

Lecture 7

36 pages

Multicast

Multicast

38 pages

Load more
Download Lecture 6 - Error-Flow Control
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 6 - Error-Flow Control and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 6 - Error-Flow Control 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?