CN Unit I - Introduction to Computer Network and Internet

Views:
 
Category: Education
     
 

Presentation Description

What is internet? Network edge, Network core, Protocol layers and services model, Network standardization. Introduction to application layer services, DNS, HTTP, FTP, SMTP, DHCP

Comments

Presentation Transcript

PowerPoint Presentation:

Reference: Kurose, Ross “Computer Networking- a top down approach featuring the internet” Slides p repared by: Mr. Vaibhav Dabhade for TE Computer Engineering Unit I: Introduction to Computer Network and Internet

Chapter 1: Introduction:

Chapter 1: Introduction Our goal: get “feel” and terminology more depth, detail later in course approach: use Internet as example Overview: what’s the Internet? what’s a protocol? network edge; hosts, access net, physical media network core: packet/circuit switching, Internet structure performance: loss, delay, throughput security protocol layers, service models history 1- 2

Roadmap:

Roadmap 1.1 What is the Internet? 1.2 Network edge end systems, access networks, links 1.3 Network core circuit switching, packet switching, network structure 1.4 Delay, loss and throughput in packet-switched networks 1.5 Protocol layers, service models 1.6 Networks under attack: security 1.7 History 1- 3

What’s the Internet: “nuts and bolts” view:

What’s the Internet: “nuts and bolts” view millions of connected computing devices: hosts = end systems running network apps Home network Institutional network Mobile network Global ISP Regional ISP router PC server wireless laptop cellular handheld wired links access points communication links fiber, copper, radio, satellite transmission rate = bandwidth routers: forward packets (chunks of data) 1- 4

What’s the Internet: “nuts and bolts” view:

What’s the Internet: “nuts and bolts” view protocols control sending, receiving of msgs e.g., TCP, IP, HTTP Internet: “network of networks” loosely hierarchical public Internet versus private intranet Home network Institutional network Mobile network Global ISP Regional ISP 1- 5

What’s the Internet: a service view:

What’s the Internet: a service view communication infrastructure enables distributed applications: Web, VoIP, email, games, e-commerce, file sharing communication services provided to apps: reliable data delivery from source to destination “best effort” (unreliable) data delivery 1- 6

What’s a protocol?:

What’s a protocol? human protocols: “what’s the time?” “I have a question” introductions …specific msgs sent …specific actions taken when msgs received, or other events network protocols: machines rather than humans all communication activity in Internet governed by protocols protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt 1- 7

What’s a protocol?:

What’s a protocol? a human protocol and a computer network protocol: Q: Other human protocols? Hi Hi Got the time? 2:00 TCP connection request TCP connection response Get http://www.awl.com/kurose-ross <file> time 1- 8

Chapter 1: roadmap:

Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge end systems, access networks, links 1.3 Network core circuit switching, packet switching, network structure 1.4 Delay, loss and throughput in packet-switched networks 1.5 Protocol layers, service models 1.6 Networks under attack: security 1.7 History 1- 9

A closer look at network structure::

A closer look at network structure: network edge: applications and hosts access networks, physical media: wired, wireless communication links network core: interconnected routers network of networks 1- 10

The network edge::

The network edge: end systems (hosts): run application programs e.g. Web, email at “edge of network” client/server peer-peer client/server model client host requests, receives service from always-on server e.g. Web browser/server; email client/server peer-peer model: minimal (or no) use of dedicated servers e.g. Skype, BitTorrent 1- 11

Access networks and physical media:

Access networks and physical media Q: How to connect end systems to edge router? residential access nets institutional access networks (school, company) mobile access networks Keep in mind: bandwidth (bits per second) of access network? shared or dedicated? 1- 12

Residential access: point to point access:

Residential access: point to point access Dialup via modem up to 56Kbps direct access to router (often less) Can’t surf and phone at same time: can’t be “always on” DSL: digital subscriber line deployment: telephone company (typically) up to 1 Mbps upstream (today typically < 256 kbps) up to 8 Mbps downstream (today typically < 1 Mbps) dedicated physical line to telephone central office 1- 13

Company access: local area networks:

Company access: local area networks company/univ local area network (LAN) connects end system to edge router Ethernet: 10 Mbs, 100Mbps, 1Gbps, 10Gbps Ethernet modern configuration: end systems connect into Ethernet switch 1- 14

Wireless access networks:

