The Application Layer: Sockets, DNS

Slides:



Advertisements
Similar presentations
DNS – Domain Name system Converting domain names to IP addresses since 1983.
Advertisements

Domain Name System. DNS is a client/server protocol which provides Name to IP Address Resolution.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Term B10.
1 EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Spring 2012 Spring 2012.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
2: Application Layer1 FTP, SMTP and DNS. 2: Application Layer2 FTP: separate control, data connections r FTP client contacts FTP server at port 21, specifying.
20101 The Application Layer Domain Name System Chapter 7.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts, routers: –IP address (32 bit) - used for addressing datagrams –“name”, e.g., gaia.cs.umass.edu.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Application Layer session 1 TELE3118: Network Technologies Week 12: DNS Some slides have been taken from: r Computer Networking: A Top Down Approach.
1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross.
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Name Resolution and DNS. Domain names and IP addresses r People prefer to use easy-to-remember names instead of IP addresses r Domain names are alphanumeric.
Chapter 2 Application Layer
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
CS 4396 Computer Networks Lab
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
Domain Name System (DNS)
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 10 Omar Meqdadi Department of Computer Science and Software Engineering University.
Ch-9: NAME SERVICES By Srinivasa R. Gudipati. To be discussed.. Fundamentals of Naming Services Naming Resolution The Domain Name System (DNS) Directory.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
CS 471/571 Domain Name Server Slides from Kurose and Ross.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
DNS: Domain Name System
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Architecture of DNS CS 718 Activity 4 Submitted by Parag Abhyankar Anup S. Kunte
1 Application Layer Lecture 6 Imran Ahmed University of Management & Technology.
DNS: Domain Name System People: many identifiers: – SSN, name, Passport # Internet hosts, routers: – IP address (32 bit) - used for addressing datagrams.
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet and Intranet Protocols and Applications Lecture 5 Application Protocols: DNS February 20, 2002 Joseph Conron Computer Science Department New York.
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
2: Application Layer1 DNS: Domain Name System People have many identifiers: SSN, name, passport number Internet hosts, routers have identifiers, too: IP.
CPSC 441: DNS 1. DNS: Domain Name System Internet hosts: m IP address (32 bit) - used for addressing datagrams m “name”, e.g., - used by.
CS 3830 Day 10 Introduction 1-1. Announcements r Quiz #2 this Friday r Program 2 posted yesterday 2: Application Layer 2.
EE 122: Lecture 20 (Domain Name Server - DNS) Ion Stoica Nov 15, 2001 (* based on the some on-line slides of J. Kurose & K. Rose and of Raj Jain)
Lecture 5: Web Continued 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
1. Internet hosts:  IP address (32 bit) - used for addressing datagrams  “name”, e.g., ww.yahoo.com - used by humans DNS: provides translation between.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
COMP 431 Internet Services & Protocols
Application Layer, 2.5 DNS 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
Important r On Friday, could you ask students to please me their groups (one per group) for Project 2 so we can assign IP addresses. I’ll send.
Ch 2. Application Layer Myungchul Kim
CSEN 404 Application Layer II Amr El Mougy Lamia Al Badrawy.
Spring 2006 CPE : Application Layer_DNS 1 Special Topics in Computer Engineering Application layer: Domain Name System Some of these Slides are.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Introduction to Networks
Session 6 INST 346 Technologies, Infrastructure and Architecture
Chapter 9: Domain Name Servers
Introduction to Communication Networks
IMPLEMENTING NAME RESOLUTION USING DNS
Chapter 7: Application layer
Cookies, Web Cache & DNS Dr. Adil Yousif.
EE 122: Domain Name Server (DNS)
Lecture 6: TCP/IP Networking 1nd semester By: Adal ALashban.
DNS: Domain Name System
16, May, 2010 Baseer Ahmad Baheer
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
FTP, SMTP and DNS 2: Application Layer.
Domain Name System: DNS
Chapter 2 Application Layer
Lecture 3 – Chapter 2 CIS 5617, Fall 2019 Anduo Wang
Presentation transcript:

The Application Layer: Sockets, DNS CS 352, Lecture 3 http://www.cs.rutgers.edu/~sn624/352-S19 Srinivas Narayana

App-layer protocol Types of messages exchanged, e.g., request, response Message format: Syntax :what fields in messages & how fields are delineated Semantics: meaning of information in fields Rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols: e.g., Skype, Microsoft Exchange

Application “addresses” We usually think of an application executing on a single host. However, applications can reside on, say, 2 different hosts connected by a network In order to communicate, need to identify the communicating parties Telephone network: phone number (10 digits) Computer network: IP address IPv4 (32 bits) 128.6.24.78 IPv6 (128 bits) 2001:4000:A000:C000:6000:B001:412A:8000 Suppose there is more than one networked program executing on a host In addition to host address, we need one more address “Which Program to talk to?” Another identity for an application: port # Host / house (IP address) App / person (port #)

IP address & port number process socket Host Host P4 process process P1 socket socket P2 Host Internet process A socket is the door between OS/network and the application/process socket P3

A network connection is a 4-tuple process socket Host: IP address B Host:: IP address A process process socket socket process socket Host: IP address C Internet Connection := (IPS, PortS, IPD, PortD)

Recall: Services provided by lower layers Host A Host B Application Layer Application Protocol Application Layer Transport Protocol Transport Layer Transport Layer Network Layer Network Layer Network Layer Network Layer H-to-N Layer H-to-N Layer H-to-N Layer H-to-N Layer Router Router

Client-server architecture always-on host permanent IP address server farms (“data centers”) for scaling Clients: communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other server client

