• No results found

Application Protocols

N/A
N/A
Protected

Academic year: 2021

Share "Application Protocols"

Copied!
53
0
0

Loading.... (view fulltext now)

Full text

(1)

1

Application Protocols

รศ.ดร. อนันต์ ผลเพิ่ม

Assoc. Prof. Anan Phonphoem, Ph.D.

[email protected]

(2)

2

Outline

Client-Server

(3)

3

TCP/IP Protocol Suite

(Internet Model)

Applications User service and interface

5

Transport Process delivery + Error (TCP/UDP)

4

Network Packet end-to-end (across network)

3

Data Link 2

Physical (mechanical and electrical spec)

1

Provide frames

Node-to-node (same network segment)

Transmission bit streams

Move packets from source to destination

(4)

4

Responsibilities of Application Layer

Identifying and establishing the

availability of intended communication

partners

Synchronizing cooperating applications

Establishing agreement on procedures

for error recovery

(5)

5

Application Definition

Programs run on behalf of users

 serve specific service requests

Application types

 self-contained (take input  show output)  remote interaction (send-receive info.)

 client – receive instruction from user

(6)

6

Client-Server Architecture

 Most network application  Server

 use well-known port numbers  run all the time

 Client

 use an ephemeral port number

 terminate after the service.

 If a client requests a service on a port number

associated with no server

 In UDP, return ICMP port unreachable error to client

(7)

7

Client-Server

Client Server Internet Client

Application Application Server

(8)

Connectionless Iterative Server

8

Datagram from client 1 Datagram from client 2 Datagram from client 3

(9)

Connection-Oriented Concurrent Server

(10)

TCP/IP protocol suite and OS

(11)

Sockets – Basic Concepts

(12)

Sockets – Basic Concepts

(13)

Connectionless Iterative: using UDP

(14)

Connection-Oriented Concurrent: TCP

14

(15)

15

Connection handshake

Client Server

(16)

16

Client Server

(17)

Parent / Child Process

(18)

18

Application Layer Examples

 Domain Name System (DNS)  Telnet

 File Transfer Protocol (FTP)

 Trivial File Transfer Protocol (TFTP)  Hypertext Transfer Protocol (HTTP)  Simple Mail Transport Protocol (SMTP)

(19)

19

(20)

20

Naming Purpose

Addresses are used to locate objects

Names are easier to remember than

numbers

To get to the address or other objects

(21)

21

Domain Name System (DNS)

 System used for translating

 names of domains into IP addresses

 using lookup mechanism

 Domain names

 comprise a hierarchy (tree)

 unique

 easy to remember

 DNS can use the services of UDP or TCP

using the well-known port 53

 www.ku.ac.th

(22)
(23)

23

IP Address Mapping Example

(24)

24

DNS Features

 A globally distributed

 maintain data locally, but retrievable globally

 No single computer has all DNS data

 Loosely coherent

 replicate changes (timing set by the zone admin)

 Scalable

 not limited size

 not limited # of query

(25)

25

DNS Concept

Domain names can be mapped to a tree

New branches at the ‘dots’

No restriction to the amount of

(26)

26

DNS in Internet

arpa com edu gov int mil net org de th uk

in-addr mit usu or

cc mua nectec go mis nucleus 71 2 108 158 โดเมนผกผัน โดเมนทั่วไป โดเมนระดับประเทศ ราก = มีต้นไม้ย่อยได้อีก 71.2.108.158.in-addr.arpa. cc.usu.edu. nontri.ku.ac.th. ku ac nontri nucleus.nectec.or.th.

arpa com edu gov int mil net org de th uk

in-addr mit usu or

(27)

27

Standard Name Space (Top Level)

com commercial

edu education

gov goverment

mil military

net network operator

org organization

th country

.aero .biz .coop .info .name .pro

(28)
(29)

29

Hostname Structure

Sequence of

labels

separated by

