Вы находитесь на странице: 1из 60

( .2 .

182-216)


. ..

-

NAT - Network Address Translation


DNS Domain Name Service
HTTP - Hyper Text Transfer Protocol
SNMP Simple Network Management
Protocol
SMTP Simple Mail Transfer Protocol
FTP File Transfer Protocol


01.05.2017 2
. ..
NAT Network Address Translation
NAT OPERATION


01.05.2017 4
. ..
N AT

10.0.0.101
18.181.0.31

NAT
(128.34.22.8)

A port 7009 S

TCP port 5000


TCP port 22


01.05.2017 5
. ..
NAT


03.05.2017 6
. ..

NAT ?
NAT ?
, NAT
o Cone NAT, Full Cone NAT
o Address-Restricted cone NAT, Restricted cone NAT
o Port-Restricted cone NAT
o NAT (Symmetric NAT)
NAT RFC3489


01.05.2017 7
. ..
F u l l C o n e ( F C ) N AT

NAT
A (128.34.22.8) S
10.0.0.101
18.181.0.31

18.181.0.31 18.181.0.31
10.0.0.101 10.0.0.101 128.34.22.8 128.34.22.8
80 4512 4512 6641 80 6641


01.05.2017 8
. ..
R e s t r i c t e d C o n e ( R C ) N AT

NAT
A (128.34.22.8) S
10.0.0.101
18.181.0.31

18.181.0.31 18.181.0.31
10.0.0.101 10.0.0.101 128.34.22.8 128.34.22.8
80 4512 4512 6641 80 6641


01.05.2017 9
. ..
P o r t R e s t r i c t e d ( P R ) N AT

NAT
A (128.34.22.8) S
10.0.0.101
18.181.0.31

18.181.0.31 18.181.0.31
10.0.0.101 10.0.0.101 128.34.22.8 128.34.22.8
80 4512 4512 6641 80 6641


01.05.2017 10
. ..
Symmetric N AT

18.181.0.32
10.0.0.101 128.34.22.8 S
4512 3311 9821 18.181.0.32

NAT
(128.34.22.8)
A
10.0.0.101
18.181.0.3
18.181.0.31 1 S
10.0.0.101 128.34.22.8
10.0.0.101 4512 3311 6641 18.181.0.31

3311 4512

01.05.2017 11
. ..
(Hairpinning):

10.0.0.101 128.34.22.8 NAT


(128.34.22.8)
4512 6641

A B
10.0.0.101
10.0.0.99


01.05.2017 12
. ..
NAT :

B
18.181.0.32

ssh
NAT
A (128.34.22.8)
S
10.0.0.101
18.181.0.31

18.181.0.31 18.181.0.31
10.0.0.101 128.34.22.8
10.0.0.101 128.34.22.8
4512 6641
80 4512 80 6641


01.05.2017 13
. ..
:N AT
(hole-punching)
Server
(18.181.0.31)

NAT NAT
NAT
(128.34.22.8) (76.18.117.
(76.18.117.20)
20)

Client A Client B
(10.0.0.101) (10.1.1.9)


01.05.2017 14
. ..
NAT =
!

NAT
A (128.34.22.8) S
10.0.0.101
18.181.0.31

18.181.0.31 18.181.0.31
10.0.0.101 10.0.0.101 128.34.22.8 128.34.22.8
80 4512 4512 6641 80 6641

.
01.05.2017 15
..
Strong End-t o -End

The network's job is to transmit datagrams as


efficiently and flexibly as possible. Everything else
should be done at the fringes.

Internet

171.64.15.55 157.166.226.26

.
01.05.2017 16
..

ICMP TCP UDP

IP


01.05.2017 17
. ..
NAT


o
o (
)

o
o NAT VoIP
NAT , !


01.05.2017 18
. ..
DNS Domain Name Service
DNS
:
o IP

o

DNS (Domain Name System)


o ,

Internet
o
Internet


. .. 01.05.2017 20
DNS:


. .. 01.05.2017 21


.aero , ;
.arts ;
.biz , ;
.com ;
.coop ;
.firm ;
.gov ();
.info TLD- ( )
.org ;
.edu ;
.jobs ;
.mil ();
C ,
.mobi

