CS计算机代考程序代写 FTP cache database dns scheme DHCP Overview of the Internet, WWW, and DNS

Overview of the Internet, WWW, and DNS
2020/21 COMP3322 Modern Technologies of WWW

Contents
• What is the Internet?
• What is WWW?
• Client-Server Communication • A brief introduction to DNS
2

Learning Outcome
• LO1 – [Web technologies] be able to master the key technologies about the World Wide Web.
3

What is the Internet?
• Users see it as services and applications • Web and e-commerce
• Email, texting, instant messenger
• Social networking and blogs
• Music and video download (and upload) • Voice and video teleconferencing
• Networking professionals see it as infrastructure • Platform on which above services run
• A huge and complicated network and is growing rapidly
4

Size of the Internet (Internet Domain
Survey)
• Derived by walking the Domain Name System
• Only report devices with IP addresses (IPv4 only)
• However, nowadays many devices do not have a fixed IP address
• Connect behind a NAT box (e.g., wireless router)
• Actual size is difficult to measure
• The survey is retired in 2019.
Number of computers on the Internet each year
5

What is the Internet?
• Internet is a network that accommodates extant services plus new services that will be invented
• Only provides the communication service; does not care about the data contents
• Internet is designed to accommodate any network technology, allowing each technology to be used where appropriate
• Does not restrict or dictate underlying network technologies
6

Internet Architecture
• Follows a network of networks approach
• Allows arbitrary networks to be included, which could also be a
network of networks
• Uses IP routers to interconnect individual networks
7

Internet Architecture
• Computers attached to the Internet are known as host computers.
• Each host attaches to an access network, which in turn, attaches to a big
network.
• To a host, Internet appears to be one giant network.
8

What is WWW?
• The World Wide Web (WWW or web) is just one of the ways information can be shared over the Internet.
• It allows documents to be linked to one another using hypertext links, thus forming a huge “web” of connected information.
• The invention of the WWW is usually attributed to the British Tim Berners-Lee, who, along with the Belgian Robert Cailliau, published a proposal in 1990 for a hypertext system while both were working at CERN in Switzerland.
9

Evolution of WWW
• The Web invented by Tim was a Read-only Web • It was static and somewhat mono-directional.
• Web 2.0 – Since mid-2000s
• With reading as well as writing, the web could become bi-directional.
• It represented the move toward a more social, collaborative, interactive and responsive web.
• Semantic Web, Artificially Intelligence Web – Web 3.0 ??
10

1. 2.
Core Features of the Web
A URL to uniquely identify a resource on the WWW.
At two ends, there are two programs interacting by means of the HTTP
protocol, which is in the form of client-server communication.
• The browser program which makes HTTP requests and that can display the HTML it
receives.
• The web server software program that responds to HTTP requests.
The HTTP protocol to describe how requests and responses operate. HTML and CSS to publish documents.
3.
4.
11

URL Components
• In order to allow clients to request particular resources from the server, a naming mechanism is required so that the client knows how to ask the server for the file.
• For the web that naming mechanism is the Uniform Resource Locator (URL).
http://www.funwebdev.com/index.php?page=17#article
Protocol
Domain Path Query String Fragment (Hostname)
12

URI – Uniform Resource Identifier
• A URI is a compact sequence of characters that identifies an abstract or physical resource.
• URL is one type of URI that identifies the resource by its location on the network.
• A URL begins with the name of the protocol to be used for accessing the resource and then contains sufficient information to point to how it can be obtained.
• The other type of URI is the URN, which identifies the resource by name or namespace.
• Provides a way of uniquely naming a resource without specifying an access protocol or mechanism, and without specifying a particular location.
• e.g. the International Standard Book Number (ISBN) for uniquely identifying a book is a URN, “urn:isbn:0451450523”
13

Client-Server Communication
• Used by applications to establish communication
• One application program acts as a server
• Always starts execution first; usually always online
• Running in a host machine known by other peers
• Awaits contact from any peer
• The other application program becomes a client
• Initiates contact to the server
• Requests for services and/or information
• Its location is not important
• Important concept: once communication has been established, data can flow in either direction between a client and server
14

Host to Host communication
• For hosts to communicate with each other, they need:
• Some method to identify the peer
• For client-server communication, we need the domain name of the
server.
• Some method to locate the peer
• We need the IP address of the server
• Some method to deliver messages to the peer
• We need to find the network path between the client and server
Domain Name Service
IP Address
Internet Protocol
15

End to End Communication
• Many server applications can be running on a single host machine. How to find the server program?
• Each communication service is “labelled” by a port number P.
• e.g., HTTP – 80, Telnet – 23, SSH – 22, FTP – 21 (20), . . . • This port # (service) must be known by all clients.
• When a server is up running, it informs the system that it is using port P. • No other application running on the same machine can use the same port P.
• By the unique IP address and port number, the network can locate those server programs.
16

