Naming & Directory Services 1
2 Naming Schemes Examples IPv4 address 146169145 domain name emudocicacuk IEEE MAC 00:D0:B7:11:60:A5 fixed size variable size eg IPv4 Address, IEEE MAC eg domain name pure impure eg IEEE MAC eg IP Address, domain name
3 Impure names in a Hierarchy Zone 0 Zone 1 Zone 2 x Zone 3 Zone 5 Zone 4 y
4 Iterative Navigation Zone 0 NS 0 Zone 1 Client NS 1 Zone 2 NS 2 Zone 4 NS 4
5 Recursive Navigation Zone 0 NS 0 Zone 1 Client NS 1 Zone 2 NS 2 Zone 4 NS 4
6 Server Multicasting Zone 3 Zone 0 NS 3 NS 0 Zone 1 Zone 2 Client NS 1 NS 2 Zone 5 Zone 4 NS 4 NS 5
7 Domain Name System A directory service for the Internet Maps domain names to resource records (RR) Main use is mapping domain names to IP addresses (A records) Example domain names hawkdocicacuk docicacuk icacuk acuk uk
8 Example DNS naming scheme (root) no edu uk com kvatro unit mit ac co sun idt kcl ic postoffice java cc dcs cc doc barium helium sync03 hawk
9 Iterative Navigation hawkdocicacuk asks for javasuncom in theory, work up docicacuk asks icacuk docicacuk asks acuk docicacuk asks uk then work down docicacuk asks root docicacuk asks com docicacuk asks suncom root uk com ac sun ic doc
10 Recursive Lookup root docicacuk asks icacuk icacuk asks acuk acuk asks uk uk asks root root asks com com asks suncom uk ac ic doc com sun
11 Worksheet: DNS (root) be no uk edu net ac kvatro ntnu ac co mit ulg idt ic kcl bbc cc dcs
12 Rough Outline of DNS Naming Conventions USA naming authority (NIC) non USA naming authority level value type value type com commercial organisation be Belgium 1 edu educational institution no Norway gov government institution uk United Kingdom 2 organisation name co commercial organisation ac academic community 3 department/host name organisation name 4 host name department/host name 5 - - host name
13 DNS Resource Records field name description A an IPv4 address of a host AAAA an IPv6 address of a host CNAME canonical name or nickname HINFO host machine type and operating system MX the IP address of a email server for a domain NS the IP address of a DNS name server for the domain PTR a pointer to another part of the name space (ie an alias) SOA details of a zone of authority TXT a text string containing anything the administrator would like WKS list of well known services available at host Can t add your own RRs: but could use TXT to hold data
14 RFC 4408: Sender Policy Framework TXT v=spf1 a mx a:curiumdocicacuk ip4:621891250/24 -all mx: any server identified by an MX record for the domain ptr: any host within the DNS domain in question a: any server identified by a A record for the domain ip4: name a particular IPv4 address range
15 X500 and LDAP General naming service for any type of object Allows for Yellow Page lookups X500 has a directory access protocol (DAP) X500 too complext lightweight directory access protocol (LDAP)
16 (root) country C=NO D=The land of the Vikings country C=GB D=This Green and Pleasant Land organization O=NTNU organization O=King s College London organization O=Imperial College organizationalunit OU=IDT organizationalunit OU=School of Physical Sciences and Engineering organizationalunit OU=Computing person P=Ms S Riley person P=Prof J Ullmann person P=Dr N Stokes
17 The Complete Story To get a web page from wwwdocicacuk you need the socket of the web server: 1 Make an A record request to a DNS to translate wwwdocicacuk to an IP address 2 Add the well known port number to the IP address, to form the socket But step (1) requires that a socket be formed for the DNS server; therefore the host must know the IP address of the DNS server Each step above requires Determine using the netmask if the IP address is on the local subnet If on local subnet, find MAC address of socket via ARP If not on local subnet, find MAC address of router via ARP
18 tone(1)% ping plutonium A complete communication with DNS 14616941271034 > 146169124domain: 52750+ A? plutoniumdocicacuk (40) 146169124domain > 14616941271034: 52750* 1/3/3 A 146169498 (173) arp who-has 146169498 tell 1461694127 (0:90:27:a3:32:5) arp reply 146169498 is-at 0:c0:4f:d5:6b:58 (0:90:27:a3:32:5) 1461694127 > 146169498: icmp: echo request arp who-has 1461694127 tell 146169498 arp reply 1461694127 (0:90:27:a3:32:5) is-at 0:90:27:a3:32:5 (0:c0:4f:d5:6b:58) 146169498 > 1461694127: icmp: echo reply 1461694127 > 146169498: icmp: echo request 146169498 > 1461694127: icmp: echo reply
19 Worksheet: ARP, Ping and DNS host1 host2 host3 1460498 14604127 1460145 0:1:2:d5:6b:58 0:1:2:a3:32:5 14604225 router 14601225 0:1:2:11:60:a5 0:1:2:a7:61:e3 0:1:2:a7:61:8 host2%ping -c 1 host3 64 bytes from host3: icmp seq=0 ttl=254 time=18 ms
20 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5
21 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 DNS Req 14604127 0:1:2:a3:32:5 1460498 0:1:2:d5:6b:58 H1 DNS Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5
22 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 DNS Req 14604127 0:1:2:a3:32:5 1460498 0:1:2:d5:6b:58 H1 DNS Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 ARP Req 14604127 0:1:2:a3:32:5 14604225 ff:ff:ff:ff:ff:ff R ARP Rep 14604225 0:1:2:a7:61:e3 14604127 0:1:2:a3:32:5
23 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 DNS Req 14604127 0:1:2:a3:32:5 1460498 0:1:2:d5:6b:58 H1 DNS Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 ARP Req 14604127 0:1:2:a3:32:5 14604225 ff:ff:ff:ff:ff:ff R ARP Rep 14604225 0:1:2:a7:61:e3 14604127 0:1:2:a3:32:5 H2 ICMP Echo Req 14604127 0:1:2:a3:32:5 1460145 0:1:2:a7:61:e3
24 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 DNS Req 14604127 0:1:2:a3:32:5 1460498 0:1:2:d5:6b:58 H1 DNS Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 ARP Req 14604127 0:1:2:a3:32:5 14604225 ff:ff:ff:ff:ff:ff R ARP Rep 14604225 0:1:2:a7:61:e3 14604127 0:1:2:a3:32:5 H2 ICMP Echo Req 14604127 0:1:2:a3:32:5 1460145 0:1:2:a7:61:e3 R ARP Req 14601225 0:1:2:a7:61:8 1460145 ff:ff:ff:ff:ff:ff H3 ARP Rep 1460145 0:1:2:11:60:a5 14601225 0:1:2:a7:61:8
25 Worksheet: ARP, Ping and DNS Src Msg Src IP Src MAC Dest IP Dest MAC H2 ARP Req 14604127 0:1:2:a3:32:5 1460498 ff:ff:ff:ff:ff:ff H1 ARP Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 DNS Req 14604127 0:1:2:a3:32:5 1460498 0:1:2:d5:6b:58 H1 DNS Rep 1460498 0:1:2:d5:6b:58 14604127 0:1:2:a3:32:5 H2 ARP Req 14604127 0:1:2:a3:32:5 14604225 ff:ff:ff:ff:ff:ff R ARP Rep 14604225 0:1:2:a7:61:e3 14604127 0:1:2:a3:32:5 H2 ICMP Echo Req 14604127 0:1:2:a3:32:5 1460145 0:1:2:a7:61:e3 R ARP Req 14601225 0:1:2:a7:61:8 1460145 ff:ff:ff:ff:ff:ff H3 ARP Rep 1460145 0:1:2:11:60:a5 14601225 0:1:2:a7:61:8 R ICMP Echo Req 14604127 0:1:2:a7:61:8 1460145 0:1:2:11:60:a5 H3 ICMP Echo Rep 1460145 0:1:2:11:60:a5 14604127 0:1:2:a7:61:8 R ICMP Echo Rep 1460145 0:1:2:a7:61:e3 14604127 0:1:2:a3:32:5