TCP problems

Larry Maloney larry.maloney at hackerdojo.com
Tue May 3 23:18:49 UTC 2016


Have you tried bumping the MTU on the interfaces to JUMBO frames? 9000 or whatever max is?

/Larry
> On May 3, 2016, at 3:41 PM, Dieter BSD <dieterbsd at gmail.com> wrote:
> 
> I have suddenly started seeing TCP problems on a machine "G":
> running FreeBSD 10.1
> Gigabyte UD5 amd64
> 2 Ethernet controllers, re0 and ue0:
> 
> re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port
> 0xb000-0xb0ff mem 0xfe600000-0xfe600fff,0xd0000000-0xd0003fff irq 16
> at device 0.0 on pci6
> re0: Using 1 MSI-X message
> re0: turning off MSI enable bit.
> re0: Chip rev. 0x4c000000
> re0: MAC rev. 0x00000000
> rgephy0: <RTL8251 1000BASE-T media interface> PHY 1 on miibus0
> 
> ue0 is Siig USB-to-Ethernet  Chipset: AX88179
> 
> Problem 1: bind(2) fails
> Problem 2: copying large files via Ethernet results in data corruption
> 
> 1) Bind:
> 
> C program containing:
> 
>  bzero(&server, sizeof(struct sockaddr_in));
>  server.sin_family=AF_INET;
>  server.sin_port=htons((unsigned short)port_number);
>  (void) memcpy((char*)&server.sin_addr, (char*)host->h_addr,
> sizeof(server.sin_addr));
> 
>  return_code = socket(PF_INET, SOCK_STREAM, 0);
>  if (return_code == -1) { fprintf(stderr, "%s: ERROR ", argv[0]);
> perror("socket() failed"); fflush(stderr); exit(-1); }
>  fd = return_code;
> 
>  return_code = bind(fd, (struct sockaddr*)&server, sizeof(server));
>  if (return_code == -1) { fprintf(stderr, "%s: ERROR ", argv[0]);
> perror("bind() failed"); fflush(stderr); exit(-1); }
> 
> gives: ERROR bind() failed: Can't assign requested address
> 
> The same binary has been working perfectly on another machine (running 8.2)
> for years.  A UDP version of the program is working ok.  Rebooting didn't help.
> 
> 2) Data corruption:
> 
> rcp large file from machine T (running 8.2) to machine G (10.1)
> rcp the file back from G to T
> compare the two copies of the file on machine T to verify integrity
> 
> This worked fine until yesterday.  Now suddenly most large files have data
> corruption, thus cmp(1) fails.  The first difference occurs at various
> places in the file.
> 
> Both machine have 2 gigabit Ethernet controllers (2 seperate networks).
> Both networks have the problem.  I have also tried different sata disks
> on different disk controllers.  Both machines are amd64 and have ECC memory.
> Cables are factory made cat6 or cat7 25 foot or shorter.  Netgear gigabit
> switches.  I tried using ftp instead of rcp.  Rebooting didn't help.
> 
> machine T:
> nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>        options=8210b<RXCSUM,TXCSUM,VLAN_MTU,TSO4,WOL_MAGIC,LINKSTATE>
>        media: Ethernet autoselect (1000baseT
> <full-duplex,flowcontrol,rxpause,txpause>)
> bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
>        media: Ethernet autoselect (1000baseT
> <full-duplex,flowcontrol,rxpause,txpause>)
> 
> machine G:
> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
>        media: Ethernet autoselect (1000baseT <full-duplex>)
> ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>        options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
>        media: Ethernet autoselect (1000baseT <full-duplex>)
> 
> I tried ifconfig -rxcsum -txcsum.  Machine T seems happy, but
> networking on machine G stopped working so I had to turn them back on.
> (problem #3?)
> 
> Small files (2-4 KB) and things like telnet/rsh seem to work fine.
> 
> It appears that *something* broke yesterday, probably something in
> machine G.  But what? hardware? software?
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"



More information about the freebsd-hackers mailing list