0% found this document useful (0 votes)
11 views

Lecture 5 Sumcsc 430

Uploaded by

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

Lecture 5 Sumcsc 430

Uploaded by

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

Lecture 5:

1) Electronic Mail:
2) 3 major components:
3) User Agents (mail reader): These are the email programs or apps you use to read, send, and
manage your emails. Think of them like your email inbox on your phone or computer, such as
Gmail or Outlook. •outgoing, incoming messages stored on server.
4) Mail Servers: These are like post offices for emails. They hold onto your emails until you're ready
to read them with your user agent, and they help send out emails you've written to others.
• mailbox contains incoming messages for user • message queue of outgoing (to be sent) mail
messages • SMTP protocol between mail servers to send email messages • client: sending mail
server • “server”: receiving mail server
5) SMTP (Simple Mail Transfer Protocol): This is a set of rules that helps send emails from your
email program (user agent) to the mail server, and then from the sender's server to the
recipient's server. It's like the postal service's way of making sure your email gets from you to
your friend's inbox.
•uses TCP to reliably transfer email message from client to server, port 25
• direct transfer: sending server to receiving server
• three phases of transfer:
handshaking (greeting): The initial phase where the sending and receiving servers establish
communication.
transfer of messages: The actual transfer of email messages from the client to the server
closure: The final phase, concluding the session between the sending and receiving servers.
•Command/Response Interaction: SMTP communication involves a series of
command/response interactions between the client and server. The client sends commands in
ASCII text, and the server replies with status codes and phrases to indicate the result or next
steps.
•messages must be in 7-bit ASCII
6) Scenario:
7) 1) Nadine uses U.A. (user agent) to compose message and send “to” [email protected] 2)
Nadine’s UA sends message to her mail server; message placed in message queue 3) Client side
of SMTP opens TCP connection with Jad’s mail server 4) SMTP client sends Nadine’s message
over the TCP connection 5) Jad’s mail server places the message in Jad’s mailbox 6) Jad invokes
his user agent to read message.
8) Mail Message Format:
SMTP: protocol for exchanging email msgs
RFC 822: standard for text message format:
• header lines, e.g., • To: • From: • Subject: different from SMTP commands!
• body • the “message”, ASCII characters only
9) MIME: printed
10) Mail Access Protocols:
11) SMTP: Used for delivering and storing emails on the recipient's server. It does not handle email
retrieval.
12) Mail Access Protocols: These are for retrieving emails from the server.
13) POP (Post Office Protocol) [RFC 1939]: A simpler protocol that allows emails to be downloaded
from the server to the user's device. After downloading, emails are typically deleted from the
server.
14) IMAP (Internet Mail Access Protocol) [RFC 1730]: Offers more advanced features than POP,
allowing users to manage emails directly on the server without downloading them. This
supports using multiple devices to access and organize emails.
15) POP3:printed Previous example uses “download and delete” mode. • Nadine cannot re-read e-
mail if she changes user client. (because emails are downloaded somewhere else. • “Download-
and-keep” is an offered option in pop3. • Copies of messages are downloaded. • Originals
remain on the server • POP3 is stateless across sessions.
16) IMAP: Keep all messages in one place: the server • Allows user to organize messages in folders •
IMAP keeps user state across sessions: • names of folders and mappings between message IDs
and folder name.
17) DNS: Domain Name System:
18) People and Identifiers: Just as people have multiple identifiers (like SSN, name, passport
number), internet hosts and routers also have identifiers:
19) IP Address: A 32-bit numerical label assigned to each device connected to a computer network
that uses the Internet Protocol for communication. IP addresses are used for addressing
messages.
20) Domain Name: A human-friendly name (e.g., www.yahoo.com) that is easier to remember than
a numeric IP address.
21) The Need for Mapping: Since humans find names easier to remember and machines use IP
addresses for routing internet traffic, there arises a question: How do we map between domain
names and IP addresses?
22) Domain Name System (DNS): DNS is the solution to this mapping challenge. Key aspects include:
23) Distributed Database: DNS is implemented as a distributed database in a hierarchy of many
name servers across the internet. This structure allows for efficient handling of changes and
queries.
24) Application-Layer Protocol: DNS uses an application-layer protocol that enables hosts, routers,
and name servers to communicate to resolve names. This means DNS functions at a layer where
applications can access network services.
25) Core Internet Function: Despite being implemented as an application-layer protocol, DNS is
fundamental to the core functioning of the internet, enabling the translation between domain
names and IP addresses.
26) How DNS works:
Host at lau.int.edu wants IP address for google.asia.com: This initiates the DNS lookup process.
The host computer wants to connect to google.asia.com, but it doesn't know the IP address
where google.asia.com is located. In the internet world, domain names are used because they
are easier for humans to remember, but the underlying network requires numerical IP addresses
to route traffic.
Host sends a "recursion requested" query request to dns.poly.edu: The host computer sends a
DNS query to its configured DNS server, which in this scenario is dns.poly.edu. The query is
marked with a "recursion requested" flag, indicating that the host expects the DNS server to
perform the necessary lookups to resolve the domain name to an IP address, rather than just
replying with a referral to another DNS server.
Local DNS server does a "recursive" search: Upon receiving the recursion requested query, the
local DNS server (dns.poly.edu) takes on the responsibility of resolving the domain name. This is
known as a recursive query because the server will continue to make further queries on behalf
of the original requester until it finds the answer.
This requires contacting several other DNS servers before the final answer is given to host: The
recursive search process involves the local DNS server contacting other DNS servers in the
hierarchy. This typically starts with a root DNS server, then moves to a top-level domain (TLD)
DNS server (for .asia in this case), and finally to authoritative DNS servers for google.asia.com.
Each of these servers either provides a part of the answer or refers the querying server to
another DNS server closer to the authoritative source for the domain. Once the IP address for
google.asia.com is found, the local DNS server sends this information back to the original host at
lau.int.edu.
27) (Drawing) Example 2: Client wants IP for www.amazon.com; 1st approx: • Client queries a root
server to find com DNS server • Client queries com DNS server to get amazon.com DNS server •
Client queries amazon.com DNS server to get IP address for www.amazon.com.
28) Why not centralize DNS:
Single Point of Failure: Centralizing DNS into one database or server would create a single point
of failure. If that server goes down or experiences issues, it could make the entire internet—or
large portions of it—unreachable.
Traffic Volume: The DNS system handles billions of queries every day. Centralizing this service
would result in an enormous amount of traffic directed to a single point, which could lead to
congestion and performance issues.
Distance to Centralized Database: Internet users are distributed globally, and having a
centralized DNS server would mean that users far from the server would experience higher
latency when making DNS queries. The distributed nature of DNS ensures that users can query a
local or regional DNS server, reducing latency.
Maintenance Challenges: Managing and updating a single centralized DNS database would be
highly challenging, especially considering the dynamic nature of the internet where domain
names are constantly being added, modified, or removed. A distributed system allows for more
manageable and localized maintenance.
29) Root Name Servers: contacted by local name server that can not resolve name • root name
server: • contacts authoritative name server if name mapping not known • gets mapping •
returns mapping to local name server.
30) Top-Level Domain (TLD) Servers: Manage the top-most level of the domain names hierarchy,
such as .com, .org, .net, .edu, and country codes like .uk, .fr, .ca, .jp. They direct queries to the
next level down for domains within these TLDs.
31) Authoritative DNS Servers: Owned by organizations, these servers contain the definitive
mappings between hostnames and IP addresses for the organization's domains (e.g., web and
mail servers). They can be managed in-house or by a third-party service provider.
32) Local DNS Servers: Typically operated by an organization or an ISP, these servers cache DNS
query results and perform DNS resolution for clients within a particular network or subnet. They
serve as the initial point of contact for DNS queries within their local network.
 Each ISP (residential ISP, company, university) has one.
 Also called “default name server”
 When a host makes a DNS query, query is sent to its local DNS
 If mapping available, direct response. • Otherwise forwards query into hierarchy.
 Caching: Once a name server finds the mapping, it caches (stores) this information for a certain
