DATA COMMUNICATOIN NETWORKING



Similar documents
internet technologies and standards

FTP: the file transfer protocol

DNS: Domain Name System

Domain Name System (DNS)

Domain Name System (or Service) (DNS) Computer Networks Term B10

Chapter 2 Application Layer

How To Map Between Ip Address And Name On A Domain Name System (Dns)

The Application Layer: DNS

Domain Name System Richard T. B. Ma

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

Chapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach

CSCI-1680 SMTP Chen Avin

FTP and . Computer Networks. FTP: the file transfer protocol

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

FTP: the file transfer protocol

DNS: Domain Name System

DNS and P2P File Sharing

CMPE 80N: Introduction to Networking and the Internet

CS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

NET0183 Networks and Communications

DNS and electronic mail. DNS purposes

Domain Name System (DNS) RFC 1034 RFC

CS 348: Computer Networks. - DNS; 22 nd Oct Instructor: Sridhar Iyer IIT Bombay

CPSC Network Programming. , FTP, and NAT.

Computer Networks & Security 2014/2015

Protocolo FTP. FTP: Active Mode. FTP: Active Mode. FTP: Active Mode. FTP: the file transfer protocol. Separate control, data connections

2.5 DNS The Internet s Directory Service

Domain Name System DNS

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

1 Introduction: Network Applications

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Application-layer protocols

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

DNS. Spring 2016 CS 438 Staff 1

Lecture 2 CS An example of a middleware service: DNS Domain Name System

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP

Internet Technology 2/13/2013

DNS: Domain Names. DNS: Domain Name System. DNS: Root name servers. DNS name servers

Domain Name System (DNS) Reading: Section in Chapter 9

Domain Name System (DNS)

DNS records. RR format: (name, value, type, TTL) Type=NS

Naming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) /URLs

Internet-Praktikum I Lab 3: DNS

3. The Domain Name Service

The Application Layer. CS158a Chris Pollett May 9, 2007.

Communicating Applications

Chapter 2 Application Layer

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Application Layer, Client/Server Computing and Socket Programming (II)

DATA COMMUNICATOIN NETWORKING

Lecture 5: Network Attacks I. Course Admin

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Motivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

DNS Domain Name System

Applications and Services. DNS (Domain Name System)

2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)

Domain Name System (DNS)

Introduction to Computer Networks

CS640: Computer Networks. Naming /ETC/HOSTS

Chapter 23 The Domain Name System (DNS)

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

FTP Protocol Secure Shell (SSH) and Secure FTP (SFTP) Components of an System Simple Mail Transfer Protocol Mail Access Protocols

Resilient Networking. Overview of DNS Known attacks on DNS Denial-of-Service Cache Poisoning. Securing DNS Split-Split-DNS DNSSEC.

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

Security Analysis of DNS & Applications/

C 1. Last Time. CSE 486/586 Distributed Systems Domain Name System. Review: Causal Ordering. Review: Causally Ordered Multicast.

Electronic Mail

, SNMP, Securing the Web: SSL

Domain Name System (DNS) Omer F. Rana. Networks and Data Communications 1

Networking Applications

The Domain Name System

Understanding DNS (the Domain Name System)

CSE/ISE 311: Systems Administra5on Networking 2

Network Fundamentals Carnegie Mellon University

Data Communications & Networks. Session 2 Main Theme Application Layer. Dr. Jean-Claude Franchitti

DNS: Domain Name System

Computer Networks - CS132/EECS148 - Spring

Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 34 DNS & Directory

The Domain Name System (DNS)

Integrated Migration Tool

Names & Addresses. Names & Addresses. Names vs. Addresses. Identity. Names vs. Addresses. CS 194: Distributed Systems: Naming

Transcription:

DATA COMMUNICATOIN NETWORKING Instructor: Ouldooz Baghban Karimi Course Book: Computer Networking, A Top-Down Approach By: Kurose, Ross Introduction

Course Overview Basics of Computer Networks Internet & Protocol Stack Application Layer Transport Layer Network Layer Data Link Layer Advanced Topics Case Studies of Computer Networks Internet Applications Network Management Network Security Introduction 2

Electronic Mail Three major components User s Mail servers Simple mail transfer protocol: SMTP User Agent mail reader Outlook, Thunderbird, iphone mail client Composing, editing, reading mail messages Outgoing, incoming messages stored on server mail server SMTP mail server SMTP SMTP outgoing message queue mail server mailbox Introduction 3

Electronic Mail Mail Servers Mailbox contains incoming messages for Message queue of outgoing (to be sent) mail messages mail server SMTP SMTP mail server SMTP protocol between mail servers to send email messages Client: sending mail server mail server SMTP server : receiving mail server Introduction 4

Electronic Mail: SMTP (RFC 2821) 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) Transfer of messages Closure Command/response interaction (like HTTP, FTP) Commands: ASCII text Response: status code and phrase Messages must be in 7-bit ASCI Introduction 5

Alice Sends Messages to Bob 1) Alice uses UA to compose message to bob@someschool.edu 2) Alice s UA sends message to her mail server; message placed in message queue 3) client side of SMTP opens TCP connection with Bob s mail server 4) SMTP client sends Alice s message over the TCP connection 5) Bob s mail server places the message in Bob s mailbox 6) Bob invokes his to read message 1 mail server 2 3 4 mail server 6 Alice s mail server 5 Bob s mail server Introduction 6

Sample SMTP Interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection Introduction 7

SMTP SMTP uses persistent connections SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message Comparison with HTTP HTTP: pull SMTP: push Both have ASCII command/response interaction, status codes HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg Introduction 8