.museum
.name
.net ;
, . RegistryPro
.pro
(http://www.nic.pro/);
.int ;
.rec ;

.tel
;
.travel ;
. bbc.tv,
(. Ru center,
.tv TLD . IANA
(.
TUVALU
.arpa , IP-


01.05.2017 22
. ..
DNS


. .. 01.05.2017 23
DNS:





DNS- DNS-
DNS-





. .. 01.05.2017 24

DNS


01.05.2017 25
. ..
DNS:


. .. 01.05.2017 26
DNS


01.05.2017 27
. ..
DNS:

(NAME) ,

TTL (Time To Live)
DNS-
(TYPE)

(RDLEN)
(RDATA),
.


01.05.2017 28
. ..
DNS:

A (address record) IP

AAAA (IPv6 address record) IPv6

CNAME (canonical name record) ()


MX (mail exchange) ()

NS (name server) DNS-

PTR (pointer) IP

SOA (Start of Authority) ,


, ,

TXT

01.05.2017 29
. ..
DNS

Authoritative data for cs.msu.ru


cs.msu.ru. 86400 IN SOA ns.cs.msu.ru. root.cs.msu.ru. (2001082400,
10800, 1800, 3600000, 259200)
cs.msu.ru. 86400 IN TXT CS Dept of the Moscow State University
cs.msu.ru. 86400 IN NS ns.cs.msu.ru.
cs.msu.ru. 86400 IN NS ns1.cs.msu.ru.
cs.msu.ru. 86400 IN NS ns1.barrnet.net.
cs.msu.ru. 86400 IN NS ipsun.ac.msk.su.
cs.msu.ru. 86400 IN NS ns.radio-msu.net.
cs.msu.ru. 86400 IN MX 10 mailhost.cs.msu.ru.

mailhost.cs.msu.ru. 86400 IN HINFO Sun Enterprise 450, Solaris 10


. .. 01.05.2017 30
DNS:

,
,
( )

:

. ,
, -
,


01.05.2017 31
. ..
HTTP
Hyper Text Transfer Protocol
Hyper Text

01.05.2017 33
. ..
World Wide Web (HTTP)

Internet

Client Server

34
. .. 01.05.2017
HTTP Request Format

request method URL version -L

header field name : value -L

headers

header field name : value -L

blank line -L

body

Server: Apache/2.2.11 (Win32) PHP/5.3.0;


Last-Modified: Sat, 16 Jan 2010 21:16:42 GMT;
Content-Type: text/plain;
charset : windows-1251;
Content-Language: ru;
X-Powered-By X-Cache


01.05.2017 35
. ..
HTTP Response

status version status code phrase -L

header field name value -L

headers

header field name value -L

blank line -L

body


01.05.2017 36
. ..

: :
GET /wiki/ HTTP/1.1 Host: HTTP/1.1 200 OK Date: Wed, 11 Feb 2009
ru.wikipedia.org User-Agent: Mozilla/5.0 11:20:59 GMT Server: Apache X-Powered-
(X11; U; Linux i686; ru; rv:1.9b5) By: PHP/5.2.4-2ubuntu5wm1 Last-Modified:
Gecko/2008050509 Firefox/3.0b5 Accept: Wed, 11 Feb 2009 11:20:59 GMT Content-
text/html Connection: close ( Language: ru Content-Type: text/html;
) charset=utf-8 Content-Length: 1234
Connection: close
( )
(
HTML)


01.05.2017 37
. ..
SMTP Simple Mail Transfer Protocol
E-mail

:
o

E-mail
o , ,
o
o


01.05.2017 39
. ..
E-mail



o

o


o
o ,

o ,
,
..

01.05.2017 40
. ..

01.05.2017 41
. ..
E-mail:
Return-Path
Received . (MTA)

MIME-Version MIME,
From: return-path SMTP MAIL
FROM:
Sender: . , - (from)
(, )
To: . (
). SMTP RCPT TO
cc: ( carbon copy). ,
bcc: ( blind carbon copy). ,
. (
, bcc , ).
Reply-To: , . , , ,
Reply-To ,
Message-ID: . - (
). : AAB77AA2175ADD4BACECE2A49988705C0C93BB7B4A@example.com.


In-Reply-To: Message-ID, (
)
Subject:
Date:
Content-Type: . (HTML, RTF, Plain text)
,
01.05.2017 42
. ..
MIME Multipurpose Internet Mail
Extension


o ,
o


01.05.2017 43
. ..

01.05.2017 44
. ..
01.05.2017 45
. ..
E-mail:

SMTP (Simple Mail Transfer Protocol)

3 (Post Office Protocol)


.

IMAP (Interactive Mail Access Protocol)


, ,

vs.

vs.

01.05.2017 46
. ..

. .. 01.05.2017 47
E-mail:

PGP PEM -


01.05.2017 48
. ..
SNMP - Simple Network Management Protocol
SNMP
:
o

SNMP (Simple Network Management Protocol)


o

o


01.05.2017 50
. ..
SNMP:


,
, ,

(Network Management System,
NMS) ,


01.05.2017 51
. ..
SNMP


01.05.2017 52
. ..
SNMP:

SNMP ,


ASN.1
:
o NMS
o


. .. 01.05.2017 53
ANS.1


01.05.2017 54
. ..
SNMP:

01.05.2017 55
. ..
FTP File Transfer Protocol
FTP

:
o
o
o

FTP (File Transfer Protocol)


o


01.05.2017 57
. ..
FTP:
FTP:
FTP TCP 21,

"User-PI" - "Server-PI

.
o FTP- :
( ), ( "User-DTP",
"Server-DTP"), , ,
, , , ,
, ,

(, "User-DTP")
.
(, "Server-DTP")

:
o "Server-DTP" "User-DTP" ,
"Server-PI"-"User-PI" .
o , FTP, ,
..

01.05.2017 58
. ..
21


01.05.2017 59
. ..
TFTP SFTP
TFTP-
o .
UDP


o TFTP :
Read request (RRQ) -
Write request (WRQ) -
Data (DATA) -
Acknowledgment (ACK) -
Error (ERROR)
SFTP-
o ,
, TFTP
, FTP
o ,
, ,
,


01.05.2017 60
. ..