Solved Intel 82579V Gigabit Ethernet Controller issue

Hello,

I have a PC with Intel Desktop Board DH77EB that has an onboard Intel 82579V Gigabit Ethernet Controller as the NIC. I have a WLAN setup and I was connecting this PC using a wireless USB adaptor earlier (Digisol DG-WN3300N - urtwn driver). This used to work fine until I enabled WPA2 security on the WLAN. My WLAN router has 4 LAN ports so I removed the USB adaptor and connected the PC directly using a RJ45 patch cord to the router and enable em driver in the loader.conf and configured it appropriately in rc.conf.

Now I can see that em0 is UP and active if I run ifconfig and I am also able to ping the IP address associated with em0. However, I am unable to ping the router or any other PCs in the network.

My WLAN continues to work fine as other PC on wireless as well as wired to the router can talk to each other.

I also tried setting hw.pci.realloc_bars=1 and hint.agp.0.disabled=1 and also disabled Intel Virtualisation in the BIOS. Still no luck...

Can someone please help?

Many thanks,

Nitin
 
Many possible causes, but not enough information to start guessing. What version of FreeBSD? Could be a firewall blocking ICMP on either the FreeBSD system or the router, or a configuration problem. Could be a hardware problem with a cable or autonegotiation problems. Please show the output of ifconfig.
 
Thank you wblock@ for your private message on formatting my messages. Below are more details:

FreeBSD version details:
uname -r
Code:
FreeBSD myFreeBSDServer 10.1-RELEASE-p6 FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 19:00:21 UTC 2015     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

ifconfig
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
    ether 00:22:4d:aa:e0:9d
    inet 192.168.0.21 netmask 0xffffff00 broadcast 192.168.0.255
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet 1000baseT <full-duplex>
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

Contents of /etc/rc.conf
Code:
hostname="myFreeBSDServer"
default_router="192.168.0.10"
gateway_enable="YES"
#wlans_urtwn0="wlan0"
#wpa_supplicant_enable="YES"
#wpa_supplicant_program="/usr/sbin/wpa_supplicant"
#wpa_supplicant_flags="-B -i wlan0 -c /etc/wpa_supplicant.conf"
#ifconfig_wlan0="WPA inet 192.168.0.21 netmask 255.255.255.0 ssid xxxxxxx"
ifconfig_em0="inet 192.168.0.21 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex"
sshd_enable="YES"
moused_enable="YES"
#ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
sendmail_enable="NONE"

Contents of /boot/loader.conf
Code:
if_em_load="YES"
hw.pci.realloc_bars=1
hint.agp.0.disabled=1
#legal.realtek.license_ack=1
#if_urtwn_load="YES"
#wlan_scan_ap_load="YES"
#wlan_scan_sta_load="YES"
#wlan_wep_load="YES"
#wlan_ccmp_load="YES"
#wlan_tkip_load="YES"

Contents of /etc/resolv.conf
Code:
nameserver 192.168.0.10

Contents of /etc/hosts
Code:
# $FreeBSD: releng/10.1/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $
#
# Host Database
#
::1            localhost localhost.my.domain
127.0.0.1        localhost localhost.my.domain
192.168.0.21            myFreeBSDServer    myFreeBSDServer.xxxxxxx.com

Output of netstat -r
Code:
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
localhost             link#2             UH          lo0
192.168.0.0        link#1             U           em0
myFreeBSDServer link#1             UHS         lo0

Internet6:
Destination        Gateway            Flags      Netif Expire
::                 localhost          UGRS        lo0
localhost          link#2             UH          lo0
::ffff:0.0.0.0     localhost          UGRS        lo0
fe80::             localhost          UGRS        lo0
fe80::%lo0         link#2             U           lo0
fe80::1%lo0        link#2             UHS         lo0
ff01::%lo0         localhost          U           lo0
ff02::             localhost          UGRS        lo0
ff02::%lo0         localhost          U           lo0

Output of netstat -rn
Code:
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
127.0.0.1          link#2             UH          lo0
192.168.0.0/24     link#1             U           em0
192.168.0.21       link#1             UHS         lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff01::%lo0/32                     ::1                           U           lo0
ff02::/16                         ::1                           UGRS        lo0
ff02::%lo0/32                     ::1                           U           lo0

Output of ping -t 3 192.168.0.21 - Server's NIC
Code:
PING 192.168.0.21 (192.168.0.21): 56 data bytes
64 bytes from 192.168.0.21: icmp_seq=0 ttl=64 time=0.206 ms
64 bytes from 192.168.0.21: icmp_seq=1 ttl=64 time=0.093 ms
64 bytes from 192.168.0.21: icmp_seq=2 ttl=64 time=0.126 ms

--- 192.168.0.21 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.093/0.142/0.206/0.047 ms

