版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Chapter 7 The Application LayerUpon completion you will be able to:7.1 Domain NameSystem: DNS Understand how the DNS is organized Know the domains in the DNS Know how a name or address is resolved Be familiar with the query and response formats Understand the need for DDNSObjectives 17.1.1 NAME SPAC
2、EThe names assigned to machines must be unique because the addresses are unique. A name space that maps each address to a unique name can be organized in two ways: flat or hierarchical.The topics discussed in this section include:Flat Name Space Hierarchical Name Space 27.1.2 DOMAIN NAME SPACEThe do
3、main name space is hierarchical in design. The names are defined in an inverted-tree structure with the root at the top. The tree can have 128 levels: level 0 (root) to level 127.The topics discussed in this section include:Label Domain Name Domain 3Figure 7.1 Domain name space4Figure 7.2 Domain nam
4、es and labels5Figure 7.3 FQDN and PQDN6Figure 7.4 Domains77.1.3 DISTRIBUTION OF NAME SPACEThe information contained in the domain name space is distributed among many computers called DNS servers. The topics discussed in this section include:Hierarchy of Name Servers Zone Root Server Primary and Sec
5、ondary Servers 8Figure 7.5 Hierarchy of name servers9Figure 7.6 Zones and domains10A primary server loads all information from the disk file; the secondary server loads all information from the primary server. When the secondary downloads information from the primary, it is called zone transfer.Note
6、:117.1.4 DNS IN THE INTERNETThe domain name space (tree) is divided into three different sections: generic domains, country domains, and the inverse domain.The topics discussed in this section include:Generic Domains Country Domains Inverse Domain Registrar 12Figure 7.7 DNS used in the Internet13Fig
7、ure 7.8 Generic domains14Table 7.1 Generic domain labels15Table 7.1 Generic domain labels (Continued)16Figure 7.9 Country domains17Figure 7.10 Inverse domain187.1.5 RESOLUTIONMapping a name to an address or an address to a name is called name-address resolution.The topics discussed in this section i
8、nclude:Resolver Mapping Names to Addresses Mapping Addresses to Names Recursive Resolution Iterative Resolution Caching 19Figure 7.11 Recursive resolution20Figure 7.12 Iterative resolution217.1.6 DNS MESSAGESThe DNS query message consists of a header and question records; the DNS response message co
9、nsists of a header, question records, answer records, authoritative records, and additional records.The topics discussed in this section include:Header 22Figure 7.13 DNS messages23Figure 7.14 Query and response messages24Figure 7.15 Header formatTCP/IP Protocol Suite25Figure 7.16 Flags fieldTCP/IP P
10、rotocol Suite26Table 7.2 Values of rCode277.1.7 TYPES OF RECORDSTwo types of records are used in DNS. The question records are used in the question section of the query and response messages. The resource records are used in the answer, authoritative, and additional information sections of the respo
11、nse message.The topics discussed in this section include:Question Record Resource Record 28Figure 7.17 Question record format29Figure 7.18 Query name format30Table 7.3 Types31Table 7.4 ClassesTCP/IP Protocol Suite32Figure 7.19 Resource record format337.1.8 COMPRESSIONDNS requires that a domain name
12、be replaced by an offset pointer if it is repeated. DNS defines a 2-byte offset pointer that points to a previous occurrence of the domain name or part of it.34Figure 7.20 Format of an offset pointer35A resolver sends a query message to a local server to find the IP address for the host “.”. We disc
13、uss the query and response messages separately.Example 1QR OpCode AA TC RD RA Reserved rCode0 0000 0 0 1 0 000 0000Figure 17.21 shows the query message sent by the resolver. The first 2 bytes show the identifier (1333). It is used as a sequence number and relates a response to a query. Because a res
14、olver may even send many queries to the same server, the identifier helps to sort responses that arrive out of order. The next bytes contain the flags with the value of 0 x0100 in hexadecimal. In binary it is 0000000100000000, but it is more meaningful to divide it into the fields as shown below:36F
15、igure 7.21 Example 1: Query message37Example 1 (Continued)QR OpCode AA TC RD RA Reserved rCode1 0000 0 0 1 1 000 0000The QR bit defines the message as a query. The OpCode is 0000, which defines a standard query. The recursion desired (RD) bit is set. (Refer back to Figure 17.16 for the flags field d
16、escriptions.) The message contains only one question record. The domain name is 4chal4fhda3edu0. The next 2 bytes define the query type as an IP address; the last 2 bytes define the class as the Internet.Figure 17.22 shows the response of the server. The response is similar to the query except that
17、the flags are different and the number of answer records is one. The flags value is 0 x8180 in hexadecimal. In binary it is 1000000110000000, but again we divide it into fields as shown below:38Example 1 (Continued)The QR bit defines the message as a response. The OpCode is 0000, which defines a sta
18、ndard response. The recursion available (RA) and RD bits are set. The message contains one question record and one answer record. The question record is repeated from the query message. The answer record has a value of 0 xC00C (split in two lines), which points to the question record instead of repe
19、ating the domain name. The next field defines the domain type (address). The field after that defines the class (Internet). The field with the value 12,000 is the TTL (12,000 s). The next field is the length of the resource data, which is an IP address (05).39Figure 7.22 Example 1: Response message4
20、0An FTP server has received a packet from an FTP client with IP address . The FTP server wants to verify that the FTP client is an authorized client. The FTP server can consult a file containing the list of authorized clients. However, the file consists only of domain names. The FTP server has only
21、the IP address of the requesting client, which was the source IP address in the received IP datagram. The FTP server asks the resolver (DNS client) to send an inverse query to a DNS server to ask for the name of the FTP client. We discuss the query and response messages separately.Example 241Example
22、 2 (Continued)QR OpCode AA TC RD RA Reserved rCode0 0001 0 0 1 0 000 0000Figure 17.23 shows the query message sent from the resolver to the server. The first 2 bytes show the identifier (0 x1200). The flags value is 0 x0900 in hexadecimal. In binary it is 0000100100000000, and we divide it into fiel
23、dsas shown below:The OpCode is 0001, which defines an inverse query. The message contains only one question record. The domain name is 19171231537in-addr4arpa. The next 2 bytes define the query type as PTR, and the last 2 bytes define the class as the Internet.42Figure 7.23 Example 2: Inverse query
24、message43Example 2 (Continued)QR OpCode AA TC RD RA Reserved rCode 1 0001 1 0 1 1 000 0000Figure 17.24 shows the response. The flags value is 0 x8D80 in hexadecimal. In binary it is 1000110110000000, and we divide it into fields as shown below:44Figure 7.24 Example 2: Inverse response message45In UN
25、IX and Windows, the nslookup utility can be used to retrieve address/name mapping. The following shows how we can retrieve an address when the domain name is given.Example 3$ nslookup Name: Address: The nslookup utility can also be used to retrieve the domain name when the address is given as shown
26、below:$ nslookup 53. name = .4617.9 DDNSThe Dynamic Domain Name System (DDNS) updates the DNS master file dynamically. 477.1.10 ENCAPSULATIONDNS uses UDP as the transport protocol when the size of the response message is less than 512 bytes. If the size of the response message is more than 512 bytes
27、, a TCP connection is used. 48DNS can use the services of UDP or TCP using the well-known port 53.Note:49Upon completion you will be able to:7.2 Electronic Mail:SMTP, POP, and IMAP Understand four configurations of email architecture Understand the functions and formats of a user agent Understand MI
28、ME and its capabilities and data types Understand the functions and commands of an MTA Understand the function of POP3 and IMAP4Objectives 507.2.1 ARCHITECTURETo explain the architecture of email, we give four scenarios. We begin with the simplest situation and add complexity as we proceed. The four
29、th scenario is the most common in the exchange of email.The topics discussed in this section include:First Scenario Second Scenario Third Scenario Fourth Scenario 51Figure 7.25 First scenario52When the sender and the receiver of an email are on the same system, we need only two user agents.Note:53Fi
30、gure 7.26 Second scenario54When the sender and the receiver of an email are on different systems, we need two UAs and a pair of MTAs (client and server).Note:55Figure 2.27 Third scenario56When the sender is connected to the mail server via a LAN or a WAN, we need two UAs and two pairs of MTAs (clien
31、t and server).Note:57Figure 7.28 Fourth scenario58Figure 7.29 Push vs. pull59When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server). This is the most common situation today.Note
32、:607.2.2 USER AGENTThe user agent (UA) provides service to the user to make the process of sending and receiving a message easier.The topics discussed in this section include:Services Provided by a User Agent User Agent Types Sending Mail Receiving Mail Addresses Mailing List MIME 61Figure 7.30 User
33、 agent62Some examples of command-driven user agents are mail, pine, and elmNote:63Some examples of GUI-based user agents are Eudora, Outlook, and Netscape.Note:64Figure 7.31 Format of an email65Figure 7.32 Email address66Figure 7.33 MIME67Figure 7.34 MIME header68Table 7.5 Data types and subtypes in
34、 MIME69Table 7.35 Data types and subtypes in MIME (Continued)70Table 7.36 Content-transfer-encoding71Figure 7.37 Base6472Table 7.6 Base64 encoding tableTCP/IP Protocol Suite73Figure 7.38 Quoted-printable747.2.3 MESSAGE TRANSFER AGENT: SMTPThe actual mail transfer requires message transfer agents (MT
35、As). The protocol that defines the MTA client and server in the Internet is called Simple Mail Transfer Protocol (SMTP).The topics discussed in this section include:Commands and Responses Mail Transfer Phases 75Figure 7.39 SMTP range76Figure 7.40 Commands and responses77Figure 7.41 Command format78T
36、able 7.7 Commands79Table 7.8 Responses80Table 7.8 Responses (Continued)81Figure 7.42 Connection establishment82Figure 7.43 Message transfer83Figure 7.44 Connection termination84Example 4$ telnet 25Trying 00.Connected to (00).Let us see how we can directly use SMTP to send an email and simulate the c
37、ommands and responses we described in this section. We use TELNET to log into port 25 (the well-known port for SMTP). We then use the commands directly to send an email. In this example, forouzanb is sending an email to himself. The first few lines show TELNET trying to connect to the adelphia mail server.After connection, we can type the SMTP commands and then receive the responses as shown
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- GB/T 22371-2024傳真機(jī)、多功能復(fù)合型傳真機(jī)環(huán)境保護(hù)要求
- 2025年度教育儲(chǔ)值卡銷(xiāo)售與教育資源整合合同3篇
- 二零二五版環(huán)保項(xiàng)目環(huán)保宣傳教育分包合同3篇
- 二零二五年度果園租賃附帶果樹(shù)修剪與施肥服務(wù)合同3篇
- 二零二五年度賓館能源審計(jì)服務(wù)合同范本3篇
- 二零二五版危險(xiǎn)化學(xué)品運(yùn)輸司機(jī)安全責(zé)任合同3篇
- 2024年速凍粘玉米購(gòu)銷(xiāo)合同的支付方式
- 2024鮮魚(yú)養(yǎng)殖與市場(chǎng)風(fēng)險(xiǎn)防控合作協(xié)議3篇
- 二零二五年度駕校場(chǎng)地租賃與智能語(yǔ)音教學(xué)合同3篇
- 二零二五年度酒店租賃經(jīng)營(yíng)聯(lián)合運(yùn)營(yíng)合同范本3篇
- 2024-2025學(xué)年八年級(jí)上學(xué)期1月期末物理試題(含答案)
- 2025年國(guó)新國(guó)際投資有限公司招聘筆試參考題庫(kù)含答案解析
- 制造車(chē)間用洗地機(jī)安全操作規(guī)程
- 2025河南省建筑安全員-A證考試題庫(kù)及答案
- 商場(chǎng)電氣設(shè)備維護(hù)勞務(wù)合同
- 油氣田智能優(yōu)化設(shè)計(jì)-洞察分析
- 陜西2020-2024年中考英語(yǔ)五年真題匯編學(xué)生版-專(zhuān)題09 閱讀七選五
- 磚混結(jié)構(gòu)基礎(chǔ)加固技術(shù)方案
- 助產(chǎn)專(zhuān)業(yè)的職業(yè)生涯規(guī)劃
- 新《國(guó)有企業(yè)管理人員處分條例》知識(shí)競(jìng)賽考試題庫(kù)500題(含答案)
- 骨質(zhì)疏松護(hù)理
評(píng)論
0/150
提交評(píng)論