Sie sind auf Seite 1von 3

Introduction

Recently, I noticed some network problems (package losts) with an almost fresh XenServer
5.6 installation on a Hetzner EQ root server running a (SSH sessions disconnects, host and
client system are not pingable for some minutes). After some research I found some
resources that point out problems with the r8169 kernel module:

 http://wiki.hetzner.de/index.php/Installation_des_r8168-Treibers (German)
 http://forum.hetzner.de/wbb2/thread.php?postid=138116#post138116 (German)

Summarized the resources suggested to replace the driver r8169 with the r8168 driver to
eliminate the network problems. Of course, the driver has to be replaced only in the host.

lspci and lsmod show that the root server has a Realtek network card and that the
problematic r8169 driver is used:

# lspci
[...]
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
[...]
 
# lsmod | grep r81
r8169 29108 0
mii 5040 1 r8169

Replace r8169 module with r8168

As suggested, I replaced the r8169 driver with a new r8168 one. Unfortunately, there is no
pre-compiled module for the XenServer 5.6. Here is a step-by-step introduction how to
manually build the r8169 module and replace the r8168 module in the host system:

1. Download XenServer's DDK (Driver Development Kit) virtual machine from


https://www.citrix.com/English/ss/downloads/details.asp?
downloadId=2301285&productId=683148 (Additional Components -> XenServer
Support Components)
2. Copy the downloaded ISO to XenServer.
3. Mount the ISO:

# mount -o loop /PATH/TO/ISO/XenServer-5.6.0-DDK.iso /mnt/PATH


4. Import the DDK virtual machine:

# xe vm-import filename=/mnt/PATH/ddk/ova.xml
5. Wait some seconds/minutes for the import job to be finished.
6. In XenCenter add a network device to the newly created DDK virtual machine, start
the machine and enter a new root password.
7. Configure the network in the DDK VM; for a Hetzner EQ server this the typical
settings are:
o /etc/sysconfig/network-scripts/ifcfg-eth0
o DEVICE=eth0
o BOOTPROTO=static
o IPADDR=IP-ADRESS-OF-HOST-SYSTEM
o NETMASK=255.255.255.224
o ONBOOT=yes
TYPE=ethernet
o /etc/sysconfig/network-scripts/route-eth0
o IP-ADRESS-OF-HOST-SYSTEM dev eth0 scope link
default via IP-ADRESS-OF-HOST-SYSTEM
o /etc/resolv.conf
o nameserver 213.133.99.99
nameserver 213.133.100.100
8. Download the newest r8168 sources from
ftp://WebUser:2mG8dBW@202.134.71.22/cn/nic/. I used the file r8168-
8.018.00.tar.bz2 (49 KB 01.04.2010 09:59:00) (Download link:
ftp://WebUser:2mG8dBW@202.134.71.22/cn/nic/r8168-8.018.00.tar.bz2)
9. Unpack the sources and build the module (this creates the file r8168-
8.018.00/src/r8168.ko):
10. # tar vjxf r8168-8.018.00.tar.bz2
11. # cd r8168-8.018.00/
# make all
12. Copy the created r8168.ko to /lib/modules/2.6.27.42-
0.1.1.xs5.6.0.44.111158xen/kernel/drivers/net/r8168.ko in the host system and set
permissions to 0744.
13. Rename the old r8169 module to prevent loading:

# mv /lib/modules/2.6.27.42-
0.1.1.xs5.6.0.44.111158xen/kernel/drivers/net/r8169.ko
/lib/modules/2.6.27.42-
0.1.1.xs5.6.0.44.111158xen/kernel/drivers/net/r8169.backup.ko
14. Edit /etc/modprobe.conf:
15. alias eth0 r8168
alias r8169 off
16. Unload the old module, load the new one and reboot the system (use one line for all
commands, because rmmod will disconnect the server from the network):

# rmmod r8169 && depmod -a && modprobe r8168 && reboot

After the system is again up and running again, lsmod should no longer list the r8169
module:

# lsmod | grep r81


r8168 95780 0
Additional information

 I found some useful information in the howto "Compiling the Realtek RTL8111
driver on XenServer by Martin Guppy".
 Here is a link to my post "XenServer 5.6: Netzwerkprobleme / Realtek 8169"
(German) in the "Hetzner Online Diskussionsforum". The user "drieschel" has
attached a install script that can be used alternatively for step 10. to 13.
 The r8168.ko file I've built can be downloaded here: http://blog.janjonas.net/wp-
content/uploads/2010/08/r8168-8.018.00.zip

http://blog.janjonas.net/2010-08-10/xenserver-5_6-network-problems-r8169-kernel-module

Das könnte Ihnen auch gefallen