Output of ping -t 3 192.168.0.10 - Router
Code:
PING 192.168.0.10 (192.168.0.10): 56 data bytes

--- 192.168.0.10 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

I can ping the router from other desktops in the network and vice versa. I cannot ping myFreeBSDServer from the router or vice versa.

There is no firewall enabled on the router or the myFreeBSDServer as the router is for internal network. Firewall will be enabled later once we get the myFreeBSDServer connecting to it.

Hope all the above info will give you some insights into what I might have done wrong.

Looking forward to your help....

Kind regards,

Nitin
 
Thanks Terry_Kennedy. I changed default_router to defaultrouter and commented gateway_enable. I had set gateway_enable while trying to fix the issue based on what I read online; it was not there initially.

Anyways, it still isn't working :(

When I run dmesg I can see some issues with pci/em as shown below:
Code:
module_register: module pci/em already exists!
Module pci/em failed to register: 17
module_register: module pci/lem already exists!
Module pci/lem failed to register: 17

I suspect it is an issue with the driver and FreeBSD 10.1 definitely uses the latest Intel driver for em(4) which is 7.4.2 I think.
 
Last edited by a moderator:
When I run dmesg I can see some issues with pci/em as shown below:
Code:
module_register: module pci/em already exists!
Module pci/em failed to register: 17
module_register: module pci/lem already exists!
Module pci/lem failed to register: 17
You're running a GENERIC kernel which has em(4) built into the kernel. But you also have a request to load the module in /boot/loader.conf which is triggering that error. I'm not sure why you're getting that specific error - if I try to load it on 10.1, I get:
Code:
(0:11) host:/tmp# kldload if_em
kldload: can't load if_em: module already loaded or in kernel
I'm also not sure what the lem(4) device is, and it isn't mentioned in your /boot/loader.conf. Did you do an actual reboot after fixing up your /etc/rc.conf or did you use some other command(s)?

Are the IP addresses you listed above the real ones, or did you edit them to conceal the actual addresses?

Are you setting hw.pci.realloc_bars for a specific reason, or is it something you just tried and didn't remove?

Can you repost the output of # netstat -rn? Also, once you've made the changes above, can you attach or PM me the complete output of # dmesg -a?
I suspect it is an issue with the driver and FreeBSD 10.1 definitely uses the latest Intel driver for em(4) which is 7.4.2 I think.
I would be very surprised by this, as em(4) is one of the most popular network drivers in FreeBSD.
 
Last edited by a moderator:
Terry_Kennedy, yes I did reboot the system after fixing up /etc/rc.conf as after running /etc/netstart it was not working.

Are the IP addresses you listed above the real ones, or did you edit them to conceal the actual addresses?
The IP addresses are real.

Are you setting hw.pci.realloc_bars for a specific reason, or is it something you just tried and didn't remove?
Yes hw.pci.realloc_bars as well as hint.agp.0.disabled=1 were added to /boot/loader.conf after googling for similar issues and certain people mentioned that their issue got sorted thereafter.

Now, I have commented out hw.pci.realloc_bars, hint.agp.0.disabled=1 and if_em_load="YES" and restarted the server.

The output of # netstat -rn:
Code:
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
default            192.168.0.10       UGS         em0
127.0.0.1          link#2             UH          lo0
192.168.0.0/24     link#1             U           em0
192.168.0.21       link#1             UHS         lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff01::%lo0/32                     ::1                           U           lo0
ff02::/16                         ::1                           UGRS        lo0
ff02::%lo0/32                     ::1                           U           lo0

I have sent you the dmesg -a out privately.
 
Terry_Kennedy, just wanted to let you know that I have a FreeNAS 9.3 server having re based NIC connected to the same router that can be pinged without any issues both ways.

Also, my the RJ45 patch cords used to connect these servers and the router are brand new CAT6 cables from Schneider which is a good brand.
 
Terry_Kennedy, yes I did reboot the system after fixing up /etc/rc.conf as after running /etc/netstart it was not working.
Good.
The IP addresses are real.
OK. The reason I was asking is that when people "sanitize" the output sometimes there are typos which conceal a real problem.
Yes hw.pci.realloc_bars as well as hint.agp.0.disabled=1 were added to /boot/loader.conf after googling for similar issues and certain people mentioned that their issue got sorted thereafter.

Now, I have commented out hw.pci.realloc_bars, hint.agp.0.disabled=1 and if_em_load="YES" and restarted the server.
Ok.
The output of # netstat -rn:
Code:
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
default            192.168.0.10       UGS         em0
127.0.0.1          link#2             UH          lo0
192.168.0.0/24     link#1             U           em0
192.168.0.21       link#1             UHS         lo0
This is good. You now have a default route, which you didn't before.