Illustration of Steps Taken by Client
and Server
Web server
IP: 147.8.176.12 Port: 35687
IP: 202.57.36.112 Port: 80
17

Port Numbers
• Valid Range: 0 to 65535 (of size 16 bits) • Divide into three ranges:
• Well-known ports: 0 to 1023 • Reservedports
• Can only be used by
• system processes
• privileged users
• Registered ports: 1024 to 49151
• Availableforordinaryuserprocesses
• Also allow to register with IANA (Internet Assigned Number Authority)
• Dynamic and/or Private ports: 49152 to 65535
18

IP Address
• Every host connected to the Internet runs the Internet Protocol and is assigned with an IP address, which is a numeric code that serves two purposes:
• Identity
• Uniquely identify a network interface of a host machine on the Internet.
• Locator
• Has information to locate the physical network in which the host is attached.
19

IPv4 Addressing
• It is a 32-bit identifier and is assigned to a network interface of a host/router.
• Interfaces – network ports/cards • Routers have multiple ports
• that means multiple interfaces
• Host machines can have multiple interfaces too, e.g., Ethernet and WiFi
• Typically presented in Dotted-Decimal Notation • Divides IPv4 address into octets of eight bits each
• E.g., IP address of 11011111 00000001 00000001 00000001 is 223.1.1.1 in dotted- decimal notation
20

IPv4 Addressing Scheme
• Technically, the 32-bit IP address is divided into two parts
• Prefix part which identifies physical network (locator)
• Suffix part which identifies a host on that physical network (identity)
147.8.175.13
147.8.175.13
HKU prefix
HKU CS prefix
A host on HKU network
A host on HKU CS network
21

IPv6 Addressing
• All centrally allocated IPv4 addresses have been exhausted since 2011 • IPv4 is not dead yet
• We are in the process of migration from IPv4 to IPv6
• A dramatically large address space: from 32-bit to 128-bit
• there are 3.4 x 1038 (340,282,366,920,938,463,374,607,431,768,211,456) addresses
• Express as 8 groups of 16-bit (4 hex digits) with colons between groups • FE80 : 0000 : 0000 : 0000 : 0001 : 0800 : 23E7 : F5DB
• Many IPv6 addresses contain long strings of zeroes. To simplify it, successive zeros can be replaced by two colons
• FE80 :: 0001 : 0800 : 23E7 : F5DB or even to
• FE80 :: 1 : 800 : 23E7 : F5DB
22

“localhost”
• In computer networking, localhost is a hostname which means this computer.
• It is used for accessing the network services that are running locally. • No network traffic is generated to the network.
• The name localhost normally resolves to: • IPv4 loopback address 127.0.0.1
• IPv6 loopback address ::1
• For example, a locally installed website may be accessed from a web browser by the URL http://localhost or http://127.0.0.1 to display its home page.
23

Protocols
• The internet exists today because of a suite of interrelated communications protocols.
• E.g., Ethernet, WiFi, ARP, ICMP, DHCP, NAT, RIP, IP, TCP, UDP, SCTP, DNS, HTTP, SMTP, FTP, SSH, telnet, Skype, Whatsapp, . ..
• A protocol is a set of rules that define how the peers in the communication are interacting.
• A communication protocol defines: • The format of the message.
• e.g., where is the control information? which part carries the contents? • The order of the messages sent and received between two ends. • The actions taken on message transmission and receipt.
HTTP HTTP request response
24

Domain Name System
25

Domain Name System (D N S)
• A network service which is critical to the normal operation of the Internet.
• Runs at the application layer.
• As elegant as IP addresses may be, human beings do not enjoy having to recall long strings of numbers.
• DNS translates human-readable domain names into the binary addresses used by the Internet Protocol.
• Example
• Computerwww.cs.hku.hk
• Has the IP address 147.8.179.15
26

Services Provided by DNS
• Translates a given domain name to IP address.
• Reverse looks up the domain name from an IP address.
• Looks up the information of the Email server and DNS server of a domain.
• Load distribution
• Maps one domain name to a set of IP addresses, e.g., replicated Web
servers
• Different users may select different machine (of different IP address) for requesting services
27

Address Resolution
• Taken place every time the browser tries to have the first contact with the Web server given by the URL.
• Where is the DNS server? How can it know all the translation mappings of the whole Internet? And how can it get the updates?
• Ideally, the DNS server should be near to its client applications.
• No single DNS server manages all the mapping info of the Internet.
• Solution: The use of a distributed hierarchical database.
28

