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



Similar documents
Network Programming using sockets

Data Communication & Networks G

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

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

Chapter 2: Application layer

Domain Name System (DNS)

Application-layer protocols

Java Network. Slides prepared by : Farzana Rahman

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

Chapter 2 Application Layer

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

DNS: Domain Name System

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

Domain Name System Richard T. B. Ma

Domain Name System (DNS) RFC 1034 RFC

Domain Name System (DNS)

DATA COMMUNICATOIN NETWORKING

NET0183 Networks and Communications

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

CMPE 80N: Introduction to Networking and the Internet

Overview of Computer Networks

FTP: the file transfer protocol

The Application Layer: DNS

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

DNS and P2P File Sharing

Internet Applications & Socket Programming

internet technologies and standards

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

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

DNS: Domain Name System

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

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

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

CS640: Computer Networks. Naming /ETC/HOSTS

Computer Networks & Security 2014/2015

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

Domain Name System DNS

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

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

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

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

Network Layers. CSC358 - Introduction to Computer Networks

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

FTP: the file transfer protocol

Socket Programming. Announcement. Lectures moved to

416 Distributed Systems. Feb 24, 2016 DNS and CDNs

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

DNS Domain Name System

Transport layer protocols. Message destination: Socket +Port. Asynchronous vs. Synchronous. Operations of Request-Reply. Sockets

Application. Transport. Network. Data Link. Physical. Network Layers. Goal

CS3600 SYSTEMS AND NETWORKS

Internet-Praktikum I Lab 3: DNS

1 Introduction: Network Applications

3. The Domain Name Service

DNS. Spring 2016 CS 438 Staff 1

Network Communication

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

loss-tolerant and time sensitive loss-intolerant and time sensitive loss-intolerant and time insensitive

The exam has 110 possible points, 10 of which are extra credit. There is a Word Bank on Page 8. Pages 7-8 can be removed from the exam.

2.5 DNS The Internet s Directory Service

Division of Informatics, University of Edinburgh

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

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

SSC - Communication and Networking Java Socket Programming (II)

Lecture 5: Network Attacks I. Course Admin

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

DNS and electronic mail. DNS purposes

Chapter 25 Domain Name System Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Socket UDP. H. Fauconnier 1-1. M2-Internet Java

Introduction to Computer Networks

Chapter 23 The Domain Name System (DNS)

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

Learning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP

The Domain Name System

Abstract Stream Socket Service

Lesson: All About Sockets

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

Review of Networking Basics. Yao Wang Polytechnic University, Brooklyn, NY11201

Mail User Agent Project

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

The Domain Name System (DNS)

How do I get to

INTERNET DOMAIN NAME SYSTEM

Introduction to TCP/IP

Transport Layer Services Mul9plexing/Demul9plexing. Transport Layer Services

DNS : Domain Name System

Introduction to the Domain Name System

Transcription:

DNS: Domain Name System DNS: Domain Names People: many identifiers: SSN, name, Passport # Internet hosts, routers: Always: IP address (32 bit) - used for addressing datagrams Often: name, e.g., nifc14.wsu.edu - used by humans Q: How do we map between names and IP addresses? A: Domain Name System (DNS): distributed database implemented in hierarchy of many name servers application-layer protocol hosts, name servers communicate to resolve names (name/address translation) note: this is a core Internet function implemented as application-layer protocol complexity at network s edge Names are hierarchical www.eecs.wsu.edu. Each suffix corresponds to a zone. edu. wsu.edu. eecs.wsu.edu. Each zone has at least two authoritative servers Top-level domains edu. com. mil. us. uk. fr. 2: Application Layer 1 2: Application Layer 2 DNS name servers DNS: Root name servers no server has all nameto-ip address mappings s: each ISP, company has local (default) name server host DNS query first goes to authoritative name server: for a host: stores that host s IP address, name can perform name to address translation for that host s name Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance doesn t scale! 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 ~ dozen root name servers worldwide 2: Application Layer 3 2: Application Layer 4

Simple DNS example root name server DNS example root name server host surf.eurecom.fr wants IP address of 1. Contacts its local DNS server, dns.eurecom.fr 2. dns.eurecom.fr contacts root name server, if necessary 3. root name server contacts authoritative name server, dns.umass.edu, if necessary dns.eurecom.fr 1 2 6 requesting host surf.eurecom.fr 5 3 4 authorititive name server dns.umass.edu Root name server: may not know authoratiative name server may know intermediate name server: who to contact to find authoritative name server dns.eurecom.fr 1 2 8 requesting host surf.eurecom.fr 7 3 6 intermediate name server dns.umass.edu 4 5 authoritative name server dns.cs.umass.edu 2: Application Layer 5 2: Application Layer 6 DNS: iterated queries root name server DNS: caching and updating records recursive query: puts burden of name resolution on contacted name server heavy load? iterated query: contacted server replies with name of server to contact I don t know this name, but ask this server dns.eurecom.fr 1 2 8 requesting host surf.eurecom.fr 3 4 7 iterated query intermediate name server dns.umass.edu 5 6 authoritative name server dns.cs.umass.edu once (any) name server learns mapping, it caches mapping cache entries timeout (disappear) after some time update/notify mechanisms under design by IETF RFC 2136 http://www.ietf.org/html.charters/dnsind-charter.html 2: Application Layer 7 2: Application Layer 8

