IP
IP . , , . . IP, . , IP . , , IP.
IP
. RFC 791. IP (Internet Protocol) TCP/ IP . , . IP , , Ethernet ATM, IP-. , IP-, IP .
, IP, . IP , , , .
IP , ( ) . IP , , . IP , . , , TCP UDP. IP , . , . . . 2.1 IP-.
4 | 4 | 8 | 16 | |||
(16 ) | (3 ) | (13 ) | ||||
(8 ) | (8 ) | (16 ) | ||||
(32 ) | ||||||
(32 ) | ||||||
( ) | 32- | |||||
. 2.1. IP
|
|
(Version) IP. 4, 6.
(Header Lenght) 32- . 5 (20 ). , .
- (Type of Service) . IP . : , , . , . . , .
- (Time to live). IP- (), . , . , , IP . (TTL Time To Live). ; TTL . IP : TTL , , . TTL 8-, , 4,25 . TTL , (TCP) - , .
- (Identification) , . - .
(Total Length) ( ). 65 535 . . 576 . . . , . , . IP. . . (MTU Maximum Transmission Unit). , Ethernet 1500 , FDDI 4096 . , , . IP : , , . . , , 16- . . . , IP- , . , 16-, ( , 2 ), 546 . , 64 , 300 /. MTU Discovery, MTU . . , . , . . .
|
|
(Flags) . , . .
. , 8. . MTU.
------------------------------------------------------------------------
TearDrop Fragmentation. DoS (. 4) ( ) IP. , NewTear, Nestea, SynDrop Bonk. , , IP, UDP. UDP, , , , , Windows NT STOP 0x0000000A 0x00000019. ISS (Internet Security Systems), , Windows NT, Windows 95, Linux. Microsoft , ( Q179129 STOP 0x0000000A or 0x00000019 Due to Modified Teardrop Attack): http://sup-port.microsoft.com/suppo rt/kb/articles/ql79/l/29.asp.
|
|
(Protocol) , . , . 2.1 () ,
. , , . . , . , . , . , UDP, TCP, ICMP OSPF.
(Source Address, Destination Address) . 32- IP- .
(Options) . , , . . , 32- (Padding). .
IP RFC 990 RFC 997. TCP/IP . , . : . , .
, TCP/IP, . , , . . , , , . , , , , . . . , , , , . , .
IP 1981 , , , 32- . . , . . (. . 2.2).
|
|
1 2 3......30 31
. 2.2.
. , IP- . , . , , , , .
, IP , . 32- . . 2.3 .
, , , . , 10, 15 16- .
, 255. . . , , . : , . . . IP ( 4) 232 (4 294 967 296), 32 . .
, . 8- , 1, 7 . 24 . . /8, 8- (7 + 1 = 8).
, , 126 (27-2). 16 777 214 (224-2) . 231 (2 147 483 648) , IP 4 232 (4 294 967 296) , 50% .
, . 16- , 10, 14 . 16 . /16.
, , 16 384 (214). 65 534 (216-2) . 230 (1 073 741 824) , 25% .
. 24- , 110, 21 . 8 . /24.
|
|
2 097 152 (221). 254 (28-2) . 229 (536,870,912) , 12,5% .
. D 1110. . 1111, .
, . . IP , . IP-. 8 . 2.4 , - .
2.2 . XXX .
IP- . . 2.3 IP-.
IP- , . IP-, 1, . ; IP- , < 0. 127.0.0.0 , TCP/IP ! , . , IP, IP- , 127.
IP (. 2.4). : N , ! . , D , .
, (broadcasting), . , , , . IP : (directed) (limited). , . , , .
, . , 185.100.255.255 185.100.0.0 185.100.xxx.xxx . , , IP-, . RFC 1812.
Cisco Systems . . , . no ip directed-broadcast . EthernetO:
Router(config)#int ethQ Router(config)#no ip directed-broadcast
, , . , , IP-. . . , 255.255.255.255 0.0.0.0 .
( ) TCP/IP, . Internet Network Information Centre (InterNIC), . 1993 IP- Network Information Center (NIC).
Defense Data Network (DDN), . InterNIC , , , .
1985 RFC 950 , , . :
;
.
IP. . . 2.5 , : .
, . IP- , , . , , . , . .
, . ,
. .
. 2.6 , , . , 130.5.0.0 , , , .
:
, ;
;
, .
, . (. . 2.7).
(subnet mask). , , . IP-. , .
IP- . , , . , , . 32- , . :
255.0.0.0 ;
255.255.0.0 ;
255.255.255.0 .
, 130.5.0.0 , 255.255.255.0. : 1, , , IP- . , IP- , , . , , . . 2.8 IP- .
, (. . 2.9).
, , , . . , 130.5.5.25 255.255.255.0 130.5.5.25/24. 24 ,
255.255.255.0 24. , - . 2.10 .
. , . , , . - .
IP, :
1. ?
2. ?
- : ( . 0 7) . ,1 #4 4 (000001002) . 2.5. .
#1. 32.
Cisco Systems ConfigMaker v2.4 , IP Subnet Calculator. , , (. . 2.12).
RFC 950, , . , , . , RIP ( RIP-1), , 193.1.1.0 /27 193.1.1.0 /24 . . , . , 193.1.1.255 193.1.1.0/24 193.1.1.224/27. 2.13 .
, (OSPF, IS-IS) , RFC 950 , . . : , IGP, ; . , .
(. 2.6) 5 . 30 (25 - 2 = 30), 1 30. N
N . , , ^ #28 #2, 28 (111002) #2. . 25 #2.
, : #N , #(N+1). , #2 (193.1.1.95) #3 (193.1.1.96).
:
1. , ?
2. , , ?
IP- , IP-, IP- . , , . , , .
, , . . Ȼ IP- . , IP- . , . , . .
. 2.7 2.8 ( ) .
193.1.1.0 /24 . RFC 1219 , . , . , 4 , : 8 (10002), 4 (01002), 12 (11002), 2 (00102), 6 (01102) . . , , . , (. 2.9).
, . IP-, . , , . . , IP- . , , . .
, , : . . 255.255.255.255. , . , . , , . , , 128.1.< ->.< >, 128.1.255.255,128.1.0.255,128.1.255.0 128.1.0.0.
, ( ) ( ) ( ). , : , , , ,
, . IP-, . , , . . , IP- . , , . .
, , : . . 255.255.255.255. , . , . , , . , , 128.1.< >.< >, 128.1.255.255,128.1.0.255,128.1.255.0 128.1.0.0.
, ( ) ( ) ( ). , : , , , ,
, . , , . . , IP , . , , , . , , . Cisco Systems , . , ip subnet-zero .
Routerfconfigure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip subnet-zero
, , :
Routerfconfigure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip subnet-zero
Router(config)#interface sen all
Router(config-if)#ip address 192.168.1.2 255.255.255.224
Bad mask /27 for address 192.168.1.2
IP-
. , 140.25.0.0/16 ( 140.25.0.0 ). , 60 . , 60 . , 2. , , , 60 , 60 . 64 = 26. , 2, , , . , :
(60+2=62) < 64. , , . 128 (27) 27- 2 = 126, , 66 (126 - 60) . , 7 .
. 32- IP- 7 , /25 (32 - 7 = 25). 25- - 255.255.255.128. 2.14 .
, 25- 9 . : 29= 512, 9 512 . , . , . , , . .
512 0 511. 9 0 511, :
0(0000000002). 1(0000000012). 2(0000000102). 3(0000000112),.....,511(1111111112).
, 3 (#3) 3 (000000011)2 9 . . , 9- :
: 10001100.00011001.00000000.0 0000000 = 140.25.0.0/16 #0: 10001100.0001100. 00000000.0 0000000 = 140.25.0.0/25
#1: 10001100.00011001. 00000000.1 0000000 = 140.25.0.128/25
#2: 10001100.00011001. 00000001.0 0000000 - 140.25.1.0/25
#3: 10001100.00011001. 00000001.1 0000000 = 140.25.1.128/25
#4: 10001100.00011001. 00000010.0 0000000 = 140.25.2.0/25
#5: 10001100.00011001. 00000010.1 0000000 = 140.25.2.128/25
#6: 10001100.00011001. 00000011.0 0000000 = 140.25.3.0/25
#7: 10001100.00011001. 00000011.1 0000000 = 140.25.3.128/25
#8: 10001100.00011001. 00000100.0 0000000 = 140.25.4.0/25
#9: 10001100.00011001. 00000100.l 0000000 = 140.25.4.128/25
#510: 10001100.00011001. 11111111. 0 0000000 = 140.25.255.0/25
#511: 10001100.00011001. 11111111. 1 0000000 = 140.25.255.128/25
, 7 . , 126 . 1 126. #3. , 7- :
#3: 10001100.00011001.00000001.1 0000000 = 140.25.1.128/25
#1: 10001100.00011001.00000001. 1 0000001 = 140.25.1.129/25
#2: 10001100.00011001.00000001. 1 0000010 = 140.25.1.130/25
#3: 10001100.00011001.00000001. 1 0000011 = 140.25.1.131/25
#4: 10001100.00011001.00000001.1 0000100 - 140.25.1.132/25
#5: 10001100.00011001.00000001.1 0000101 = 140.25.1.133/25
#6: 10001100.00011001.00000001.1 0000110 = 140.25.1.134/25
#62: 10001100.00011001.00000001. 1 0111110 = 140.25.1.190/25
#63: 10001100.00011001.00000001. 1 0111111 - 140.25.1.191/25
#64: 10001100.00011001.00000001.1 1000000 = 140.25.1.192/25
#65: 10001100.00011001.00000001.1 0000001 = 140.25.1.193/25
#123: 10001100.00011001.00000001. 1 1111011 = 140.25.1.251/25
#124: 10001100.00011001.00000001. 1 1111100 = 140.25.1.252/25
#125: 10001100.00014001.00000001. 1 1111101 = 140.25.1.253/25
#126: 10001100.00011001.00000001. 1 1111110 = 140.25.1.254/25
#3 , :
10001100.00011001.00000001. 1 1111111 = 140.25.1.255.
, #3 #4 (140.25.2.0).
. 132.45.0.0/16. 8 . 3 . /19 ( 255.255.224.0). :
#0: 10000100.00101101. 000 00000.00000000 = 132.45.0.0/19
#1: 10000100.00101101. 001 00000.00000000 = 132.45.32.0/19
#2: 10000100.00101101. 010 00000.00000000 = 132.45.64.0/19
#3: 10000100.00101101. 011 00000.00000000 = 132.45.96.0/19
#4: 10000100.00101101. 100 00000.00000000 = 132.45.128.0/19
#5: 10000100.00101101. 101 00000.00000000 = 132.45.160.0/19
#6: 10000100.00101101. 110 00000.00000000 = 132.45.192.0/19
#7: 10000100.00101101. 111 00000.00000000=132.45.224.0/19
#3 (132.45.96.0/19, 10000100.00101101.011 00000.00000000):
#3: 10000100.00101101. 011 00000.00000000 = 132.45.96.0/19
#1: 10000100.00101101. 011 00000.00000001 = 132.45.96.1/19
#2: 10000100.00101101. 011 00000.00000010 = 132.45.96.2/19
#3: 10000100.00101101. 011 00000.00000011 = 132.45.96.3/19
#8190: 10000100.00101101. 011 11111.11111110 = 132.45.127.254/19
#3 (132.45.96.0/19): 10000100.00101101. 011 11111.11111111 - 132.45.127.255/19
200.35.1.0/24. 20 . . 5 . /27 (32-5=27). 30 (32-2=30), 8 (23).
:
#0: 11001000.00100011.00000001. 000 00000 = 200.35.1.0/27
#1: 11001000.00100011.00000001. 001 00000 = 200.35.1.32/27
#2: 11001000.00100011.00000001. 010 00000 = 200.35.1.64/27
#3: 11001000.00100011.00000001. 011 00000 = 200.35.1.96/27
#4: 11001000.00100011.00000001. 100 00000 = 200.35.1.128/27
#5: 11001000.00100011.00000001. 101 00000 = 200.35.1.160/27
#6: 11001000.00100011.00000001. 110 00000 = 200.35.1.192/27
#7: 11001000.00100011.00000001. 111 00000 = 200.35.1.224/27
, #6 (200.35.1.192/27):
#6: 11001000.00100011.00000001. 110 00000 = 200.35.1.192/27
#1: 11001000.00100011.00000001. 110 00001 = 200.35.1.193/27
#2: 11001000.00100011.00000001. 110 00010 = 200.35.1.194/27
#3: 1001000.00100011.00000001. 110 00011 = 200.35.1.195/27
#29: 11001000.00100011.00000001. 110 11101 = 200.35.1.221/27
#30: 11001000.00100011.00000001. 110 11110 = 200.35.1.222/27
200.35.1.192/27 : 11001000.00100011.00000001. 110 11111 = 200.35.1.223/27