1 / 46

Computer Networks (CS3623)

Computer Networks (CS3623). # 10 | Internetworking. Intro. We know how to build a single network using point-to-point links, shared media, and switches Fact & goal: networks build with various technologies to communicate with each other. The problems. Heterogeneity

cjoshua
Télécharger la présentation

Computer Networks (CS3623)

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. Computer Networks(CS3623) #10 | Internetworking

  2. Intro • We know how to build a single network using point-to-point links, shared media, and switches • Fact & goal: • networks build with various technologies • to communicate with each other

  3. The problems • Heterogeneity • establishing connectivity between two different networks via several other networks in between (may be of yet another type) • Scale • Routing • Addressing

  4. Agenda: Simple Internetworking • What is an internetwork? • Service Model • Global Addresses • Datagram Forwarding in IP • Some protocols : • Address Translation (ARP) • Host Configuration (DHCP) • Error Reporting (ICMP)

  5. Internetwork • internet vs Internet • network = directly connected or switched network uses one technology (e.g. Ethernet) • internetwork = interconnection of networks

  6. Example of internetwork

  7. Simple internetworking using IP

  8. Service Model of an internetwork • = the host-to-host services to provide • The philosophy (in the case of IP): make it undemanding enough that just about any network technology that might turn up in an internetwork would be able to provide the necessary service

  9. IP service model • BEST EFFORT • IP makes every effort to deliver datagrams, it makes no guarantees • Two parts: • Addressing scheme • Identify all hosts in the internetwork • Datagram (connectionless) model of data delivery

  10. Datagram Delivery • Every datagram carries enough information to let the network forwards the packet to its correct destination • ‘best effort’ = unreliable service • if something goes wrong (packet gets lost, corrupted, misdelivered, out of order, duplicated etc.), the network does nothing

  11. Service model: X on top of Y ? ?

  12. The ability of IP • “run over anything” • many of the technologies over which IP runs today did not exist when IP was invented • Best-effort delivery: • packets can get lost • packets can get delivered out of order • the same packet can get delivered more than once • It is up to the higher-level protocols or applications that run above IP to deal with these phenomena

  13. Intermezzo: IP over Avian Carriers • RFC1149 : A Standard for the Transmission of IP Datagrams on Avian Carriers (1 April 1990) • RFC 2549: IP over Avian Carriers with Quality of Service (1 April 1999) www.blug.linux.no/rfc1149

  14. IP Packet Format: the header • HLen: length of header in 32- bits words • TOS: type of service • Length: datagram in bytes • 2nd word  fragmentation & reassembly • TTL: hops; default = 64 • Protocol: demux key; TCP (6), UDP (17) • Checksum: header as 16-bit words

  15. Various MTU • Every network type has its own MTU (maximum transmission unit) • Eth: 1500 bytes; FDDI: 4500 bytes; PPP: 532 bytes • Choices for IP: • Make sure that IP datagram are small enough for any network technology • Packet can be fragmented & reassembled

  16. Fragmentation & Reassembly • When host sends an IP datagram • Reasonable choice: MTU of the network • Fragmentation: only if the MTU is smaller than the datagram size • Reassembly: • Done at the receiving host – not at each router • Missing fragment  receiver discard all arrived fragments

  17. Ident: chosen by the sending host; ‘unique’ • M bit in the Flag: 1 = more fragment to follow • Offset: count 8-byte chunks

  18. Global Addresses • Globally unique • Identifying all the hosts in the internetwork • Hierarchical • Support routing • IP: • network address • host address

  19. IPv4 @ classes – ‘classful’ • Class D: multicast group • Class E: currently unused

  20. IP Datagram Forwarding • the process of takinga packet from an input and sending it out on the appropriate output • Selecting appropriate output lookup table • Build up the table  routing

  21. Datagram Forwarding Alg. • For a host: one interface & only a default router in its forwarding table if (NetworkNum of destination = my NetworkNum) then deliver packet to destination directly else deliver packet to default router

  22. Datagram Forwarding Alg. (cont) • For a router: typically two or more interfaces if (NetworkNum of destination = NetworkNum of one of my interfaces) thendeliver packet to destination over that interface else if (NetworkNum of destination is in my forwarding table) thendeliver packet to NextHop router else deliver packet to default router

  23. Example #1H1  H2 • Same physical network  same network number • H1 deliver the datagram directly to H2 • Q: given H2’s IP, how to find out H2’s Eth @ ?

  24. Example #2H1  H8 • H1 sends the datagram to its default router (R1) • R1: no interface on the same network with H8 • R1 sends the datagram to R2 over Net 3 • R2: looks up H8’s net number • R2 sends the datagram to R3 over Net 4 • R3: on the same network with H8 • R3 sends the datagram directly to H8

  25. Hierarchical Aggregation  Scalability

  26. Details on IPv4  RFC 791 http://www.ietf.org/rfc/rfc0791.txt

  27. Address Translation: The main issue • IP datagrams contain IP addresses • The physical interface on the host or router only understands the addressing scheme of that particular network • Weneed to: • translate the IP address to a link-level address that makes sense on this network • encapsulate the IP datagram inside a framethat contains that link-level address

  28. Remember this...

  29. Address Resolution Protocol (ARP) • Enable each host to build up a table of mapping between IP @ and link-level @ • The entries are timed out periodically (typically 15 minutes) • If a host want to send an IP datagram to a host (or router) on the same network, it checks in the ARP table. • If no mapping exist, it invokes the ARP

  30. The ARP • Broadcasting an ARP query onto the network • Contains the target IP address • Each host receives the query and checks to see if it matches its IP address • If it does match, the host sends a response message • Contains its link-level address • The originator adds the information to its ARP table

  31. The query message... • Also include the IP @ and link-layer @ of the sending host • Broadcasted • On receiving query message: • If a host already has entry for that sending host  ‘refreshes’ (reset the timeout counter) • If the host is the target of the query  adds the information into the ARP table • Not (A or B)  do nothing

  32. ARP packet format • HardwareType: type of physical network (1 = Eth) • ProtocolType: higher-layer protocol (0x800 = IPv4) • HLen & PLen: ‘hardware’ & ‘protocol’ @ length • Operation: request or response

  33. ARP example: request-reply • Request from a host with IPv4@ 10.10.10.123 (0A.0A.0A.7B) and MAC@ 00:09:58:D8:11:22 to 10.10.10.140 (0A.0A.0A.8C) • Reply from 10.10.10.140

  34. ARP example

  35. ARP Poisoning & MitM attack

  36. Automated Host Configuration • Dynamic Host Configuration Protocol (DHCP) • Simplest level: • DHCP server as a centralized repository for host configuration information • Automatically retrieved by each host when it is booted or connected to the network • More sophisticated model: • DHCP server maintain a pool of available addresses that it hands out to host on demand

  37. DHCP server discovery • Contact the DHCP server: host broadcasts a DHCPDISCOVER message • Routers do not forward such packets • Using UDP

  38. DHCP cases • The simplest case: • One DHCP server per network • The server reply to the host generated the message • For a large number of networks: • Use a relay agent, at least one per network • When RA receives a DHCPDISCOVER, it unicasts it to the DHCP server, awaits the response, then send it back to the requesting client

  39. Relay Agent

  40. DHCP packet format • DHCP derived from BOOTP • Some of the fields are not relevant to host configuration • Client puts it HW @ in the chaddr field • The DHCP server replies by filling the yiaddr • Other info (e.g. default router) can be included in the options field

  41. DHCP Packet examples

  42. ‘Leased’ address • Host cannot keep address indefinitely and cannot depended upon to give back its address • DHCP allows addresses to be ‘leased’ for some period of time • A host with a leased address clearly needs to renew the lease periodically

  43. Error Reporting • Internet Control Message Protocol (ICMP) • Defines a collection of error messages that are sent back to the source host whenever a router or host is unable to process an IP datagram successfully • Destination host unreachable, reassembly process failed, TTL has reached 0, IP header checksum failed etc. • Also defines control messages that a router can send back to a source host.

  44. ICMP-Redirect • One of the most useful control message • Tells the source host that there is a better route to the destination • Example: • A network with two routers R1 & R2 attached to it • A host uses R1 as a default router • R1 receive a datagram from the host, based on its forwarding table R2 would have been better for a particular destination • R1 sends an ICMP-Redirect back to the host, instructing it to use R2 for the particular destination

  45. Other use of ICMP: PING

More Related