DNS records DNS: distributed db storing resource records (RR) Type=A name is hostname Type=NS RR format: (name, value, type,ttl) value is IP address name is domain (e.g. foo.com) value is IP address of authoritative name server for this domain Type=CNAME name is an alias name for some cannonical (the real) name value is cannonical name Type=MX value is hostname of mailserver associated with name 2: Application Layer 9 DNS protocol, messages DNS protocol : query and reply messages, both with same message format msg header identification: 16 bit # for query, reply to query uses same # flags: query or reply recursion desired recursion available reply is authoritative 2: Application Layer 10 DNS protocol, messages Example: Java client (TCP) Name, type fields for a query class TCPClient RRs in reponse to query records for authoritative servers additional helpful info that may be used input stream client socket, connect to server output stream attached public static void main(string argv[]) throws Exception String sentence; String modifiedsentence; BufferedReader infromuser = new BufferedReader(new InputStreamReader(System.in)); Socket clientsocket = new Socket("hostname", 6789); DataOutputStream outtoserver = new DataOutputStream(clientSocket.getOutputStream()); 2: Application Layer 11 2: Application Layer 12

Example: Java client (TCP), cont. Example: Java server (TCP) input stream attached Send line to server Read line from server BufferedReader infromserver = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); sentence = infromuser.readline(); outtoserver.writebytes(sentence + '\n'); modifiedsentence = infromserver.readline(); System.out.println("FROM SERVER: " + modifiedsentence); clientsocket.close(); welcoming socket at port 6789 Wait, on welcoming socket for contact by client input stream, attached class TCPServer public static void main(string argv[]) throws Exception String clientsentence; String capitalizedsentence; ServerSocket welcomesocket = new ServerSocket(6789); while(true) Socket connectionsocket = welcomesocket.accept(); BufferedReader infromclient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); 2: Application Layer 13 2: Application Layer 14 Example: Java server (TCP), cont Example: Java client (UDP) output stream, attached Read in line from socket Write out line DataOutputStream outtoclient = new DataOutputStream(connectionSocket.getOutputStream()); clientsentence = infromclient.readline(); capitalizedsentence = clientsentence.touppercase() + '\n'; outtoclient.writebytes(capitalizedsentence); End of while loop, loop back and wait for another client connection input stream client socket Translate hostname to IP address using DNS class UDPClient public static void main(string args[]) throws Exception BufferedReader infromuser = new BufferedReader(new InputStreamReader(System.in)); DatagramSocket clientsocket = new DatagramSocket(); InetAddress IPAddress = InetAddress.getByName("hostname"); byte[] senddata = new byte[1024]; byte[] receivedata = new byte[1024]; String sentence = infromuser.readline(); senddata = sentence.getbytes(); 2: Application Layer 15 2: Application Layer 16

Example: Java client (UDP), cont. Example: Java server (UDP) datagram with data-to-send, length, IP addr, port Send datagram to server Read datagram from server DatagramPacket sendpacket = new DatagramPacket(sendData, senddata.length, IPAddress, 9876); clientsocket.send(sendpacket); DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); clientsocket.receive(receivepacket); String modifiedsentence = new String(receivePacket.getData()); System.out.println("FROM SERVER:" + modifiedsentence); clientsocket.close(); 2: Application Layer 17 datagram socket at port 9876 space for received datagram Receive datagram class UDPServer public static void main(string args[]) throws Exception DatagramSocket serversocket = new DatagramSocket(9876); byte[] receivedata = new byte[1024]; byte[] senddata = new byte[1024]; while(true) DatagramPacket receivepacket = new DatagramPacket(receiveData, receivedata.length); serversocket.receive(receivepacket); 2: Application Layer 18 Example: Java server (UDP), cont Chapter 2: Summary Get IP addr port #, of sender datagram to send to client Write out datagram String sentence = new String(receivePacket.getData()); InetAddress IPAddress = receivepacket.getaddress(); int port = receivepacket.getport(); String capitalizedsentence = sentence.touppercase(); senddata = capitalizedsentence.getbytes(); DatagramPacket sendpacket = new DatagramPacket(sendData, senddata.length, IPAddress, port); serversocket.send(sendpacket); End of while loop, loop back and wait for another datagram 2: Application Layer 19 application service requirements: reliability, bandwidth, delay client-server paradigm Internet transport service model connection-oriented, reliable: TCP unreliable, datagrams: UDP specific protocols: http ftp smtp, pop3 dns socket programming client/server implementation using tcp, udp sockets 2: Application Layer 20

Chapter 2: Summary Most importantly: learned about protocols typical request/reply message exchange: client requests info or service server responds with data, status code message formats: headers: fields giving info about data data: info being communicated control vs. data msgs in-based, out-of-band centralized vs. decentralized stateless vs. stateful reliable vs. unreliable msg transfer complexity at network edge security: authentication 2: Application Layer 21