Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Comnet 2006 Communication Networks Recitation 7 Lookups & RDT.

Similar presentations


Presentation on theme: "1 Comnet 2006 Communication Networks Recitation 7 Lookups & RDT."— Presentation transcript:

1 1 Comnet 2006 Communication Networks Recitation 7 Lookups & RDT

2 2 Comnet 2006 Lookup and Forwarding Engine header payload Packet Router Destination Address Outgoing Port Destination Port Forwarding Table Routing Lookup Data Structure 65.0.0.0/8 128.9.0.0/16 149.12.0.0/19 3 1 7

3 3 Comnet 2006 0 2 24 2 32 -1 128.9.0.0/16 65.0.0.0 142.12.0.0/19 65.0.0.0/8 65.255.255.255 Example Forwarding Table Destination IP Prefix Outgoing Port 65.0.0.0/ 8 3 128.9.0.0/161 142.12.0.0/197 IP prefix: 0-32 bits Prefix length 128.9.16.14

4 4 Comnet 2006 Prefixes can Overlap 128.9.16.0/21128.9.172.0/21 128.9.176.0/24 Find the longest matching prefix among all prefixes that match the destination address. 0 2 32 -1 128.9.0.0/16 142.12.0.0/19 65.0.0.0/8 128.9.16.14 Longest matching prefix

5 5 Comnet 2006 LPM in IP Routers Using 32 exact match algorithms for LPM! Exact match against prefixes of length 1 Exact match against prefixes of length 2 Exact match against prefixes of length 32 Network Address Port Priority Encode and pick

6 6 Comnet 2006 LPM in IP Routers Binary tries Example Prefixes a) 00001 b) 00010 c) 00011 d) 001 e) 0101 f) 011 g) 100 h) 1010 i) 1100 j) 11110000 e f g h i j 01 a bc d

7 7 Comnet 2006 LPM in IP Routers “Patricia” trie Example Prefixes a) 00001 b) 00010 c) 00011 d) 001 e) 0101 f) 011 g) 100 h) 1010 i) 1100 j) 11110000 e f g h i j Skip 5 10000 01 a bc d

8 8 Comnet 2006 (exact match) (range match) Each prefix is encoded as a range, find narrowest enclosing range. A B 13 Binary Search

9 9 Comnet 2006 Reliable Transmission How do we send a packet reliably when it can be lost and/or corrupted in the network?How do we send a packet reliably when it can be lost and/or corrupted in the network? MechanismsMechanisms –Acknowledgements –Timeouts Simplest reliable protocol: Stop and WaitSimplest reliable protocol: Stop and Wait –send a packet –stop and wait until an ACK arrives from the receiver –retransmit if timeout occurs before ACK arrives

10 10 Comnet 2006 Stop and Wait

11 11 Comnet 2006 Recovering from Errors

12 12 Comnet 2006 Problems with Stop and Wait How does the receiver recognize a duplicate transmission (e.g. in the case of a lost ACK)?How does the receiver recognize a duplicate transmission (e.g. in the case of a lost ACK)? –Solution: Put sequence number in packet PerformancePerformance –No pipeline effect –Example For a l.5 Mbps link with 45 ms RTTFor a l.5 Mbps link with 45 ms RTT Bandwidth-delay product = 67.5 Kb (~8KB)Bandwidth-delay product = 67.5 Kb (~8KB) 1KB packets imply 1/8th link utilization1KB packets imply 1/8th link utilization

13 13 Comnet 2006 Sequence Numbers Detect retransmissions using sequence numbersDetect retransmissions using sequence numbers –both packets and ACKs Sequence # in packet is finiteSequence # in packet is finite How many bits do we need?How many bits do we need? –1 bit for stop and wait –Won’t send seq #1 until receive ACK for seq #0

14 14 Comnet 2006 What if packets are reordered? Never reuse a seq #? Finite…Never reuse a seq #? Finite… Require in order delivery? Unreliable network …Require in order delivery? Unreliable network … Prevent very late delivery?Prevent very late delivery? –TTL: Decrement hop count per packet, discard if exceeded –Seq # not reused within delay bound


Download ppt "1 Comnet 2006 Communication Networks Recitation 7 Lookups & RDT."

Similar presentations


Ads by Google