[go: up one dir, main page]

0% found this document useful (0 votes)
35 views25 pages

Lecture - 08 - Chapter 2 - Chapter 3 - 12 Sep 2024

Uploaded by

Usman Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views25 pages

Lecture - 08 - Chapter 2 - Chapter 3 - 12 Sep 2024

Uploaded by

Usman Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

National University of

Computer & Emerging Sciences


CS 3001 – COMPUTER NETWORKS

Lecture 08
Chapter 2
Chapter 3

12th Septemebr, 2024

Nauman Moazzam Hayat


nauman.moazzam@lhr.nu.edu.pk
Office Hours: 02:00 pm till 04:30 pm (Every Tuesday & Thursday)
Caching DNS Information
▪ once (any) name server learns mapping, it caches mapping,
and immediately returns a cached mapping in response to a
query
• caching improves response time
• cache entries timeout (disappear) after some time (TTL)
• TLD servers typically cached in local name servers
▪ cached entries may be out-of-date
• if named host changes IP address, may not be known Internet-
wide until all TTLs expire!
• best-effort name-to-address translation!

Application Layer: 2-2


DNS records
DNS: distributed database storing resource records (RR)
RR format: (name, value, type, ttl)

type=A type=CNAME
▪ name is hostname ▪ name is alias name for some “canonical”
▪ value is IP address (the real) name
▪ www.ibm.com is really
type=NS servereast.backup2.ibm.com
▪ value is canonical name
▪ name is domain (e.g., foo.com)
▪ value is hostname of
type=MX
authoritative name server for ▪ value is name of SMTP mail
this domain server associated with name
Application Layer: 2-3
DNS records
DNS: distributed db storing resource records (RR) (RFC 1035)
RR format: (name, value, type, ttl)
if type=A (Address Mapping Record, RFC 1035) if type=CNAME (Canonical Name Record, RFC 1035)
▪ name is hostname ▪ name is alias (mnemonic) name for some
▪ value is IP address “canonical” (the real) name
▪ Used to map (point) a domain name to an IP address ▪ value is canonical name (real/actual name)
▪ E.g. (relay1.bar.foo.com, 145.37.93.126, A) ▪ www.ibm.com is really
servereast.backup2.ibm.com
▪ Used to map (point) a domain name to another
domain name (for example your website is
example.com, but you have also registered
examples.com, thus examples.com can be redirected
towards example.com via this record
if type=NS (Name Server Record, RFC 1035) ▪ E.g. (foo.com, relay1.bar.foo.com, CNAME)
• name is domain if type=MX (Mail Exchange Record, RFC 1035)
• value is hostname of authoritative name ▪ name is alias name for some “canonical” (the real)
server for this domain name
• NS records specifies which DNS server is
authoritative for this domain ▪ value is canonical name of mail server associated
• E.g. (foo.com, dns.foo.com, NS) with alias name
▪ Same as CNAME but for mail server
▪ Used by SMTP to locate mail server name for that domain
(thus mail server name must also have a Type A record.)
▪ E.g. (foo.com, mail.bar.foo.com, MX)
DNS RR Summary
DNS protocol messages
DNS query and reply messages, both have same format:
2 bytes 2 bytes

message header: identification flags

▪ identification: 16 bit # for query, # questions # answer RRs


reply to query uses same # # authority RRs # additional RRs
▪ flags:
• query or reply questions (variable # of questions)

• recursion desired
answers (variable # of RRs)
• recursion available
• reply is authoritative authority (variable # of RRs)

additional info (variable # of RRs)

Application Layer: 2-6


DNS protocol messages
DNS query and reply messages, both have same format:
2 bytes 2 bytes

identification flags

# questions # answer RRs

# authority RRs # additional RRs

name, type fields for a query questions (variable # of questions)

RRs in response to query answers (variable # of RRs)

records for authoritative servers authority (variable # of RRs)

additional “ helpful” info that may additional info (variable # of RRs)


be used
Application Layer: 2-7
DNS Messages (Header Section)
- Header Section: The first 12 bytes is the header section, which has a number of fields:

- The first field is a 16-bit number that identifies the query. This identifier is copied into
the reply message to a query, allowing the client to match received replies with sent queries.

- Flags: There are a number of flags in the flag field. A one-bit query/reply flag indicates whether
the message is a query (0) or a reply (1). A one-bit authoritative flag is set in a reply message when
a DNS server is an authoritative server for a queried name. A one-bit recursion-desired flag is set
when a client (host or DNS server) desires that the DNS server perform recursion when it doesn’t
have the record. A one-bit recursion available flag is set in a reply if the DNS server supports
recursion.

- # Fields (Four number-of fields): These fields indicate the number of occurrences of the four types of
data sections that follow the header.

- Question Section: contains information about the query that is being made. This section includes
(i) a name field that contains the name that is being queried, and (ii) a type field that indicates the
type of question being asked about the name

- Answer Section: In a reply from a DNS server, the answer section contains the resource records
for the name that was originally queried.

- Authority Section: contains records of other authoritative servers.

- Additional Section: contains other helpful records


Getting your info into the DNS
example: new startup “Network Utopia”
▪ You should register name networkuptopia.com at DNS registrar (e.g.,
Network Solutions, GoDadday etc.)
• provide names, IP addresses of authoritative name server (primary and
secondary)
• registrar inserts type NS & type A RRs into .com TLD server: (and CNAME RR if alias name
also exists)
(networkutopia.com, dns1.networkutopia.com, NS)
(dns1.networkutopia.com, 212.212.212.1, A)
(nwutopia.com,networkutopia.com,CNAME)
▪ You should create authoritative server locally with IP address
212.212.212.1 containing the following RRs
• type A record for www.networkuptopia.com i.e. if DNS query is initiated by HTTP for a webserver,
then RRs will be
- (networkutopia.com, 212.212.212.2, A) assuming webserver IP address is 212.212.212.2
- and also another RR can be (www.networkutopia.com, 212.212.212.2, A) so that webserver is reached in both the
scenarios i.e. if user either types url “networkutopia.com” or types “www.networkutopia.com”
• type MX record for networkutopia.com i.e. if the DNS query is initiated by SMTP for a mail server,
then RRs will be
- (networkutopia.com, mail.networkutopia.com, MX)
- (mail.networkutopia.com, 212.212.212.3, A) assuming mail server IP address is 212.212.212.3

Application Layer: 2-9


DNS security
DDoS attacks Spoofing attacks
▪ bombard root servers with ▪ intercept DNS queries,
traffic returning bogus replies
• not successful to date ▪ DNS cache poisoning
▪ RFC 4033: DNSSEC
• traffic filtering
authentication services
• local DNS servers cache IPs of TLD
servers, allowing root server
bypass
▪ bombard TLD servers
• potentially more dangerous

Application Layer: 2-10


Chapter 2: Summary
our study of network application layer is now complete!
▪ application architectures ▪ specific protocols:
• client-server • HTTP
• P2P • SMTP, IMAP
• DNS
▪ application service requirements: • P2P: BitTorrent
• reliability, bandwidth, delay
▪ video streaming, CDNs
▪ Internet transport service model ▪ socket programming:
• connection-oriented, reliable: TCP TCP, UDP sockets
• unreliable, datagrams: UDP

Application Layer: 2-21


Chapter 2: Summary
Most importantly: learned about protocols!
▪ typical request/reply message important themes:
exchange: ▪ centralized vs.
• client requests info or service decentralized
• server responds with data, status code ▪ stateless vs. stateful
▪ message formats: ▪ scalability
• headers: fields giving info about data ▪ reliable vs. unreliable
• data: info(payload) being message transfer
communicated ▪ “complexity at network
edge”

Application Layer: 2-22


Chapter 2

2-23
Chapter 3
Transport Layer
A note on the use of these PowerPoint slides:
We’re making these slides freely available to all (faculty, students,
readers). They’re in PowerPoint form so you see the animations; and
can add, modify, and delete slides (including this one) and slide
content to suit your needs. They obviously represent a lot of work on
our part. In return for use, we only ask the following:
▪ If you use these slides (e.g., in a class) that you mention their
source (after all, we’d like people to use our book!)
▪ If you post any slides on a www site, that you note that they are
adapted from (or perhaps identical to) our slides, and note our
copyright of this material.
Computer Networking: A
For a revision history, see the slide note for this page.
Top-Down Approach
Thanks and enjoy! JFK/KWR 8th edition
All material copyright 1996-2023
Jim Kurose, Keith Ross
J.F Kurose and K.W. Ross, All Rights Reserved Pearson, 2020

Transport Layer: 3-24


Transport layer: overview
Our goal:
▪ understand principles ▪ learn about Internet transport
behind transport layer layer protocols:
services: • UDP: connectionless transport
• multiplexing, • TCP: connection-oriented reliable
demultiplexing transport
• reliable data transfer • TCP congestion control
• flow control
• congestion control

Transport Layer: 3-25


Transport layer: roadmap
▪ Transport-layer services
▪ Multiplexing and demultiplexing
▪ Connectionless transport: UDP
▪ Principles of reliable data transfer
▪ Connection-oriented transport: TCP
▪ Principles of congestion control
▪ TCP congestion control
▪ Evolution of transport-layer
functionality

Transport Layer: 3-26


Transport services and protocols
application
transport

▪ provide logical communication mobile network


network
data link
physical
between application processes national or global ISP

running on different hosts


▪ transport protocols actions in end
systems: local or
• sender: breaks application messages regional
ISP
into segments, passes to network layer home network content
• receiver: reassembles segments into provider
network
messages, passes to application layer datacenter
application
transport
network
network

▪ two transport protocols available to data link


physical

Internet applications enterprise


network
• TCP, UDP
Transport Layer: 3-27
Transport vs. network layer services and protocols
household analogy:
12 kids in Ann’s house sending
letters to 12 kids in Bill’s
house:
▪ hosts = houses
▪ processes = kids
▪ app messages = letters in
envelopes
▪ transport protocol = Ann and Bill
who demux to in-house siblings
▪ network-layer protocol = postal
service

Transport Layer: 3-28


Transport vs. network layer services and protocols
household analogy:
▪transport layer:
12 kids in Ann’s house sending
communication between letters to 12 kids in Bill’s
processes house:
• relies on, enhances, network ▪ hosts = houses
layer services ▪ processes = kids
▪ app messages = letters in
envelopes
▪network layer: ▪ transport protocol = Ann and Bill
communication between who demux to in-house siblings
hosts ▪ network-layer protocol = postal
service

Transport Layer: 3-29


Transport Layer vs Network Layer & Data Link Layer
- The Data Link Layer is responsible for delivery of frames between two
neighboring nodes over a link. This can be called node-to-node delivery.

- The network layer is responsible for delivery of datagrams between two


hosts. This can be called host-to-host delivery.

Communication on the Internet is not defined as the exchange of data


between two nodes or between two hosts. Real communication takes place
between two processes.

- The Transport Layer is responsible for the process-to-process delivery.


Transport Layer Actions

Sender:
application ▪ is passed an application- application
app. msg
layer message
transport ▪ determines segment TThhtransport
app. msg
header fields values
network (IP) ▪ creates segment network (IP)

link ▪ passes segment to IP link

physical physical

Transport Layer: 3-31


Transport Layer Actions

Receiver:
application ▪ receives segment from IP application
▪ checks header values
transport
app. msg ▪ extracts application-layer transport
message
network (IP) network (IP)
▪ demultiplexes message up
link to application via socket link

physical physical
Th app. msg

Transport Layer: 3-32


Two principal Internet transport protocols
applicatio

▪ TCP: Transmission Control Protocol


n
transport
mobile network
network
data link
• reliable, in-order delivery physical national or global ISP

• congestion control
• flow control
• connection setup
local or
▪ UDP: User Datagram Protocol regional
ISP
• unreliable, unordered delivery home network content
• no-frills extension of “best-effort” IP provider
network datacenter
applicatio

▪ services not available (by UDP or TCP):


network
n
transport
network
• delay guarantees data link
physical

• bandwidth guarantees enterprise


network

Transport Layer: 3-33


Assignment # 2 (Chapter – 2)
• (already announced)

- 2nd Assignment will be uploaded on Google Classroom


after the lecture in the Stream Section, on Thursday 12th
September, 2024

- Due Date: Thursday, 19th September, 2024 (During the


lecture, as 17th September is public holiday)

- Hard copy of the handwritten assignment to be submitted


directly to the Instructor during the lecture.

- Please read all the instructions carefully in the uploaded


Assignment document, follow & submit accordingly
Quiz # 2 (Chapter – 2) (already announced)

- Quiz # 2 for Chapter 2 to be taken in the class on Thursday, 19th September, 2024 during the
lecture time.

- Quiz to be take during own section lecture only

No Retake
Be on time

You might also like