Courtesy: Nick McKeown, Stanford More on IP and Packet Forwarding Tahir Azim.

Slides:



Advertisements
Similar presentations
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Advertisements

IP Forwarding Relates to Lab 3.
1 o Two issues in practice – Scale – Administrative autonomy o Autonomous system (AS) or region o Intra autonomous system routing protocol o Gateway routers.
CSE331: Introduction to Networks and Security Lecture 8 Fall 2002.
CS 356: Computer Network Architectures Lecture 10: IP forwarding
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Network Layer Moving datagrams. How do it know? Tom-Tom.
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
Internet Control Message Protocol (ICMP)
Network Layer – Subnetting and Control Protocols Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
Computer Networks. IP Addresses Before we communicate with a computer on the network we have to be able to identify it. Every computer on a network must.
DNS (Domain Name System) Protocol On the Internet, the DNS associates various sorts of information with domain names. A domain name is a meaningful and.
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
KIS – Cvičenie #5 IP konfigurácia v prostredí OS Windows Marián Beszédeš, B506
TCP/IP Illustracted Vol1. 제목 : IP Routing ( 수 ) 한 민 규
IP Forwarding.
Network Layer Dr. Yingwu Zhu 4-1. Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP.
L11: Link and Network layer Dina Katabi Spring Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek,
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Network Layer Dr. Yingwu Zhu 4-1. Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP.
Chapter 19 Binding Protocol Addresses (ARP) A frame transmitted across a physical network must contain the hardware address of the destination. Before.
Chapter 23 Internet Control Message Protocol used to report information and errors IP uses ICMP when it sends an error message ICMP uses IP to transport.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Presented by Rebecca Meinhold But How Does the Internet Work?
Internet Protocol: Routing IP Datagrams Chapter 8.
1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets.
Winter 2008CS244a Handout 41 CS244a: An Introduction to Computer Networks Handout 4: Layer 3 and the Internet Protocol (IP) Nick McKeown Professor of Electrical.
CS470 Computer Networking Protocols
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Packet Switch Architectures The following are (sometimes modified and rearranged slides) from an ACM Sigcomm 99 Tutorial by Nick McKeown and Balaji Prabhakar,
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
L11: Protocols and Network layer Frans Kaashoek Spring Some slides are from lectures by Nick Mckeown, Ion Stoica,Dina.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
Scaling the Network: Subnetting and Other Protocols
ROUTING.
Scaling the Network Chapters 3-4 Part 2
Traceroute traceroute is a Unix utility designed by Van Jacobson in 1987 The Windows equivalent is called tracert The Linux equivalent is called tracepath.
IP Routers – internal view
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
CS4470 Computer Networking Protocols
What is a WAN A WAN is a data communications network that covers a relatively broad geographic area WAN technologies function at the lower three layers.
Internet Control Message Protocol (ICMP)
CS 457 – Lecture 10 Internetworking and IP
IP Forwarding Relates to Lab 3.
Internet Control Message Protocol (ICMP)
Delivery and Routing of IP Packets
Internetworking Outline Best Effort Service Model
IP Forwarding Relates to Lab 3.
Scaling the Network: Subnetting and Other Protocols
IP Forwarding Relates to Lab 3.
COMPUTER NETWORKS PRESENTATION
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Packet Switch Architectures
Presentation transcript:

Courtesy: Nick McKeown, Stanford More on IP and Packet Forwarding Tahir Azim

Courtesy: Nick McKeown, Stanford Mapping Computer Names to IP addresses The Domain Naming System (DNS) Names are hierarchical and belong to a domain: –e.g. elaine17.stanford.edu –Common domain names:.com,.edu,.gov,.org,.net,.uk (or other country-specific domain). –Top-level names are assigned by the Internet Corporation for Assigned Names and Numbers (ICANN). –A unique name is assigned to each organization. DNS Client-Server Model –DNS maintains a hierarchical, distributed database of names. –Servers are arranged in a hierarchy. –Each domain has a “root” server. –An application needing an IP address is a DNS client.

Courtesy: Nick McKeown, Stanford Mapping Computer Names to IP addresses The Domain Naming System (DNS) A DNS Query 1.Client asks local server. 2.If local server does not have address, it asks a set of other designated servers. 3.If none of the designated servers have the address, the local server asks the root server of the requested domain. 4.Addresses are cached in case they are requested again. E.g. “What is the IP address of e.g. gethostbyname() Client application

Courtesy: Nick McKeown, Stanford An example of names and addresses Mapping the path between two hosts > host cms.niit.edu.pk cms.niit.edu.pk has address > tracert [traceroute or tracepath in Linux/Unix] Tracing route to arachne-lb.berkeley.edu [ ] over a maximum of 30 hops: 1 3 ms 1 ms 24 ms ms 49 ms 49 ms ms 39 ms 39 ms ms 39 ms 124 ms rwp44.pie.net.pk [ ] ms 57 ms 84 ms pos2-2.khi77gsrc1.pie.net.pk [ ] 6 60 ms 59 ms 59 ms g3-0.khi77gw1.pie.net.pk [ ] ms 204 ms 203 ms t2a6-p9-0.uk-lon2.eu.bt.net [ ] ms 229 ms 209 ms t2c1-ge7-0.uk-lon2.eu.bt.net [ ] ms 206 ms * t2c1-p3-0.uk-glo.eu.bt.net [ ] 10 * 205 ms 203 ms t2c1-p9-3.uk-eal.eu.bt.net [ ] ms 294 ms 294 ms t2c1-p5-0-0.us-ash.eu.bt.net [ ] ms 369 ms 367 ms eq-exch.bb-peer01.loudoun.va.ena.net [ ] ms 442 ms 367 ms ms 374 ms 394 ms ms * 417 ms te tr01-plalca01.transitrail.net [ ] ms * 359 ms calren-trcust.plalca01.transitrail.net [ ] ms 366 ms 357 ms ucb--svl-dc1-egm.cenic.net [ ] ms * 362 ms g3-17.inr-202-reccev.Berkeley.EDU [ ] ms 364 ms 362 ms t1-1.inr-211-srb.Berkeley.EDU [ ] ms 358 ms 374 ms arachne-lb.Berkeley.EDU [ ]

