Applications and Services. DNS (Domain Name System)



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

DNS : Domain Name System

Forouzan: Chapter 17. Domain Name System (DNS)

19 Domain Name System (DNS)

Hostnames. HOSTS.TXT was a bottleneck. Once there was HOSTS.TXT. CSCE515 Computer Network Programming. Hierarchical Organization of DNS

1 Introduction: Network Applications

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

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

The Application Layer: DNS

Domain Name System (DNS)

Domain Name System. DNS is an example of a large scale client-server application. Copyright 2014 Jim Martin

Application-layer Protocols

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

DATA COMMUNICATOIN NETWORKING

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

File Transfer Protocol (FTP) Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Fall 2007, TAIWAN

Internetworking with TCP/IP Unit 10. Domain Name System

DNS - Domain Name System

DNS Domain Name System

FTP: the file transfer protocol

The Domain Name System (DNS)

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

THE DOMAIN NAME SYSTEM DNS

CS3250 Distributed Systems

1 DNS Packet Structure

Internet Security [1] VU Engin Kirda

DNS Conformance Test Specification For Client

Remote login (Telnet):

Internet Technology 2/13/2013

Teldat Router. DNS Client

Internet-Praktikum I Lab 3: DNS

Domain Name System (DNS) Fundamentals

Application Protocols in the TCP/IP Reference Model

Application Protocols in the TCP/IP Reference Model. Application Protocols in the TCP/IP Reference Model. DNS - Domain Name System

Chakchai So-In, Ph.D.

Networking Applications

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

Table of Contents DNS. How to package DNS messages. Wire? DNS on the wire. Some advanced topics. Encoding of domain names.

Chapter 23 The Domain Name System (DNS)

The Domain Name System

Domain Name System (DNS) Session-1: Fundamentals. Ayitey Bulley

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

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

Application Protocols in the TCP/IP Reference Model. Application Protocols in the TCP/IP Reference Model. DNS - Concept. DNS - Domain Name System

How-to: DNS Enumeration

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

Simple Mail Transfer Protocol

Cannot send Autosupport , error message: Unknown User

Domain Name System (DNS)

NET0183 Networks and Communications

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

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

ECE 4321 Computer Networks. Network Programming

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

Domain Name Resolver (DNR) Configuration

CS 164 Winter 2009 Term Project Writing an SMTP server and an SMTP client (Receiver-SMTP and Sender-SMTP) Due & Demo Date (Friday, March 13th)

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

Introduction to Computer Networks

CSCI-1680 SMTP Chen Avin

Some advanced topics. Karst Koymans. Friday, September 11, 2015

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

Cork Institute of Technology Master of Science in Computing in Education National Framework of Qualifications Level 9

3. The Domain Name Service

Internet Technologies Internet Protocols and Services

Mail system components. Electronic Mail MRA MUA MSA MAA. David Byers

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

FILE TRANSFER PROTOCOL INTRODUCTION TO FTP, THE INTERNET'S STANDARD FILE TRANSFER PROTOCOL

How to Configure the Windows DNS Server

FTP: the file transfer protocol

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

DNS. Some advanced topics. Karst Koymans. (with Niels Sijm) Informatics Institute University of Amsterdam. (version 2.6, 2013/09/19 10:55:30)

Introduction to Network Operating Systems

OCS Training Workshop LAB14. Setup

The Domain Name System

Domain Name System :49:44 UTC Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement

Domain Name System Richard T. B. Ma

Distributed Systems. 09. Naming. Paul Krzyzanowski. Rutgers University. Fall 2015

Appendix. Web Command Error Codes. Web Command Error Codes

CS640: Computer Networks. Naming /ETC/HOSTS

Domain Name System (DNS)

Basic Operation & Management of TCP/IP Networks

SME- Mail to SMS & MMS Gateway with NowSMS Quick Start Guide

DNS Resolving using nslookup

Mail agents. Introduction to Internet Mail. Message format (2) Authenticating senders