Mail Message Format SMTP: protocol for exchanging email messages RFC 822: standard for text message format: header lines To From: Subject: Different from SMTP MAIL FROM, RCPT TO: commands! Body: the message ASCII characters only blank line header body Introduction 9

Mail Access Protocols SMTP SMTP mail access protocol (e.g., POP, IMAP) sender s mail server receiver s mail server SMTP: delivery/storage to receiver s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939]: authorization, download IMAP: Internet Mail Access Protocol [RFC 1730]: more features, including manipulation of stored mesasges on server HTTP: gmail, Hotmail, Yahoo! Mail, etc. Introduction 10

POP3 Protocol Authorization phase client commands: : declare name pass: password server responses +OK -ERR Transaction phase client: list: list message numbers retr: retrieve message by number dele: delete quit S: +OK POP3 server ready C: bob S: +OK C: pass hungry S: +OK successfully logged on C: list S: 1 498 S: 2 912 S:. C: retr 1 S: <message 1 contents> S:. C: dele 1 C: retr 2 S: <message 1 contents> S:. C: dele 2 C: quit S: +OK POP3 server signing off Introduction 11

POP3 & IMAP POP3 Previous example uses POP3 download and delete mode Bob cannot re-read e-mail if he changes client IMAP Keeps all messages in one place: at server Allows to organize messages in folders POP3 download-and-keep : copies of messages on different clients POP3 is stateless across sessions Keeps state across sessions: Names of folders and mappings between message IDs and folder name Introduction 12

DNS: Domain Name System People identifiers SIN Name Passport Number Internet hosts and router IP address (32 bit) - used for addressing datagrams name, e.g., www.yahoo.com - used by humans How to map between IP address and name? Introduction 13

DNS: Domain Name System Distributed Database Implemented in hierarchy of many name servers Application Layer Protocol Host and name servers communicate to resolve names Address/name translation Core internet function implemented as application layer protocol Complexity at network edge Introduction 14

DNS: Domain Name System DNS Services Hostname to IP address translation Host aliasing Canonical, alias names Mail server aliasing Load distribution Replicated web servers: Many IP addresses correspond to one name Why not Centralize DNS? Single point of failure Traffic Volume Distance Centralized Database Maintenance Scalability Introduction 15

DNS: A Distributed Hierarchical Database Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers poly.edu umass.edu DNS servers DNS servers Client wants IP for www.avazon.com Client queries 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 Introduction 16

DNS: 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 13 Root Name Servers Worldwide Introduction 17

TLD & Authoritative Servers Top-level domain (TLD) servers Responsible for com, org, net, edu, aero, jobs, museums, and all top-level country domains, e.g.: uk, fr, ca, jp Network Solutions maintains servers for.com TLD Educause for.edu TLD Authoritative DNS servers Organization s own DNS server(s), providing authoritative hostname to IP mappings for organization s named hosts Can be maintained by organization or service provider Introduction 18

Local DNS Name Server Does not strictly belong to hierarchy Each ISP (residential ISP, company, university) has one Also called default name server When host makes DNS query, query is sent to its local DNS server Has local cache of recent name-to-address translation pairs (but may be out of date!) Acts as proxy, forwards query into hierarchy Introduction 19

DNS Name Resolution root DNS server Host at cis.poly.edu wants IP address for gaia.cs.umass.edu 2 3 4 TLD DNS server 5 Iterated Query Contacted server replies with name of server to contact I don t know this name, but ask this server local DNS server dns.poly.edu 1 8 requesting host cis.poly.edu 7 6 authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Introduction 20

DNS Name Resolution root DNS server Recursive Query 2 7 6 3 Puts burden of name resolution on contacted name server Heavy load at upper levels of hierarchy? local DNS server dns.poly.edu 1 8 5 4 TLD DNS server requesting host cis.poly.edu authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Introduction 21

DNS: Caching & Updating Records Once (any) name server learns mapping, it caches mapping Cache entries timeout (disappear) after some time (TTL) TLD servers typically cached in local name servers Thus root name servers not often visited Cached entries may be out-of-date (best effort nameto-address translation!) If name host changes IP address, may not be known Internet-wide until all TTLs expire Update/notify mechanisms proposed IETF standard RFC 2136 Introduction 22

DNS Records DNS: Distributed DB storing resource records (RR) RR format: (name, value, type, ttl) Type=A name is hostname value is IP address Type=MX value is name of mailserver associated with name Type=NS name is domain (e.g., foo.com) value is hostname of authoritative name server for this domain Type=CNAME name is alias name for some canonical (the real) name www.ibm.com is really servereast.backup2.ibm.com value is canonical name Introduction 23

DNS Protocol & Messages Query and reply messages, both with same message format 2 bytes 2 bytes Message header Identification 16 bit # for query, reply to query uses same # identification # questions # authority RRs flags # answer RRs # additional RRs Flags query or reply recursion desired recursion available reply is authoritative questions (variable # of questions) answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) Introduction 24

DNS Protocol & Messages 2 bytes 2 bytes identification # questions # authority RRs flags # answer RRs # additional RRs name, type fields for a query RRs in response to query records for authoritative servers additional helpful info that may be used questions (variable # of questions) answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) Introduction 25

Inserting Records into DNS Example: new startup Network Utopia Register name networkuptopia.com at DNS registrar (e.g., Network Solutions) Provide names, IP addresses of authoritative name server (primary and secondary) Registrar inserts two RRs into.com TLD server: (networkutopia.com, dns1.networkutopia.com, NS) (dns1.networkutopia.com, 212.212.212.1, A) Create authoritative server type A record for www.networkuptopia.com; type MX record for networkutopia.com Introduction 26