Courtesy: Nick McKeown, Stanford Example Mapping the path between two hosts cms.niit.edu.pk > host bbr2-rtr.stanford.edu | sort -n bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address bbr2-rtr.Stanford.EDU has address

Courtesy: Nick McKeown, Stanford An aside: Error Reporting (ICMP) and traceroute Internet Control Message Protocol: –Used by a router/end-host to report some types of error: –E.g. Destination Unreachable: packet can’t be forwarded to/towards its destination. –E.g. Time Exceeded: TTL reached zero, or fragment didn’t arrive in time. Traceroute uses this error to its advantage. –An ICMP message is an IP datagram, and is sent back to the source of the packet that caused the error.

Courtesy: Nick McKeown, Stanford How a Router Forwards Datagrams  Every datagram contains a destination address.  The router determines the prefix to which the address belongs, and routes it to the“Network ID” that uniquely identifies a physical network.  All hosts and routers sharing a Network ID share same physical network.

Courtesy: Nick McKeown, Stanford How a Router Forwards Datagrams 128.9/ / / / / /19 65/8 PrefixPort Next-hop R1 R2 R3 R e.g => Port 2 Forwarding/routing table

Courtesy: Nick McKeown, Stanford Forwarding Datagrams  Is the datagram for a host on a directly attached network?  If no, consult forwarding table to find next-hop.

Courtesy: Nick McKeown, Stanford Inside a router Link 1, ingressLink 1, egress Link 2, ingressLink 2, egress Link 3, ingressLink 3, egress Link 4, ingressLink 4, egress Choose Egress Choose Egress Choose Egress Choose Egress

Courtesy: Nick McKeown, Stanford Inside a router Link 1, ingressLink 1, egress Link 2, ingressLink 2, egress Link 3, ingressLink 3, egress Link 4, ingressLink 4, egress Choose Egress Choose Egress Choose Egress Forwarding Decision Forwarding Table

Courtesy: Nick McKeown, Stanford Forwarding in an IP Router Lookup packet DA in forwarding table. –If known, forward to correct port. –If unknown, either (i)drop packet, or (ii)forward to some default port Decrement TTL, update header Checksum. Forward packet to outgoing interface. Transmit packet onto link. Question: How is the address looked up in a real router?

Courtesy: Nick McKeown, Stanford Making a Forwarding Decision Class-based addressing Class AClass BClass CD Class A Class B Class C Port 4 Exact Match Routing Table: IP Address Space

Courtesy: Nick McKeown, Stanford Associative Lookups “Contents addressable memory” (CAM) Network Address Port Number Associative Memory or CAM Search Data 32 Port Number Hit? Advantages: Simple Disadvantages Slow High Power Small Expensive Search data is compared with every entry in parallel All 2 32 addresses are not stored

Courtesy: Nick McKeown, Stanford Hashed Lookups Hashing Function Memory Address Data Search Data Port number Hit? { 16 32

Courtesy: Nick McKeown, Stanford Lookups Using Hashing An example Hashing Function 16 #1#2#3#4 #1#2 #1#2#3 Linked list of entries with same hash key. Memory Search Data Port number Hit? 32

Courtesy: Nick McKeown, Stanford Lookups Using Hashing Advantages: Simple Expected lookup time can be small Disadvantages Non-deterministic lookup time Inefficient use of memory

Courtesy: Nick McKeown, Stanford Trees and Tries Binary Search Tree: <> <><> log 2 N N entries Binary Search Trie: (“reTRIEval”) Requires 32 memory references, regardless of number of addresses.

Courtesy: Nick McKeown, Stanford Search Tries Multiway tries reduce the number of memory references 16-ary Search Trie 0000, ptr1111, ptr 0000, 01111, ptr , , ptr Question: Why not just keep increasing the degree of the trie?

Courtesy: Nick McKeown, Stanford Classless Addressing CIDR / / / / /24 Most specific route = “longest matching prefix” Question: How can we look up addresses if they are not an exact match?

Courtesy: Nick McKeown, Stanford Ternary CAMs ValueMask Priority Encoder Port Associative Memory Port Note: Most specific routes appear closest to top of table Ternary CAM allows a third matching state of "X" or "Don't Care" for one or more bits in the stored dataword For example, a ternary CAM might have a stored word of "10XX0" which will match any of the four search words "10000", "10010", "10100", or "10110".

Courtesy: Nick McKeown, Stanford Longest prefix matches using Binary Tries Example Prefixes: a) b) c) d) 001 e) 0101 f) 011 g) 10 h) 1010 i) 111 j) e f g h i j 01 a bc d k k)

Courtesy: Nick McKeown, Stanford Lookup Performance Required LineLine RatePkt­size=40BPkt­size=240B T11.5Mbps4.68Kpps0.78Kpps OC3155Mbps480Kpps80Kpps OC12622Mbps1.94Mpps323Kpps OC482.5Gbps7.81Mpps1.3Mpps OC19210Gbps31.25Mpps5.21Mpps

Courtesy: Nick McKeown, Stanford Discussion Why was the Internet Protocol designed this way? –Why connectionless, datagram, best-effort? –Why not automatic retransmissions? –Why fragmentation in the network? Must the Internet address be hierarchical? What address does a mobile host have? Are there other ways to design networks? Google: Clean Slate Internet Design