CS 640: Introduction to Computer Networks Aditya Akella Lecture 7 - IP: Addressing and Forwarding.

Slides:



Advertisements
Similar presentations
IP Forwarding Relates to Lab 3.
Advertisements

IP Addressing Introductory material.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
IPv4 Addresses. Internet Protocol: Which version? There are currently two versions of the Internet Protocol in use for the Internet IPv4 (IP Version 4)
IP Addressing and Subnetting
IST 201 Chapter 9. TCP/IP Model Application Transport Internet Network Access.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
An Engineering Approach to Computer Networking
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Winter CMPE 155 Week 8. Winter Router demos: background.
Computer Networking Lecture 8 – IP Addressing and Forwarding.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Oct 26, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar 1 ECSE-4670: Computer Communication Networks (CCN) Network Layer Shivkumar.
Computer Networking Lecture 9 – IP Packets.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
15-744: Computer Networking L-4 Routers. L -4; © Srinivasan Seshan, Routing How do routers process IP packets Forwarding lookup algorithms.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
CSEE W4140 Networking Laboratory Lecture 3: IP Forwarding and ICMP Jong Yul Kim
Introduction to TCP/IP
Computer Networking Lecture 7 – Bridging, Addressing and Forwarding Copyright ©, Carnegie Mellon University.
1 Peter Steenkiste Departments of Computer Science and Electrical and Computer Engineering Networking, Spring 2008
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Lecture 7 – IP Addressing and Forwarding
CS 6401 Efficient Addressing Outline Addressing Subnetting Supernetting.
Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing.
IP Addressing Introductory material. An entire module devoted to IP addresses.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
IPv4 Addresses. Internet Protocol: Which version? There are currently two versions of the Internet Protocol in use for the Internet IPv4 (IP Version 4)
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
Efficient Addressing Outline Addressing Subnetting Supernetting CS 640.
Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement:
ICS 156: Lecture 2 (part 1) Today:  IP addressing  Data link protocols and ARP  Notes about lab.
CS 640: Introduction to Computer Networks
1 TCP/IP Networking. 2 TCP/IP TCP/IP is the networking protocol suite most commonly used with UNIX, Windows, NT and most other OS’s. TCP/IP defines a.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Computer Networking Lecture 9 – IP Addressing and Forwarding.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 21.
IP Addressing.
Computer Networking Lecture 8 – IP Addressing and Forwarding.
CS470 Computer Networking Protocols Huiping Guo Department of Computer Science California State University, Los Angeles 4. Internetworking.
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Cisco Networking Training (CCENT/CCT/CCNA R&S) Rick Rowe Ron Giannetti.
1 Lecture, November 20, 2002 Message Delivery to Processes Internet Addressing Address resolution protocol (ARP) Dynamic host reconfiguration protocol.
5: DataLink Layer5-1 Virtualization of networks Virtualization of resources: powerful abstraction in systems engineering: r computing examples: virtual.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Introduction to Networks
Computer Communication Networks
IP: Addressing, ARP, Routing
Scaling the Network: The Internet Protocol
CS4470 Computer Networking Protocols
Distributed Systems (Section B)
CS 457 – Lecture 10 Internetworking and IP
Lecture 8 – Bridging, Addressing and Forwarding
IPv4 Addresses.
Wide Area Networks and Internet CT1403
Lecture 8 – IP Addressing & Packets
COS 461: Computer Networks
Lecture 7 – IP Addressing and Forwarding
Network Layer: Control/data plane, addressing, routers
Scaling the Network: The Internet Protocol
ECSE-4670: Computer Communication Networks (CCN)
An Engineering Approach to Computer Networking
Presentation transcript:

CS 640: Introduction to Computer Networks Aditya Akella Lecture 7 - IP: Addressing and Forwarding

2 Multiple incompatible LANs can be physically connected by specialized computers called routers The connected networks are called an internetworks –The Internet can be viewed as an internetwork of internetworks host LAN 1... host LAN 2... router WAN LAN 1 and LAN 2 might be completely different, totally incompatible LANs (e.g., Ethernet and ATM) What is an Internetwork?

3 Internet Protocol (IP) Hour Glass Model –Create abstraction layer that hides underlying technology from network application software –Make as minimal as possible –Allows range of current & future technologies –Can support many different types of applications Network technology Network applications WWW phone... SMTP HTTP RTP... TCP UDP… IP ethernet PPP… CSMA async sonet... copper fiber radio...

4 Designing an Internetwork How do I designate a distant host? –Addressing How do I send information to a distant host? –Underlying service model What gets sent? How fast will it go? What happens if it doesn’t get there? –Routing/Forwarding: What path is it sent on? Challenges –Heterogeneity Assembly from variety of different networks –Scalability Ensure ability to grow to worldwide scale