Wireless access networks shared wireless access network connects end system to router via base station aka “access point” wireless LANs: 11 or 54 Mbps wider-area wireless access provided by telco operator ~1Mbps over cellular system (EVDO, HSDPA) next up (?): WiMAX (10’s Mbps) over wide area base station mobile hosts router 1- 15

Home networks:

Home networks Typical home network components: DSL or cable modem router/firewall Ethernet wireless access point wireless access point wireless laptops router/ firewall cable modem to/from cable headend Ethernet 1- 16

Chapter 1: roadmap:

Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge end systems, access networks, links 1.3 Network core circuit switching, packet switching, network structure 1.4 Delay, loss and throughput in packet-switched networks 1.5 Protocol layers, service models 1.6 Networks under attack: security 1.7 History 1- 17

The Network Core:

The Network Core mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” 1- 18

Network Core: Circuit Switching:

Network Core: Circuit Switching End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required 1- 19

Network Core: Circuit Switching:

Network Core: Circuit Switching network resources (e.g., bandwidth) divided into “pieces” pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into “pieces” frequency division time division 1- 20

Circuit Switching: FDM and TDM:

Circuit Switching: FDM and TDM FDM frequency time TDM frequency time 4 users Example: 1- 21

Network Core: Packet Switching:

Network Core: Packet Switching each end-end data stream divided into packets user A, B packets share network resources each packet uses full link bandwidth resources used as needed resource contention: aggregate resource demand can exceed amount available congestion: packets queue, wait for link use store and forward: packets move one hop at a time Node receives complete packet before forwarding Bandwidth division into “pieces” Dedicated allocation Resource reservation 1- 22

Packet Switching: Statistical Multiplexing:

Packet Switching: Statistical Multiplexing Sequence of A & B packets does not have fixed pattern, bandwidth shared on demand  statistical multiplexing . TDM: each host gets same slot in revolving TDM frame. A B C 100 Mb/s Ethernet 1.5 Mb/s D E statistical multiplexing queue of packets waiting for output link 1- 23

Packet-switching: store-and-forward:

Packet-switching: store-and-forward takes L/R seconds to transmit (push out) packet of L bits on to link at R bps store and forward: entire packet must arrive at router before it can be transmitted on next link delay = 3L/R (assuming zero propagation delay) Example: L = 7.5 Mbits R = 1.5 Mbps transmission delay = 15 sec R R R L more on delay shortly … 1- 24

Internet structure: network of networks:

Internet structure: network of networks roughly hierarchical at center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T, Cable and Wireless), national/international coverage treat each other as equals Tier 1 ISP Tier 1 ISP Tier 1 ISP Tier-1 providers interconnect (peer) privately 1- 25

Internet structure: network of networks:

Internet structure: network of networks “Tier-2” ISPs: smaller (often regional) ISPs Connect to one or more tier-1 ISPs, possibly other tier-2 ISPs Tier 1 ISP Tier 1 ISP Tier 1 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP pays tier-1 ISP for connectivity to rest of Internet tier-2 ISP is c ustomer of tier-1 provider Tier-2 ISPs also peer privately with each other. 1- 26

Internet structure: network of networks:

Internet structure: network of networks “Tier-3” ISPs and local ISPs last hop (“access”) network (closest to end systems) Tier 1 ISP Tier 1 ISP Tier 1 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP local ISP local ISP local ISP local ISP local ISP Tier 3 ISP local ISP local ISP local ISP Local and tier- 3 ISPs are customers of higher tier ISPs connecting them to rest of Internet 1- 27

Internet structure: network of networks:

Internet structure: network of networks a packet passes through many networks! Tier 1 ISP Tier 1 ISP Tier 1 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP Tier-2 ISP local ISP local ISP local ISP local ISP local ISP Tier 3 ISP local ISP local ISP local ISP 1- 28

Chapter 1: roadmap:

Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge end systems, access networks, links 1.3 Network core circuit switching, packet switching, network structure 1.4 Delay, loss 1.5 Protocol layers, service models 1.6 Networks under attack: security 1.7 History 1- 29

How do loss and delay occur?:

How do loss and delay occur? packets queue in router buffers packet arrival rate to link exceeds output link capacity packets queue, wait for turn A B packet being transmitted (delay) packets queueing (delay) free (available) buffers: arriving packets dropped ( loss ) if no free buffers 1- 30

Chapter 1: roadmap:

Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge end systems, access networks, links 1.3 Network core circuit switching, packet switching, network structure 1.4 Delay, loss and throughput in packet-switched networks 1.5 Protocol layers, service models 1.6 Networks under attack: security 1.7 History 1- 31