I have sent you the dmesg -a out privately.
That all looks good.

Try this command: # ifconfig em0 -rxcsum -txcsum -tso. This will probably cause the link to flap, so give it time to renegotiate after giving that command before you try the ping test again.

If that still doesn't fix it, what sort of device is the other end of the cable plugged into? Can you temporarily move the cable to another port that you know works (for example, the one your FreeNAS server is plugged into)?

After all of that, if it still isn't working, please post the output from # arp -a.
 
Hi Terry_Kennedy,

I ran the command: # ifconfig em0 -rxcsum -txcsum -tso, still no luck. I gave it enough time like about 20 minutes or so. I then put rxcsum txcsum tso in /etc/rc.conf for ifconfig_em0 entry and restarted and tested again but failed again.


what sort of device is the other end of the cable plugged into?
It is a TotoLink N300RG wireless router

Can you temporarily move the cable to another port that you know works (for example, the one your FreeNAS server is plugged into)?
Yes, I tried that too, but to no avail. I tried the the cable that was used for FreeNAS server plugged it into the port that was being used by FreeNAS.

Here is the output of arp -a :
Code:
? (192.168.0.10) at 00:19:cb:91:7c:e5 on em0 expires in 1101 seconds [ethernet]
? (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]
 
Here is the output of arp -a :
Code:
? (192.168.0.10) at 00:19:cb:91:7c:e5 on em0 expires in 1101 seconds [ethernet]
? (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]
That is interesting. It seems to have learned the Ethernet address of the gateway (192.168.0.10), so something is getting out onto the wire. Please try # ping 192.168.0.255 (without making any further changes) and then # arp -a and post that output.
 
Ok I pinged # ping 192.168.0.255 and then here is the output of # arp -a :

Code:
myFreeBSDServer (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]
 
Well diizzy, it was without media 1000baseTX mediaopt full-duplex. I added these only later on when it was not working that way. Anyways, I have removed it and made it plain and simple as below:
Code:
ifconfig_em0="inet 192.168.0.21 netmask 255.255.255.0
and tried again, but it just won't work :(
 
Last edited by a moderator:
Ok I pinged # ping 192.168.0.255 and then here is the output of # arp -a :

Code:
myFreeBSDServer (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]
Did you change anything from the last time you did the # arp -a? Because last time it was seeing the router and now it isn't.
 
You forgot " at the end to terminate the line properly.
That said, any reason why you aren't using DHCP as your router/gateway provides it? Probably easier to get that going first before doing a manual config...
It's also really uncommon to have the router IP at .10 instead of .1 or .0 hence why I'm suggestion that you use DHCP which will provide the correct addresses.
Comment out everything related to gateway etc and just use this line:
ifconfig_em0="SYNCDHCP"

Typed a bit too fast, I meant 192.168.0.1 or 192.168.1.1 not 192.168.X.0
//Danne
 
That said, any reason why you aren't using DHCP as your router/gateway provides it? Probably easier to get that going first before doing a manual config...
He's running an Apache web server on it and probably needs the static address for that.

Edited to add:
It's also really uncommon to have the router IP at .10 instead of .1 or .0
If you look at the first set of arp output, the FreeBSD box did see the router at .10.
 
Terry_Kennedy - No I did not change anything. I only pinged 192.168.0.255 and then ran arp -a

diizzy - Yes I am running Apache & Subversion servers on that server so I need a static IP. Also I am not using static IPs on the wireless LAN. DHCP server has been disabled on the router.
 
Apache doesn't (bind it to port 80 or whatever you want to use) and even if it did just add the mac addr to the router (yes, all routers do have this nowdays). Same goes for Subversion... I have no idea why you need to make this overly complicated.

http://totolinkusa.com/sub/product/products/n300rg.html --> FAQ
"How to assign a special IP to your computer for wireless router? (this also includes wired ones"
They also refer the router to 192.168.1.1 which makes more sense/is more common. The 192.168.0.10 device is a Zyxel network unit according to its mac addr but I don't think we've ever confirmed that it is the router.

nitin
As for the bug, that's not what you're seeing.

//Danne
 
Apache doesn't (bind it to port 80 or whatever you want to use) and even if it did just add the mac addr to the router (yes, all routers do have this nowdays). I have no idea why you need to make this overly complicated. ;-)
//Danne
Let's just try to solve his original issue without confusing him further. Once he has it working, he can optimize it one step at a time, testing after each.
 
Any chance this could be something related to the bug reported here:
https://lists.freebsd.org/pipermail/freebsd-bugs/2014-June/056741.html
I don't think so. That was an issue with removing entries from the ARP cache. Your issue is that the cache isn't being populated at all.

