Internet Names and Addresses 1 Naming in the

  • Slides: 33
Download presentation
Internet: Names and Addresses 1

Internet: Names and Addresses 1

Naming in the Internet r What are named? All Internet Resources. m Objects: www.

Naming in the Internet r What are named? All Internet Resources. m Objects: www. cs. cornell. edu/pages/ranveer m Services: weather. yahoo. com/forecast m Hosts: planetlab 1. cs. cornell. edu r Characteristics of Internet Names m human recognizable m unique m persistent r Universal Resource Names (URNs) 2

Locating the resources r Internet services and resources are provided by end- hosts m

Locating the resources r Internet services and resources are provided by end- hosts m ex. www 1. cs. cornell. edu and www 2. cs. cornell. edu host Ranveer’s home page. r Names are mapped to Locations m Universal Resource Locators (URL) m Embedded in the name itself: ex. weather. yahoo. com/forecast r Semantics of Internet naming ü human recognizable ü uniqueness x persistent 3

Locating the resources r Internet services and resources are provided by end- hosts m

Locating the resources r Internet services and resources are provided by end- hosts m ex. www 1. cs. cornell. edu and www 2. cs. cornell. edu host Ranveer’s home page. r Names are mapped to Locations m Universal Resource Locators (URL) m Embedded in the name itself: ex. weather. yahoo. com/forecast r Semantics of Internet naming ü human recognizable ü uniqueness x persistent 4

Locating the Hosts? r Internet Protocol Addresses (IP Addresses) m ex. planetlab 1. cs.

Locating the Hosts? r Internet Protocol Addresses (IP Addresses) m ex. planetlab 1. cs. cornell. edu 128. 84. 154. 49 r Characteristics of IP Addresses m m 32 bit fixed-length enables network routers to efficiently handle packets in the Internet r Locating services on hosts m port numbers (16 bit unsigned integer) 65536 ports m standard ports: HTTP 80, FTP 20, SSH 22, Telnet 20 5

Mapping Not 1 to 1 r One host may map to more than one

Mapping Not 1 to 1 r One host may map to more than one name m One server machine may be the web server (www. foo. com), mail server (mail. foo. com)etc. r One host may have more than one IP address m IP addresses are per network interface r But IP addresses are generally unique! m two globally visible machines should not have the same IP address m Anycast is an Exception: • routers send packets dynamically to the closest host matching an anycast address 6

How to get a name? r Naming in Internet is Hierarchical m decreases centralization

How to get a name? r Naming in Internet is Hierarchical m decreases centralization m improves name space management r First, get a domain name then you are free to assign sub names in that domain m How to get a domain name coming up r Example: weather. yahoo. com belongs to yahoo. com which belongs to. com m regulated by global non-profit bodies 7

Domain name structure root (unnamed) com edu gov mil net org g. TLDs lucent

Domain name structure root (unnamed) com edu gov mil net org g. TLDs lucent cornell ustreas . . . fr gr us uk . . . cc. TLDs second level (sub-)domains g. TLDs= Generic Top Level Domains cc. TLDs = Country Code Top Level Domains 8

Top-level Domains (TLDs) r Generic Top Level Domains (g. TLDs) m. com - commercial

Top-level Domains (TLDs) r Generic Top Level Domains (g. TLDs) m. com - commercial organizations m. org - not-for-profit organizations m. edu - educational organizations m. mil - military organizations m. gov - governmental organizations m. net - network service providers m New: . biz, . info, . name, … r Country code Top Level Domains (cc. TLDs) m One for each country 9

How to get a domain name? r In 1998, non-profit corporation, Internet Corporation for

How to get a domain name? r In 1998, non-profit corporation, Internet Corporation for Assigned Names and Numbers (ICANN), was formed to assume responsibility from the US Government r ICANN authorizes other companies to register domains in com, org and net and new g. TLDs m Network Solutions is largest and in transitional period between US Govt and ICANN had sole authority to register domains in com, org and net 10

How to get an IP Address? r Answer 1: Normally, answer is get an

How to get an IP Address? r Answer 1: Normally, answer is get an IP address from your upstream provider m This is essential to maintain efficient routing! r Answer 2: If you need lots of IP addresses then you can acquire your own block of them. m IP address space is a scarce resource - must prove you have fully utilized a small block before can ask for a larger one and pay $$ (Jan 2002 - $2250/year for /20 and $18000/year for a /14) 11

