DNS: Domain Name System

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

Network Programming using sockets

Data Communication & Networks G

Domain Name System (DNS)

Computer Networks. Instructor: Niklas Carlsson

DNS: Distributed Name System

Chapter 2 Application Layer

Socket programming. Socket Programming. Languages and Platforms. Sockets. Rohan Murty Hitesh Ballani. Last Modified: 2/8/2004 8:30:45 AM

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

DNS: Domain Name System

Domain Name System Richard T. B. Ma

Application-layer protocols

How To Use A Network On A Network With A Powerline (Lan) On A Pcode (Lan On Alan) (Lan For Acedo) (Moe) (Omo) On An Ipo) Or Ipo (

Chapter 2: Application layer

Domain Name System (DNS) RFC 1034 RFC

DATA COMMUNICATOIN NETWORKING

Alarm transmission through Radio and GSM networks

Goal: learn how to build client/server application that communicate using sockets. An interface between application and network

Domain Name System (DNS)

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

internet technologies and standards

Distributed Computing and Big Data: Hadoop and MapReduce

Cours du 22 novembre

Digital Communication in the Modern World Application Layer cont. DNS, SMTP

The Application Layer: DNS

DNS and P2P File Sharing

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

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

CMPE 80N: Introduction to Networking and the Internet

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

Java Network. Slides prepared by : Farzana Rahman

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

FTP: the file transfer protocol

Chapter 2 Application Layer

CIS-162. Security Baselines. Security Baselines. Best Practice aka Beer and Pizza. Remove all unneeded processes

Questions & Answers Chapter 10 Software Reliability Prediction, Allocation and Demonstration Testing

Things to Remember. r Complete all of the sections on the Retirement Benefit Options form that apply to your request.

Power Monitoring and Control for Electric Home Appliances Based on Power Line Communication

Computer Networks & Security 2014/2015

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

CMPE 80N: Introduction to Networking and the Internet

NET0183 Networks and Communications

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

1 Introduction: Network Applications

HEALTHCARE INTEGRATION BASED ON CLOUD COMPUTING

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

Concept and Experiences on using a Wiki-based System for Software-related Seminar Papers

DNS: Domain Name System

Effect of Contention Window on the Performance of IEEE WLANs

Hitachi Virtual Storage Platform

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

DNS. Spring 2016 CS 438 Staff 1

Integrating Net2 with an intruder alarm system

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

LTI, SAML, and Federated ID - Oh My!

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

Overview of Computer Networks

Automatic Testing of Neighbor Discovery Protocol Based on FSM and TTCN*

2.5 DNS The Internet s Directory Service

Automated Hydraulic Drilling Rigs. HHSeries

Give me all I pay for Execution Guarantees in Electronic Commerce Payment Processes

Over-encryption: Management of Access Control Evolution on Outsourced Data

THE DISTRIBUTED LOCATION RESOLUTION PROBLEM AND ITS EFFICIENT SOLUTION

Faithful Comptroller s Handbook

Financial Derivatives for Computer Network Capacity Markets with Quality-of-Service Guarantees

Transmittal 198 Date: DECEMBER 9, SUBJECT: Termination of the Existing Eligibility-File Based Crossover Process at All Medicare Contractors

How to create a default user profile in Windows 7

How to recover your Exchange 2003/2007 mailboxes and s if all you have available are your PRIV1.EDB and PRIV1.STM Information Store database

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

Domain Name System DNS

Review of Previous Lecture

CS640: Computer Networks. Naming /ETC/HOSTS

Cloud Service Reliability: Modeling and Analysis

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

INITIAL MARGIN CALCULATION ON DERIVATIVE MARKETS OPTION VALUATION FORMULAS

Instructions to help you complete your enrollment form for HPHC's Medicare Supplemental Plan

Chapter 1: Introduction BELSORP analysis program Required computer environment... 8

An Efficient Group Key Agreement Protocol for Ad hoc Networks

College of Engineering Bachelor of Computer Science

Lecture 5: Network Attacks I. Course Admin

Determine implementation strategy, including a communications plan with trading partners and business associates (1 month)

Software Engineering and Development

3. The Domain Name Service

Firstmark Credit Union Commercial Loan Department

String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket.

Transmittal 47 Date: FEBRUARY 24, 2006

DNS and electronic mail. DNS purposes

Optimal Peer Selection in a Free-Market Peer-Resource Economy

Network Layer 4- density - A Top Down Approach

How to create RAID 1 mirroring with a hard disk that already has data or an operating system on it

Confirmation of Booking

Socket Programming. Announcement. Lectures moved to

9:6.4 Sample Questions/Requests for Managing Underwriter Candidates

Distributed Systems. Naming

Towards Automatic Update of Access Control Policy

Engineered Systems. Configuration Guide. October, 1998 TD9007 rev. 2.0

Chapter 3 Savings, Present Value and Ricardian Equivalence

DOCTORAL DEGREE PROGRAM

AFFILIATE MEMBERSHIP APPLICATION

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Transcription:

DNS: Domain Name System People: many identifies: m SSN, name, Passpot # Intenet hosts, outes: m IP addess (32 bit) - used fo addessing datagams (in IPv4) m name, e.g., gaia.cs.umass.edu - used by humans Q: map between IP addesses and name? Adding additional delays Domain Name System: distibuted database implemented in hieachy of many name seves application-laye potocol host, outes, name seves to communicate to esolve names (addess/name tanslation) m uns ove UDP, pot 53 m used by othe app pots. m note: coe Intenet function implemented as application-laye potocol m complexity at netwok s edge 2: Application Laye 2b-1

Othe DNS sevices Host aliasing: any canonical hostname may have one o moe aliases: e.g. cassius.ee.usyd.edu.au has aliases www.ee.usyd.edu.au and ee.usyd.edu.au Mail seve aliasing: use of simple hostnames fo email: hotmail.com might be elay1.west.hotmail.com DNS pemits to have same mail seve and web seve aliased hostnames; easie fo uses Load distibution: eplicated seves fo busy seves; e.g. fo cnn.com we may have many seves DNS database otates the IP addesses of all eplicated seves wheneve eply to an inquiy; client uses the fist IP addess in the list load distibution 2: Application Laye 2b-2

DNS name seves Why not centalize DNS? single point of failue taffic volume distant centalized database maintenance doesn t scale! no seve has all nameto-ip addess mappings local name seves: m each ISP, company has local (default) name seve m host DNS quey fist goes to local name seve authoitative name seve: m fo a host: stoes that host s IP addess, name m can pefom name/addess tanslation fo that host s name 2: Application Laye 2b-3

DNS: Root name seves contacted by local name seve that can not esolve name oot name seve: m contacts authoitative name seve if name mapping not known m gets mapping m etuns mapping to local name seve ~ dozen oot name seves woldwide 2: Application Laye 2b-4

Simple DNS example oot name seve host suf.euecom.f wants IP addess of gaia.cs.umass.edu 1. Contacts its local DNS seve, dns.euecom.f 2. dns.euecom.f contacts oot name seve, if necessay 3. oot name seve contacts authoitative name seve, dns.umass.edu, if necessay local name seve dns.euecom.f 1 2 6 equesting host suf.euecom.f 5 3 4 authoititive name seve dns.umass.edu gaia.cs.umass.edu 2: Application Laye 2b-5

DNS example oot name seve Root name seve: may not know authoatiative name seve may know intemediate name seve: who to contact to find authoitative name seve local name seve dns.euecom.f 1 2 8 equesting host suf.euecom.f 7 3 6 intemediate name seve dns.umass.edu 4 5 authoitative name seve dns.cs.umass.edu gaia.cs.umass.edu 2: Application Laye 2b-6

DNS: iteated queies oot name seve ecusive quey: puts buden of name esolution on contacted name seve heavy load? iteated quey: contacted seve eplies with name of seve to contact I don t know this name, but ask this seve local name seve dns.euecom.f 1 2 8 equesting host suf.euecom.f 3 4 7 iteated quey intemediate name seve dns.umass.edu 5 6 authoitative name seve dns.cs.umass.edu gaia.cs.umass.edu 2: Application Laye 2b-7

DNS: caching and updating ecods once (any) name seve leans mapping, it caches mapping m cache enties timeout (disappea) afte some time [specified in TTL(time to live) field of the DNS Resouce Recod (RR)] update/notify mechanisms unde design by IETF m RFC 2136 m http://www.ietf.og/html.chates/dnsindchate.html 2: Application Laye 2b-8

DNS ecods DNS: distibuted db stoing esouce ecods (RR) RR fomat: (name, value, type,ttl) Type=A Type=CNAME m name is hostname m value is IP addess Type=NS m name is domain (e.g. foo.com) m value is IP addess of authoitative name seve fo this domain m name is an alias name fo some canonical (the eal) name m value is canonical name Type=MX m value is hostname of mail seve associated with name 2: Application Laye 2b-9

DNS potocol, messages DNS potocol : quey and eply messages, both with same message fomat message heade identification: 16 bit # fo quey, eply to quey uses same # flags: m quey o eply m ecusion desied m ecusion available m eply is authoitative 2: Application Laye 2b-10

DNS potocol, messages Name, type fields fo a quey RRs in esponse to quey ecods fo authoitative seves additional helpful info that may be used 2: Application Laye 2b-11

Socket pogamming Goal: lean how to build a client/seve application that communicates using sockets Socket API intoduced in BSD4.1 UNIX, 1981 explicitly ceated, used, eleased by apps client/seve paadigm two types of tanspot sevice via socket API: m uneliable datagam m eliable, byte steamoiented develope decision socket a host-local, applicationceated/owned, OS-contolled inteface (a doo ) into which application pocess can both send and eceive messages to/fom anothe (emote o local) application pocess 2: Application Laye 2b-12

Two types of client/seve apps Implementation of a potocol standad in an RFC m Client/seve pogams obey ules of the RFC e.g., if it is FTP pocess, see RFC 959 and confom it m Client and seve pogams ae able to inteopeate m Client and seve pogams can be ceated independently m They must use the pot numbe associated with potocol A popietay client/seve application m No necessity in confoming any RFC m Client and seve pogams developed by same develope m Not to use aleady used pot numbes m This method is the one we use hee Use C, C ++, o Java pogamming 2: Application Laye 2b-13

Socket pogamming using TCP Socket: a doo between application pocess and endend-tanspot potocol (UDP o TCP) TCP sevice: eliable tansfe of bytes fom one pocess to anothe socket pogamming: client/seve application development contolled by application develope contolled by opeating system pocess socket TCP with buffes, vaiables Intenet pocess socket TCP with buffes, vaiables contolled by application develope contolled by opeating system client o seve client o seve 2: Application Laye 2b-14

Socket pogamming with TCP Client must contact seve seve pocess must fist be unning seve must have ceated socket (doo) that welcomes client s contact Client contacts seve by: ceating client-local TCP socket object specifying IP addess, pot numbe of seve pocess TCP thee way handshaking When client ceates socket: client TCP establishes connection to seve TCP When contacted by client, seve TCP ceates new socket fo seve pocess to communicate with client m allows seve to talk with multiple clients application viewpoint TCP povides eliable, in-ode tansfe of bytes ( pipe ) between client and seve 2: Application Laye 2b-15

Socket pogamming with TCP Example client-seve app: client eads line fom standad input (infomuse steam), sends to seve via socket (outtoseve steam) seve eads line fom socket seve convets line to uppecase, sends back to client client eads, pints modified line fom socket and pints the line on standad output (infomseve steam) Input steam: sequence of bytes into pocess Output steam: sequence of bytes out of pocess infomuse outtoseve client socket iinfomseve a typical TCPclient: 3 steams and 1 socket 2: Application Laye 2b-16

Client/seve socket inteaction: TCP Seve (unning on hostid) ceate socket, pot=x, fo incoming equest: welcomesocket = SeveSocket() wait fo incoming connection equest connectionsocket = welcomesocket.accept() ead equest fom connectionsocket wite eply to connectionsocket close connectionsocket TCP connection setup Client ceate socket, connect to hostid, pot=x clientsocket = Socket() send equest using clientsocket ead eply fom clientsocket close clientsocket 2: Application Laye 2b-17

Example: Java client (TCP) impot java.io.*; impot java.net.*; class TCPClient { Ceate input steam Ceate client socket, connect to seve Ceate output steam attached to socket public static void main(sting agv[]) thows Exception { Sting sentence; Sting modifiedsentence; BuffeedReade infomuse = new BuffeedReade(new InputSteamReade(System.in)); Socket clientsocket = new Socket("hostname", 6789); DataOutputSteam outtoseve = new DataOutputSteam(clientSocket.getOutputSteam()); 2: Application Laye 2b-18

Example: Java client (TCP), cont. Ceate input steam attached to socket Send line to seve Read line fom seve BuffeedReade infomseve = new BuffeedReade(new InputSteamReade(clientSocket.getInputSteam())); sentence = infomuse.eadline(); outtoseve.witebytes(sentence + '\n'); modifiedsentence = infomseve.eadline(); System.out.pintln("FROM SERVER: " + modifiedsentence); clientsocket.close(); } } 2: Application Laye 2b-19

Example: Java seve (TCP) impot java.io.*; impot java.net.*; class TCPSeve { Ceate welcoming socket at pot 6789 Wait, on welcoming socket fo contact by client Ceate input steam, attached to socket public static void main(sting agv[]) thows Exception { Sting clientsentence; Sting capitalizedsentence; SeveSocket welcomesocket = new SeveSocket(6789); while(tue) { Socket connectionsocket = welcomesocket.accept(); BuffeedReade infomclient = new BuffeedReade(new InputSteamReade(connectionSocket.getInputSteam())); 2: Application Laye 2b-20

Example: Java seve (TCP), cont Ceate output steam, attached to socket Read in line fom socket Wite out line to socket } } } DataOutputSteam outtoclient = new DataOutputSteam(connectionSocket.getOutputSteam()); clientsentence = infomclient.eadline(); capitalizedsentence = clientsentence.touppecase() + '\n'; outtoclient.witebytes(capitalizedsentence); End of while loop, loop back and wait fo anothe client connection 2: Application Laye 2b-21

Socket pogamming with UDP UDP: no connection between client and seve no handshaking sende explicitly attaches IP addess and pot of destination seve must extact IP addess, pot of sende fom eceived datagam UDP: tansmitted data may be eceived out of ode, o lost application viewpoint UDP povides uneliable tansfe of goups of bytes ( datagams ) between client and seve a typical UDP client: 1 steam and 1 socket 2: Application Laye 2b-22

Diffeences in SP with UDP no initial handshaking between two pocesses and thus no welcoming socket no steams attached to the sockets attaching IP destination addess and pot numbe to each packet by the sende etieving addess by eceive fo each packet Example: m client eads a line fom standad input and sends it out though its socket to the seve m seve eads a line fom its socket m convets it to uppecase m sends the modified line out to client m client eads the modified line though its socket and pints it on it standad output 2: Application Laye 2b-23

Client/seve socket inteaction: UDP Seve (unning on hostid) Client ceate socket, pot=x, fo incoming equest: sevesocket = DatagamSocket() ead equest fom sevesocket ceate socket, clientsocket = DatagamSocket() Ceate, addess (hostid, pot=x, send datagam equest using clientsocket wite eply to sevesocket specifying client host addess, pot umbe ead eply fom clientsocket close clientsocket 2: Application Laye 2b-24

Example: Java client (UDP) impot java.io.*; impot java.net.*; Ceate input steam Ceate client socket Tanslate hostname to IP addess using DNS class UDPClient { public static void main(sting ags[]) thows Exception { BuffeedReade infomuse = new BuffeedReade(new InputSteamReade(System.in)); DatagamSocket clientsocket = new DatagamSocket(); InetAddess IPAddess = InetAddess.getByName("hostname"); byte[] senddata = new byte[1024]; byte[] eceivedata = new byte[1024]; Sting sentence = infomuse.eadline(); senddata = sentence.getbytes(); 2: Application Laye 2b-25

Example: Java client (UDP), cont. Ceate datagam with data-to-send, length, IP add, pot Send datagam to seve Read datagam fom seve } DatagamPacket sendpacket = new DatagamPacket(sendData, senddata.length, IPAddess, 9876); clientsocket.send(sendpacket); DatagamPacket eceivepacket = new DatagamPacket(eceiveData, eceivedata.length); clientsocket.eceive(eceivepacket); Sting modifiedsentence = new Sting(eceivePacket.getData()); System.out.pintln("FROM SERVER:" + modifiedsentence); clientsocket.close(); } 2: Application Laye 2b-26

Example: Java seve (UDP) impot java.io.*; impot java.net.*; Ceate datagam socket at pot 9876 Ceate space fo eceived datagam Receive datagam class UDPSeve { public static void main(sting ags[]) thows Exception { DatagamSocket sevesocket = new DatagamSocket(9876); byte[] eceivedata = new byte[1024]; byte[] senddata = new byte[1024]; while(tue) { DatagamPacket eceivepacket = new DatagamPacket(eceiveData, eceivedata.length); sevesocket.eceive(eceivepacket); 2: Application Laye 2b-27

Example: Java seve (UDP), cont Get IP add pot #, of sende Sting sentence = new Sting(eceivePacket.getData()); InetAddess IPAddess = eceivepacket.getaddess(); int pot = eceivepacket.getpot(); Ceate datagam to send to client Wite out datagam to socket } } Sting capitalizedsentence = sentence.touppecase(); senddata = capitalizedsentence.getbytes(); DatagamPacket sendpacket = new DatagamPacket(sendData, senddata.length, IPAddess, pot); sevesocket.send(sendpacket); } End of while loop, loop back and wait fo anothe datagam 2: Application Laye 2b-28

Chapte 2: Summay Ou study of netwok apps now complete! application sevice equiements: m eliability, bandwidth, delay client-seve paadigm Intenet tanspot sevice model m connection-oiented, eliable: TCP m uneliable, datagams: UDP specific potocols: m http m ftp m smtp, pop3 m dns socket pogamming m client/seve implementation m using tcp, udp sockets 2: Application Laye 2b-29

Chapte 2: Summay Most impotantly: leaned about potocols typical equest/eply message exchange: m client equests info o sevice m seve esponds with data, status code message fomats: m heades: fields giving info about data m data: info being communicated contol vs. data msgs m in-based, out-of-band centalized vs. decentalized stateless vs. stateful eliable vs. uneliable msg tansfe complexity at netwok edge secuity: authentication 2: Application Laye 2b-30