The Network Layer FTP HTTP SMTP TCP DNS

  • Slides: 25
Download presentation
The Network Layer FTP HTTP SMTP TCP DNS Finger transport layer UDP network layer

The Network Layer FTP HTTP SMTP TCP DNS Finger transport layer UDP network layer IP Ethernet ATM application layer modem SHRIMP data link layer COS 461 Fall 1997

Internetworking u challenge: how to tie together diverse networks into a single meta-network u

Internetworking u challenge: how to tie together diverse networks into a single meta-network u goes beyond bridges – spans heterogeneous networks – must scale to millions of hosts u terminology – internetwork: any combination of networks – Internet: a particular internetwork we all use COS 461 Fall 1997

Internetworking u three facets: – addressing: how hosts are named – service model: how

Internetworking u three facets: – addressing: how hosts are named – service model: how hosts interact with the network – routing: how a route from sender to destination is chosen u several versions of IP exist – everybody uses version 4 now – version 6 is coming COS 461 Fall 1997

Who Runs the Internet? u nobody! u the Internet Engineering Task Force (IETF) declares

Who Runs the Internet? u nobody! u the Internet Engineering Task Force (IETF) declares technical standards, and then everybody follows them u the IETF negotiates a standard with the major players, and people do what they want, influenced by the IETF standard u who elects the IETF? COS 461 Fall 1997

Addressing u unique 32 -bit address for each host u two-level address: (network, host)

Addressing u unique 32 -bit address for each host u two-level address: (network, host) u dotted-decimal notation (128. 112. 153. 27) u three address formats class A class B class C 0 7 24 network host 10 14 16 network host 21 8 network host COS 461 Fall 1997

Two-Level Addressing u network is a single (extended) LAN – provides physical address for

Two-Level Addressing u network is a single (extended) LAN – provides physical address for each host – can deliver packets between all hosts in network u outside hosts treat a network as a black box u advantages of two-level approach – can remember single route for a whole network – host numbers can be allocated locally COS 461 Fall 1997

Three-Level Addressing u (network, subnet, host) – subnet and host numbers managed locally –

Three-Level Addressing u (network, subnet, host) – subnet and host numbers managed locally – outside can’t tell two-level from three-level u variable division of address bits between subnet and host parts – determined by subnet mask u subnet is a single LAN u subnets treat each other as black boxes COS 461 Fall 1997

Translating Addresses u IP uses IP addresses, but a network uses physical addresses –

Translating Addresses u IP uses IP addresses, but a network uses physical addresses – must translate to communicate within network u each host keeps a list of IP-to-physical translations – forgotten every 15 minutes or so u Address Resolution Protocol (ARP) translates IP address to physical address COS 461 Fall 1997

ARP u querying host broadcasts a packet asking for a translation for some IP

ARP u querying host broadcasts a packet asking for a translation for some IP address u host with that IP address answers with ARP response containing the physical address – all hosts know their own addresses u query contains translation for the querying host – other hosts learn from the query COS 461 Fall 1997

RARP u reverse Address Resolution Protocol (RARP) translates physical to IP u works just

RARP u reverse Address Resolution Protocol (RARP) translates physical to IP u works just like ARP u allows a host to learn its own IP address after it boots – table of address mappings stored on a server » maintained by administrator COS 461 Fall 1997

DHCP u Dynamic Host Configuration Protocol (DHCP) allows host to learn its own network

DHCP u Dynamic Host Configuration Protocol (DHCP) allows host to learn its own network parameters u on startup, host broadcasts DHCP query u server responds with all the information host needs to function on the Internet u used on many PC networks COS 461 Fall 1997

Service Model u unreliable datagram service – transmits data in variable size chunks (datagrams)

Service Model u unreliable datagram service – transmits data in variable size chunks (datagrams) – may drop, reorder, or duplicate datagrams – best effort approach COS 461 Fall 1997

Fragmentation and Reassembly u each network has a Maximum Transmission Unit (MTU): the largest

