48
Компьютерные системы и сети Выпуск 3

PRO 3 5 - dlink.ru

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

PRO_3_5.indd ..
:
.. (), - . .. , - .-. .. , - . .. , - . .. , - . .. , .. , - . .. , . . .. , - . .. , - . .. , - . .. , -.

-
09.00.00 « » (),
/
09.00.00 « »
2019
004.7 32.973.202 50
: «», - . .. ;
«1», . . ..
50 , ..
TCP/IP : / . . , . . , . . . — : . .. , 2019. — 638, [2] . : . — ( ).
ISBN 978-5-94627-179-0
TCP/IP — - . TCP/IP. , , PPP, PPP, oE, PPPoA, PPTP L2TP, .
IP 4 6, NAT, - IP. ARP, Gratuitous ARP Proxy ARP. ICMP 4 6. IPv6, , , NDP.
. - , , OSPF, 3. TCP UDP. - Telnet, SSH, SSL/TLS, DHCP, DHCPv6. - TCP/IP.
. - . - . .. D-Link - - .
004.7 32.973.202
5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1. TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.1. TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2. TCP/IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1. PPP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3. Link Control Protocol (LCP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4. Network Control Protocol (NCP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.5. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.5.1. Password Authentication Protocol (PAP) . . . . . . . . . . . . . . . . . . . 26 2.5.2. Challenge Handshake Authentication Protocol (CHAP) . . . . . . . 28 2.5.3. Microsoft Challenge Handshake Authentication Protocol (MS-CHAP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.6. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.7. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.8. PPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.9. PPP Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.10. PPP ATM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.10.1. ADSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.10.2. ATM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.11. PPTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 2.12. L2TP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 2.13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3. IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 3.1. IP 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
3.1.1. Type of Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.1.2. IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 3.1.3. IP-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.1.4. IPv4. . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 3.1.5. IPv4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 3.1.6. IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 3.1.7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 3.1.8. (VLSM) . . . . . . . . . . . . . . . . . . . . . . . . 103 3.1.9. IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 3.1.10. NAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 3.1.11. IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.2. IP 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 3.2.1. IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 3.2.2. IPv6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 3.2.3. IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 3.2.4. IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 3.2.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 3.2.6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 3.2.7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6

3.2.8. IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 3.2.9. IPv6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3.3. IP . . . . . . . . . . . . . . . . . . . . . . 141 3.3.1. IPSec. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 3.3.2. Encapsulating Security Payload (ESP). . . . . . . . . . . . . . . . . . . . . . 154 3.3.3. Internet Key Exchange (IKE). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 3.3.4. NAT IPSec . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 3.3.5. IPSec- . . . . . . . . . . . . . . . . . 174
4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 4.1. ARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 4.2. Gratuitous ARP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 4.3. Proxy ARP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 4.4. IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
5. ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 5.1. , ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 5.2. ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 5.3. ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
6. NDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.1. IPv6 . . . . . . . . . . . . 195 6.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 6.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 7.1. IP- . . . . . . . . . . . . . . . . . . . . . . 206 7.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 7.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 7.4. - . . . . . . . . . . . . . . . . . . . . 215
7.4.1. RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 7.4.2. - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 7.4.3. RIPv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 7.4.4. RIPng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
7.5. OSPF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 7.5.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 7.5.2. OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 7.5.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 7.5.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 7.5.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 7.5.6. . . . . . . . . . . . . . . 253
7.6. OSPF 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 7.6.1. OSPFv3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 7.6.2. LSA OSPFv3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 8.1. TCP UDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 8.2. UDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 8.3. TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
8.3.1. TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 8.3.2. TCP- . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
7

8.3.3. TCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 8.3.4. TCP Fast Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 8.3.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 8.3.6. TCP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 8.3.7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 8.3.8. TCP. . . . . . . . . . . . . . . . . . . . . 287 8.3.9. (ECN) . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 8.3.10. Virtual Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.1. Telnet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.2. SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
9.2.1. SSH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 9.2.2. SSH . . . . . . . . . . . . . . . . . . . . . 309 9.2.3. SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
9.3. SSL/TLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 9.3.1. SSL/TLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 9.3.2. TLS 1.2 TLS 1.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 9.3.3. Change Cipher Spec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 9.3.4. Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 9.3.5. X.509 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 9.3.6. Handshake TLS 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 9.3.7. Handshake TLS 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 9.3.8. Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
9.4. DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 9.4.1. DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 9.4.2. DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 9.4.3. DHCP . . . . . . . . . . . . . . . . 350 9.4.4. relay- DHCP. . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 9.4.5. DHCP Relay Agent Information (Option 82) . . . . . . . . . . . . . . . . . . 368 9.4.6. DHCP Local Relay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 9.4.7. DHCP Snooping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
9.5. DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 9.5.1. DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 9.5.2. DHCP (DUID) . . . . . . . . . . . . . . . . . . . . . . . 383 9.5.3. (IA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 9.5.4. Stateful DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 9.5.5. Stateless DHCPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 9.5.6. DHCPv6 Prefix Delegation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 9.5.7. DHCPv6 Relay Agent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 9.5.8. DHCPv6 Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
10. TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 10.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 10.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 10.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
10.3.1. IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 10.3.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 10.3.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
8

10.3.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 10.3.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 1. PPPoE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
1.1. PPPoE- . 430 1.2. PPPoE- . . . . . . . . . . . . . . . 439 1.3. PPPoE- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
2. PPPoE- VLAN IEEE 802.1Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 3. L2TP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
3.1. L2TP- LAC LNS . . . . . . . . . . . 450 3.2. LAC- . . . . . . . . . . . . . . . . . 456 3.3. L2TP- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
4. IP-. . . . . . . . . . . . . . . . . . . . . . . 461 4.1. VLSM . . . . . . . . . . . . . . . . . . . . 463 4.2. IP-. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
5. IP- . . . . . 467 5.1. IPv4- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 5.2. IPv6- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
6. CLI 474 6.1. . . . . . . . . . . 476 6.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
7. IPSec- . . . . . 483 8. . . . . . . . . . 493
8.1. ARP . . . . . . . . . . . . . . . . . . . . . . . . . 495 8.2. Gratuitous ARP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 8.3. IPv6- NDP. . . . . . . 499
9. RIP - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 10. OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
10.1. OSPFv2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 10.2. OSPFv3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
11. RIP OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 12. TCP SYN Flood. . . 539
12.1. TCP SYN Flood Linux. . . . . . . . . . . . . . . . . . . . . . . . 540 12.2. TCP SYN Flood . . . . . . . . . . . . . . . . 544
13. TCP Fast Open . . . . . . . . . . . . . . 547 14. FTP- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 15. - Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
9

16. - SSH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
16.1. SSH Linux . . . . . . . . . . 566 16.2. SSH Windows . . . . . . . 573
17. Web- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
17.1. Web- . . . . . . . . . . . . . . . . . 582 17.2. SSL . . . . . . . . . . . . . . . . . . . . . . . . . . 584
18. DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 19. relay- DHCP . . . . . . . . . . . 594 20. IPoE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601 21. DHCP Local Relay . . . . . . . . . . . 612 22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 . VirtualBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 . 802.1Q Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
. , - . , , . — TCP/IP.
TCP/IP — - , , . . .. D-Link - - . « » « - » « Wi-Fi». - IP-, , - , .
10 , 22 - .
1 TCP/IP, TCP/IP.
2 . , , LCP, NCP, , , , , Ethernet ATM, PPTP, L2TP, - .
3 IP 4 6, - .
4 ARP, Gratuitous ARP Proxy ARP, IPv6.
5 ICMP, , ICMP, ICMP, ping.
6 NDP, IPv6 - , , - .
7 ; IP- , , , - - , OSPF, 3.
8 TCP UDP.
11

:
DSLAM / L3




9 Telnet, SSH, SSL/TLS, DHCP, DHCPv6.
10 TCP/IP. 22 ,
. - - .
12
1.1. TCP/IP TCP/IP, ,
: Transmission Control Protocol (TCP) Internet Protocol (IP). TCP/IP ARPAnet, - (United States Defense Advanced Research Projects Agency, DARPA, ARPA). - ARPAnet - . - . , - .
1973 - ARPAnet. , 1973 , : TCP. - «Transmission Control Program». - 1974 RFC 675 «Specification of Internet Transmission Control Program».
TCP . - 1977 TCP. 1977 TCP/IP. (Jon Postel), TCP/IP , - Internet Engineering Note number 2 TCP. , , . TCP/IP TCP (Transmission Control Program) : Transmission Control Protocol (TCP) Internet Protocol (IP) . 1978 TCP. TCP IP, - , 1980 TCP version 4 IP version 4. IP 4, 1. TCP/IP ARPAnet, , 1983 — .
TCP/IP ( ), - , , , LAN, WLAN WAN, , - .
15
TCP/IP , - . 802.11 « Wi-Fi». , . . , - . - : , , - , . WAN- PPP (Point-to-Point Protocol, ). - - «-». RFC 1661 RFC 1662 . PPP . , «-»: Dial-Up, ISDN, ADSL, GPON . .
PPP, - PPP Ethernet (PPPoE) ATM (PPPoA). PPP over Ethernet (PPPoE) RFC 2516. - - , . PPPoE xDSL, ETTx FTTx. PPP over AAL5 (PPPoA) RFC 2364 PPP ATM Adaptation Layer 5 (AAL5). PPPoA ( DOCSIS) xDSL.
, - L2- - . , . - , , , .
PPP Point-to-Point Protocol, , . PPP (. 2.1):
1) . PPP - , , HDLC (High-Level Data Link Control);
2) (Link Control Protocol, LCP), - , ,
85
IP (Internet Protocol) TCP/IP (network layer). — , , . . (internetwork) (. 3.1).
. , , , - . , , . IP.
IP , . , . IP (connectionless protocol). , ,
1
4.
OSI IP-, - , , -.
, (IP-) (-) -.
OSI . . TCP/IP .
: www. dlink.ru (. 4.1).
. , . . , .
IP- , , , - .
3
4
1
-: ?
186
IP, TCP/IP . IP . , .
IP , - , - , . IP Internet Control Message Protocol (ICMP).
ICMP IP - ICMP-, - IP-. ICMP RFC 792 IP, RFC 791. 1990- - IPv6, ICMP. , ICMP ICMPv6 (RFC 4443), ICMP ICMPv4.
ICMPv4 ICMPv6 (. 5.1). — . , : Type () — ICMP; Code () — ICMP- - ;
Checksum ( ) — IPv4.
, - .
ICMPv4 ICMPv6 . , - ICMP, ICMP. . 5.1.
Type Code Checksum
: 0 7 15 31
. 5.1. ICMPv4/v6
194
6. NDP
, IPv6, IP, . , TCP/IPv4 ARP. TCP/IPv6 , , NDP (Neighbor Discovery Protocol — - ). NDP, ICMP, - , . - RFC 4861.
«» - , - . , ( L3), «» - . , - .
RFC 4861 , NDP. , . 6.1.
- . Router Discovery — - , - .
Parameter Discovery — / , MTU .
Prefix Discovery — .
. 6.1. , NDP
Router Discovery
Parameter Discovery
Prefix Discovery
Address Autoconfiguration
IP-. - -, IP- . IP- , - DNS (Domain Name System), , . , - .
, IP- - (. 7.1): (direct delivery) (indirect delivery).
, - (, Ethernet Wi-Fi). , . - . , . - , .
, . IP- , , - . - , . , - . - , , , ARP- , , .
, - ? . IP- : ()
261
IP. - , . , IP, , IP- .
IP- . - , - , , . , , .
— TCP (Transmission Control Protocol, ) UDP (User Datagram Protocol, ).
TCP , , . P - , , HTTP, FTP, SMTP .
UDP TCP , , TCP. UDP , , - . IPTV.
8.1. TCP UDP OSI
, IPv4. - , - . , / , - IP-. UDP - .
TCP/IP - . ,
299
(Application layer) OSI TCP/IP. - , . . - , . . , - .
9.1. Telnet Telnet TCP/IP. RFC 854
TCP ( 23). Telnet - , - TCP/IP (. 9.1).
Telnet : 1) ; 2) ; 3) . Telnet -
(Network Virtual Terminal, NVT). — - , . . , . - , , , , - . , Telnet - (, -, , . .). , . , , . , .
Telnet (NVT) Telnet (NVT)
NVT
. : , , IP-, , , , . . .
- - . TCP/IP OSI - .
. , , ( - ). .
10.1. -
. , . , .
. 1. . -
. : ? ? , ? - , ? , , ?
, - .
2. . - . , .
3. . , - , - , .
429
22 . - , .
1 : DIR-825/AC/G1 .......................... 1 . DES-1100-16 ...................................... 1 . DGS-3120-24TC/*RI ......................... 2 . ................................................ 2 . Ethernet ...................................................... 4 . USB-COM (RS-232)1 .................................. 2 . OC Windows ............................. 2 . OC Linux Ubuntu .................... 1 .
- :
DIR-825/AC/G1 ................................ v3.0.4 DES-1100-16 ............................................ v1.00.B29 DGS-3120-24TC/*RI ................................ v4.19.R005
, Linux, DlinkLab_18.04LTS.ova VirtualBox. - . - VirtualBox - .
Linux Ubuntu. : pppoe, wireshark, vlan, xl2tpd, vsftpd, hping3, python 2.7, curl 7.58.0, minicom, telnet, openssh, openssl, tftpd-hpa, isc-dhcp-server.
pppoe. :
$ sud apt-get install pppoe
OC Windows :
Wireshark .............................. https://goo.gl/JkpRMc PuTTY .............. https://goo.gl/DHKV2m TFTP- Tftpd .................................................. https://goo.gl/ziAPA3 FTP- Golden FTP Server .............................. https://goo.gl/jQBHKW iPerf .......................................................... https://goo.gl/zsxR6T
1 USB-COM (RS-232) , - COM- .
430
1. PPPoE
Point-to-Point Protocol over Ethernet (PPPoE) Ethernet (Access Concentrator, AC), .
PPPoE . - , PPP . «-- » Ethernet, PPP - . (Discovery). PPPoE - . , .
PPPoE - . PPPoE PPPoE-. - PPP, PPPoE PPPoE-.
1 : Windows ................................ 2 . Linux .................................... 1 . DES-1100-16 ......................................... 1 . DIR-825 .......................................... 1 . Ethernet .......................................................... 3 .
Linux: Wireshark PPPoE
: PPPoE- .
1.1. PPPoE-
PPPoE- (. 1.1). PPPoE-- , , . , . PPPoE-- . PPP- - .
PPPoE-.
443
PPPoE- ? _________________________
1. 2 Web- . 2. PPPoE-. -
→ ALG/Passthrough PPPoE. - .
3. . → → - .
4. PPPoE- 2 3.
PPPoE- ? _________________________
2. PPPoE- VLAN IEEE 802.1Q
, VLAN IEEE 802.1Q. , PPPoE- - (VLAN).
(Virtual Local Area Network, VLAN) - , , - , . , - (, ). - , . . , . - , .
IEEE 802.1Q: VLAN ID (VID) — VLAN; Tagging ( ) — - 802.1Q VLAN ;
Untagging ( ) — - 802.1Q VLAN .
tagged (- ) untagged (). untagging , Ethernet. tagging , IEEE 802.1Q.
449

IP- DNS- __________________________________________
2. 1 PPP-- :
$ ifconfig
$ sudo cat /proc/net/vlan/enp0s3.10
$ sudo cat /proc/net/vlan/enp0s3.20
3. L2TP
Layer Two Tunneling Protocol (L2TP) PPTP Layer 2 Forwarding (L2F) — , Cisco Systems. IETF L2TP - .
L2TP PPP. , PPP , IP-.
L2TP LAC LNS - -.
L2TP: L2TP Access Concentrator (LAC, L2TP) — , LNS (remote system). , LAC LNS, - L2TP. LAC (. Client LAC), PPP.
L2TP Network Server (LNS, L2TP-) — , LAC. LNS — PPP-, - LAC.
Client LAC ( LAC) — , L2TP. - LNS LAC.
Remote System ( ) — , LAC.
461
4. IP-
- IP, IP-.
IPv4 32- (4 ) . 8 (), . - .
IP- , : — (Net ID) (Host ID), . - , - , . , , , .

RFC 950. IP- — (subnetwork). , IP-: , , - .
IP- - , , , — . (bit mask), - . (subnet mask).
— 32- , - , - , , . - - IP-.
- . 2s, s — , , . 2n – 2, n — , , - , — — .
467
_______________________________________________________________ _______________________________________________________________ _______________________________________________________________ _______________________________________________________________
3. . 4.3. 4 - 2, 3 . . _______________________________________________________________ _______________________________________________________________ _______________________________________________________________ _______________________________________________________________
5. IP-
D-Link IP-- (IP Filtering), IP-. . IP-, .
, - , , .
1 : Windows ................................ 3 . DES-1100-16 ......................................... 1 . DIR-825 .......................................... 1 . Ethernet .......................................................... 4 .
: .
5.1. IPv4-
IP- , . 5.1. 2 - 3 (). .
1. 1, 2 3
, . 5.1. 2. 1, 2 3 IP--
, . 5.1.
474
6. CLI
- Web-. - (Command Line Interface, CLI). - .
CLI , , , , , .
CLI . - , sh sw, - show switch.
, CLI :
< >
config ipif <System> [{ipaddress <network_address> | vlan <vlan_name 32> | state [enable | disable}] | bootp | dhcp]
IP-, VLAN 32 .
config ipif System ipaddress 10.24.22.5/8 vlan default
[ ]
.
create account [admin | user] <username 15>
(admin user). - .
create account admin user1
483
3. system, . NVRAM :
reset system
IP - , , . IP IPv4 IPv6 - IP Security, IPSec.
IPSec (VPN). IPSec VPN, : – (Security gateway–Security gateway); – (Host–Security gateway); – (Host–Host).
« » , IPSec, , - .
VPN IPSec , . - VPN-. , VPN, - — .
« - – ».
IPSec : ; IPSec; /; .
(Security Association, SA) — , , - ,
493
Wireshark . , ? ________________________________________
, , 1 R1. ______________________________ _______________________________________________________________ _______________________________________________________________
8.
, , - , (address resolution). TCP/IP IPv4- - ARP.
ARP - «–»: ARP Request (ARP-): -, - IP-, , , .
ARP Reply (ARP-): - , .
ARP - , . , ARP-, , .
(caching). ARP- , MAC- IP- . — . ARP-.
ARP-: (Static ARP Entries), - ARP-. - , ;
(Dynamic ARP Entries) — / IP- ARP. - . , - .
ARP- , .
503

, IP- - , (routing). - , - (router). . — - .
, , . . IP-, /, - ( L3), (default gateway). IP- - — IP- ( L3), , . . . , - .
- , , - . , IP- (hop) , . . , , - . , , , .
- , (routing table). , / . - - .
. . . . . (default route). , , .
514
SW3 :
create iproute default 192.168.30.2
show iproute
SW1: ? _________________________
SW2: ? _________________________
SW3: ? _________________________
17. , - 1 2. 1 :
tracert 192.168.60.10
? ? ____ _______________________________________________________________
18. , - 2 1. 2 :
tracert 192.168.50.10
10. OSPF
OSPF (Open Shortest Path First) - . - . , - .
- , . (Link State Database, LSDB). . - , . . .
533
11. RIP OSPF
(route redistribution) - , , - . , , . RIP OSPF SW2, . 11.1, - (AS boundary router, ASBR) OSPF AS-external-LSA .
1 :
Windows ................................ 2 . DGS-3120-24TC ................................... 3 . Ethernet .......................................................... 4 . ................................................... 2 .
Windows: PuTTY
: RIPv2 OSPFv2.

1. Ethernet- 1 2 , . 11.1.
2. 1 2 IP-, . 11.1.
3. SW1, SW2 SW3 Ethernet-, . 11.1
SW1
1. 1 - RS-232. PuTTY.
2. - :
reset config
config command_prompt SW1

5. , SW2 ASBR area 0.0.0.0. - SW2 :
show ospf
6. (LSBD) SW2:
show ospf lsdb
7. SW3:
show iproute
? _______ _______________________________________________________________
12. TCP SYN Flood
TCP (Transmission Control Protocol) TCP- , - , . TCP- - (three-way handshake). TCP- TCP- SYN . SYN ACK (SYN+ACK). - SYN+ACK, ACK. TCP- - .
TCP SYN Flood, « » (Denial- of-Service, DoS). , TCP- SYN, SYN+ACK . , . , . , , .
547

1. 2 hping3:
$ sudo hping3 - 300 -S -i u1 212.46.14.1
2. 1 Web- . → DoS. ? IP- ? _________ _______________________________________________________________
13. TCP Fast Open -
. TCP- ACK, , . TCP-- - . TCP Fast Open (TFO). SYN .
TCP SYN, - - . - . TFO SYN.
TCP TFO . - SYN — HTTP- - . TFO , - . TCP-.
TFO Fast Open Cookie (cookie) — , . cookie - . cookie TCP- Fast Open Cookie.
1 : Linux ............................................... 2 . DES-1100-16 .................................................... 1 . Ethernet .................................................................... 2 .
553
, TCP- / - TCP Fast Open. ? _________ _______________________________________________________________
14. FTP-
NAT IPv4. NAT — NAT NAPT (Network Address Port Translation). NAT NAT IP- IP- NAT, IP-. - IP, IP- . .
NAPT ( Port Address Translation (PAT), overloaded NAT) - UDP. NAPT . IP- , NAPT TCP/UDP TCP/UDP IP- , TCP/UDP NAT. IP, TCP/UDP. TCP/UDP IP, IP- . NAPT - NAT , .
, FTP- , , . NAT. , . Virtual Server ( - ). - , . IP- , IP-. - TCP/UDP.
557
1. 2 FTP-.
:
ftp://212.46.14.1
2. 1 2 - ping. / ________ _______________________________________________________________
3. 2 IP- 212.46.14.56. .
4. FTP-. ? ? ___________________________
15. Telnet
, , . , , , - , . Telnet - , .
D-Link Telnet- - , - Telnet- IP- - . , , .
OC Windows, Telnet-, , . Telnet - Windows.
OC Linux Telnet - telnet.
Telnet PuTTY.
Telnet OC Linux OC Windows, .
565
16. SSH
SSH - , .
Telnet, SSH- : . - SSH, SSH- IP- . , , .
D-Link - Telnet. SSH Telnet SSH-.
SSH- - . : , - . - .
: - , . , , . , , , - .
: - , . - . , . , .
. OC Linux SSH OpenSSH.
OC Windows SSH PuTTY.
1 : Linux OC Windows ........ 1 . DGS-3120-24TC ................................... 1 . Ethernet .......................................................... 1 . ................................................... 1 .
Windows: PuTTY PuTTYgen Pageant Wireshark TFTP- Tftpd
581
Web- - , , Web-. HTTP HTTPS. Web- , - , . .
Web- (GUI), , / HTTPS-, .
1 : Linux ............................................... 1 . DGS-3120-24TC .............................................. 1 . Ethernet .................................................................... 1 . ............................................................. 1 .
. 17.1.
2. , IP- :
https://10.90.90.90
SSL-? ____________
Client Hello. ? _______________________________________________________________
? ________
18. DHCP
Dynamic Host Configuration Protocol (DHCP — ) — , - IP- , .
DHCP: DHCP (DHCP client) — , DHCP .
DHCP (DHCP server) — , - DHCP.
Relay- DHCP (DHCP Relay agent) — (, ), DHCP , .
DHCP- , - . DHCP . - . - L3 DHCP.
595
19. relay- DHCP
DHCP . - , - , . . IP- . , - . , DHCP , . relay- DHCP.
Relay- DHCP — , , DHCP , . DHCP relay- - IP- . IP- IP- . Relay-, DHCP, - .
1 : Linux .................................... 1 . Windows ................................ 2 . DGS-3120-24TC ................................... 1 . Ethernet .......................................................... 3 . ................................................... 1 .
Linux: Minicom DHCP- Isc-dhcp-server Wireshark
: relay- DHCP- .
Linux
1. 1 , . 19.1. . IP- enp0s3:
$ sudo ifconfig enp0s3 192.168.1.1/24
$ sudo route add default gw 192.168.1.2
3. :
DHCP-, , DHCPREQUEST . relay-, , IP- Relay Agent IP address. relay- DHCPREQUEST .
5. DHCPACK, DHCP- relay-, DHCPACK, relay- 2. relay-? _____________________________ _______________________________________________________________ _______________________________________________________________ _______________________________________________________________
, , DHCPACK, , - DHCPOFFER. DHCPACK - IP- - IP- relay-. , relay- , , DHCPOFFER.
20. IPoE
- IPoE. - — Ethernet-. IPv4. DHCP-, - , IP- WAN-, - DNS-.
? , DHCP- IP-
612
21. DHCP Local Relay
DHCP relay- , , - DHCP , - . Relay-, IP- 82. , - IP- . , , 6 , , - — - . DHCP Local Relay, D-Link. 82 , DHCP- - . relay- IP- - DHCP-, Relay Agent IP address. DHCP- 82. - DHCP- , - . 82 relay- DHCP-.
1 : Linux .................................... 1 . Windows ................................ 2 . DGS-3120-24TC ................................... 1 . Ethernet .......................................................... 3 . ................................................... 1 .
Linux: Minicom DHCP- Isc-dhcp-server Wireshark
: DHCP Local Relay.
Linux
1. 1 , . 21.1. . IP- enp0s3:
$ sudo ifconfig enp0s3 192.168.1.1/24
2. Wireshark. - enp0s3 :
$ sudo wireshark
22. ,
. 22.1.
VLAN
SW1 1 default 1
SW2
2 v10 10
24 v20 20
TCP/IP
. VirtualBox
DlinkLab_18.04LTS.ova - :
Username: classroom Password: classroom 1. VirtualBox — https://goo.gl/JBz4iB 2. VirtualBox Extension Pack — https://goo.gl/JBz4iB 3. DlinkLab_18.04LTS.ova — https://goo.gl/npW1Bm 4. VirtualBox DlinkLab_18.04LTS.ova.
→ . , . - , (. .1).
. A.1.
628

1. RFC 675. Specification of Internet Transmission Control Program. December 1974. 2. RFC 793. Transmission Control Protocol. September 1981. 3. RFC 1180. A TCP/IP Tutorial. January 1991. 4. Charles M. Kozierok. The TCP/IP Guide. http://www.tcpipguide.com 5. RFC 1661. The Point-to-Point Protocol (PPP). July 1994. 6. RFC 1332. The PPP Internet Protocol Control Protocol (IPCP). May 1992. 7. RFC 1994. PPP Challenge Handshake Authentication Protocol (CHAP). August 1996. 8. RFC 2433. Microsoft PPP CHAP Extensions. October 1998. 9. RFC 2759. Microsoft PPP CHAP Extensions, Version 2. January 2000. 10. RFC 3078. Microsoft Point-To-Point Encryption (MPPE) Protocol. March 2001. 11. .. . 1. . : , 2014. 12. .. . 2. - . : , 2014. 13. Chris Le, Sanjeev Mervana. Design and Implementation of DSL-Based Access Solutions. Cisco Press, 2001. 14. RFC 2516. A Method for Transmitting PPP Over Ethernet (PPPoE). February 1999. 15. RFC 2364. PPP Over AAL5. July 1998. 16. RFC 2637. Point-to-Point Tunneling Protocol (PPTP). July 1999 17. RFC 2661. Layer Two Tunneling Protocol "L2TP". August 1999 18. RFC 791. Internet Protocol. September 1981 19. RFC 2474. Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers. December 1998. 20. E.., .., .., .., - .. . : . .. , 2013. 21. RFC 1517. Applicability Statement for the Implementation of Classless Inter-Domain Routing (CIDR). September 1993. 22. RFC 1518. An Architecture for IP Address Allocation with CIDR. September 1993. 23. RFC 1519. Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy. September 1993. 24. RFC 3022. Traditional IP Network Address Translator (Traditional NAT). January 2001. 25. RFC 2640. Internet Protocol, Version 6 (IPv6) Specification. December 1998. 26. RFC 4291. IP Version 6 Addressing Architecture. February 2006. 27. RFC 3587. IPv6 Global Unicast Address Format. August 2003. 28. Sheila Frankel, Karen Kent, Ryan Lewkowski, Angela D. Orebaugh, Ronald W. Ritchey, Steven R. Sharma. Guide to IPsec VPNs. Recommendations of the National Institute of Standards and Technology. NIST Special Publication 800-77, 2005. 29. RFC 4301. Security Architecture for the Internet Protocol. December 2005. 30. RFC 4302. IP Authentication Header. December 2005. 31. RFC 4303. IP Encapsulating Security Payload (ESP). December 2005. 32. RFC 2408. Internet Security Association and Key Management Protocol (ISAKMP). November 1998. 33. RFC 2409. The Internet Key Exchange (IKE). November 1998.
630
A
ACL (. Access Control List). . - . ACL , , , . ACL - QoS - .
ADSL (. Asymmetric Digital Subscriber Loop). - . xDSL, , - .
AES (. Advanced Encryption Standard). C ( 128 , 128/192/256 ). - AES - (NIST) . AES Rijndael. AES FIPS PUB 197-2001. , CCMP (CTR with CBC-MAC Protocol) 802.11.
AH (. Authentication Header). IPSec, - , , IP-, - , -replay , . . . IPSecv3 .
ARP (. Address Resolution Protocol). . , IP- (- ) - TCP/IP. ARP , - IP-.
Asymmetric chipper. . , - , , — . , , , . - , , .
Authentication. . , , - .


- . .. .
.
23.05.2019. 70×100/16. ......52,0...550... 463.
. .. . 105005, , 2- ., . 5., .1.
[email protected] www.baumanpress.ru