5 The Road Ahead Methods for packet forwarding Traditional IP addressing CIDR IP addressing Forwarding examples

6 Logical Structure of Internet –Ad hoc interconnection of internetworks, owned by different organizations called ISPs. No particular topology Vastly different router & link capacities –Send packets from source to destination by hopping through networks Router forms bridge from one network to another Different packets may take different routes host router

7 Approaches to Forwarding Packets Forwarding: which path to send a packet on? Choices arise both at Layer 2 and Layer 3, but we will discuss in the context of Layer 3. 1.Table of global addresses – “packet switching” –Routers keep next hop for destination –Packets carry destination address –Very common 2.Source routing –Packet carries path 3.Table of virtual circuits – “virtual circuit switching” –Connection routed through network to setup state –Packets forwarded using connection state

8 Global Addresses Each packet has destination address Each router has forwarding table of (destination  next hop) –Routing table is static – does not change with flows (cf. VCs) Distributed routing algorithm for calculating forwarding tables –Next class

9 Global Address Example Receiver Packet R Sender R2 R3 R1 RR R  3 R  4 R  3 R

10 Source Routing List entire path in packet Router processing –Strip first step from packet –Examine next step in directions –Forward to next step

11 Source Routing Example Receiver Packet R1, R2, R3, R Sender R2 R3 R1 R2, R3, R R3, RR

12 Simplified Virtual Circuits Connection-oriented packet-switching –Telephone: connection-oriented circuit-switching Connection setup phase –Use other means to route setup request –Each router allocates flow ID on local link Local significance Currently unused on link –Set up connection state Each packet carries connection ID –Sent from source with 1 st hop connection ID Router processing –Lookup flow ID – simple table lookup –Replace flow ID with outgoing flow ID –Forward to output port

13 Virtual Circuits Example Receiver Packet 1,5  3,7 Sender ,7  4, ,2  3,6 R2 R3 R Network picks a path Assigns VC numbers for flow on each link Populates forwarding table

14 Source Routing Advantages –Switches can be very simple and fast Disadvantages –Variable (unbounded) header size –Sources must know or discover topology Must also deal with failures Typical uses –Ad-hoc wireless networks –Loose source routing in overlays

15 Virtual Circuits Advantages –Source knows route exists and receiver willing to receive –Efficient lookup (simple table lookup) –More flexible (different path for each flow) –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 state Typical use  fast router/switch implementations –ATM – combined with fix sized cells –MPLS – tag switching for IP networks

16 Global Addresses Advantages –No per connection state (per source/flow) –Aggregation  also helps Scalability Disadvantages –Routers must know routes even for inactive destinations Potentially large tables –All packets to destination take same route Little flexibility –Need routing protocol to fill table Complex distributed process

17 Comparison Source RoutingGlobal Addresses Header SizeWorstOK – Large address Router Table SizeNone Number of hosts (prefixes) Forward OverheadBestPrefix matching Virtual Circuits Best Number of circuits Pretty Good Setup OverheadNone Error RecoveryTell all hostsTell all routers Connection Setup Tell all routers and Tear down circuits and re-route

18 Router Table Size One entry for every host on the Internet? –300M entries, doubling every 18 months One entry for every LAN? –Every host on LAN shares prefix –Still too many and growing quickly One entry for every organization? Better… –Every host in organization shares prefix –Requires careful address allocation

19 Addressing in IP: Considerations Hierarchical vs. flat –Wisconsin / Madison / UW-Campus / Aditya vs. Aditya: –Ethernet addresses are flat What information would routers need to route to Ethernet addresses? –Hierarchical structure crucial for designing scalable binding from interface name to route –Route to a general area, then to a specific location What type of Hierarchy? –How many levels? –Same hierarchy depth for everyone? Address broken in segments of increasing specificity –Uniform for everybody: needs centralized management –Non-uniform: more flexible, needs careful decentralized management

20 IP Addresses Fixed length: 32 bits Total IP address size: 4 billion Initial class-ful structure (1981) –Class A: 128 networks, 16M hosts –Class B: 16K networks, 64K hosts –Class C: 2M networks, 256 hosts

21 IP Address Classes (Some are Obsolete) Network IDHost ID Network IDHost ID 816 Class A 32 0 Class B 10 Class C 110 Multicast Addresses Class D 1110 Reserved for experiments Class E

22 Original IP Route Lookup Address would specify prefix for forwarding table –Simple lookup address –Class B address – class + network is –Lookup in forwarding table –Prefix – part of address that really matters for routing Forwarding table contains –List of class+network entries –A few fixed prefix lengths (8/16/24) Large tables –2 Million class C networks

