# Realtek RTL8111E installation



## mrjoli021 (Jun 11, 2011)

I have a Gigabyte motherboard with a Realtek RTL8111E built in. When I do [cmd=]pciconf -lv[/cmd] it displays the network card, but how can I set it up?

I am using 8.2 64Bit.

Thanks.


----------



## usdmatt (Jun 11, 2011)

Do you see an interface called 're0' when you run ifconfig?

If so, the easiest thing is to add the following to /etc/rc.conf and reboot


```
ifconfig_re0="ipaddress netmask"
```

You can also do the following to bring the interface up without the reboot. (You still need to add the interface to /etc/rc.conf to make the configuration work on boot).

[CMD="ifconfig"]re0 ipaddress netmask[/CMD]
[CMD="ifconfig"]re0 up[/CMD]


----------



## mrjoli021 (Jun 11, 2011)

No, if I do [cmd=]ifconfig[/cmd] all I get is the loopback.


----------



## usdmatt (Jun 11, 2011)

Hmm, that's strange.

I have an 8111 interface on my Gigabyte Atom board which is recognised but it may be a slightly different revision on the Realtek device to yours.

Can you post the relevant section from *pciconf*?


----------



## mrjoli021 (Jun 12, 2011)

```
re0@pci0:3:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x06 hdr=0x00

	vendor	=	'Realtek Semiconductor'
	device	=	'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
	class		=	network
	subclass	=	ethernet
```


----------



## wblock@ (Jun 12, 2011)

mrjoli021 said:
			
		

> ```
> re0@pci0:3:0:0: class=0x020000 card=0xe0001458 chip=0x816810ec rev=0x06 hdr=0x00
> vendor	=	'Realtek Semiconductor'
> device	=	'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
> ...



That shows re(4) has attached to the device.  Use
`% ifconfig -a`

If re0 isn't in the list, check /var/log/messages for errors.


----------



## mrjoli021 (Jun 12, 2011)

[cmd=]ifconfig -a[/cmd]
only shows lo.

The log file shows:

```
kernel: re0: Using 1 MSI messages
kernel: re0: Chip rev. 0x2c800000
kernel: re0: MAC rev. 0x00000000
kernel: re0: Unknown H/W revision: 0x2c800000
kernel: device_attached: re0 attached returned 6
kernel: re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xee00-0xeeff mem 0xfdfff00-0xfdffffff, 0xfdff80000-0xfdffbfff irq 18 at device 0.0 on pci3
```

and this keeps on repeating.


----------



## wblock@ (Jun 12, 2011)

New revisions of the 8111 keep coming out.  I don't know if the driver needs major changes or just a small update.

First, try an update to 8-STABLE.  If that doesn't solve it, ask on the mailing lists.  Not sure which is best, but maybe -net or -questions.


----------



## mrjoli021 (Jun 12, 2011)

sorry i am new to bsd.  how to i update the driver to stable?

Sorry, I am new to FreeBSD. How do I update the driver to -STABLE?


----------



## wblock@ (Jun 12, 2011)

mrjoli021 said:
			
		

> Sorry, I am new to FreeBSD. How do I update the driver to -STABLE?



1.  Some people would just download the latest snapshot and install it.  The snapshots are at ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/201105/.

2. The better way is to update your source with csup(1).  See /usr/share/examples/cvsup/stable-supfile.

Then build and install new system and kernel as shown in the Handbook.

3. The sneaky but not guaranteed way is to update source with csup(1), then try to rebuild just the driver:
`# cd /usr/src/sys/modules/re`
`# make install clean`

Updating just the driver won't always work.  Sometimes other system code has to be updated also.


----------



## wblock@ (Jun 13, 2011)

Having posted about this twice today, I have a couple of new articles:

Upgrading FreeBSD To -STABLE
Building FreeBSD World And Kernel


----------



## HuMbUcKeR (Jul 24, 2011)

I'm having the some problem reported by mrjoli021.

Did the upgrade to -STABLE solved the problem?
I'm asking this because I don't have other network card available, so at this moment my host machine doesn't have network connection.
If the update solves the problem I can try to borrow a network card from some one and do the update, otherwise I will have to buy a new network card...

Thanks


----------



## mrjoli021 (Jul 25, 2011)

Yes the upgrade fixed my problem.


----------



## HuMbUcKeR (Jul 25, 2011)

mrjoli021 said:
			
		

> Yes the upgrade fixed my problem.



Thank you, I will try to borrow a NIC


----------

