The Application Layer: Sockets, DNS

Similar documents
Lecture 05: Application Layer (Part 02) Domain Name System. Dr. Anis Koubaa

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Application Layer Protocols

Chapter 2 Application Layer. Lecture 5 DNS. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Domain Name Service. DNS Overview. October 2009 Computer Networking 1

FTP. Mail. File Transfer Protocol (FTP) FTP commands, responses. Electronic Mail. TDTS06: Computer Networks

Computer Networking Introduction

Chapter 2 Application Layer

CS4/MSc Computer Networking. Lecture 3: The Application Layer

Domain Name System (DNS) 김현철 ( 화 ) 정보통신융합서울대학교컴퓨터공학부

Lecture 7: Application Layer Domain Name System

Chapter 2: Application layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

Review for Internet Introduction

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

Communications Software. CSE 123b. CSE 123b. Spring Lecture 11: Domain Name System (DNS) Stefan Savage. Some pictures courtesy David Wetherall

CSE 123b Communications Software. Overview for today. Names and Addresses. Goals for a naming system. Internet Hostnames

CS 43: Computer Networks. 10: Naming and DNS September 24, 2018

Application Layer. Applications and application-layer protocols. Goals:

CS 3516: Advanced Computer Networks

Application Layer: , DNS

Domain Name System (DNS)

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

DNS and HTTP. A High-Level Overview of how the Internet works

CSEN 503 Introduction to Communication Networks

Application Layer. Goals: Service models. Conceptual aspects of network application protocols Client server paradigm

Section 2: Application layer

CC451 Computer Networks

CSEN 404 Introduction to Networks. Mervat AbuElkheir Mohamed Abdelrazik. ** Slides are attributed to J. F. Kurose

Chapter 2 part B: outline

Advanced Networking. Domain Name System

Advanced Networking. Domain Name System. Purpose of DNS servers. Purpose of DNS servers. Purpose of DNS servers

2.5 DNS The Internet s Directory Service

Chapter II: Application Layer

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

Chapter 2 outline. 2.1 Principles of app layer protocols

A DNS Tutorial

DNS Basics BUPT/QMUL

Naming Computer Networking. Overview. DNS: Domain Name System. Obvious Solutions (1) Obvious Solutions (2)

Networking Applications

Chapter 2 Application Layer

CS519: Computer Networks. Lecture 6: Apr 5, 2004 Naming and DNS

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

Chapter 1 Introduction

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Application Layer. Goals:

Application Layer. Applications and application-layer protocols. Goals:

CSC 401 Data and Computer Communications Networks

Protocol Classification

Networking Overview. CS Computer Security Profs. Vern Paxson & David Wagner

Information Network Systems The application layer. Stephan Sigg

DNS & Iodine. Christian Grothoff.

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

DNS Hierarchical Name Space. BIND Terminology and DNS Name Servers. Distributed Hierarchical Database (1st Approx) Domain Name System (DNS)

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

Translating Addresses

ECE 650 Systems Programming & Engineering. Spring 2018

Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License. Page 2. Page 3.

internet technologies and standards

Internet applications. 2: Application Layer 1

This time. Digging into. Networking. Protocols. Naming DNS & DHCP

Domain Name System (DNS)

Web caches (proxy server)

Chapter 2. Application Layer. 2: Application Layer 1

Network Applications Principles of Network Applications

ECE 435 Network Engineering Lecture 7

More Internet Support Protocols

EECS 3214: Computer Network Protocols and Applications

Goal and A sample Network App

Chapter 2 Application Layer

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Domain Name System.

Client Server Concepts, DNS, DHCP

Computer Networks. Domain Name System. Jianping Pan Spring /25/17 CSC361 1

Chapter 2 Application Layer

Lecture 2 - Application Layer. Lecture 1 Review. Application Layer. Principles of network applications. Notes. Notes. Notes. Notes

Applications Layer Protocols. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Domain Name System (DNS) Session-1: Fundamentals. Joe Abley AfNOG Workshop, AIS 2017, Nairobi

Q U E S T I O N 3 In the current version of IP (IPv4), the use of TCP and UDP headers differ in which of the following ways?

CSC358 Week 3. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

CE693: Adv. Computer Networking

Computer Network 1 1

CS 655 System and Network Architectures and Implementation. Module 4 Naming, Mobility, Messaging

Domain Name System (DNS) DNS Fundamentals. Computers use IP addresses. Why do we need names? hosts.txt does not scale. The old solution: HOSTS.

IP ADDRESSES, NAMING, AND DNS

Networking Overview. CS 161: Computer Security Prof. Vern Paxson. TAs: Jethro Beekman, Mobin Javed, Antonio Lupher, Paul Pearce & Matthias Vallentin

EE 122: Domain Name System

Reminders. EE 122: Domain Name System. Goals of Today!s Lecture. Host Names vs. IP addresses. Separating Naming and Addressing

Midterm Logistics. Midterm Review. The test is long.(~20 pages) Today. My General Philosophy on Tests. Midterm Review

Midterm Review. EE122 Fall 2012 Scott Shenker

The Domain Name System

DNS and CDNs : Fundamentals of Computer Networks Bill Nace

The Domain Name System

CSE 486/586 Distributed Systems

Network Application. Topic. Principle of Network Application. Principle of Network Application

Internet Services & Protocols. Application Layer and its Services

Transcription:

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

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 2

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 #) 3

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

A network connection is a 4-tuple Host: IP address B Host:: IP address A process socket process socket process socket Internet Host: IP address C process Connection := (IP S, Port S, IP D, Port D ) socket 5

Recall: Services provided by lower layers Host A Application Layer Application Protocol Host B Application Layer Transport Layer Transport Protocol 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 6

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

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

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 10

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 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? 12

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. 13

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

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 15

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 16

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

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

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

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 20

DNS protocol messages DNS protocol : query and reply messages, both with same message format 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 QR Opcode 21

DNS protocol, messages 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 22

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

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

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 25

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 26

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 27