Protocol “Layers”:

Protocol “Layers” Networks are complex! many “pieces”: hosts routers links of various media applications protocols hardware, software 1- 32

Organization of air travel:

Organization of air travel a series of steps ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing ticket (complain) baggage (claim) gates (unload) runway landing airplane routing airplane routing 1- 33

Layering of airline functionality:

Layering of airline functionality Layers: each layer implements a service via its own internal-layer actions relying on services provided by layer below ticket (purchase) baggage (check) gates (load) runway (takeoff) airplane routing departure airport arrival airport intermediate air-traffic control centers airplane routing airplane routing ticket (complain) baggage (claim gates (unload) runway (land) airplane routing ticket baggage gate takeoff/landing airplane routing 1- 34

Internet protocol stack:

Internet protocol stack application: supporting network applications FTP, SMTP, HTTP transport: process-process data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring network elements PPP, Ethernet physical: bits “on the wire” application transport network link physical 1- 35

ISO/OSI reference model:

ISO/OSI reference model presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions session: synchronization, checkpointing , recovery of data exchange application presentation session transport network link physical 1- 36

Encapsulation:

Encapsulation source application transport network link physical H t H n M segment H t datagram destination application transport network link physical H t H n H l M H t H n M H t M M network link physical link physical H t H n H l M H t H n M H t H n M H t H n H l M router switch message M H t M H n frame 1- 37

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 1- 38

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 1- 39

Some network apps:

Some network apps e-mail web instant messaging remote login P2P file sharing multi-user network games streaming stored video clips voice over IP real-time video conferencing grid computing 1- 40

Application layer functions:

Application layer functions Implement desired functionality within application protocols when… no underlying transport/network service supports it e.g. Mail, Web, News, P2P, etc…. Congestion and flow control (Non-TCP applications) Reliability (Non-TCP applications) underlying transport/network service is inadequate Security (S/MIME, PGP, HTTPS) Delivery semantics (multicast) Naming (DNS, URLs) Routing (overlays) Functionality that is common rolled into libraries and “middleware” 1- 41

Application architectures:

Application architectures Client-server Peer-to-peer (P2P) Hybrid of client-server and P2P 1- 42

Application layer protocols:

Application layer protocols Once architecture is chosen, an application protocol must be defined Describes how clients, servers, and peers communicate with each other Defines types of messages exchanged, e.g., request & response messages Syntax of message types: what fields in messages & how fields are delineated Semantics of the fields, i.e., meaning of information in fields Rules for when and how processes send & respond to messages 1- 43

Application layer protocols:

Application layer protocols Types of application protocols Public-domain protocols defined in RFCs allows for interoperability e.g., HTTP, SMTP Proprietary protocols e.g., KaZaA, Skype Key design characteristic What transport service should the application protocol use? 1- 44

Understanding application requirements:

Understanding application requirements Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Bandwidth some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective” other apps (“elastic apps”) make use of whatever bandwidth they get 1- 45

Internet transport protocols services:

Internet transport protocols services TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee 1- 46

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications app architectures app requirements 2.2 Web and HTTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server 1- 47

Web and HTTP:

Web and HTTP First some jargon Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file,… Each object is addressable by a URL Web page consists of base HTML-file which includes several referenced objects Example URL: www.someschool.edu/someDept/pic.gif host name path name 1- 48

HTTP overview:

HTTP overview HTTP: hypertext transfer protocol Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 http://www.rfc-editor.org/rfc/rfc1945.txt HTTP 1.1: RFC 2068 http://www.rfc-editor.org/rfc/rfc2068.txt PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP request HTTP response HTTP response 1- 49

HTTP overview (continued):

HTTP overview (continued) Uses TCP: client initiates bi-directional TCP connection (via socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) Messages encoded in text TCP connection closed HTTP is “stateless” server maintains no information about past client requests compare to ftp Protocols that maintain “state” are complex! past history (state) must be maintained if server/client crashes, their views of “state” may be inconsistent, must be reconciled aside 1- 50

HTTP request message: general format:

HTTP request message: general format 1- 51

HTTP response status codes:

HTTP response status codes 200 OK request succeeded, requested object later in this message 301 Moved Permanently requested object moved, new location specified later in this message (Location:) 400 Bad Request request message not understood by server 404 Not Found requested document not found on this server 505 HTTP Version Not Supported A few sample codes: 1- 52

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server 1- 53

FTP: the file transfer protocol:

FTP: the file transfer protocol transfer file to/from remote host client/server model client: side that initiates transfer (either to/from remote) server: remote host ftp: RFC 959 ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host 1- 54

FTP: separate control, data connections:

FTP: separate control, data connections FTP client contacts FTP server at port 21 using TCP Control connection for exchanging commands Out-of-band signaling between end-points Server maintains “state” Authorization status Current directory Contrast to HTTP For file transfer Request via control connection New TCP connection for data xfer is negotiated and created Can be server or client initiated Includes IP address and port information sent in application layer message Why? Protocol allows client to initiate transfer between 2 ftp servers Data connection closed after transfer FTP client FTP server TCP control connection port 21 TCP data connection port 20 1- 55

FTP commands, responses:

FTP commands, responses Sample commands: sent as ASCII text over control channel USER username PASS password LIST return list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample return codes status code and phrase (as in HTTP) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file 1- 56

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server 1- 57

Electronic Mail:

Electronic Mail Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Mozilla Thunderbird outgoing, incoming messages stored on server user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP 1- 58

Electronic Mail: mail servers:

Electronic Mail: mail servers Mail Servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages e.g. sendmail, postfix, Exchange SMTP protocol Between mail servers to send email messages Mail servers are both clients and servers client: sending server server: receiving server Peer-to-peer? Between user agents and mail servers to send email messages mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP 1- 59

Electronic Mail: SMTP [RFC 821]:

Electronic Mail: SMTP [RFC 821] uses TCP to reliably transfer email message from client to server, port 25 User agent to sending server If one runs SMTP locally (postfix, sendmail) or uses SMTP built-in to client software Sending server to receiving server command/response interaction commands: response: status code and phrase 1- 60

Scenario: Alice sends message to Bob:

Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “to” bob@someschool.edu 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message user agent mail server mail server user agent 1 2 3 4 5 6 1- 61

Sample SMTP interaction:

Sample SMTP interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection 1- 62

Try SMTP interaction for yourself::

Try SMTP interaction for yourself: telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader) 1- 63

