ApplicationLayer -1- Network Tools...Summary: Application Layer (1) • Domain Name System –Mapping host names to IP addresses • Host configuration –Obtaining an IP address •

Post on 30-Aug-2020

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

Application Layer-1-

NetworkTools

2015,Lecture 08Kaan Bür

EITF25– Internet:TechnologyandApplications

PreviouslyonEITF25

• AddressingaboveIP– Ports, sockets

• Process-to-processdelivery• Transportlayerprotocols– TCP– UDP

• QualityofService2015-11-30 2EITF25– Internet:TechnologyandApplications

TransportLayer

Application layer

• Principlesofdigitalcommunications– Fromelectricalsignals tobitstopackets

• Usingthephysicalinfrastructure– Networkaccess

• Findingyourway– Addressing, routing

• Makinguseofitall– Applications

2015-11-16 EITF25– Internet:TechnologyandApplications 3

Today:ApplicationLayer (1)

• DomainNameSystem,DNS[S24.2][F26.6]

• HostConfiguration,DHCP[S21.5][F18.4.4]

• DebuggingTools,ICMP[S14.3][F19.2]

• World-WideWeb,HTTP[S24.3][F26.1]

*[Kihl&Andersson:7.5,7.7,7.9,12.4]2015-11-30 4EITF25– Internet:TechnologyandApplications

MappinghostnametoIPaddress

• Applicationprotocolsusehostnames• TCP/IPprotocolsuiteusesIPaddresses• MappingfromhostnametoIPaddresses

• DomainNameSystem(DNS)– Domainnamespace– Domainnameresolution

• www.lth.se ≡130.235.209.2202015-11-30 EITF25– Internet:TechnologyandApplications 5

DomainNameSystem(DNS)

• Internet’stelephonebook:Address↔name– Oneofthemost important systemson theInternet

2015-11-30 6EITF25– Internet:TechnologyandApplications

Domainnamespace

• Namesmustbeunique– Completecontrolneeded

2015-11-30 EITF25– Internet:TechnologyandApplications 7

Domainnamesandlabels

2015-11-30 8EITF25– Internet:TechnologyandApplications

Internetdomains

2015-11-30 9EITF25– Internet:TechnologyandApplications

Genericdomains

2015-11-30 10EITF25– Internet:TechnologyandApplications

se

lth

eit

eit.lth.se

Countrydomains

2015-11-30 11EITF25– Internet:TechnologyandApplications

Hierarchyofdomainnameservers

• 13logicalrootnameservers– implemented by376physicalservers

2015-11-30 EITF25– Internet:TechnologyandApplications 12

Domains,subdomains,zones

Domain

• SubtreeofDNS

Zone

• Servers’controlarea

2015-11-30 EITF25– Internet:TechnologyandApplications 13

Domainnameresolution

• Actionofaddressmapping– Client=resolver– Server=DNS

• Oneservercannothavealltheanswers!– Howtoaskothers?–Whattodowiththeanswer?

• Caching– Rememberwhatyou’ve learned!

2015-11-30 14EITF25– Internet:TechnologyandApplications

Recursiveresolution

2015-11-30 15EITF25– Internet:TechnologyandApplications

Iterativeresolution

2015-11-30 16EITF25– Internet:TechnologyandApplications

DomainnametoIPaddress (1)

17

magi.magicnet.setroll.trollnet.se

1. magi.magicnet.se ?

ns.trollnet.se2015-11-30 EITF25– Internet:TechnologyandApplications

18

DomainnametoIPaddress (2)

troll.trollnet.semagi.magicnet.se

ns.trollnet.se x.ns.se

2. magicnet.se ?

3. Ask ns.magicnet.se

2015-11-30 EITF25– Internet:TechnologyandApplications

19

DomainnametoIPaddress (3)

troll.trollnet.semagi.magicnet.se

ns.trollnet.se ns.magicnet.se

4. magi.magicnet.se ?

5. IP = 194.52.54.47

6. IP = 194.52.54.47

2015-11-30 EITF25– Internet:TechnologyandApplications

20

DomainnametoIPaddress (4)

troll.trollnet.semagi.magicnet.se

7. IP = 194.52.54.47

2015-11-30 EITF25– Internet:TechnologyandApplications

Exercise: Breakthisviciouscycle!

2015-11-30 EITF25– Internet:TechnologyandApplications 21

IPaddr.

DNS

TCPUDP

IP

DHCP

ObtaininganIPaddress

• DynamicHostConfigurationProtocol– Application layer

• DHCP– IPaddress• Allocationfrompoolorstatic

– Networkmask– Defaultgateway– DNSserver(s)

2015-11-30 22EITF25– Internet:TechnologyandApplications

DHCPoperation

2015-11-30 23EITF25– Internet:TechnologyandApplications

DHCPstates

2015-11-30 EITF25– Internet:TechnologyandApplications 24

75%

Seeyouin15’:)

• Afterthebreak– Networkdebugging– ICMP–World-wide web

2015-11-30 25EITF25– Internet:TechnologyandApplications

DebuggingTools

• Applicationsusedfordebugging• Twoexamples– Ping– Traceroute

2015-11-30 EITF25– Internet:TechnologyandApplications 26

Ping

