Lecture 4: Basic Internet Operations Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4395 4-1
LAN View A LAN 2 B Hub 2 Gateway to Internet Hub 1 Z (Gateway) LAN 1 LAN N Prof. Shervin Shirmohammadi CEG 4395 4-2
outbound packet Internet View A LAN 2 B Hub 2 Gateway to Internet Z Hub 1 (Gateway) LAN 1 LAN N deliver packet A LAN 2 B Hub 2 Gateway to Internet Internet Hub 1 Z (Gateway) LAN 1 LAN N How to find the IP address of the destination? Prof. Shervin Shirmohammadi CEG 4395 4-3
DNS Domain Name System (DNS) is a client-server application that identifies each host on the Internet with a unique user-friendly name; e.g., cbc.ca instead of 159.33.3.85 A name space that maps each address to a unique name can be organized in two ways: flat or hierarchical. Flat: each name consists of a sequence of characters without any further structure; e.g., ComputerNumber376UniversityofOttawaCanada. Hierarchical: each name is made of several parts, such as organization, department, country, and computer name; e.g., site0.site.uottawa.ca Prof. Shervin Shirmohammadi CEG 4395 4-4
Domain Name Space The namespace is partitioned at the top level, and authority for names in subdivision is passed to designated agents. Each label is restricted to 63 characters. Prof. Shervin Shirmohammadi CEG 4395 4-5
Top Level Internet Domains The IANA (Internet Assigned Numbers Authority) handles domain naming. www.iana.org Prof. Shervin Shirmohammadi CEG 4395 4-6
Domain Name and Label Label: each section of a name Prof. Shervin Shirmohammadi CEG 4395 4-7
Hierarchy of Name Servers There is a server responsible for a given top-domain. Each server must know the address of all its lower-level servers for its sub-domains. What is the problem with this approach? Prof. Shervin Shirmohammadi CEG 4395 4-8
A Realistic Hierarchy The tree is more flat than the theoretical one on the previous slide. Hence, fewer servers must be contacted to find a given host. Prof. Shervin Shirmohammadi CEG 4395 4-9
13 Root Name Servers a.root-servers.net 198.41.0.4 b.root-servers.net 128.9.0.107 c.root-servers.net 192.33.4.12 d.root-servers.net 128.8.10.90 e.root-servers.net 192.203.230.10 f.root-servers.net 192.5.5.241 g.root-servers.net 192.112.36.4 h.root-servers.net 128.63.2.53 i.root-servers.net 192.36.148.17 j.root-servers.net 198.41.0.10 k.root-servers.net 193.0.14.129 l.root-servers.net 198.32.64.12 m.root-servers.net 202.12.27.33 Prof. Shervin Shirmohammadi CEG 4395 4-10
Primary and Secondary Servers Primary: creates, maintains, and updates information about its zone. Secondary: gets its information from a primary server; does not create, maintain, or update information about its zone. Both servers have authority over their zone. The idea here is to have a backup server in case of failure. Prof. Shervin Shirmohammadi CEG 4395 4-11
Internet Domain Categories Servers are divided into 3 different categories. Prof. Shervin Shirmohammadi CEG 4395 4-12
Generic Domain Prof. Shervin Shirmohammadi CEG 4395 4-13
Country Domain Prof. Shervin Shirmohammadi CEG 4395 4-14
Inverse Domain IP address 132.34.45.121 is represented as 121.45.34.132.in-addr.arpa. What is the benefit of such a lookup service? Prof. Shervin Shirmohammadi CEG 4395 4-15
DNS Software Name server: A server program that supplies name-to-address translation, mapping from domain names to IP addresses (and vice versa). Name resolver: client program that uses one or more name servers when translating a name. Resolver accesses the closest DNS, asking for a mapping. Recursive lookup Iterative lookup Prof. Shervin Shirmohammadi CEG 4395 4-16
Recursive Resolution E.g.: Host 1: client.fhda.edu Host 2: www.mcgraw.com Prof. Shervin Shirmohammadi CEG 4395 4-17
Iterative Resolution Prof. Shervin Shirmohammadi CEG 4395 4-18
DNS Message Format Identification: a unique number for client to match response to query Question: the lookup request Answer: the lookup answer Authority: the closest DNS suitable for this request. Clients are encouraged to cache this information for further requests. Prof. Shervin Shirmohammadi CEG 4395 4-19
Parameter Field Prof. Shervin Shirmohammadi CEG 4395 4-20
DNS Communication Protocol Client-server architecture, with server usually listening on UDP port 53, and sometimes TCP port 53. Why is UDP preferred to TCP? Client creates an ID and sends a message, with the format shown in slide 7-19, to the primary DNS server. Server responds, using the ID provided. Server communicates with higher-level servers in a similar way, if required. Duplicate responses are dropped. Security concerns? Prof. Shervin Shirmohammadi CEG 4395 4-21
Example C:\>nslookup www.cbc.ca Server: infofan.site.uottawa.ca Address: 137.122.89.39 Non-authoritative answer: Name: a1849.gc.akamai.net Addresses: 208.38.45.183, 208.38.45.191 Aliases: www.cbc.ca, www.cbc.ca.edgesuite.net Prof. Shervin Shirmohammadi CEG 4395 4-22
Network Address Translation (NAT) Although it is against the Internet architecture, we don t really need unique IP addresses (unique to the Internet) for nodes on our private network, as long as we know how to route packets to the right destinations. A B Z LAN 2 Hub 1 (Gateway) LAN 1 LAN N Hub 2 Gateway to Internet As long as Hub 2 acts as a proxy and knows how to get an incoming packet to A, B,, and Z, it doesn t matter if A, b, and Z s IP addresses are not unique compared to the rest of the Internet. Prof. Shervin Shirmohammadi CEG 4395 4-23
192.168.0.1 NAT Operation 192.168.0.2 S-port=8777 S-IP=192.168.0.2 S-port=63211S-IP=137.122.20.1 Router NAT 137.122.20.1 D-port=8777 D-IP=192.168.02 D-port=63211D-IP=137.122.20.1 Internet 192.168.0.10 NAT port = 63210 port=5113 S-IP=192.168.0.10 NAT port = 63211 port=8777 S-IP=192.168.0.2 NAT port = 63212 port=6522 S-IP=192.168.0.1 Prof. Shervin Shirmohammadi CEG 4395 4-24
WWW World Wide Web uses a client-server model. Prof. Shervin Shirmohammadi CEG 4395 4-25