SMTP: final words:

SMTP: final words SMTP uses persistent connections SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message Comparison with HTTP: HTTP: pull SMTP: push both have ASCII command/response interaction, status codes 1- 64

Mail access protocols:

Mail access protocols SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server Direct (telnet or ssh followed by “mail”) POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, Horde/IMP, etc. user agent sender’s mail server user agent SMTP SMTP access protocol receiver’s mail server 1- 65

Chapter 2: Application layer:

Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P file sharing 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2.9 Building a Web server 1- 66

Domain Name System (DNS):

Domain Name System (DNS) Internet hosts, routers like to use fixed-length addresses (numbers) IP address (32 bit) - used for addressing datagrams Humans like to use variable-length names www.cs.pdx.edu keywords DNS, keywords, naming protocols Map names to numbers (IP addresses) 1- 67

DNS issues:

DNS issues Load distribution Replicated Web servers: set of IP addresses for one canonical name Host aliasing Canonical and alias names Mail server aliasing MX record 1- 68

DNS MX record type:

DNS MX record type Initially only “A” records MX records created for mail Point to mail exchanger for a name E.g. mail.acm.org is MX for acm.org Addition of MX record type proved to be a challenge How to get mail programs to lookup MX record for mail delivery rather than A record? Needed critical mass of such mailers 1- 69

DNS records:

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

DNS hierarchical canonical name space:

DNS hierarchical canonical name space www.cs.pdx.edu root edu net org uk com ca gwu ucb pdx bu mit cs ece www 1- 71

Maps closely to distributed database:

Maps closely to distributed database Client wants IP for www.amazon.com: client queries a root server to find com DNS server client queries com DNS server to get amazon.com DNS server client queries amazon.com DNS server to get IP address for www.amazon.com Root DNS Servers com DNS servers org DNS servers edu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers 72

Maps closely to distributed database:

Maps closely to distributed database Administrative hierarchy Organized into regions known as “zones” with “.” as separator zone = contiguous section of name space Zones created by convincing owner node to delegate subzone umass.edu zone delegates cs.umass.edu to a different set of authoritative name servers Each zone contains multiple redundant servers (fault tolerance) Primary (master) name server updated manually Secondary (redundant) servers updated by zone transfer of name space Root DNS Servers com DNS servers org DNS servers edu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers 73

Root name servers:

