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

IP Sub-networking Mini-Howto

Robert Hart, hartr@interweft.com.au


Ilgiz Kalmetev ilgiz@mail.rb.ru

v1.0, 31 March 1997

IP -
A, B C, .

3 IP

4 ?

5 ?

6 IP

1
GNU (GPL).
InterWeft IT Consultants (Melbourne, Australia).
InterWeft WWW InterWeft IT Consultants
http://www.interweft.com.au/ Linux Documentation Project http://sunsite.unc.edu/LDP.

2
IP
.
IP ,
.
IP C - A B
.

2.1
,
IP . : Linux http://sunsite.unc.edu/LDP/LDP/nag/nag.html
Linux http://linuxwww.db.erau.edu/SAG/.
TCP/IP Craig Hunt, OReilly and Associates
http://www.ora.com/catalog/tcp/noframes.html.

3. IP

3 IP
, IP .

3.1

IP - !

, - IP . IP
. Eh - ?
( ) IP
( IP ).
( ) -
IP .
6 (, ) 6 IP
- , .
, IP !
, , IP .
, IP .
( ) Internet
IP .

3.2

IP " "

(IPv4) IP, IP 4 (8 ) -
32 . , (
). (
) IP "- ". IP

192.168.1.24

- 4 () , (.) .
- 8- ,
0 255 ( 256 - , -
).
, IP , ,
IP (oops - ). ,
ID () ,
.

3.3

IP

IP
A IP 8 ( ) ,
24 ( ) .
A ,
0 127 . 128
A, 33,554,430 .
0.0.0.0 ( ) 127.0.0.0 (loop back )
.
126 A.
B IP 16 ( )
, 16 ( ) .
B 1 0.

3. IP

14 , 32767 B.
B 128 191,
32,766 .
C IP 24 ( )
, 8 ( ) .
1 1 0.
14 , 4,194,303 B.
B 192 255,
254 . C , 223,
.
:

A
B
C

()

1 126
128 191
192 254

, -
, IP, Internet. : A 10.0.0.0
16 B 172.16.0.0 - 172.31.0.0
256 192.168.0.0 - 192.168.255.0
, ,
.

3.4

IP : IP ( IP , - ,
Ethernet). ()
0 ( -
);
IP ( IP ).
()
1 ( - ,
).
( Ethernet- PPP , ,
). ,
- .

A ... ( , )
10.0.0.0
10.0.1.0
10.255.255.255

, 0.

,
1

B... ( , )

4. ?

172.17.0.0
B
172.17.0.1

172.17.255.255

C... ( , )
192.168.3.0
C
192.168.3.42
192.168.3.255

IP C.

3.5

. "
".
IP IP ,
, .
(-) - 1
0. , : A - : 255.0.0.0
B - : 255.255.0.0
C - : 255.255.255.0
: IP (
- );
- IP - IP
.

4 ?
- , , IP ,
IP
. , IP .
- "": IP
, , - IP .
: - , .

5 ?
IP,
A, .

: ,
.
: A ,
( ) .
.

6. IP


. , Ethernet, Token Ring, FDDI, ATM
- !
:
( )
, .
IP IP
. ISP,
IP .
, .
, ,
-
;
,
,
.
.

( ).

IP

IP , ?
, :
( -
);
/ , ,
, IP
.
;
IP
;
, /
;
, !
, , 192.168.1.0
254 () (192.168.1.0)
(192.168.1.255).

6.1

, ,
.
(,
.).

6. IP

.
, ,
. Usenet (
comp.os.linux.networking).

6.2

IP
.
IP , (), - IP
.
IP -
IP , .
, IP , ,
-
() ; 4 ()
.
4 IP : IP -
.
.
.
- !
, .
, .
, IP 2n ( n -
IP ) (
).
-
, ,
, .

6.3

- , IP
.
- IP - ,
1, 0.
, IP : A (8 ) : 255.0.0.0
B (16 ): 255.255.0.0
C (24 ): 255.255.255.0

,
. ,
, ,
() 1.
C, 11111111.11111111.11111111.10000000 255.255.255.128
192.168.1.0, :-

7.

2
4
8
16
32
64

126
62
30
14
6
2


255.255.255.128
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252

(11111111.11111111.11111111.10000000)
(11111111.11111111.11111111.11000000)
(11111111.11111111.11111111.11100000)
(11111111.11111111.11111111.11110000)
(11111111.11111111.11111111.11111000)
(11111111.11111111.11111111.11111100)

, ,

. , , IP
!
, IP ,
( ,
, ).
,
- IP . ,
() ,
:

Bcast
MinIP
MaxIP


-------------------------------------------------------------------------128
2
0
127
1
126
126
128
255
129
254
126
252
192

224

0
64
128
192

63
127
191
255

1
65
129
193

62
126
190
254

62
62
62
62

248

0
32
64
96
128
160
192
224

31
63
95
127
159
191
223
255

1
33
65
97
129
161
193
225

30
62
94
126
158
190
222
254

30
30
30
30
30
30
30
30

240

, ,
.
.
, IP
.

7
Linux PC (
) , IP Forwarding .
cat /proc/ksyms | grep ip_forward

- ...
00141364 ip_forward_Rf71ac834

7.

, IP-Forwarding
.
, , IP C
192.168.1.0 4 ( 62 IP / ).
, . :
192.168.1.0
192.168.1.64
182.168.1.128

192.168.1.63
192.168.1.127
192.168.1.255


255.255.255.192
255.255.255.192
255.255.255.126

62
62
124 (. .)

: , 124
( 126 ) ,
. 192.168.1.192
. 192.168.1.191
.
, 192.168.1.191 192 ,
.
-
.

7.1

, Linux
.
( ).
, Linux IP
. :

eth0
eth1
eth2

IP
192.168.1.1
192.168.1.65
192.168.1.129


255.255.255.192
255.255.255.192
255.255.255.128

:
Destination
192.168.1.0
192.168.1.64
192.168.1.128

Gateway
0.0.0.0
0.0.0.0
0.0.0.0

Genmask
255.255.255.192
255.255.255.192
255.255.255.128

Iface
eth0
eth1
eth2

IP
( ). Linux PC /,
IP Linux, .
Robert Hart Melbourne, Australia March 1997.