Another thing to try is # tcpdump -i em0. That will generate a bunch of output showing everything the host sees on the Ethernet port. Exit with Control-C. What you see is less important than seeing anything coming in at all.
 
Hence use DHCP as it requires zero config and does provide the correct addresses. If that works, at least we can tell the network setup.
//Danne
 
Terry_Kennedy:

I have reverted the ifconfig_em0 to:

ifconfig_em0="inet 192.168.0.21 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex rxcsum txcsum tso"


Restarted the server and here are the outputs for commands run in that order:
ifconfig
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
    ether 00:22:4d:aa:e0:9d
    inet 192.168.0.21 netmask 0xffffff00 broadcast 192.168.0.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet 1000baseT <full-duplex>
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

arp -a:
Code:
? (192.168.0.10) at 00:19:cb:91:7c:e5 on em0 expires in 1136 seconds [ethernet]
? (192.168.0.11) at 00:19:cb:91:7c:e5 on em0 expires in 1102 seconds [ethernet]
? (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]

I can see 192.168.0.11 in there which used to be the defaultrouter earlier when it was working with the wireless adaptor.

Next, ping -t 3 192.168.0.255
Code:
PING 192.168.0.255 (192.168.0.255): 56 data bytes

--- 192.168.0.255 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

arp -a gave same result as above

Next, I ran tcpdump -i em0 it showed an output which stated that it is listening to em0 and EN10MB and data 65356 bytes. Then I ran ping 192.168.0.10 from another terminal. tcmpdump in the first terminal started outputting:
Code:
14:46:41.712850 IP 192.168.0.7 > 224.0.0.251: igmp v2 report 224.0.0.251
14:46:42.547532 IP 192.168.0.6 > 239.255.255.250: igmp v2 report 239.255.255.250
14:46:42.691752 IP myFreeBSDServer.25115 > 192.168.0.10.domain: 14568+ PTR? 7.0.168.192.in-addr.arpa. (42)
14:46:42.752118 IP 192.168.1.1.domain > myFreeBSDServer.25115: 14568 NXDomain* 0/1/0 (97)

Does that ring a bell?
 
I have reverted the ifconfig_em0 to:

ifconfig_em0="inet 192.168.0.21 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex rxcsum txcsum tso"
You need:
ifconfig_em0="inet 192.168.0.21 netmask 255.255.255.0 media 1000baseTX mediaopt full-duplex -rxcsum -txcsum -tso"
You want to turn those options off, not on (they're already on by default).
Restarted the server and here are the outputs for commands run in that order:
arp -a:
Code:
? (192.168.0.10) at 00:19:cb:91:7c:e5 on em0 expires in 1136 seconds [ethernet]
? (192.168.0.11) at 00:19:cb:91:7c:e5 on em0 expires in 1102 seconds [ethernet]
? (192.168.0.21) at 00:22:4d:aa:e0:9d on em0 permanent [ethernet]

I can see 192.168.0.11 in there which used to be the defaultrouter earlier when it was working with the wireless adaptor.
Ok, the adapter is seeing packets from the router.
Next, I ran tcpdump -i em0 it showed an output which stated that it is listening to em0 and EN10MB and data 65356 bytes. Then I ran ping 192.168.0.10 from another terminal. tcmpdump in the first terminal started outputting:
Code:
14:46:41.712850 IP 192.168.0.7 > 224.0.0.251: igmp v2 report 224.0.0.251
14:46:42.547532 IP 192.168.0.6 > 239.255.255.250: igmp v2 report 239.255.255.250
14:46:42.691752 IP myFreeBSDServer.25115 > 192.168.0.10.domain: 14568+ PTR? 7.0.168.192.in-addr.arpa. (42)
14:46:42.752118 IP 192.168.1.1.domain > myFreeBSDServer.25115: 14568 NXDomain* 0/1/0 (97)
Does that ring a bell?
This is very strange. It sees packets from 192.168.0.6 and 192.168.0.7 which are other devices on the same LAN, which is expected. It saw a packet from 192.168.1.1, which is not on the same LAN, which means that there is either some routing going on, or there are multiple IP networks on the same LAN. I would have expected to also see "ICMP echo request" and "ICMP echo reply" messages from your ping.

Can you ping any of those addresses (192.168.0.6, 192.168.0.7, or 192.168.1.1) successfully?
 
*sigh* Stop using media 1000baseTX mediaopt full-duplex that is just wrong.... You don't really need to turn off TSO either.
As for the rest, do you have more routers/modems and what not on your network? 192.168.1.1 is most likely your router as it matches the documentation for it.
This is why I'm telling you to use DHCP so we can see what it assigns to as there's something you don't know/are telling us.
Keep in mind that the router doesn't necessarily need to respond to ICMP pings or pings at all for that matter even though it's very uncommon that it doesn't.
//Danne
 
Back
Top