Os hosts farão a fragmentação de IP?

7

Ouvi roteadores sozinhos fazendo fragmentação. Quando um host está conectado à rede com cabo Ethernet, como ele mantém o tamanho da MTU em 1500? O próprio host fragmentará e enviará apenas 1500 bytes de carga no cabo Ethernet?

Jinga
fonte
Alguma resposta o ajudou? Nesse caso, você deve aceitar a resposta para que a pergunta não apareça para sempre, procurando uma resposta. Como alternativa, você pode fornecer e aceitar sua própria resposta.
Ron Maupin

Respostas:

8

Fragmentação IPv6

Somente hosts IPv6 podem fragmentar (ref RFC 2460 - Especificação IPv6, Seção 4.5 ):

4.5 Fragment Header


   The Fragment header is used by an IPv6 source to send a packet larger
   than would fit in the path MTU to its destination.  (Note: unlike
   IPv4, fragmentation in IPv6 is performed only by source nodes, not by
   routers along a packet's delivery path -- see section 5.

Fragmentação IPv4

Os hosts IPv4 podem opcionalmente fragmentar-se (ref RFC 1122 - Requisitos de host da Internet, Seção 3.3.3 ), e os roteadores IPv4 devem executar a fragmentação.

Citando o RFC 1122 - Requisitos de host da Internet, Seção 3.3.3 :

3.3.3  Fragmentation

         Optionally, the IP layer MAY implement a mechanism to fragment
         outgoing datagrams intentionally.

Citando o RFC 1812 - Requisitos do roteador IP, Seção 4.2.2.7

4.2.2.7 Fragmentation: RFC 791 Section 3.2


   Fragmentation, as described in [INTERNET:1], MUST be supported by a
   router.

Exemplo :

É bastante fácil ilustrar como os hosts se fragmentam ... por exemplo, executar ping em um host da Internet com um tamanho de ping muito grande (> 1500 bytes) ...

No terminal 1:

[mpenning@Bucksnort ~]$  ping -c 1 -s 65507 4.2.2.2

No terminal 2:

[mpenning@Bucksnort ~]$ sudo tshark -n -i eth0 icmp
  1   0.000000 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=0)
  2   0.000058 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=1480)
  3   0.000071 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=2960)
  4   0.000081 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=4440)
  5   0.000094 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=5920)
  6   0.000105 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=7400)
  7   0.000116 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=8880)
  8   0.000124 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=10360)
  9   0.000133 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=11840)
 10   0.000143 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=13320)
 11   0.000152 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=14800)
 12   0.000162 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=16280)
 13   0.000172 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=17760)
 14   0.000181 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=19240)
 15   0.000191 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=20720)
 16   0.000201 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=22200)
 17   0.000211 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=23680)
 18   0.000221 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=25160)
 19   0.000230 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=26640)
 20   0.000240 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=28120)
 21   0.000250 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=29600)
 22   0.000259 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=31080)
 23   0.000269 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=32560)
 24   0.000278 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=34040)
 25   0.000288 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=35520)
 26   0.000298 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=37000)
 27   0.000308 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=38480)
 28   0.000318 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=39960)
 29   0.000327 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=41440)
 30   0.000337 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=42920)
 31   0.000352 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=44400)
 32   0.000361 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=45880)
 33   0.000372 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=47360)
 34   0.000384 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=48840)
 35   0.000394 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=50320)
 36   0.000403 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=51800)
 37   0.000411 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=53280)
 38   0.000419 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=54760)
 39   0.000428 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=56240)
 40   0.000437 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=57720)
 41   0.000446 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=59200)
 42   0.000455 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=60680)
 43   0.000466 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=62160)
 44   0.000477 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=63640)
 45   0.000486 192.0.2.3 -> 4.2.2.2 ICMP Echo (ping) request
 46   0.044402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=0)
 47   0.044439 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=1480)
 48   0.044899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=2960)
 49   0.044910 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=4440)
 50   0.044916 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=5920)
 51   0.045149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=7400)
 52   0.045399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=8880)
 53   0.045409 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=10360)
 54   0.045415 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=11840)
 55   0.045649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=13320)
 56   0.045899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=14800)
 57   0.045908 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=16280)
 58   0.045915 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=17760)
 59   0.046148 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=19240)
 60   0.046163 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=20720)
 61   0.046402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=22200)
 62   0.046421 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=23680)
 63   0.046650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=25160)
 64   0.046668 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=26640)
 65   0.046901 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=28120)
 66   0.046918 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=29600)
 67   0.047151 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=31080)
 68   0.047171 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=32560)
 69   0.047399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=34040)
 70   0.047418 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=35520)
 71   0.047424 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=37000)
 72   0.047650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=38480)
 73   0.047900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=39960)
 74   0.048149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=41440)
 75   0.048165 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=42920)
 76   0.048172 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=44400)
 77   0.048178 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=45880)
 78   0.048398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=47360)
 79   0.048650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=48840)
 80   0.048667 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=50320)
 81   0.048674 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=51800)
 82   0.048900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=53280)
 83   0.048922 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=54760)
 84   0.049150 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=56240)
 85   0.049174 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=57720)
 86   0.049398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=59200)
 87   0.049649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=60680)
 88   0.049671 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=62160)
 89   0.049677 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01, 
   off=63640)
 90   0.049683 4.2.2.2 -> 192.0.2.3 ICMP Echo (ping) reply
Mike Pennington
fonte
Os sistemas operacionais mais modernos fazem a descoberta da MTU do caminho IPv4 e, assim, definem o sinalizador Não fragmentar para todos os pacotes de saída.
BatchyX
Então, quando no host., Quando eu sibilo um pacote muito grande., Fragmenta ao gateway padrão ??
Jinga
11
@BatchyX, a questão não é se os hosts executam o PMTUD, é se eles podem se fragmentar.
9788 Mike Blumenau, São
@Jinga, isso está correto; se você executar ping com um tamanho de ping grande e solicitar fragmentação, o ping será fragmentado na MTU do seu link local.
9788 Mike-Pennington
2
@BatchyX, PMTUD não está em questão aqui. Para sua informação, meus servidores Linux pesquisam SNMP o dia inteiro e o DF não está definido nesses quadros UDP; portanto, sua declaração sobre o DF sendo definido em todos os quadros é evidentemente falsa. Pare de confundir o problema com informações estranhas do PMTUD.
9788 Mike Blumenau, São