Fragmentation and Reassembly u each network has a Maximum Transmission Unit (MTU): the largest IP packet it can carry u packet may travel through diverse networks with different MTUs u solution: if packet is bigger than MTU, break it into fragments – may be broken more finely in a later network u reassemble at ultimate destination COS 461 Fall 1997

Fragmentation Example FDDI (MTU=4500) Ethernet (MTU=1500) 4000 1500 1000 P 2 P (MTU=512) 512

Fragmentation Example FDDI (MTU=4500) Ethernet (MTU=1500) 4000 1500 1000 P 2 P (MTU=512) 512 512 476 512 FDDI (MTU=4500) 512 512 476 488 512 488 COS 461 Fall 1997

Reassembly u performed by destination host u store fragments in memory until they all

Reassembly u performed by destination host u store fragments in memory until they all show up u fragments might be dropped, so discard stored fragments after a timeout period u for best performance, avoid fragmentation – higher-level protocols can avoid sending large datagrams (use common MTU, or discover the right size dynamically) COS 461 Fall 1997

IP Packet Format 32 bits version hdr len type of service datagram identifier time

IP Packet Format 32 bits version hdr len type of service datagram identifier time to live total length flags protocol offset in datagram checksum source address destination address options (if any; variable size) data follows COS 461 Fall 1997

IP Packet Format: Details u version: currently 4 u header length: in 32 -bit

IP Packet Format: Details u version: currently 4 u header length: in 32 -bit words, 5 if no options u type of service: almost never used u total length: in bytes, header+data u datagram identifier: allows destination to match up fragments of the same datagram COS 461 Fall 1997

IP Packet Format: Details u flags – more-fragments: says this isn’t the last fragment

IP Packet Format: Details u flags – more-fragments: says this isn’t the last fragment of the datagram – don’t-fragment: prohibits fragmentation; packet will be dropped rather than fragmented u offset: offset within datagram at which this fragment begins COS 461 Fall 1997

IP Packet Format: Details u time to live: initially set to 64; decremented on

IP Packet Format: Details u time to live: initially set to 64; decremented on each hop; packet dropped if TTL==0 u protocol: identifies which higher-level protocol this datagram belongs to u checksum: 16 -bit ones-complement sum u source address, destination address obvious u options: rarely used COS 461 Fall 1997

ICMP u Internet Control Message Protocol u companion protocol to IP u used to

ICMP u Internet Control Message Protocol u companion protocol to IP u used to report errors in IP u types of packets – destination host unreachable – reassembly failed – checksum didn’t match – don’t send so fast – there’s a better route COS 461 Fall 1997

Host Names and DNS u Domain Naming System (DNS) provides a mapping from human-readable

Host Names and DNS u Domain Naming System (DNS) provides a mapping from human-readable names (idea. cs. princeton. edu) to IP addresses (128. 112. 153. 27) u benefits – easier to remember – level of indirection allows reconfiguration without telling clients COS 461 Fall 1997

Domains u hierarchy of domains – top-level: . edu. gov. uk. su and so

Domains u hierarchy of domains – top-level: . edu. gov. uk. su and so on – deeper levels: princeton. edu cs. princeton. edu u name-servers provide mappings for a domain – at least two name servers per domain – servers for a domain must know IP addresses of name-servers for all sub-domains COS 461 Fall 1997

DNS Naming u top-level servers know IP addresses of name-servers for top-level domains u

DNS Naming u top-level servers know IP addresses of name-servers for top-level domains u lookup process – ask top-level server for IP address for desired name – result is either » the answer » referral to name-server for a more specific domain – iterate until you have the answer COS 461 Fall 1997

DNS Details u most machines just ask a local DNS server, which carries out

DNS Details u most machines just ask a local DNS server, which carries out the lookup process u cache results – forget after timeout period – also cache lookup failures u locations of top-level servers hard-wired into local DNS servers u location of local DNS server hard-wired COS 461 into each machine Fall 1997

Administrative Details u to allocate a DNS domain name – contact Inter. NIC (Network

Administrative Details u to allocate a DNS domain name – contact Inter. NIC (Network Information Center) – pay them a fee – they check that you have the necessary servers running – they tell top-level servers that you’re there u similar for IP network number allocation COS 461 Fall 1997