O que é um esquema de conexão simétrica e assimétrica para proteção contra ataques DDoS? Quais são as vantagens e desvantagens de cada um deles? Qual proteção é melhor para o seu projeto? Você encontrará as respostas para essas perguntas abaixo do corte.
Ao longo do caminho, falaremos sobre simetria nas redes de telecomunicações em geral. Você descobrirá como a Internet é assimétrica, de onde vem essa assimetria e, em geral, é boa ou ruim. Como bônus - solução rápida para os dois problemas mais comuns ao conectar a proteção de rede. E depois da leitura, você pode entender o que tentei retratar no KDPV.
![polegar](https://habrastorage.org/webt/v5/dx/kb/v5dxkba7ayvx0bibzruyc2axg68.png)
O que é simetria?
Todos entendem o que é "simétrico" no nível das "sensações", mas não conseguem articular imediatamente o que isso significa. Vamos tentar. Se algo é chamado de simétrico, significa que não muda sob a influência de certas transformações - transformações de simetria. O exemplo mais óbvio é a simetria geométrica.
90 , . : " 90 ". — . — "", . . .
— . . — . : . , , . , , — .
![sym](https://habrastorage.org/webt/qx/zt/ol/qxztol9rgqygzdfpl7xxlk_pqfa.gif)
, . , Facebook Facebook . ? : , , , ..
— . . " " . . , . . — , . 1891 — . XX () ( ). , , "" . .
(), .
, .
![quadro de distribuição](https://habrastorage.org/webt/2d/rh/n9/2drhn9ucdjq43cye67xsk6zojj8.jpeg)
, , 27 , 1% . , .
— , .
IP- (IP / ID ). . UDP — , . TCP , - , .
, . . ( ) , .
. . , .
![tráfego](https://habrastorage.org/webt/0c/-k/e6/0c-ke6jfpofjc8kvebsivdt7ao8.jpeg)
:
- .
, .
, , , .
, " " — RFC — :
- Forward direction — , .
- Reverse direction — — , .
- Upstream link — , — downstream links.
. hot-potato routing. , , , . hot-potato — — "" .
?
, . "Observing routing asymmetry in Internet traffic". Tier-2, Tier-1, .
, "". (Flow) — IP , IP , , ID . , .
- .
- .
- , , .. , UDP.
, :
![ligações](https://habrastorage.org/webt/zw/4s/7h/zw4s7hisnmnkuwk9qmndm7ks9ec.png)
- — flows — / * 100
- — packets — (1-|Nab-Nba|/|Nab+Nba|)*100%, Nab — , Nba — .
- — bytes — (1-|Nab-Nba|/|Nab+Nba|)*100%, Nab — , Nba — .
, , . edge-.
.
"How Asymmetric Is the Internet?" , ( — IP- ).
- 4000 RIPE Atlas. — , . .
- Traceroute . Traceroute , .. , . .
![número](https://habrastorage.org/webt/qt/ym/cv/qtymcvhmyjm6pbdz2xqovyumpc0.png)
- , 12.6% ( , 5 — 10%).
- , . , :
![diff](https://habrastorage.org/webt/ay/2q/rl/ay2qrlumdfgx_ocxeo5--nla03i.png)
y — , ( ) A --> --> . x — . , — 1. , . — .
, ?
. DDoS.
DDoS- , , , : . - , , . , — , .
![esquemas](https://habrastorage.org/webt/vv/cy/t-/vvcyt-aya5gt1t5cknbwgjbz8ry.jpeg)
, . . ? .
, .
: , , , ?
:…
: ?
:…
: !
: ...
- . , , , " " .
: , , , ?
: . . .
: ?
: , , .
: !
: .
, , , , . DDoS-.
: SYN flood
, TCP. , (3-way handshake).
- SYN , .
- , SYN-ACK . SYN , A+1, B, .
- ACK B+1, TCP .
, ( ).
SYN flood — DDoS-, — . SYN (spoofed) IP . SYN-ACK ACK', … . TCP .
![hatiko](https://habrastorage.org/webt/zv/zl/fm/zvzlfmz7iydhrz9ojr1dwqlzcei.jpeg)
? , — SYN cookie SYN proxy.
SYN cookie . , SYN (IP , TCP ..), , B SYN-ACK . SYN-ACK TCP cookie. (3 3-way handshake), B+1, ACK . .
ookie . , ACK . , . , , ACK cookie, SYN cookie. . , .
![synproxy](https://habrastorage.org/webt/xf/rw/8c/xfrw8chmotisbayqrjn9hxa1ewg.jpeg)
spoofing spoofing'o. , . — , , .
(UDP, QUIC, ICMP) TCP. . IP , .
, .
, , .
edge-, " " . , . : ( ).
, edge-, . :
![proteção](https://habrastorage.org/webt/--/d4/yy/--d4yyeif9ca5zz1qeuqfyatlom.jpeg)
, . , . edge ? — "", , ! .
, ? , 3. , . — . , .. 3 . 1 2 .
, , , — . , . , , 1, 2. . , , , , . , , " ".
DDoS
DDoS, , — . BGP, . . . , — . , , .
- — BGP. peering' .
- . , , , , . , , , troubleshooting' c . , " ". , .
- , , , .. , . , TCP. RTT (. Round Trip Time). .
- . - . , , 100% . .
2-4 , DDoS .
, . DDoS 100% . mitigation — , — . , - . " " , .
?
95% , , DDoS , . , . ( DDoS ) — , . , , , .
. , BGP.
![drake](https://habrastorage.org/webt/hl/g4/j-/hlg4j-ao8_ewhq1a13lg3shnydm.png)
DDoS-GUARD , , . .
BONUS: ,
, - uRPF strict loose. ? uRPF (Unicast Reverse Path Forwarding) . , , , source IP.
uRPF IP- . strict , c , IP, . spoof' IP . , , . loose IP- , .
/ GRE / IPIP-
MTU . :
- Maximal Transmission Unit (MTU) — Protocol Data Unit (PDU).
- PDU — + payload.
- Maximal Segment Size (MSS) — payload.
() PDU payload PDU . , MTU , payload.
MTU 1476, MSS – 1436 ( 1400) ( Don't fragment). - .
. MSS , . MSS : Juniper, Cisco, Mikrotik.