IP- UDP-, UDP. UDP- . , . . , , , UDP- .
UDP
UDP , . , .
TCP
^ TCP - , . TCP ' . TCP "".
TCP , . , - . TCP , ftp, telnet .
, , IP- ' '. ' (socket). 4.3. BSD UNIX.
TCP . TCP . , . TCP , . , , . . , , . , . (Maximum Segment Lifetime-MSL). 3 .
( , UDP) (. 12.8).
> ( , ).
^> , (
> Hlen - .
^ - , .
^> , . , URG - 1.
^ - . - - . - , .
|
|
^> '.
> : URG - ; PSH - ; SYN- ( ); FIN - .
볺 :
^ 볺 S YN- , ';
> S YN- (ISN - Initial Sequence Number), ;
- 볺 SYh'- 1SN+1.
ISN. (passive open), - (active open). TCP 11 . netstat:
netstat -a -n
Proto Local Address Foreign Address State
TCP 192.168.2.30:1025 192.168.2.1:139
ESTABLISHED
TCP 192.168.2.30:1038 198.168.2.22:139 TIME_WAIT
'
TCP .
. - , , , . , . 32- . 232 - 1, .
³ , ( - ). , , - , . . (. 12.9), .
, TCP, RTT (Round Trip Time) - . .
' -* FIN .
TCP RFC 793, 1122, 2581. TCP 95 % Internet [http: // en.wikipedia.org].
13 DSN
Internet, , , , , ' .
DNS : 䳭 . RFC 882, 883, 1034, 1035, 1101, 1183. DNS 1983 p., DNS .
' . ' (, /etc/hosts), IP-. ﳿ . .
|
|
DNS .
1. TCP/IP :
a) Ethernet IEEE 802.3; ) IP; ) ARP; ) TCP.
2. (anycast) :
) ;
) ;
)
;
) .
3.
:
); 6) IP; ) ARP; ) IGMP.
13.1,
80- pp. DNS. . (. 13.1), .
, , com -
, int - , mil- , net - , de - ͳ, - .
' (Fully Qualified Domain Name (FQDN)). . , hostl ' :
hostl.acme.kyiv.ua.
( -) .
' , , , , ' "" . , myserver host2
host2
"" . TCP/IP : , .
. -edu, gov, mil, net, org. , . . :
^> ,
^> 12 ;
> .
, , .
13.2. DNS
DNS- , ' - . DNS, ' , . , , , , - (zone of authority). - .
, DNS, , 볺-. : > , > 쳭,)> .
. . ³ . ³ "'''', . ' , , 볭 . . DNS . , .
, , UPS. DNS.
|
|
^ (Primary Name Server) .
> (Secondary Name Server) , . ﳿ voymc.
> (Cache only server) , .
( ).
, DNS, -'. , . . .
볺 DNS . , . , , .
ϳ , . , - ( , - ). ³ . , dom.isc.arizona.edu., isc.arizona.edu, arizona.edu, edu, . , 쳭 .
. lion.cf.iton.edu. dn.isc.arizona.edu.
dn.isc.arizona.edu. ³ arizona.edu edu. ֳ , sdu iton.edu. . iton.edu. ;
cf.iton.edu lion. 볺. ϳ :
;> dn.isc.arizona.edu lion;
^ dn.isc.arizona.edu iton.edu;
^> iton.edu cf.iton.edu.
DNS
DNS - , .
(RFC 882,1035,1183). :
[] [] [] ,
* - ' , . , , ,
. , . '
;
* - , ;
* - , 䳺 . I(Internet);
* - , ;
* - , .
:
|
|
> . , , 䳿 ;
> . ֳ , ;
> . ̳ .
. SOA
, , . .
SOA . 䳺 , . .
@ IN SOA ns.cs.colorado.edu admin.cs.colorado.edu.
(1001; Serial
21600; Refresh, 6 hours
1800; Retry, 30min
1209600; Expire, 2 weeks 432000); Minimum 5 days
> @ . " ns.cs.colorado.edu ' . ^ admin.cs.colorado.edu. - .' .
^ Serial . . . .
" Refresh - .
> Retry , .
^ Expire .
^> Minimum . dz DNS, .
. NS
NS. ֳ . , SOA. :
[] [] [] NS '_ ' SOA. :
cf.iton.edu. IN NS nsl.cf.iton.edu. cf.iton.edu. IN NS ns2. cf.iton.edu. cf.iton.edu. IN NS add_s. cf.iton.edu.
() . . NS . . , NS.
, .
( ) IP-.
:
lion IN A 196.168.2.1
' .
PTR IP- ' -. PTR .
PTR. , IP ' . netstat, sendmail, syslog, XWindow, ftp, finger, rlogind .
:
[] [] PTR '__
. "" . . , 192.168.2.1 : 1.2.168.192
, . ' . .
. ³ : ' , DNS ' . PTR . NNN.IN-ADDR.ARPA, NNN - IP-. ,
' 1.2.168.192. IN-ADDR.ARPA. , ' . PTR NNN.IN-ADDR.ARPA, (SOA, NS, PTR). 127. IN-ADDR.ARPA.
̳ PTR .
CNAME , .
HINFO '.
|
|
WKS , .
. .
DNS , . DNS - , , , .
13.4.
, DNS BIND (Berkeley Internet Name Domain). 쳭 .
. named. gethostbyname gethostbyaddr. -,
߲ - , ^~,.: ,~?----------
__ ______________.,_ vr ^**.<..*! ^*, /.. CC^/Ot^/f &).
. named . etc/named.boot:
directory '__
cache '_
primary '_
secondary IP- '_
forwarders IP-
xfrnets IP-
bogusns IP-
:
¥ directory , , ;
# cache (.) (/etc/named.), .
, ;
# primary , ' , ;
# secondary , IP- , ' -,
. , , named . primary
secondary, , - ;
¥ forwarders . - - , . . , , . , . - . , . . , ;
# xfrnets ,
DNS;
# bogusns ,
. 볺
볺 (). 볺 /etc/resolv.conf. ³ , , .
search , ' .
. - , . . . - . , . IP-.
, , , .
13.5. DNS
DNS BIND v. 4.9. Internet (Internet Software Consortium) 4 BIND 8. :
<=> DNS;
(Notify, RFC 1996);
=> IP v.6;
=> ;
^> .
BIND 8 DNS , , , " - " (master - slave). , - ﳿ.
. . . NOTIFY (RFC 1996). ϳ NOTIFY. ϳ
.
. . ' .
DNS 볺 .
DNS DHCP. DHCP 볺 , Netbios IP-. ϳ 䳿 IP- .
BIND 8, , ( allow-transfer, xfrnets).
allow-query DNS- . "" DNS .
( RFC 2137) ;
IETF (- - Transactional Signature (TSIG) 볺. , DNS- (DNS-spoofmg).
1. DNS:
) ;
) , DNS;
) ;
) , 볺 DNS.
2. IP- DNS:
) ; ) PTR; ) SO ; ) NS.
3. DNS:
) DNS ' , ;
) ﳿ DNS, ;
) ;
) .
14 ز Ʋ TCP/IP
14.1.
' TCP/IP - '. - :
<=> IP-adpeca;
<=> DNS;
^> .
RARP
ARP (RFC 826) IP- . RARP (RFC 903) - IP-. , IP-, - -. RARP IP-.
RARP ? 볺 - . UNIX - /etc/ethers, :
2:80:8:48:25:48 hostl 4:6b:8a:48:25:49 host2
IP- DNS hosts. RARP IP-.
(Bootstrap protocol, RFC 951) - '. .
볺, , BOOTREQUEST, - 볺
255.255.255.255. BOOTREPLY. ϳ UDP 67 () UDP 68 (볺). , .
, : > >- , ^ DNS, >-, > , >- . 볺 ().
DHCP
TCP/IP DHCP (Dynamic Host Configuration Protocol, RFC 1541, 1534). DHCP - . ³ , (67, 68) (BOOTREQUEST, BOOTREPLY). DHCP .
DHCP :
^ 볺 ;
^ ;
^> .
DHCP. DHCP. , DHCP. ϳ (볺 DHCP) "discover message" - . DHCP . 볺 . DHCP "" . 볺 . DHCP - . DHCP 볺 .
14.2.
( -
). (, ). :
> , , ;
^ ;
^ (, (), ).
, , , , , , .
ATM. Ethernet, Ethernet , . Internet TCP/IP , ' ( ), " " . (), .
TCP UDP . RTP, RSVP, RTCP, IP Multicast , .
:
ӿ (Real Time Reservation Protocol) ;
^> RSVP (Resource reservation Protocol) ' (, RTP);
> RTCP (Real Time Transport Control Protocol) ' .
RTP
RTP (RFC 1889), UDP. , RTP , , RTP- ( ). . 14.1.
:
> ();
> (padding) , 32- ;
> , ;
> ;
> ( );
> ;
> ;
> ;
> , .
ֳ RTP , . RTP- (). . . . , . RTP-.
RTP , IGMP.
RTCP
ϳ RTP ', 곭 , . <' """ , ^ RTCP (RFC 1889). ³, RTP, UDP
RSVP
RSVP , , . ³ , .
, . RSVP , , , ATM Frame Relay. ³ - (^, ^, ^ ). "", . , , - , . , , . - , . . , , .
RSVP Resv Path. Resv . . Path ( Resv).
RSVP ^ (admission control) ^ (policy control). , - - . : > (packet classifier) > (packet scheduler). , , .
Http
HTTP 1.0 (Hypertext transmission protocol) RFC-1945. HTTP . - HTML-. , , .
HTTP
HTTP : 볺 , (. 14.2). -, 볺 볺 .
CR LF, :
[method] [request_URI] [HTTP_Version] [headerl_fieldname]: [fieldl_value] [header2_fieldname]: [field2_value]
[headerN_fieldname]: [fieldN_value]
[data] POST /default.htm HTTP/1.0
Accept: image/gif, *.*
Accept-Language: en
User-Agent: WebSpy (c)
<HTML> <H1> Hello! </Hlx/HTML>
CRLF .
[HTTP_Version] [Status_code] [Reason_Phrase] , ;
[headerl_fieldname]:
[headerN_fieldname]: [fieldN_value]
[data]
CRLF . : .
GET /qthief.htmHTTP/1., URI, .Accept: image/gif, image/x-bitmap, image/jpeg, */*
; , .Accept-Language: en
-Agent: Mozilla/1. 22 (compatible; MSIE 2.0; Windows 95)
; 볺 , aaroiTConnection: Keep-Alive
; ϳ .
If-Modified-Since: Sunday, 17-Apr-96
; , .
²².
/1.0 200 200 - .Date: Sun, 21 Apr 1996 02:20:42 . Server: Microsoft-Internet-Information-Server / . .Connection: keep-alivenoronaceHHH
.Content-Type: text/ntmlTnn .Last-Modified: Thu, 18 Apr 1996 17:39 .Content-Length: 2543 .<HTML> any data</HTML>flaHi
_ , . , ,
* , ', .
: , , , 304, Not modified.
GET- HTML-, , . If-modified-Since .
HEAD - . .
POST-. , . , URI , . POST- .
'. POST .
HTTP 1.1. : PUT POST, ' , ' ; PATCH- ', COPY, MOVE, DELETE - , , ', LINK, UNLINK- ' ', OPTIONS , ; TRACE- 볺 ().
web- , . ' : ^Informational, ^-Successful, ^Redirection, >Client Error, >Server Error 100, 200, 300, 400, 500
74.4. if
| # IP- - IP-.
IP ' (routers) ' (hosts). ' . , .
(. 14.3).
( TCP/IP), -, . IP- , . 2
, , (default). , , .
:
1. IP- -
.
2.
.
3.
,
.
4.
,
.
5.
, ,
.
6.
.
, - IP- "&".
& - ( , , ).
: > RIP (Routing Information Protocol) RFC 1058, 1721, 27- .
Xerox. , - . OSPF;
* OSPF (Open Shortest Pass First) RFC 1850, 1523, 1587, 1584 - , , ;
> EGP (Exterior Gateway Protocol) RFC904, 911,1092, 1093- . . BGP;
BGP (Border Gateway Protocol) RFC 1267, 1771, 1655, 57- ;
-> IGRP (Interior Gateway Routing Protocol) - , CISCO . OSPF.
, , (. 14.3).
BGP
BGP (Border Gateway Protocol) (RFC - 1267, 1655,1771-74). , , - . . RIB (Routing Information Base).
' . ( ' , - ). , .
, , , , , , , , , .
14.5. ϳ: TCP/IP
TCP/IP (. 14.4).
http://www.oracle.com. HTTP, 80. IP . DNS IP 141.146.8.66.
TCP, - IP. IP IP- (1).
. ARP - .
(1). 1 (2), . , 1 - " " 볺. 2 , . - , - . , , , 80 . TCP - , TCP web- .
1. 볺 (bootpd), :
) IP- - ';
) ';
) IP-;
) DNS;
) IP- .
2. - :
) : ;
) ;
)
, ;
) ;
) ;
) TCP.
3. RTP:
) ;
) ;
) ;
)
.
4. RSVP:
) -
;
) ;
) ;
) , .
TCP/IP , .
, ' . ' Windows 2000 Windows . ' .
TCP/IP Internet. . Windows 2000 Windows\System32\Drivers\etc.
Hosts
' IP- '. , :
IP- '
:
127.0.0.1 localhost
192.168.3.24 myhostl 192.168.2.14 myhost2
Services
services , , . :
<service name> <port number>/<protocol> [aliases...] [#<comment>]
service name - , port number - , protocol - (tcp udp), aliases - . , .
:
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users #Active users
systat 11/tcp users #Active users
daytime 13/tcp
daytime 13/udp
qotd 17/tcp quote #Quote of the day
qotd 17/udp quote #Quote of the day
chargen 19/tcp ttytst source ^Character generator
chargen 19/udp ttytst source #Character generator
ftp-data 20/tcp #FTP, data
ftp 21/tcp #FTP. control
telnet 23/tcp
smtp 25/tcp mail #Simple Mail Transfer Protocol
Networks
networks IP- .
:
<network name> cnetwork number> [aliases...] [#<comment>],
network name - , network number - IP- , aliases - . :
loopback 127 campus 284.122.107 london 284.122.108
Protocol
.
:
<protocol name> <assigned number> [aliases...] [#<comment>],
protocol name - , assigned number - , aliases - .
Ping
'.
, ping - -
_, ---- '.
:
ping [-t] [-a] [-n count] [-1 length] [-] [- ttf] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list
-
3.T>aeeft
yf - , . TTL. - TTL , - -
, . :
tracert [-d] [- maximum_hops] [-j computer-list] [-w timeout] target name
Ipconfig
TCP/IP. : ipconfig [/all | /renew [adapter] | /release [adapter] ]
Netstat
TCP . :
netstat [-] [-] [-n] [-s] [-p protocol] [-r] [interval]
Hostname
. :
hostname
Route
. :
route [-f] [-p] [command [destination] [mask subnetmask] [gateway] [metric costmetric]]
1. Hosts, Services, Networks
'.
.
2.
' .
3.
'. .
'. .
4.
.
5.
. .
6. internet
'. .
7.
. .
8. IV
ֲͲ ò INTERNET
INTERNET ò ֲ
IJͲ ղ
ò ί
15
INTERNET ֲ
, ' .
㳿, Internet. 㳿 - World Wide Web (WWW, Web-).
Internet
Internet ̳ ARPA (Advanced Research Projects Agency) 1969 p. ARPANET ' . 1973 p. ARPA ' ' (Internetting project) . ' . . ARPANET ', , , . 1983 . ARPANET TCP/IP, , . ARPANET MILNET ARPANET, . 1990 p. ARPANET . ARPANET Internet. , Internet , NSF (National Scientific Foundation). NSFNET, ' ' (45 /) Internet. InternetMCI, Sprint Link, ANSNET.
Internet
+Internet - , , TCP/IP..., ' . Internet TCP/IP.
Internet , , , - InternetMCI, Commercial Internet Exchange, - EBONE, NORDUnet, DANTE, EUnet. . , Internet, Internet, .
, Internet - , , .
Internet UNIX.
³ (telnet)
11 ^ Telnet - , -\ \