Domain Names and Domain Levels
• Domain names are hierarchical.
• Domain name is a sequence of labels with dots in between, and it defines a realm of administrative autonomy of Internet hosts.
• Most specific label is on the left and most significant label is on the right.
• Rightmost label known as a top-level domain (TLD)
Third-Level Domain
Top Level Domain (TLD)
Most general
server1.www.funwebdev.com
Fourth-Level Domain Second-Level Domain (SLD)
Top-Level Domain (TLD) com
Second-Level Domain (SLD)
funwebdev
Third-Level Domain www
Most specific
Fourth-Level Domain
server1
29

Domain Name Tree
• All TLDs are linked to the DNS root node, which does not have a name.
• The concept of distributed hierarchical database
unnamed root
Root DNS Servers
hk DNS servers
hku.hk
DNS servers
TLD SLD
com
edu
gov
org
uk
hk
com DNS servers
edu DNS servers
hku
google.com DNS servers
yale.edu DNS servers
mit.edu DNS servers
yahoo.com DNS servers
cs www
30
edu

Distributed Hierarchical Database
• There are four levels of DNS servers:
1. Root Name Servers
2. TLD Servers
3. Authoritative DNS Servers
4. Local Name Servers (Default name servers)
31

Local Name Servers
Organization
• Each domain (i.e., ISP, company, university, . . .) has to provide one or more local DNS server for supporting internal requests.
• All client applications (in DNS term, we called them the resolvers) are configured with the address of the local DNS server(s).
Each host machine
32

Local Name Servers
• All client applications first contact the local DNS server to lookup the mappings.
• If local DNS server has the information,
• it returns the answers to the resolvers immediately.
• If local DNS server does not have the information, • it sends the requests to the root name server.
33

Authoritative DNS servers
• Each organization should have at least one authoritative DNS server if they offer publicly accessible hosts.
• These servers provide authoritative hostname to IP mappings (and vice versa) for organization’s computers (e.g., Web, mail).
• They can serve as local name servers too.
• Example: Only CS department has the correct and up2date information of the mapping of our CS departmental servers/machines (e.g., ns1.cs.hku.hk)
34

TLD Servers
• Each top-level domain has its own set of name servers that are responsible for providing information under its domain subtree.
• Examples: .hk subtree, .com subtree, .org subtree
• They know the authoritative servers of a particular subdomain in its
subtree.
• Example: .hk TLD servers has the info about who are the authoritative DNS servers of .hku.hk
35

Types of TLDs
Generic top-level domains (gTLD)
Country code top-level domain (ccTLD)
Domain Name
Assigned To
aero
Air transport industry
arpa
Infrastructure domain
biz
Businesses
com
Commercial organizations
edu
Educational institutions
gov
United States Government
info
Information
jobs
Human resource managers
mil
United States military
mobi
Mobile content providers
museum
Museums
net
Major network support centers
org
Non-commercial organizations
travel
Travel and tourism
Domain Name
Assigned To
country code
A sovereign nation
In 2014, ICANN decided to allow many new TLDs
36

Root Name Servers
• Have information on all TLD name servers.
• Known (publicly) by all local name servers. • The root servers response DNS queries
from local name servers with the correct TLD name servers.
• There are 13 root name servers worldwide.
a NSI Herndon, VA
c PSInet Herndon, VA
d U Maryland College Park, MD g DISA Vienna, VA
h ARL Aberdeen, MD
j NSI (TBD) Herndon, VA
e NASA Mt View, CA
f Internet Software C. Palo Alto, CA
b USC-ISI Marina del Rey, CA l ICANN Marina del Rey, CA
k RIPE London
i NORDUnet Stockholm
m WIDE Tokyo
com DNS servers
Root DNS Servers
hk DNS servers
hku.hk
DNS servers
edu DNS servers
yahoo.com DNS servers
google.com DNS servers
yale.edu DNS servers
mit.edu DNS servers
37

Domain name address resolution process
38

DNS Caching
• Once the name server knows the mapping information, it caches it in the memory.
• Caching improves efficiency and reduces DNS traffic
• Eliminates unnecessary search
• Get answers back from authoritative servers, reuse the info. in the future.
• Learn name servers (addresses) that are authoritative for some domains.
• A cached mapping is removed after some configured time.
39

Reading
• MDN web docs
• How does the Internet work?
• https://developer.mozilla.org/en- US/docs/Learn/Common_questions/How_does_the_Internet_work
• How the Web works?
• https://developer.mozilla.org/en-
US/docs/Learn/Getting_started_with_the_web/How_the_Web_works
• What is a domain name?
• https://developer.mozilla.org/en- US/docs/Learn/Common_questions/What_is_a_domain_name
40

Other References
• About DNS
• http://www.tcpipguide.com/free/t_TCPIPDomainNameSystemDNS.htm
• An Introduction to Computer Networks
• Chapter 1, An Overview of Networks
• http://intronetworks.cs.luc.edu/current/html/intro.html
41