Warning: Unable to send packet: Error with PF_PACKET send() [11]: Message too long (errno = 90)

3869 단어 message
오늘 tcpreplay를 사용하여 데이터를 재생할 때 어떤 패키지가 전송되지 않은 것을 발견했습니다.
 
Warning: Unable to send packet: Error with PF_PACKET send() [215]: Message too long (errno = 90)

Warning: Unable to send packet: Error with PF_PACKET send() [216]: Message too long (errno = 90)

Warning: Unable to send packet: Error with PF_PACKET send() [218]: Message too long (errno = 90)

Warning: Unable to send packet: Error with PF_PACKET send() [219]: Message too long (errno = 90)

Warning: Unable to send packet: Error with PF_PACKET send() [234]: Message too long (errno = 90)

Actual: 459 packets (386911 bytes) sent in 0.03 seconds.                Rated: 12897033.0 bps, 98.40 Mbps, 15300.00 pps

Statistics for network device: eth0

        Attempted packets:         235

        Successful packets:        217

        Failed packets:            18

        Retried packets (ENOBUFS): 0

        Retried packets (EAGAIN):  0

Statistics for network device: eth0

        Attempted packets:         224

        Successful packets:        224

        Failed packets:            0

        Retried packets (ENOBUFS): 0

        Retried packets (EAGAIN):  0

오류 힌트를 보면 패킷이 너무 큰 것 같습니다.보낸 패킷을 살펴봤습니다.
 
 
10:20:39.019199 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 323602:326522, ack 1978, win 31, length 2920

10:20:39.019298 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 326522, win 543, length 0

10:20:39.047511 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 326522:329442, ack 1978, win 31, length 2920

10:20:39.047559 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 329442, win 543, length 0

10:20:39.047665 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 329442:330902, ack 1978, win 31, length 1460

10:20:39.075783 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 330902:333822, ack 1978, win 31, length 2920

10:20:39.075824 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 333822, win 543, length 0

10:20:39.104001 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 333822:336742, ack 1978, win 31, length 2920

10:20:39.104049 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 336742, win 543, length 0

10:20:39.104322 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 336742:338202, ack 1978, win 31, length 1460

10:20:39.132219 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 338202:339662, ack 1978, win 31, length 1460

패킷 길이가 이미 1500(MTU 기본값은 1500)을 넘었기 때문에 문제의 해결 방법은 시스템의 MTU 값을 수정하는 것이다.
 
먼저 제 시스템 환경: ubuntu 12.04
linux 시스템에서 MTU를 수정하는 방법은 간단합니다. 명령 하나면 됩니다.
 
sudo ifconfig eth0 mtu 3000

이것은 네트워크 카드 eth0의 MTU 값을 3000으로 설정한 것입니다. 이렇게 다시 패키지를 놓으면 데이터 패키지가 모두 발송되는 것을 발견할 수 있습니다.
 
 
sending out eth0 eth0

processing file: tcp_rewrite.pcap

Actual: 459 packets (386911 bytes) sent in 0.04 seconds.                Rated: 9672775.0 bps, 73.80 Mbps, 11475.00 pps

Statistics for network device: eth0

        Attempted packets:         235

        Successful packets:        235

        Failed packets:            0

        Retried packets (ENOBUFS): 0

        Retried packets (EAGAIN):  0

Statistics for network device: eth0

        Attempted packets:         224

        Successful packets:        224

        Failed packets:            0

        Retried packets (ENOBUFS): 0

        Retried packets (EAGAIN):  0

 
본고는 Eliot의 오리지널입니다. 전재는 출처를 밝히십시오http://blog.csdn.net/xyw_blog/article/details/10741919

좋은 웹페이지 즐겨찾기