period. This mechanism significantly speeds up future queries for the same domain name by
reducing the need to look up the information again.
 Cached entries have a timeout period, after which they are removed from the cache.
 TLD Servers: Top-Level Domain (TLD) servers (e.g., for .com, .org, .net) are often cached in local
name servers, which further reduces the need to query the root name servers at the top of the
DNS hierarchy.
 This caching means that root name servers are not queried as often, which helps distribute the
DNS query load more evenly across the system.
 Updates and Notify Mechanisms: The Internet Engineering Task Force (IETF) is involved in
designing update and notify mechanisms for DNS, as detailed in RFC 2136. These mechanisms
are intended to improve how DNS information is updated and propagated across the network.
33) DNS Records:
Entries in the DNS distributed database used to map domain names to various types of data.
Each DNS record, known as a Resource Record (RR), follows a specific format consisting of four
components: (name, value, type, ttl (TTL stands for "Time To Live" in the context of DNS
(Domain Name System) records. It is a value that specifies the duration (in seconds) that a DNS
record is considered valid before it should be discarded or refreshed.))
 Type=A (Address Record):
Name: The hostname of a device.
Value: The IP address associated with the hostname.
Maps a domain name to an IPv4 address, directing internet traffic to the correct host.
 Type=NS (Name Server Record):
Name: The domain (e.g., foo.com).
Value: The hostname of the authoritative name server for the domain.
Specifies the authoritative name servers for a domain, guiding DNS queries to the right
server for domain-related information.
 Type=CNAME (Canonical Name Record):
Name: An alias name for a canonical (real) name.
Value: The canonical (true) name of the domain.
Example: www.ibm.com might actually point to servereast.backup2.ibm.com.
Maps an alias name to a canonical (real) domain name, allowing multiple domain names
to point to the same physical location for easier management.
 Type=MX (Mail Exchange Record):
Value: The name of the mail server associated with the domain.
Directs email to the correct mail servers for a domain, ensuring proper routing of email
messages.
34) DNS Protocol: The Domain Name System (DNS) protocol uses a uniform message format for
both query and reply messages, ensuring a structured and standardized method for DNS queries
and their responses. DNS message header include:
Identification: A unique 16-bit number assigned to each query, used to match replies with their
corresponding queries.
Flags: Control bits in the header that specify the message's nature and how it should be
processed. Important flags include:
Query or Reply: Determines whether the message is a request for information or a response to a
request.
Recursion Desired (RD): Indicates if the client asks the server to query other servers recursively
on its behalf if it doesn't have the answer.
Recursion Available (RA): Signals from the server whether it supports recursive queries,
informing the client it can handle the full resolution process if needed.
Reply is Authoritative (AA): Identifies if the response comes from a server that has direct
authority over the domain in question, ensuring the reply's accuracy and reliability.

You might also like