1.去官方网站上下载R8169的驱动
2. # lsmod | grep r8169 If it is installed, please remove it.
# rmmod r8169 note: If the built-in driver cannot removed byrmmod, please edit /etc/modprobe.conf and comment 'alias eth0 r8169'.Then, remmove it again or reboot your computer. Unpack the tarball :
# tar vjxf r8168-8.aaa.bb.tar.bz2 Change to the directory:
# cd r8168-8.aaa.bb If you are running the target kernel, then you should be able to do : # make clean modules (as root or with sudo)
# make install
# depmod -a
# insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x) You can check whether the driver is loaded by using following commands.
# lsmod | grep r8168
# ifconfig -a If there is a device name, ethX, shown on the monitor, the linux driver is loaded. Then, you can use the following command to activate the ethX.
# ifconfig ethX up ,where X=0,1,2,...<Set the network related information> 1. Set manually a. Set the IP address of your machine.
# ifconfig ethX "the IP address of your machine" b. Set the IP address of DNS. Insert the following configuration in /etc/resolv.conf. nameserver "the IP address of DNS" c. Set the IP address of gateway.
# route add default gw "the IP address of gateway"
2. Set by doing configurations in /etc/sysconfig/network-scripts/ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network /ifcfg-ethX for SuSE. There are two examples to set network configurations.
a. Fix IP address: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes TYPE=ethernet NETMASK=255.255.255.0 IPADDR=192.168.1.1 GATEWAY=192.168.1.254 BROADCAST=192.168.1.255
b. DHCP: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
3.在/etc/sysconfig/network-scripts/ifcfg-ethX下加入
insmod /gy/r8168-8.006.00/src/r8168.ko
alias eth0 r8168
4.re bo o t 即可
2. # lsmod | grep r8169 If it is installed, please remove it.
# rmmod r8169 note: If the built-in driver cannot removed byrmmod, please edit /etc/modprobe.conf and comment 'alias eth0 r8169'.Then, remmove it again or reboot your computer. Unpack the tarball :
# tar vjxf r8168-8.aaa.bb.tar.bz2 Change to the directory:
# cd r8168-8.aaa.bb If you are running the target kernel, then you should be able to do : # make clean modules (as root or with sudo)
# make install
# depmod -a
# insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x) You can check whether the driver is loaded by using following commands.
# lsmod | grep r8168
# ifconfig -a If there is a device name, ethX, shown on the monitor, the linux driver is loaded. Then, you can use the following command to activate the ethX.
# ifconfig ethX up ,where X=0,1,2,...<Set the network related information> 1. Set manually a. Set the IP address of your machine.
# ifconfig ethX "the IP address of your machine" b. Set the IP address of DNS. Insert the following configuration in /etc/resolv.conf. nameserver "the IP address of DNS" c. Set the IP address of gateway.
# route add default gw "the IP address of gateway"
2. Set by doing configurations in /etc/sysconfig/network-scripts/ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network /ifcfg-ethX for SuSE. There are two examples to set network configurations.
a. Fix IP address: DEVICE=eth0 BOOTPROTO=static ONBOOT=yes TYPE=ethernet NETMASK=255.255.255.0 IPADDR=192.168.1.1 GATEWAY=192.168.1.254 BROADCAST=192.168.1.255
b. DHCP: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
3.在/etc/sysconfig/network-scripts/ifcfg-ethX下加入
insmod /gy/r8168-8.006.00/src/r8168.ko
alias eth0 r8168
4.re bo o t 即可