EITF25 Internet: Technology and Applications Application Layer -1- Network Tools 2015, Lecture 08 Kaan Bür
Previously on EITF25 Addressing above IP Ports, sockets Process-to-process delivery Transport layer protocols TCP UDP Quality of Service Transport Layer 2015-11-30 EITF25 Internet: Technology and Applications 2
Application layer Principles of digital communications From electrical signals to bits to packets Using the physical infrastructure Network access Finding your way Addressing, routing Making use of it all Applications 2015-11-16 EITF25 Internet: Technology and Applications 3
Today: Application Layer (1) Domain Name System, DNS [S24.2][F26.6] Host Configuration, DHCP [S21.5][F18.4.4] Debugging Tools, ICMP [S14.3][F19.2] World-Wide Web, HTTP [S24.3][F26.1] *[Kihl & Andersson: 7.5, 7.7, 7.9, 12.4] 2015-11-30 EITF25 Internet: Technology and Applications 4
Mapping host name to IP address Application protocols use host names TCP/IP protocol suite uses IP addresses Mapping from host name to IP addresses Domain Name System (DNS) Domain name space Domain name resolution www.lth.se 130.235.209.220 2015-11-30 EITF25 Internet: Technology and Applications 5
Domain Name System (DNS) Internet s telephone book: Address name One of the most important systems on the Internet 2015-11-30 EITF25 Internet: Technology and Applications 6
Domain name space Names must be unique Complete control needed 2015-11-30 EITF25 Internet: Technology and Applications 7
Domain names and labels 2015-11-30 EITF25 Internet: Technology and Applications 8
Internet domains 2015-11-30 EITF25 Internet: Technology and Applications 9
Generic domains 2015-11-30 EITF25 Internet: Technology and Applications 10
Country domains se lth eit eit.lth.se 2015-11-30 EITF25 Internet: Technology and Applications 11
Hierarchy of domain name servers 13 logical root name servers implemented by 376 physic al servers 2015-11-30 EITF25 Internet: Technology and Applications 12
Domains, subdomains, zones Domain Subtree of DNS Zone Servers control area 2015-11-30 EITF25 Internet: Technology and Applications 13
Domain name resolution Action of address mapping Client = resolver Server = DNS One server cannot have all the answers! How to ask others? What to do with the answer? Caching Remember what you ve learned! 2015-11-30 EITF25 Internet: Technology and Applications 14
Recursive resolution 2015-11-30 EITF25 Internet: Technology and Applications 15
Iterative resolution 2015-11-30 EITF25 Internet: Technology and Applications 16
Domain name to IP address (1) troll.trollnet.se magi.magicnet.se 1. magi.magicnet.se? ns.trollnet.se 2015-11-30 EITF25 Internet: Technology and Applications 17
Domain name to IP address (2) troll.trollnet.se magi.magicnet.se 2. magicnet.se? 3. Ask ns.magicnet.se ns.trollnet.se 2015-11-30 18 EITF25 Internet: Technology and Applications x.ns.se
Domain name to IP address (3) troll.trollnet.se magi.magicnet.se 6. IP = 194.52.54.47 4. magi.magicnet.se? 5. IP = 194.52.54.47 ns.trollnet.se ns.magicnet.se 2015-11-30 19 EITF25 Internet: Technology and Applications
Domain name to IP address (4) troll.trollnet.se magi.magicnet.se 7. IP = 194.52.54.47 2015-11-30 20 EITF25 Internet: Technology and Applications
Exercise: Break this vicious cycle! DHCP IP addr. IP DNS TCP UDP 2015-11-30 EITF25 Internet: Technology and Applications 21
Obtaining an IP address Dynamic Host Configuration Protocol Application layer DHCP IP address Allocation from pool or static Network mask Default gateway DNS server(s) 2015-11-30 EITF25 Internet: Technology and Applications 22
DHCP operation 2015-11-30 EITF25 Internet: Technology and Applications 23
DHCP states 75% 2015-11-30 EITF25 Internet: Technology and Applications 24
See you in 15 :) After the break Network debugging ICMP World-wide web 2015-11-30 EITF25 Internet: Technology and Applications 25
Debugging Tools Applications used for debugging Two examples Ping Traceroute 2015-11-30 EITF25 Internet: Technology and Applications 26
Ping 2015-11-30 EITF25 Internet: Technology and Applications 27
Traceroute 2015-11-30 EITF25 Internet: Technology and Applications 28
Internet Control Message Protocol ICMP Support protocol for IP Error reporting Query 2015-11-30 EITF25 Internet: Technology and Applications 29
Encapsulation ICMP messages encapsulated in IP packets 2015-11-30 EITF25 Internet: Technology and Applications 30
ICMP message formats Error reporting Query messages 2015-11-30 EITF25 Internet: Technology and Applications 31
ICMPv4 message types 2015-11-30 EITF25 Internet: Technology and Applications 32
Redirection (error reporting type) Routing update for hosts More efficient when too many hosts DEFAULT ROUTER 2015-11-30 EITF25 Internet: Technology and Applications 33
Exercise: ICMP in action Q: In what kind of network can a host never receive a redirection message? A: In a network with only one router 2015-11-30 EITF25 Internet: Technology and Applications 34
Echo request and reply (query type) Is my destination alive? Network diagnostics IP layer Debugging tools Ping Traceroute 2015-11-30 EITF25 Internet: Technology and Applications 35
Traceroute Used to trace a packet s route from source to destination Uses three ICMP messages Echo Request (query) Time Exceeded (error) Destination Unreachable (error) Manipulates TTL field in IP header Uses wrong port number 2015-11-30 EITF25 Internet: Technology and Applications 36
Traceroute Echo request 2015-11-30 EITF25 Internet: Technology and Applications 37
Application layer paradigms Client-server paradigm WWW, Online games, Web TV, Facebook Peer-to-peer paradigm BitTorrent, Voddler, Skype Some applications use both paradigms Spotify 2015-11-30 EITF25 Internet: Technology and Applications 38
Client-server paradigm 2015-11-30 EITF25 Internet: Technology and Applications 39
Peer-to-peer paradigm 2015-11-30 EITF25 Internet: Technology and Applications 40
Application: WWW The idea of the World-Wide Web (WWW) was first proposed by Tim Berners-Lee in 1989 at CERN, the European Organization for Nuclear Research The purpose was to allow all CERN researchers at different locations throughout Europe to access each others results The commercial Web started in 1993. 2015-11-30 EITF25 Internet: Technology and Applications 41
Components of WWW Web documents (pages) HyperTextMarkup Language (HTML) for static web pages Script languages (PHP, ASP, JSP, CGI etc.) for dynamic Universal Resource Locator (URL) Standard way to identify location of web documents HyperText Transfer Protocol (HTTP) Protocol to access documents on a web server 2015-11-30 EITF25 Internet: Technology and Applications 42
Universal Resource Locator (URL) A web document has four identifiers Protocol, Host, Port and Path. A URL is defined as protocol://host:port/path Standard HTTP port 80 is is omitted http://www.eit.lth.se/course/eitf25 2015-11-30 EITF25 Internet: Technology and Applications 43
Hypertext Transfer Protocol (HTTP) Text-based protocol Two basic types of messages Requests and Responses Sets up and uses a TCP connection 2015-11-30 EITF25 Internet: Technology and Applications 44
Document retrieval 2015-11-30 EITF25 Internet: Technology and Applications 45
Operation of HTTP 1.1 Persistent connection Only one TCP session for all requests from the same server. 2015-11-30 EITF25 Internet: Technology and Applications 46
HTTP request and response format 2015-11-30 EITF25 Internet: Technology and Applications 47
HTTP methods in requests Using these methods, clients may request corresponding actions from server. 2015-11-30 EITF25 Internet: Technology and Applications 48
Example request and response 2015-11-30 EITF25 Internet: Technology and Applications 49
Cookies Original WWW was stateless Each request/response treated separately No history of previous messages Cookies store information about client introduce concept of a user session Implementation (creation and storage) of cookies can be different, but same concept 2015-11-30 EITF25 Internet: Technology and Applications 50
Cookies 2015-11-30 EITF25 Internet: Technology and Applications 51
Summary: Application Layer (1) Domain Name System Mapping host names to IP addresses Host configuration Obtaining an IP address Debugging tools Ping, traceroute, ICMP Client-server vs. P2P applications www, http, cookies 2015-11-30 EITF25 Internet: Technology and Applications 52