# One of those problems with FBSD and the Ethernet adapter, please help



## okasion (Jun 9, 2010)

Hello,

We have a GIGABYTE GA-P55M-UD2 motherboard with a _re0: <RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet>_ Ethernet onboard. The box is running a FreeBSD 8.0 RELEASE and the problem is that when we try to link up the device, it remains as "no carrier":


```
# ifconfig re0 172.16.247.34 netmask 255.255.255.0 media 100baseTX mediaopt full-duplex
[root@apollo ~]# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:24:1d:d9:48:e3
        inet 172.16.247.34 netmask 0xffffff00 broadcast 172.16.247.255
        media: Ethernet 100baseTX <full-duplex> (none)
        status: no carrier
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
        ether 00:40:f4:cf:0c:5f
        inet 10.10.10.143 netmask 0xff000000 broadcast 10.255.255.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:e1:1f:00:24:1d
        ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        lladdr 0.e1.1f.37.0.0.24.1d.a.2.ff.fe.0.0.0.0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
        inet6 ::1 prefixlen 128 
        inet 127.0.0.1 netmask 0xff000000
```

We have to use that special parameters with ifconfig because our switch does not support autoselect.
We have more than 10 FreeBSD servers connected to the same switch using the same command and everyone of them works fine.

Could you guys suggest any ideas besides changing the Ethernet adapter or switch?


----------



## SirDice (Jun 9, 2010)

You can add those mediaopt options to ifconfig_re0 in rc.conf.


----------



## DutchDaemon (Jun 9, 2010)

Other than that, 'no carrier' is usually 'no cable' or a dead/downed switchport.


----------



## SirDice (Jun 9, 2010)

Which could happen if you get lots of duplex and speed mismatches, a switch might decide to block off that port. On proper equipment I'd set both on both sides, never auto negotiate. Most unmanaged switches are a bit tricky though. And realtek isn't the best either. I know my realtek cards and home el-cheapo sweex switch will throw a fit if I don't use auto/auto 

I'm sure the OP tried different cables and/or switch ports too?


----------



## gilinko (Jun 9, 2010)

And the question is what is plugged into _re1_ as that link is active and thusly have a connection to something. If you have an extra PCIe adapter and the onboard one is using the same driver then usually the onboard gets named first(ie re0) and the PCIe card gets to follow that(re1).


----------



## okasion (Jun 9, 2010)

Thanks for the help; I have added ifconfig_re0=... to rc.conf as SirDice said, I sat the defaultrouter to the same destination as all our other server (172.16.247.1), then I did a reboot. The machine's connection never came up again, because re1 (a gigabyte lan that works fine without any parameter) was not configured in rc.conf (my fault).
I will (in fact, I have to  ) go to the datacenter tomorrow and setup the machine correctly, and specially configure ifconfig_re1 in rc.conf so I can work from work or home.

Anyway, I still don't know what to do with the main lan (re0) which is already nated to a static public IP in our router (that is after the switch).

Again, any commentary will be welcome.


----------



## pbd (Jun 10, 2010)

What version of FreeBSD do you use?

Maybe I have the same problem, but I'm not sure.


----------



## okasion (Jun 10, 2010)

pbd said:
			
		

> What version of FreeBSD do you use?
> 
> Maybe I have the same problem, but I'm not sure.



Thank you for your response, but we are using FreeBSD 8.0 RELASE, not FreeBSD 8.0 BETA


----------



## pbd (Jun 10, 2010)

okasion said:
			
		

> Thank you for your response, but we are using FreeBSD 8.0 RELASE, not FreeBSD 8.0 BETA



The PR is old, I had the problem still on 8.0-RELEASE and now on 8.1-PRERELEASE.


----------



## okasion (Jun 11, 2010)

I am going crazy here guys,

I managed ***SOMEHOW*** to linkup the re0 eth device, which even was without green or orange light on the network card, I became stoned when the status was active and actually functional; the description of ifconfig was something I never saw on any *NIX system: 


```
100BaseTX <full-duplex> (100BaseTX <half-duplex>)
```

(sorry I don't have the whole ifconfig here, but I saved everything at work), after doing the nat on our ASA and opening some ports,* I started installing cPanel on the server*, but the damn thing modified my re0 configuration with "media auto", and the network immediately stopped working again to no carrier. I even was with my boss at that time...

Could anyone help me please? why the ethernet adapter only activated with that weird configuration, which I can't setup again, even after hours of trying and trying...

Btw, I have connection to the server through another Realtek adapter (re1), but it is on another LAN so I can't use it to nat it to our public inet IP's.

Thanks in advance.


----------