Root name servers contacted by local name server that can not resolve name root name servers contacts authoritative name server or intermediate name server if name mapping not known gets mapping and returns it to local name server 13 root name servers worldwide for fault-tolerance All that fit in a 512 octet SOA record b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 17 other locations) i Autonomica, Stockholm (plus 3 other locations) k RIPE London (also Amsterdam, Frankfurt) m WIDE Tokyo a Verisign, Dulles, VA c Cogent, Herndon, VA (also Los Angeles) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 11 locations) 1- 74

TLD Servers:

TLD Servers Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp. Network Solutions maintains servers for com TLD Educause for edu TLD 1- 75

Recursive query example:

Recursive query example requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 authoritative DNS server dns.cs.umass.edu 8 TLD DNS server 4 5 6 3 7 Host at cis.poly.edu wants IP address for gaia.cs.umass.edu 1- 76

Iterative query example:

Iterative query example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu Query #1 is a recursive query Queries #2, #4, #6 are iterative queries requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 authoritative DNS server dns.cs.umass.edu 8 6 7 TLD DNS server 1- 77

DNS protocol, messages:

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 1- 78

DNS protocol, messages:

DNS protocol, messages Name, type fields for a query RRs in response to query records for authoritative servers additional “helpful” info that may be used 1- 79

DNS issues:

DNS issues UDP used for queries Need reliability -> Why not TCP? No rate control Centralized caching per site not required Vulnerability of 13 static root servers Attacks on root servers have occurred Jon Postel and his mobility “experiment” 1- 80

Dynamic Host Configuration Protocol (DHCP):

Dynamic Host Configuration Protocol (DHCP)

Dynamic Assignment of IP addresses:

Dynamic Assignment of IP addresses Dynamic assignment of IP addresses is desirable for several reasons: IP addresses are assigned on-demand Avoid manual IP configuration Support mobility of laptops 1- 82

BOOTP:

BOOTP BOOTstrap Protocol (BOOTP) From 1985 Host can configure its IP parameters at boot time. Services. IP address assignment. Detection of the IP address for a serving machine. Not only assign IP address, but also default router, network mask, etc. 1- 83

DHCP:

DHCP Dynamic Host Configuration Protocol (DHCP) From 1993 An extension of BOOTP, very similar to DHCP Same port numbers as BOOTP Extensions: Supports temporary allocation (“leases”) of IP addresses DHCP client can acquire all IP configuration parameters needed to operate DHCP is the preferred mechanism for dynamic assignment of IP addresses DHCP can interoperate with BOOTP clients. 1- 84

BOOTP Interaction:

BOOTP Interaction BOOTP can be used for downloading memory image for diskless workstations (a) (b) 1- 85

DHCP Interaction (simplified):

DHCP Interaction (simplified) 1- 86

BOOTP/DHCP Message Format:

BOOTP/DHCP Message Format 1- 87

BOOTP/DHCP:

BOOTP/DHCP OpCode : 1 (Request), 2(Reply) Note: DHCP message type is sent in an option Hardware Type : 1 (for Ethernet) Hardware address length : 6 (for Ethernet) Hop count : set to 0 by client Transaction ID : Integer (used to match reply to response) Seconds: number of seconds since the client started to boot Client IP address, Your IP address, server IP address, Gateway IP address, client hardware address, server host name, boot file name: client fills in the information that it has, leaves rest blank 1- 88

DHCP Message Type:

DHCP Message Type Message type is sent as an option. Value Message Type 1 DHCPDISCOVER 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNAK 7 DHCPRELEASE 8 DHCPINFORM 89

Other options (selection):

Other options (selection) Other DHCP information that is sent as an option: Subnet Mask, Name Server, Hostname, Domain Name, Forward On/Off, Default IP TTL, Broadcast Address, Static Route, Ethernet Encapsulation, X Window Manager, X Window Font, DHCP Msg Type, DHCP Renewal Time, DHCP Rebinding, Time SMTP-Server, SMTP-Server, Client FQDN, Printer Name, … 1- 90

DHCP Operation:

DHCP Operation DCHP DISCOVER DCHP OFFER 1- 91

DHCP Operation:

DHCP Operation DCHP DISCOVER At this time, the DHCP client can start to use the IP address Renewing a Lease (sent when 50% of lease has expired) If DHCP server sends DHCPNACK, then address is released. 1- 92

DHCP Operation:

DHCP Operation DHCP RELEASE At this time, the DHCP client has released the IP address 1- 93

authorStream Live Help