periods

 each label can be up to 63 characters

 total name can be at most 255 characters

Examples:

 www.sanook.com  iwing.cpe.ku.ac.th

(30)

30

Domain Name and Label

• Absolute Domain Name

challenger.atc.fhda.edu

.

• Relative Domain Name

atc

(31)

31

(32)
(33)

33

Sub-Domain

ac ku th go lib sci eng cpc ce ie me Domain ku.ac.th Domain cpc.ku.ac.th ราก Domain sci.ku.ac.th

(34)

34

Delegation

 Administrator can create sub-domains

 according to geography, affiliation or other

criterion

 Domain Admin

may

delegate responsibility

for managing a sub-domain

 Parent domain retains links to delegated

sub-domain

 parent domain “remembers” who it delegated

(35)

35

(36)

36

net domain

Zones and Delegations

 Zones are “administrative spaces”

 Zone administrators are responsible for

portion of a domain’s name space

 Authority is delegated from a parent and to a

(37)

37

Zone and Domain

(38)

38

Zone and Domain

(39)

39

Name Servers

Name servers answer ‘DNS’ questions

Several types of name servers

 Authoritative servers

 master (primary)

 slave (secondary)

 (Caching) recursive servers

 also caching forwarders

(40)

40

Authoritative Name Servers

 Give authoritative answers for one or more

zones

 Master server loads data from zone file

 Slave server replicates data from master via a

zone transfer

master

slave

(41)

41

Recursive Name Server

Perform actual lookups

 ask questions to DNS on behalf of clients

Answers are obtained from authoritative

servers

 but answers forwarded to clients are

marked as not authoritative

Answers are stored for future reference

(42)

42

Resolver

Ask questions to DNS system on behalf

of the application

Normally implemented in a system

library (e.g, libc)

gethostbyname (char *name);

(43)
(44)

44

Iterative Resolution

18.27.0.82 รูทเนมเซิ ร์ฟเวอร์ รูทเนมเซิ ร์ฟเวอร์ เนมเซิ ร์ฟเวอร์ mit . edu เนมเซิ ร์ฟเวอร์ mit . edu w 20 ns . mit . edu 18.70.0.160 w 20 ns . mit . edu 18.70.0.160

mintaka . lcs . mit . edu 18.26.0.36

mintaka . lcs . mit . edu 18.26.0.36

jaguar . lcs . mit . edu 1

jaguar . lcs . mit . edu

ไคล เอ็นต์ ไคล เอ็นต์

nontri.ku.ac.th

1

8

jaguar . lcs . mit . edu 2 jaguar . lcs . mit . edu 2

w 20 ns . mit . edu ,

18.70.0.160

3 w 20 ns . mit . edu ,

18.70.0.160

3

jaguar . lcs . mit . edu 4 jaguar . lcs . mit . edu 4

mintaka . lcs . mit . edu ,

18.26.0.36

mintaka . lcs . mit . edu ,

18.26.0.36 ns . ku . ac . th 5

ns . ku . ac . th

ns . ku . ac . th 5

jaguar . lcs . mit . edu jaguar . lcs . mit . edu

, เนมเซิ ร์ฟเวอร์ lcs . mit . edu 6 , เนมเซิ ร์ฟเวอร์ lcs . mit . edu 6

jaguar . lcs . mit . edu

18.27.0.82

7 jaguar . lcs . mit . edu

18.27.0.82

7

(45)

45

(46)

46

Query Record Format (Question)

(47)
(48)

48

nontri.ku.ac.th  ns.ku.ac.th

…… ……

destination=158.108.2.67 source=158.108.2.71

identification=10 query, standard, recursive

number of questions = 1 number of answers RRs = 0

number of authority RRs = 0 numberof additional RRs = 0

name=ftp.nectec.or.th., type=A, class=IN

ไอพีเฮดเดอร์ (บางส่วน) ดีเอ็นเอสเฮดเดอร์

ส่วนค าถาม

