|
Linux Network Administrator Guide, Second EditionAn early version of Linux accounting software assigned the fragments a fake port number, 0xFFFF, that we could count. To ensure that we capture the second and later fragments, we could use a rule like: # ipfwadm -A both -a -W ppp0 -P tcp -S 0/0 0xFFFF The IP chains implementation has a slightly more sophisticated solution, but the result is much the same. If using the ipchains command we'd instead use: # ipchains -A forward -i ppp0 -p tcp -f and with iptables we'd use: # iptables -A FORWARD -i ppp0 -m tcp -p tcp -f These won't tell us what the original port for this data was, but at least we are able to see how much of our data is fragments, and be able to account for the volume of traffic they consume. In 2.2 kernels you can select a kernel compile-time option that negates this whole issue if your Linux machine is acting as the single access point for a network. If you enable the IP: always defragment option when you compile your kernel, all received datagrams will be reassembled by the Linux router before routing and retransmission ...» | Код для вставки книги в блог HTML
phpBB
текст
|
|