Motivation. Users can t remember IP addresses. Implemented by library functions & servers. - Need to map symbolic names (

Electronic Mail

Domain Name Server. Training Division National Informatics Centre New Delhi

Introduction to the Domain Name System

DNS. Computer Networks. Seminar 12

Datacommunication. Internet Infrastructure IPv4 & IPv6

Chapter 24 The Domain Name System (DNS)

smtp-user-enum User Documentation

Transcription:

Applications and Services DNS (Domain Name Service) File Transfer Protocol (FTP) Simple Mail Transfer Protocol (SMTP) Malathi Veeraraghavan Distributed database used to: DNS (Domain Name System) map between hostnames and IP addresses provide electronic routing information Unix implementation: resolver (user-level process) gethostbyname: takes a domain name and returns an IP address gethostbyaddr: takes an IP address and looks up a hostname DNS uses mainly UDP for its lookups except when the response is truncated, in which case resolver uses TCP Malathi Veeraraghavan 2

Hierarchical organization of the DNS unnamed root arpa com edu gov mil int net org ae... us... zw UAE country domains in-addr poly uconn Zimbabwe 35 8 03 photon 44 Each node has a label of up to 63 characters Root node has a null label Domain name of a node is the list of labels, starting at that node, working up to the root, using a period to separate the labels Network Information Center (NIC) maintains the top of the tree arpa is a special domain used for pointer queries to translate IP addresses into domain names. When a host name is added, e.g., photon.poly.edu, an entry also needs to be made under the arpa domain. If photon.poly.edu has an IP address of 35.8.03.44, then the structure shown in created under in-addr.arpa. Note it is backwards; A pointer query for 44.03.8.35.in-addr.arpa will yield the name photon.poly.edu Malathi Veeraraghavan 3 General format of DNS queries/responses 0 5 6 3 identification number of questions number of authority RRs flags number of answer RRs number of additional RRs questions answers (variable number of resource records) authority (variable number of resource records) additional information (variable number of resource records) 2 bytes (DNS header) Identification sent by the client and returned by the server lets client match responses Malathi Veeraraghavan 4

Flags: Fields in the DNS queries/responses QR opcode AA TC RD RA (zero) rcode 4 QR: 0 means the message is a query, means it s a response. opcode: 0 (standard query); (inverse query); 2 (server status request) AA: Authoritative Answer TC: Truncated - with UDP, total length of reply> 52 bytes and only first 52 bytes were returned; resolver usually reissues request using TCP RD: Recursion Desired - If it is set, name server handles it as a recursive query; If it is not set, and the requested name server does not have an authoritative answer, it returns a list of other name servers to contact (iterative query) RA: Recursion Available - If this is set to in the response, the name server supports recursion. rcode: return code - 0 (no error); 3 (name error). The name error is returned by the authoritative name server if the domain name specified in the query does not exist. 3 4 Malathi Veeraraghavan 5 Question portion of the DNS query message The query name is the name being looked up: sequence of one or more labels Each label begins with a -byte count that specifies the no. of bytes to follow Example: gemini.noc.poly.edu is represented as 6gemini3noc4poly3edu0 Query type in a question and each response has a type Name Numeric Value query name query type query class = 0 5 6 3 multiple bytes Description type? query type? A IP address NS 2 name server CNAME 5 canonical name PTR 2 pointer query HINFO 3 host info MX 5 mail exchange record AXFR 252 request for zone transfer * or any 255 request for all records Malathi Veeraraghavan 6

Resource record portion of DNS response domain name multiple bytes type class time-to-live resource data length resource data 0 5 6 3 Domain name: same as the query name Type and class: same as the query type and query class Time-to-live: number of seconds that the RR can be cached by the client (2 days) Resource data length: depends on the type of query; if type=a, resource data is 4 bytes long (IP address) Malathi Veeraraghavan 7 Applications FTP: File Transfer Protocol SMTP: Simple Mail Transfer Protocol SNMP: Simple Network Management Protocol Telnet, Rlogin: Remote login NFS: Network File System HTTP: HyperText Transfer Protocol (web browsing) Malathi Veeraraghavan 8

FTP client user at a terminal user interface user protocol interpreter control connection (FTP commands/ replies) server server protocol interpreter file system user data transfer function data connection server data transfer function file system FTP uses two TCP connections control connection: well-known port number at the server = 2 data connection: well-known port number at the server = 20 Malathi Veeraraghavan 9 Data representation File type ASCII, EBCDIC, Image (binary), Local Format control Nonprint, Telnet format control, Fortran carriage control Structure File structure, Record structure, Page structure Transmission mode Stream mode, block mode, compressed mode Common UNIX implementations of FTP ASCII or image type Nonprint format control only File structure only Stream mode transmission only Malathi Veeraraghavan 0

FTP commands Command Description ABOR Abort previous command and any file transfer LIST filelist List files or directories PASS password Password on server PORT n, n2, n3, n4, n5, n6 Client IP address (n.n2.n3.n4) and port ( n5 256 + n6 ) QUIT Logoff from server RETR filename Retrieve (get) a file STORE filename Store (put) a file SYST Server returns system type TYPE type Specify the file type: ascii or image USER username Username on server Malathi Veeraraghavan FTP replies Example replies (replies are 3 digit numbers: meaning of first two digits on page 424 in text book) 25 Data connection already open; transfer starting 200 Command OK 24 Help message 33 Username OK, password required 425 Can t open data connection 452 Error writing file 500 Syntax error (unrecognized command) 50 Syntax error (invalid arguments) 502 Unimplemented MODE type Malathi Veeraraghavan 2

FTP client port 73 port 74 IP addr 40.252.3.34 FTP client port 73 port 74 IP addr 40.252.3.34 Connection management PORT 40, 252, 3, 34, 4, 50\r\n 4x256 + 50 = 74 (control connection) FTP server port 2 FTP server port 2 port 20 SYN to 40.252.3.34 port 74 (active open) Control connection stays up for the duration of the client-server connection Creation of data connection is under control of client Client chooses an ephemeral port number on the client host for its end of the data connection. Client sends the PORT command to the server across the control connection Server receives the port number and issues an active open to that port on the client host. The server s end of the data connection always uses port 20. Multiple FTP sessions from multiple clients to the same FTP server Malathi Veeraraghavan 3 SMTP user at a terminal sender User agent queue of mail to be sent message transfer agent user at a terminal receiver User agent user mailboxes port 25 message transfer agent Communication between two MTAs uses NVT (network virtual terminal) ASCII SMTP commands Send mail: HELO, MAIL, RCPT, DATA, QUIT Malathi Veeraraghavan 4

sun% mail wallace@noao.edu To: wallace@noao.edu Subject: testing Example invokes user agent this is output by user agent, 2, 3. user agent adds one blank line;. this is body of message Sending letter to wallace@noao.edu verbose output from user agent following is output by MTA Connecting to mailhost via ether... Trying 40.252..54... connected. 220 noao.edu Sendmail 4... >>> HELO sun.tuc.noao.edu 250 noao.edu Hello sun.tuc.noao.edu Client does an active open to port 25 >>> MAIL From: <rstevens@sun.tuc.noao.edu> MAIL command identifies sender 250 <rstevens@sun.tuc.noao.edu> Sender OK >>> RCPT To: <wallace@noao.edu> RCPT command identifies recipient 250 <wallace@noao.edu> Recipient OK >>> DATA DATA command carries actual data 354 Enter mail, end with. on a line by itself Malathi Veeraraghavan 5 Example continued >>> QUIT terminates mail exchange 22 noao.edu delivering mail wallace@noao.edu... Sent sent. This is output by user agent Actual data sent: 393 bytes (for just the one line, 2, 3?) Received: by sun.tuc.noao.edu (4./SMI-4.) id AA00502; Mon, 9 Jul 93 2:47:32 MST Message Id: <9379947.AA00502@sun.tuc.noao.edu.> From: rstevens@sun.tuc.noao.edu (Richard Stevens) Date: Mon, 9 Jul 993, 2:47:2-0700 Reply-To: wallace@noao.edu X-Phone: X-Mailer: To: wallace@noao.edu Subject: testing, 2, 3. Malathi Veeraraghavan 6

Other SMTP commands RSET: aborts current mail transaction and causes both ends to reset VRFY: lets the client ask the sender to verify a recipient address without sending mail to the recipient NOOP command does nothing except make the server respond with a 200 OK reply code. Other optional commands Malathi Veeraraghavan 7 Envelopes, headers, body Electronic mail is composed of three pieces: Envelope: used by the MTA for delivery; MAIL, RCPT commands Headers: used by user agents. Nine header fields in example: Received, Message-Id, From, Date, Reply-To, X-Phone, X-Mailer, To, Subject Body: content of message (NVT ASCII text) Malathi Veeraraghavan 8