23 Subnet Addressing: RFC917 (1984) Original goal: network part would uniquely identify a single physical network Inefficient address space usage –Class A & B networks too big Also, very few LANs have close to 64K hosts Easy for networks to (claim to) outgrow class-C –Each physical network must have one network number Routing table size is too high Need simple way to reduce the number of network numbers assigned –Subnetting: Split up single network address ranges –Fizes routing table size problem, partially

24 Subnetting Add another “floating” layer to hierarchy Variable length subnet masks –Could subnet a class B into several chunks Network Host Network HostSubnet Subnet Mask

25 Subnetting Example Assume an organization was assigned address (class B) Assume < 100 hosts per subnet (department) How many host bits do we need? –Seven What is the network mask? – –

26 Forwarding Example Host configured with IP adress and subnet mask Subnet number = IP (AND) Mask (Subnet number, subnet mask)  Outgoing I/F D = destination IP address For each forwarding table entry (SN, SM  OI) D1 = SM & D if (D1 == SN) Deliver on OI Else Forward to default router

27 Inefficient Address Usage Address space depletion –In danger of running out of classes A and B –Why? Class C too small for most domains Very few class A – very careful about giving them out Class B poses greatest problem –Class B sparsely populated But people refuse to give it back

28 Classless Inter-Domain Routing (CIDR) – RFC1338 Allows arbitrary split between network & host part of address –Do not use classes to determine network ID –Use common part of address as network number –Allows handing out arbitrary sized chunks of address space –E.g., addresses have the first 20 bits in common. Thus, we use these 20 bits as the network number  /20 Enables more efficient usage of address space (and router tables) –Use single entry for range in forwarding tables –Combine forwarding entries when possible

29 CIDR Example Network is allocated 8 contiguous chunks of 256-host addresses to –Allocation uses 3 bits of class C space –Remaining 20 bits are network number, written as /21 Replaces 8 class C routing entries with 1 combined entry –Routing protocols carry prefix with destination network address

30 IP Addresses: How to Get One? Network (network portion): Get allocated portion of ISP’s address space: ISP's block /20 Organization /23 Organization /23 Organization /23... ….. …. …. Organization /23

31 IP Addresses: How to Get One? How does an ISP get block of addresses? –From Regional Internet Registries (RIRs) ARIN (North America, Southern Africa), APNIC (Asia- Pacific), RIPE (Europe, Northern Africa), LACNIC (South America) How about a single host? –Hard-coded by system admin in a file –DHCP: Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” Host broadcasts “DHCP discover” msg DHCP server responds with “DHCP offer” msg Host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg

32 Back to CIDR Provider is given / / / / /23 Provider CIDR implications: Longest prefix match Route aggregation

33 Finding a Local Machine Routing Gets Packet to Correct Local Network –Based on IP address –Router sees that destination address is of local machine Still Need to Get Packet to Host –Using link-layer protocol –Need to know hardware address Same Issue for Any Local Communication –Find local machine, given its IP address host LAN 1... router WAN Destination =

34 Address Resolution Protocol (ARP) –Diagrammed for Ethernet (6-byte MAC addresses) Low-Level Protocol –Operates only within local network –Determines mapping from IP address to hardware (MAC) address –Mapping determined dynamically No need to statically configure tables Only requirement is that each host know its own IP address op Sender MAC address Sender IP Address Target MAC address Target IP Address op: Operation –1: request –2: reply Sender –Host sending ARP message Target –Intended receiver of message

35 ARP Request Requestor –Fills in own IP and MAC address as “sender” Why include its MAC address? Mapping –Fills desired host IP address in target IP address Sending –Send to MAC address ff:ff:ff:ff:ff:ff Ethernet broadcast op Sender MAC address Sender IP Address Target MAC address Target IP Address op: Operation –1: request Sender –Host that wants to determine MAC address of another machine Target –Other machine

36 ARP Reply Responder becomes “sender” –Fill in own IP and MAC address –Set requestor as target –Send to requestor’s MAC address op Sender MAC address Sender IP Address Target MAC address Target IP Address op: Operation –2: reply Sender –Host with desired IP address Target –Original requestor

37 Host Routing Table Example Host when plugged into CS ethernet Dest  routing to same machine Dest  other hosts on same ethernet Dest  special loopback address Dest  default route to rest of Internet –Main CS router: gigrouter.net.cs.cmu.edu ( ) Destination Gateway Genmask Iface eth eth lo eth0

38 The Next Lecture IP packet structure –Fragmentaiton Routers and route lookup