Type A = indicate that VALUE is an IP Add

Class IN = indicate Internet

(49)

49

ns.ku.ac.th  ns.nectec.or.th

ftp.nectec.or.th 202.44204.34 ftp.nectec.or.th, 202.44204.34 ftp.nectec.or.th เนมเซิร์ฟเวอร์ nectec.or.th ns.nectec.or.th 202.44204.67 ns.ku.ac.th 158.108.2.67 nontri.ku.ac.th 158.108.2.71 เนมเซิร์ฟเวอร์ ku.or.th 1 2 3 4 ftp.nectec.or.th 202.44204.34 ftp.nectec.or.th, 202.44204.34 ftp.nectec.or.th เนมเซิร์ฟเวอร์ nectec.or.th ns.nectec.or.th 202.44204.67 ns.ku.ac.th 158.108.2.67 ns.ku.ac.th 158.108.2.67 nontri.ku.ac.th 158.108.2.71 เนมเซิร์ฟเวอร์ ku.or.th 1 2 3 4 ku.ac.th …… …… destination=202.44.204.67 source=158.108.2.67

identification=20 query, standard, recursive

number of questions = 1 number of answers RRs = 0

number of authority RRs = 0 numberof additional RRs = 0

name=ftp.nectec.or.th., type=A, class=IN

ดีเอ็นเอสเฮดเดอร์

(50)

50

DNS File Example

BIND (Berkeley Internet Name Domain)

Unix  use daemon “named”

/etc/named.conf /usr/local//named/db.ku /usr/local/named/db.rev /usr/local/named/db.local /usr/local/named/db.cache /etc/named.conf /usr/local/named/db.ku * /usr/local/named/db.rev * /usr/local/named/db.local /usr/local/named/db.cache มาสเตอร์เนมเซิร์ฟเวอร์ สเลฟเนมเซิร์ฟเวอร์ ns ns2

www mail nontri omega sigma

/etc/named.conf /usr/local//named/db.ku /usr/local/named/db.rev /usr/local/named/db.local /usr/local/named/db.cache /etc/named.conf /usr/local/named/db.ku * /usr/local/named/db.rev * /usr/local/named/db.local /usr/local/named/db.cache มาสเตอร์เนมเซิร์ฟเวอร์ สเลฟเนมเซิร์ฟเวอร์ ns ns2

(51)

51

nslookup

Interactive resolver

 allows user to communicate directly with a

(52)

dig

(53)

53

References

 “TCP/IP Protocol Suite”, 2nd Edition, Behrouz A.

Forouzan

 “Introduction to the DNS system”, Olaf M. Kolkman

 “CCNA 1 v3.0 Module 11 TCP/IP Transport and

Application Layers”, cisco.com

 “Address Conversion Functions and The Domain

Name System”, Anonymous

References

Related documents

A study of the room temperature Mössbauer spec- trum, powder X-ray diffraction, energy dispersive X-ray spectroscopy, and magnetic measurements of a sample of black magnetic

Comparing grazing intensities in relation to the seed furrow mechanisms ( Figure 3B ), it is noticed that corn plant height (86 DAS) were affected by the graz- ing intensities at

Two protocols, Trivial File Transfer Protocol (TFTP) and Dynamic Host Configuration Protocol (DHCP) must be available for the HomeBase Server to be capable of deploying the

Advising & Student Engagement Coordinator, College of Humanities and Social Sciences B.A..

For the minimum steady-state short-circuit current in the case of a single-fed short- circuit from one generator or one power station unit, constant no-load excitation

What Must Franchisors Do To Comply With State Franchise Registration And Disclosure Laws.  File an application which includes an FDD, standard franchise agreements and

This research chooses the port noise management to find the gap and make a feasible proposal for Port of Gothenburg on noise initiatives dealing with issue in American

Public and private sector health benefit schemes, as well as all other formal or informal health financing schemes in place, are very likely to benefit from a Centre for