2015-11-30 EITF25– Internet:TechnologyandApplications 27

Traceroute

2015-11-30 EITF25– Internet:TechnologyandApplications 28

InternetControlMessageProtocol

• ICMP• SupportprotocolforIP– Errorreporting– Query

2015-11-30 29EITF25– Internet:TechnologyandApplications

Encapsulation

• ICMPmessagesencapsulatedinIPpackets

2015-11-30 EITF25– Internet:TechnologyandApplications 30

ICMPmessageformats

• Errorreporting

• Querymessages

2015-11-30 31EITF25– Internet:TechnologyandApplications

ICMPv4messagetypes

2015-11-30 32EITF25– Internet:TechnologyandApplications

• Routingupdateforhosts–Moreefficientwhen toomanyhosts

Redirection(errorreportingtype)

2015-11-30 33EITF25– Internet:TechnologyandApplications

DEFAULT ROUTER

Exercise: ICMPinaction

Q: Inwhatkindofnetworkcanahostneverreceivearedirectionmessage?

A: Inanetworkwithonlyonerouter

2015-11-30 EITF25– Internet:TechnologyandApplications 34

Echorequestandreply (querytype)

• Ismydestinationalive?

• Networkdiagnostics– IPlayer

• Debuggingtools– Ping– Traceroute

2015-11-30 35EITF25– Internet:TechnologyandApplications

Traceroute

• Usedtotraceapacket’sroutefromsourcetodestination

• UsesthreeICMPmessages– EchoRequest (query)

– TimeExceeded (error)

– DestinationUnreachable (error)

• ManipulatesTTLfieldinIPheader• Uses‘wrong’ portnumber

2015-11-30 EITF25– Internet:TechnologyandApplications 36

Traceroute

2015-11-30 EITF25– Internet:TechnologyandApplications 37

Echo request

Applicationlayerparadigms

• Client-serverparadigm–WWW,Onlinegames,WebTV,Facebook

• Peer-to-peerparadigm– BitTorrent, Voddler, Skype

• Someapplicationsusebothparadigms– Spotify

2015-11-30 EITF25– Internet:TechnologyandApplications 38

Client-serverparadigm

2015-11-30 EITF25– Internet:TechnologyandApplications 39

Peer-to-peerparadigm

402015-11-30 EITF25– Internet:TechnologyandApplications

Application:WWW

• TheideaoftheWorld-WideWeb(WWW)wasfirstproposedbyTimBerners-Lee in1989atCERN,theEuropeanOrganizationforNuclearResearch

• ThepurposewastoallowallCERNresearchersatdifferentlocationsthroughoutEuropetoaccesseachothers’ results

• ThecommercialWebstartedin1993.

2015-11-30 EITF25– Internet:TechnologyandApplications 41

ComponentsofWWW

• Webdocuments(pages)– HyperTextMarkup Language (HTML) forstaticwebpages

– Script languages (PHP,ASP, JSP,CGIetc.)fordynamic

• UniversalResourceLocator(URL)– Standardwaytoidentify locationofwebdocuments

• HyperTextTransferProtocol(HTTP)– Protocol toaccessdocuments onawebserver

2015-11-30 EITF25– Internet:TechnologyandApplications 42

UniversalResourceLocator(URL)

• Awebdocumenthasfouridentifiers– Protocol, Host,PortandPath.

• AURLisdefinedas– protocol://host:port/path

• StandardHTTPport80isisomitted– http://www.eit.lth.se/course/eitf25

2015-11-30 EITF25– Internet:TechnologyandApplications 43

HypertextTransferProtocol(HTTP)

• Text-basedprotocol• Twobasictypesofmessages– RequestsandResponses

• SetsupandusesaTCPconnection

2015-11-30 EITF25– Internet:TechnologyandApplications 44

Documentretrieval

452015-11-30 EITF25– Internet:TechnologyandApplications

OperationofHTTP1.1

• Persistentconnection– OnlyoneTCPsession forallrequestsfromthesameserver.

2015-11-30 EITF25– Internet:TechnologyandApplications 46

HTTPrequestandresponseformat

2015-11-30 EITF25– Internet:TechnologyandApplications 47

HTTPmethodsinrequests

• Usingthese’methods’,clientsmayrequestcorrespondingactionsfromserver.

2015-11-30 EITF25– Internet:TechnologyandApplications 48

Examplerequestandresponse

2015-11-30 EITF25– Internet:TechnologyandApplications 49

Cookies

• OriginalWWWwasstateless– Eachrequest/response treatedseparately– Nohistoryofpreviousmessages

• Cookies– storeinformation aboutclient– introduce conceptofauser session

• Implementation(creationandstorage)ofcookiescanbedifferent,butsameconcept

2015-11-30 EITF25– Internet:TechnologyandApplications 50

Cookies

512015-11-30 EITF25– Internet:TechnologyandApplications

Summary: ApplicationLayer (1)

• DomainNameSystem–Mapping hostnamestoIPaddresses

• Hostconfiguration– Obtaining anIPaddress

• Debuggingtools– Ping, traceroute,ICMP

• Client-servervs.P2Papplications– www,http, cookies

2015-11-30 EITF25– Internet:TechnologyandApplications 52

top related