17 April
17 April
Computer Networks
1
Happy 31st Birthday Turkish Internet
Did you watch the video?
2
HTTP vs HTTPS
• HTTP does not provide any encryption or security measures, any
data transmitted over HTTP can be intercepted and viewed by
third parties
• HTTPS is a secure version of HTTP that uses SSL (Secure Sockets
Layer) or TLS (Transport Layer Security) encryption to protect
data in transit. (RFC 2818 and others)
• HTTP port: 80 HTTPS port: 443
3
Cookie vs Proxy
• Cookies: to remember user preferences, login credentials, and
other information related to the user's activity on a website
• Proxy server: an intermediary server between a user's computer
and the internet.
—For caching content to improve performance,
—filtering content to block unwanted traffic, and
—accessing resources that may be blocked in certain geographic locations.
4
Hypertext Transfer Protocol
HTTP
11
12
Comparision of CDN providers: https://www.werockyourweb.com/best-cdn/
13
HTTP/2
Key goal: decreased delay in multi-object HTTP requests
GET O4 GET O
3 GET O2
GET O1
object data requested
client
O1
O2
O1
O2 O3
O3
O4
O4
GET O4 GET O
3 GET O2
object data requested
GET O1
client
O2
O4
O3 O1
O2
O3
O1 O4
21
In the past we had to memorize the numbers
(or write to notebooks)
22
In the past we had to
write to hosts.txt
23
Internet Directory Services DNS
• Domain Name System
— a directory lookup service – The Internet’s phonebook
— Provides mapping between host name and IP address
— www.sabanciuniv.edu 159.20.64.126
— A “must” for proper to functioning of Internet
• In Arpanet times, hosts.txt file was used ( Example 27 May 1983)
— managed centrally, downloaded by all hosts daily – RFC 810
— become insufficient in time
— Still OSs have it Check: WindowsSystem32driversetc
• DNS - RFCs 1034 (concepts) and 1035 (implementation)
— 1987 - total 110 pages
— Updated by many other RFCs
Internet Directory Services DNS
• Four important elements of DNS
—Domain name space
• Tree-structured
—DNS database (distributed)
• The info about each node in name space tree structure is contained in
a Resource Record (RR).
• The collection of RRs is organized as a distributed database
—Name servers
• Servers that hold and process information about portion of tree and
corresponding RRs
—Name Resolvers
• Programs that help clients to extract information from name servers
Domain Names: e.g www.sabanciuniv.edu 159.20.64.126
Authoritative
• over 200 TLDs (including later added ones, e.g. .biz .pro .info) Full List from IANA
• hierarchy helps uniqueness
• Char length limits – 63 individual, 253 total length
•Naming follows organizational boundaries, not physical ones
• https://www.trabis.gov.tr/
28
Domain Names and Example
• Variable-depth unlimited levels hierarchy for names (labels)
—Delimited by period (.)
• edu is college-level educational institutions
• yale.edu is domain for Yale University in US
• cs.yale.edu is Computer Science department at Yale
• Eventually get to leaf nodes
—Identify specific hosts
—Hosts are assigned Internet (IP) addresses
DNS Database
• Each TLD and subordinate nodes manage uniqueness of the
names that they assign
• Management of subordinate domains may be delegated
—down the hierarchy
—In this way, zones are created
• Distributed database
—Millions of zones – decentralized
—each of these zones are separately managed by different name
servers, so distributed database
• Billions of records
—Every Internet transaction interacts with DNS
Zones
tr
33
Typical DNS Operation
• User program requests IP address for a domain name
• Resolver module in local host formulates query for local name server
— In same domain as resolver
• Local name server checks for name in local database and cache
— If so, returns IP address to requestor
— Otherwise, query other available name servers
• Starting down from root of DNS tree
• Local name server caches the reply
— and maintain it for TTL seconds
• At the end, user program is given IP address or error message
DNS Name Resolution
local
DNS name resolution: iterated query
root DNS server
Example: host at
host1.sabanciuniv.edu wants IP 2
address for www.mit.edu 3
TLD DNS server
4
Iterated query: 1
contacted server 8 5
replies with name of requesting host at local DNS server
server to contact Host1.sabanciuniv.edu dns.sabanciuniv.edu
www.mit.edu
“I don’t know this 7 6
Pc1.ai.cs. Pc2.ai.cs.
vu.nl vu.nl
An Example of SOA RR
anynet.com IN SOA dns.anynet.com. admin.anynet.com
( 2018091401 ; Serial
3600 ; Refresh
300 ; Retry Admin’s
360000 ; Expire email
address;
86400) ; Minimum ) first dot is
actually @
49
The mystery behind different IPs for the
same host
• For load balancing
—Works in round-robin fashion
example.com. 60 IN A 192.1.1.1
example.com. 60 IN A 192.1.1.2
example.com. 60 IN A 192.1.1.3
• Useful when you know the IP address and want to know the
corresponding host name (mainly for authentication)
• Suppose you would like to know the host name for IP address
144.122.145.140
—you have to query the DNS servers for the PTR entry
140.145.122.144.in-addr.arpa.
—Be careful! numbers are in reverse order
—In order to find the host name, the host’s name server should have an entry
140.145.122.144.in-addr.arpa. PTR frigya.general.services.metu.edu.tr
Check with an e-mail
52
• Also check with : https://dnschecker.org/
53
• DNS – Ekşisözlük – Kürşat Çağıltay
54
55