1 / 37

Scaling the Network Chapters 3-4 Part 1

Scaling the Network Chapters 3-4 Part 1. Networking CS 3470, Section 1. Network Layer: Introduction. How does it all fit? Data link layer Delivers frames between two physically connected hosts Network layer

cshine
Télécharger la présentation

Scaling the Network Chapters 3-4 Part 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scaling the Network Chapters 3-4 Part 1 Networking CS 3470, Section 1

  2. Network Layer: Introduction • How does it all fit? • Data link layer • Delivers frames between two physically connected hosts • Network layer • Delivery of packets from machine to machine • Hop by hop between hosts and routers • Transport layer • Between two end hosts

  3. Network Layer Functions • Addressing • Globally unique address for each routable device • Logical address, unlike MAC address • Assigned by network operator • Need to map to MAC address • Forwarding • From input port to appropriate output port in a router • Routing • Which path to use to forward packets from src to dest

  4. Today • Finish network forwarding • Internet Protocol (IP) • Start addressing

  5. Network Layer Forwarding • Forwarding input port to appropriate output port in a router • We already talked about forwarding over the network layer • Datagram / Connectionless • Virtual Circuit Switching • Which one is used with IP?

  6. Datagram vs Virtual Circuit • Datagram (example: IP) • Data exchange among computers • “Elastic” service, no strict timing req. • “Smart” end systems (computers) • Can adapt, perform control, error recovery • Simple inside network, complexity at “edge” • Many link types • Different characteristics • Uniform service difficult

  7. Datagram vs Virtual Circuit • Virtual Circuit (Example: ATM) • Evolved from telephony • Human conversation: • Strict timing, reliability requirements • Need for guaranteed service • Quality of service • “Dumb” end systems • Telephones • Complexity inside network

  8. Internetworking • What is an internetwork? • An arbitrary collection of networks interconnected to provide some sort of host-host packet delivery service A simple internetwork where H represents hosts and R represents routers

  9. IP • IP stands for Internet Protocol • Key tool used today to build scalable, heterogeneous internetworks • It runs on all the nodes in a collection of networks and defines the infrastructure that allows these nodes and networks to function as a single logical internetwork

  10. IP • A IP router is a gateway from one network to another • Can interface with many network types • Ethernet • Token Ring • FDDI • Sonet • Wireless • ... more

  11. [TCP/UDP]/IP • Two well-known transport level protocols that run on top of IP at the hosts are UDP and TCP • TCP • Connection-based protocol • Error recovery • Packets arrive in order • UDP • Connectionless protocol • No error recovery • Packets can arrive in any order, or not at all

  12. Internetworking • A simple internetwork showing the protocol layers • IP connects them all!

  13. IP Service Model • Packet Delivery Model • Connectionless model for data delivery • Best-effort delivery (unreliable service) • packets are lost • packets are delivered out of order • duplicate copies of a packet are delivered • packets can be delayed for a long time • Global Addressing Scheme • Provides a way to identify all hosts in the network

  14. Packet Format • Version (4): currently 4 • Hlen (4): number of 32-bit words in header • TOS (8): type of service (not widely used) • Length (16): number of bytes in this datagram

  15. Packet Format • Ident (16): used by fragmentation • Flags/Offset (16): used by fragmentation • TTL (8): number of hops this datagram has traveled • Protocol (8): (TCP=6, UDP=17) • Checksum (16): of the header only • DestAddr & SrcAddr (32)

  16. IP Fragmentation and Reassembly • Each network has some MTU (Maximum Transmission Unit) • Ethernet (1500 bytes), FDDI (4500 bytes) • Strategy • Fragmentation occurs in a router when it receives a datagram that it wants to forward over a network which has (MTU < datagram) • Reassembly is done at the receiving host • All the fragments carry the same identifier in the Ident field • Fragments are self-contained datagrams • IP does not recover from missing fragments

  17. IP Fragmentation and Reassembly IP datagrams traversing the sequence of physical networks

  18. IP Fragmentation and Reassembly Header fields used in IP fragmentation. (a) Unfragmented packet; (b) fragmented packets.

  19. IP Addressing • Globally unique logical address for a host • Address resolution • Logical to physical address mapping • Is possible to address any host in the network • Even if on different physical network

  20. IP Addressing • A 32-bit number that uniquely identifies a location • Written using dotted decimal notation • Common form: 134.161.240.211 • Binary representation: 10000110 10100001 11110000 11010011 • Two-level hierarchy: network id and host id • Network IDs administered by Internet Assigned Number Authority (IANA) • Host IDs administered locally

  21. IP Addressing • IP address is assigned to each network interface (NIC) • Routers connect two or more physical networks • Each interface has its own address • Multi-homed host • A host having multiple connections to Internet • Multiple addresses identify the same host • Does not forward packets between its interfaces

  22. IP Addressing • Classful addressing scheme separates groups of addresses into classes • Class A • 8 bits used for network (256) • 24 bits used for hosts and network devices (16,777,216) • Binary address starts with 0 • Class B • 16 bits for networks (65,536) • 16 bits for hosts and network devices (65,536) • binary address starts with 10 • Class C • 24 bits for the network (16,777,216) • 8 bits for the host (256) • Binary address starts with 110

  23. class 1.0.0.0 to 127.255.255.255 A network 0 host 128.0.0.0 to 191.255.255.255 B multicast address 1110 network host 110 192.0.0.0 to 223.255.255.255 C network 10 host 224.0.0.0 to 239.255.255.255 D 32 bits IP “Classful” Addressing Scheme • Three unicast address classes: A, B, and C • One multicast: class D

  24. Classless Inter-Domain Routing • Classful addressing scheme wasteful • IP address space exhaustion • Class B net allocated enough for 65K hosts • Even if only 2K hosts in that network • Solution: Classless Inter Domain Routing (CIDR) • Eliminate class distinction • No A,B,C • Keep multicast class D

  25. host part network part 11001000 000101110001000 0 00000000 200.23.16.0/23 Classless Addressing • Addresses allocated in contiguous blocks • Number of addresses assigned always power of 2 • Network portion of address is of arbitrary length • Address format: a.b.c.d/x • x is number of bits in network portion of address

  26. 223.1.1.1 223.1.2.1 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 LAN 223.1.3.2 223.1.3.1 IP Addressing first 24 bits are network address

  27. 223.1.1.2 223.1.1.1 223.1.1.4 223.1.1.3 223.1.7.0 223.1.9.2 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 223.1.3.27 223.1.2.6 223.1.3.1 223.1.3.2 223.1.2.1 223.1.2.2 IP Addressing first 24 bits are network address Interconnected system consisting of six networks

  28. Special IP Addresses • Network address: host id = all 0’s • Directed broadcast address: host id = all 1’s • Local broadcast address: all 1’s • Local host address (this computer): all 0’s • Loopback address • network id = 127, any host id (e.g. 127.0.0.1)

  29. Private IP Addresses • Some addresses are not globally routable • IP packets created by these addresses cannot be transmitted into the public domain • Commonly used for home, office, and enterprise LANS

  30. Private IP Addresses

  31. Private IP addresses • Router uses Network Address Translation (NAT) to send IP packets from private IP addresses onto public networks • Router places it’s own IP address as destination • Maintains table, knows which host to route addresses Router keeps translation table

  32. Address Resolution • IP address is virtual • Not understood by underlying physical networks • IP packets need to be transmitted by the underlying physical network • Address resolution • Translating IP address to physical address • Address Resolution Protocol (ARP)

  33. ARP • A router has to know where to deliver packets on the local network • ARP is used to discover MAC addresses based on IP addresses arp who-has 192.168.10.1 tell node31.ceee.lab arp reply 192.168.10.1 is-at 00:60:08:ce:9d:3b arp who-has node31.ceee.lab tell 192.168.10.254 arp reply node31.ceee.lab is-at 00:02:3f:b4:cd:87

  34. ARP Cache • Each computer maintains a cachetable • IP address  hardware address mapping • Only about computers on the same network • Try out “/usr/sbin/arp –a” command • Exchanges ARP messages • To resolve IP addresses with unknown hardware addresses • Encapsulated in DLL frame (e.g., Ethernet data frame)

  35. ARP Protocol • When a node sends an IP packet • To another node on the same physical network • Look up destination address in the ARP table • If not found • Broadcast a request to the local network • Whose IP address is this? • What info should the request message contain?

  36. ARP Response • The target node responds to sender (unicast?) • With its physical address • Adds the requester into its ARP table (why?) • On receiving the response • Requester updates its table • Other nodes upon receiving the request • Refresh the requester entry if already there • No action otherwise (why?) • Table entries deleted if not refreshed for a while

  37. ARP Example • ARP broadcast by W requesting hardware address of Y

More Related