Peer-to-peer (P2P) architecture Peers: Intermittently connected hosts Directly talking to each other Little to no reliance on always-up servers Examples: BitTorrent, Skype Today, many applications use a hybrid model Example: Skype “supernodes” peer

Domain Name System (DNS) “You have my name. Can you lookup my number?”

Domain Name System (DNS) Problem statement: Average brain can easily remember 7 digits for a few names On average, IP addresses have 12 digits We need an easier way to remember IP addresses Solution: Use alphanumeric names to refer to hosts Just as a contacts or telephone directory (white pages) Add a service (called DNS) to map between alphanumeric host names and binary IP addresses We call this Address Resolution

Simple DNS Idea (1): What if every host has a local directory? /etc/hosts.txt How things worked in the early days of the Internet! What if hosts moved around? How do you keep this up to date?

Simple DNS Idea (2): Implement a server that looks up a table DOMAIN NAME IP ADDRESS www.yahoo.com 98.138.253.109 cs.rutgers.edu 128.6.4.2 www.google.com 74.125.225.243 www.princeton.edu 128.112.132.86 <Client IP, CPort, DNS server IP, 53> QUERY | STD QUERY | cs.rutgers.edu <DNS server, 53, Client IP, Cport> RESPONSE | STD QUERY | 128.6.4.2 Idea (2): Implement a server that looks up a table Simple, but does not scale Every new host needs to be entered in this table Performance? Failure?

DNS design A centralized DNS design (ex: single server) is problematic. single point of failure traffic volume distant centralized database security maintenance It doesn’t scale to the requirements of the Internet.

Distributed and hierarchical database Root DNS Servers org DNS servers edu DNS servers com DNS servers rutgers.edu DNS servers umass.edu DNS servers wnyc.org DNS servers google.com DNS servers amazon.com DNS servers cs.rutgers.edu DNS server RFC 1034

DNS protocol Client and Server Client connects to Port 53 DNS server address should be known Either manually configured or automatically (more on this to come…) Two types of messages Queries Responses Type of Query (OPCODE) methods Standard query (0x0) Request domain name for a given IP address Updates (0x5) Provide a binding of IP address to domain name Each type has a common message format that follows the header

DNS Protocol When client wants to know an IP address for a host name Client sends a DNS query to the “local” name server in its network If name server contains the mapping, it returns the IP address to the client Otherwise, the name server forwards the request to the root name server The request works its way down the tree toward the host until it reaches a name server with the correct mapping

Example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu root DNS server 2 3 Host at cis.poly.edu wants IP address for gaia.cs.umass.edu Local DNS server Root DNS server TLD DNS server Authoritative DNS server .edu DNS server 4 5 local DNS server dns.poly.edu 7 6 1 8 umass.edu DNS server dns.umass.edu requesting host cis.poly.edu gaia.cs.umass.edu

Query type Iterated query: root DNS server 2 Iterated query: Contacted server replies with name of server to contact “I don’t know this name, but ask this server” 3 .edu DNS server 4 5 local DNS server dns.poly.edu 7 6 1 8 umass.edu DNS server dns.umass.edu requesting host cis.poly.edu gaia.cs.umass.edu

Query type Recursive query: requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 4 5 6 umass.edu DNS server dns.umass.edu 7 8 .edu DNS server 3 Recursive query: Puts burden of name resolution on the contacted name server Problem: think about the root DNS server. Must it answer every DNS query?

DNS caching and updating records Once (any) name server learns a name to IP address mapping, it caches the mapping Cache entries timeout (disappear) after some time TLD servers typically cached in local name servers In practice, root name servers aren’t visited often

DNS protocol messages Message header QR = 0 for Query, 1 for response DNS protocol : query and reply messages, both with same message format QR Opcode Message header QR = 0 for Query, 1 for response Opcode= 0 standard identification: 16 bit # for query, reply to query uses same # flags: Authoritative answer recursion desired recursion available reply is authoritative

DNS protocol, messages Name, type fields for a query RRs in response QR OPCODE Name, type fields for a query RRs in response to query records for authoritative servers Information about nameserver additional “helpful” info that may be used

RR format: (name, type, class, ttl, addr) DNS records DNS: distributed db storing resource records (RR) RR format: (name, type, class, ttl, addr) Type=A name is hostname value is IP address 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 Type=AAAA name is hostname value is IPv6 address Type=NS name is domain (e.g. foo.com) value is hostname of authoritative name server for this domain Type=MX value is name of mailserver associated with name

DNS Record example RRs in response to query records for NAME Design.cs.rutgers.edu TYPE A CLASS IN TTL 1 day(86400) ADDRESS 192.26.92.30 RRs in response to query NAME Cs.rutgers.edu TYPE NS CLASS IN TTL 1 day(86400) NSDNAME Ns-lcsr.rutgers.edu records for authoritative servers Information about nameserver

DNS summary DNS service: Hostname to IP address translation Host aliasing Canonical and alias names Mail server aliasing Load distribution Replicated Web servers: set of IP addresses for one canonical name Caching Hierarchical structure for scaling Multiple layers of indirection

Bootstrapping DNS How does a host contact the name server if all it has is the name and no IP address? IP address of at least 1 nameserver must be given a priori or with another protocol (DHCP, bootp) File /etc/resolv.conf in unix Start -> settings-> control panel-> network ->TCP/IP -> properties in windows

Themes Request/response nature of these protocols How Messages are structured HTTP, SMTP, FTP - simple ASCII protocols Caching Name Lookup Division of concerns (e.g. zones) Hierarchy structure