How to get lots of IP Addresses? Internet Registries RIPE NCC (Riseaux IP Europiens

How to get lots of IP Addresses? Internet Registries RIPE NCC (Riseaux IP Europiens Network Coordination Centre) for Europe, Middle-East, Africa APNIC (Asia Pacific Network Information Centre )for Asia and Pacific ARIN (American Registry for Internet Numbers) for the Americas, the Caribbean, sub-saharan Africa Note: Once again regional distribution is important for efficient routing! Can also get Autonomous System Numnbers (ASNs from these registries 12

Are there enough addresses? r Unfortunately No! m 32 bits 4 billion unique addresses

Are there enough addresses? r Unfortunately No! m 32 bits 4 billion unique addresses m but addresses are assigned in chunks m ex. cornell has four chunks of /16 addressed • ex. 128. 84. 0. 0 to 128. 84. 255 • 128. 253. 0. 0, 128. 84. 0. 0, 132. 236. 0. 0, and 140. 251. 0. 0 r Expanding the address space! m IPv 6 128 bit addresses m difficult to deploy (requires cooperation and changes to the core of the Internet) 13

DHCP and NATs r Dynamic Host Control Protocol m lease IP addresses for short

DHCP and NATs r Dynamic Host Control Protocol m lease IP addresses for short time intervals m hosts may refresh addresses periodically ª only live hosts need valid IP addresses r Network Address Translators m Hide local IP addresses from rest of the world m only a small number of IP addresses are visible outside ª solves address shortage for all practical purposes ; access is highly restricted • ex. peer-to-peer communication is difficult 14

NATs in operation r Translate addresses when packets traverse through NATs r Use port

NATs in operation r Translate addresses when packets traverse through NATs r Use port numbers to increase number of supportable flows 15

DNS: Domain Name System: r distributed database implemented in hierarchy of many name servers

DNS: Domain Name System: r distributed database implemented in hierarchy of many name servers r application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) m note: core Internet function implemented as application-layer protocol m complexity at network’s “edge” 16

DNS name servers How could we provide this service? Why not centralize DNS? r

DNS name servers How could we provide this service? Why not centralize DNS? r single point of failure r traffic volume Name server: process running on a host that processes DNS requests local name servers: m r distant centralized database r maintenance doesn’t scale! m authoritative name server: m r no server has all name-to-IP address mappings each ISP, company has local (default) name server host DNS query first goes to local name server can perform name/address translation for a specific domain or zone 17

Name Server Zone Structure root com gov edu lucent mil net org fr gr

Name Server Zone Structure root com gov edu lucent mil net org fr gr us uk Structure based on administrative issues. ustreas irs Zone: subtree with common administration authority. www 18

Name Servers (NS) root com gov edu lucent cornell ustreas customs . . .

Name Servers (NS) root com gov edu lucent cornell ustreas customs . . . irs Root NS Lucent NS Ustreas NS IRS NS www 19

Name Servers (NS) • NSs are duplicated for reliability. • Each domain must have

Name Servers (NS) • NSs are duplicated for reliability. • Each domain must have a primary and secondary. • Anonymous ftp from: ftp. rs. internic. net, netinfo/root-server. txt gives the current root NSs (about 10). • Each host knows the IP address of the local NS. • Each NS knows the IP addresses of all root NSs. 20

DNS: Root name servers r contacted by local name server that can not resolve

DNS: Root name servers r contacted by local name server that can not resolve name r root name server: m Knows the authoritative name server for main domain r ~ 60 root name servers worldwide m real-world application of anycast 21

Simple DNS example host surf. eurecom. fr wants IP address of www. cs. cornell.

Simple DNS example host surf. eurecom. fr wants IP address of www. cs. cornell. edu root name server 2 5 1. Contacts its local DNS server, dns. eurecom. fr 2. dns. eurecom. fr contacts local name server root name server, if dns. eurecom. fr necessary 1 6 3. root name server contacts authoritative name server, dns. cornell. edu, if necessary (what might requesting host be wrong with this? ) surf. eurecom. fr 3 4 authorititive name server dns. cornell. edu www. cs. cornell. edu 22

DNS example root name server. edu name server Root name server: r may not

DNS example root name server. edu name server Root name server: r may not know 2 authoritative name server local name server dns. eurecom. fr r may know intermediate name server: who to contact to find 1 authoritative name server 4 3 5 6 7 8 9 intermediate name server dns. cornell. edu 10 requesting host authoritative name server dns. cornell. edu surf. eurecom. fr www. cs. cornell. edu 23

DNS Architecture r Hierarchical Namespace Management m domains and sub-domains m distributed and localized

DNS Architecture r Hierarchical Namespace Management m domains and sub-domains m distributed and localized authority r Authoritative Nameservers m server mappings for specific sub-domains m more than one (at least two for failure resilience) r Caching to mitigate load on root servers m time-to-live (ttl) used to delete expired cached mappings 24

DNS: query resolution iterated query: iterated query r contacted server replies with name of

DNS: query resolution iterated query: iterated query r contacted server replies with name of server to contact r “I don’t know this name, but ask this server” r Takes burden off root servers recursive query: root name server. edu name server 2 5 6 recursive query 9 local name server dns. eurecom. fr 1 10 r puts burden of name resolution on contacted name server r reduces latency 4 3 requesting host intermediate name server dns. cornell. edu 8 7 authoritative name server dns. cornell. edu surf. eurecom. fr www. cs. cornell. edu 25

DNS records: More than Name to IP Address DNS: distributed db storing resource records

DNS records: More than Name to IP Address DNS: distributed db storing resource records (RR) RR format: (name, value, type, ttl) r Type=A m name is hostname m value is IP address m One we’ve been discussing; most common r Type=NS m m name is domain (e. g. foo. com) value is IP address of authoritative name server for this domain r Type=CNAME m name is an alias name for some “cannonical” (the real) name m value is cannonical name r Type=MX m value is hostname of mailserver associated with name 26

nslookup r Use to query DNS servers (not telnet like with http – why?

nslookup r Use to query DNS servers (not telnet like with http – why? ) r Examples: m nslookup www. yahoo. com dns. cornell. edu • specify which local nameserver to use m nslookup –type=mx cs. cornell. edu • specify record type 27

PTR Records r Do reverse mapping from IP address to name r Why is

PTR Records r Do reverse mapping from IP address to name r Why is that hard? Which name server is responsible for that mapping? How do you find them? r Answer: special root domain, arpa, for reverse lookups 28

Arpa top level domain Want to know machine name for 128. 30. 33. 1?

Arpa top level domain Want to know machine name for 128. 30. 33. 1? Issue a PTR request for 1. 33. 30. 128. in-addr. arpa root arpa com gov edu mil net org In-addr ietf gr us uk www. ietf. org. www 128 30 fr 33 1 1. 33. 30. 128. in-addr. arpa. 29

Why is it backwards? r Notice that 1. 30. 33. 128. in-addr. arpa is

Why is it backwards? r Notice that 1. 30. 33. 128. in-addr. arpa is written in order of increasing scope of authority just like www. cs. foo. edu r Edu largest scope of authority; foo. edu less, down to single machine www. cs. foo. edu r Arpa largest scope of authority; inaddr. arpa less, down to single machine 1. 30. 33. 128. in-addr. arpa (or 128. 33. 30. 1) 30

In-addr. arpa domain r When an organization acquires a domain name, they receive authority

In-addr. arpa domain r When an organization acquires a domain name, they receive authority over the corresponding part of the domain name space. r When an organization acquires a block of IP address space, they receive authority over the corresponding part of the in-addr. arpa space. r Example: Acquire domain berkeley. edu and acquire a class B IP Network ID 128. 143 31

DNS protocol, messages DNS protocol : query and repy messages, both with same message

DNS protocol, messages DNS protocol : query and repy messages, both with same message format msg header r identification: 16 bit # for query, repy to query uses same # r flags: m query or reply m recursion desired m recursion available m reply is authoritative m reply was truncated 32

DNS protocol, messages Name, type fields for a query RRs in reponse to query

DNS protocol, messages Name, type fields for a query RRs in reponse to query records for authoritative servers additional “helpful” info that may be used 33