LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   RTL8111/8168B PCI Express Gigabit Ethernet problems Ubuntu (http://www.linuxquestions.org/questions/linux-networking-3/rtl8111-8168b-pci-express-gigabit-ethernet-problems-ubuntu-797088/)

hudsonryde 03-22-2010 12:50 PM

RTL8111/8168B PCI Express Gigabit Ethernet problems Ubuntu
 
Okay, I had posted on here awhile back about a wireless card that was giving me trouble, but it doesn't seem like there was a good solution out there, but that's beside the point, I have now hooked the box into a wired connection ready to enjoy the internet at my fingertips again. but alas, the ethernet card does not work...
I have done some searching and the solutions i've found are a couple years old and i cannot get them to work, or they simply mean i must buy a new ethernet card... woohoo.

anyway, if i could get some help first, that would be excellent, I am running Ubuntu Studio 9.10 64-bit, the wireless card is RTL8111/8168B PCI Express Gigabit Ethernet

hudsonryde 03-22-2010 09:38 PM

okay, i did some hunting, and found me a driver on realtek's site, downloaded it, and got it installed and everything, and tried to configure it using the included instructions:
<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. Fixed 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

<Modify the MAC address>
There are two ways to modify the MAC address of the NIC.
1. Use ifconfig:

# ifconfig ethX hw ether YY:YY:YY:YY:YY:YY

,where X is the device number assigned by Linux kernel, and
YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

2. Use ip:

# ip link set ethX address YY:YY:YY:YY:YY:YY

,where X is the device number assigned by Linux kernel, and
YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

<Force Link Status>

1. Force the link status when insert the driver.

If the user is in the path ~/r8168, the link status can be forced
to one of the 5 modes as following command.

# insmod ./src/r8168.ko speed=SPEED_MODE duplex=DUPLEX_MODE autoneg=NWAY_OPTION

,where
SPEED_MODE = 1000 for 1000Mbps
= 100 for 100Mbps
= 10 for 10Mbps
DUPLEX_MODE = 0 for half-duplex
= 1 for full-duplex
NWAY_OPTION = 0 for auto-negotiation off (true force)
= 1 for auto-negotiation on (nway force)
For example:

# insmod ./src/r8168.ko speed=100 duplex=0 autoneg=1

will force PHY to operate in 100Mpbs Half-duplex(nway force).

2. Force the link status by using ethtool.
a. Insert the driver first.
b. Make sure that ethtool exists in /sbin.
c. Force the link status as the following command.

# ethtool -s ethX speed SPEED_MODE duplex DUPLEX_MODE autoneg NWAY_OPTION

,where
SPEED_MODE = 1000 for 1000Mbps
= 100 for 100Mbps
= 10 for 10Mbps
DUPLEX_MODE = half for half-duplex
= full for full-duplex
NWAY_OPTION = off for auto-negotiation off (true force)
= on for auto-negotiation on (nway force)

For example:

# ethtool -s eth0 speed 100 duplex full autoneg on

will force PHY to operate in 100Mpbs Full-duplex(nway force).

<Jumbo Frame>
Transmitting Jumbo Frames, whose packet size is bigger than 1500 bytes, please change mtu by the following command.

# ifconfig ethX mtu MTU

, where X=0,1,2,..., and MTU is configured by user.

RTL8168B/8111B supports Jumbo Frame size up to 4 kBytes.
RTL8168C/8111C and RTL8168CP/8111CP support Jumbo Frame size up to 6 kBytes.
RTL8168D/8111D supports Jumbo Frame size up to 9 kBytes.

but i did not get very far. down to 1c. actually... any help?

hudsonryde 03-22-2010 09:47 PM

sorry to keep posting but i believe i have found the problem, but i do not know how to fix it... i ran an lspci -v and noticed that for every output i got a "compatibilities: <access denied>"... how can i resolve this?

homemadev 08-06-2011 04:55 AM

Hello.. I have a similar problem.. I'm getting the "Capabilities: <access denied>" error on the exact same Realtek controller.

Would you please let me know how you solved your problem? Even reinstalling Ubuntu doesn't help... Thanks!

EDIT: I realize "access denied" is just a permissions, resolved by sudo... Still, I'm having this error and am curious for help.. here are the basics:

Atom 330
Ubuntu Maverick 10: 2.6.32-24-generic
(same problem with 2.6.32-33 and the latest, Natty, 2.6.38-10)
Realtek RTL8111/8168B PCI Express Gigabit Ethernet Controller

ifconfig shows my device as eth0:
Code:

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:e0:4c:68:76:0b 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:40 Base address:0x6000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

also:

Code:

fred@geanette:~$ sudo ifdown eth0
ifdown: interface eth0 not configured
fred@geanette:~$
fred@geanette:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
fred@geanette:~$
fred@geanette:~$
fred@geanette:~$ uname -r
2.6.38-10-generic
fred@geanette:~$ sudo lspci -v
[sudo] password for fred:
00:00.0 Host bridge: nVidia Corporation MCP79 Host Bridge (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0

00:00.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0

00:03.0 ISA bridge: nVidia Corporation MCP79 LPC Bridge (rev b2)
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0
        I/O ports at 4f00 [size=256]

00:03.1 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: 66MHz, fast devsel

00:03.2 SMBus: nVidia Corporation MCP79 SMBus (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: 66MHz, fast devsel, IRQ 10
        I/O ports at 4900 [size=64]
        I/O ports at 4d00 [size=64]
        I/O ports at 4e00 [size=64]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: nForce2_smbus
        Kernel modules: i2c-nforce2

00:03.3 RAM memory: nVidia Corporation MCP79 Memory Controller (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: 66MHz, fast devsel

00:03.5 Co-processor: nVidia Corporation MCP79 Co-processor (rev b1)
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 20
        Memory at fae80000 (32-bit, non-prefetchable) [size=512K]
        Kernel driver in use: nvidia
        Kernel modules: nvidia-current

00:04.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1) (prog-if 10 [OHCI])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 23
        Memory at fae7f000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: ohci_hcd

00:04.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1) (prog-if 20 [EHCI])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
        Memory at fae7ec00 (32-bit, non-prefetchable) [size=256]
        Capabilities: [44] Debug port: BAR=1 offset=00a0
        Capabilities: [80] Power Management version 2
        Kernel driver in use: ehci_hcd

00:06.0 USB Controller: nVidia Corporation MCP79 OHCI USB 1.1 Controller (rev b1) (prog-if 10 [OHCI])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 22
        Memory at fae7d000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: ohci_hcd

00:06.1 USB Controller: nVidia Corporation MCP79 EHCI USB 2.0 Controller (rev b1) (prog-if 20 [EHCI])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 20
        Memory at fae7e800 (32-bit, non-prefetchable) [size=256]
        Capabilities: [44] Debug port: BAR=1 offset=00a0
        Capabilities: [80] Power Management version 2
        Kernel driver in use: ehci_hcd

00:08.0 Audio device: nVidia Corporation MCP79 High Definition Audio (rev b1)
        Subsystem: nVidia Corporation Device cb84
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
        Memory at fae78000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: HDA Intel
        Kernel modules: snd-hda-intel

00:09.0 PCI bridge: nVidia Corporation MCP79 PCI Bridge (rev b1) (prog-if 01 [Subtractive decode])
        Flags: bus master, 66MHz, fast devsel, latency 0
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
        Capabilities: [b8] Subsystem: nVidia Corporation Device cb79

00:0b.0 IDE interface: nVidia Corporation MCP79 SATA Controller (rev b1) (prog-if 85 [Master SecO PriO])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 41
        I/O ports at c080 [size=8]
        I/O ports at c000 [size=4]
        I/O ports at bc00 [size=8]
        I/O ports at b880 [size=4]
        I/O ports at b800 [size=16]
        Memory at fae76000 (32-bit, non-prefetchable) [size=8K]
        Capabilities: [44] Power Management version 2
        Capabilities: [8c] SATA HBA v1.0
        Capabilities: [b0] MSI: Enable+ Count=1/8 Maskable- 64bit+
        Kernel driver in use: ahci
        Kernel modules: ahci

00:0c.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [80] Express Root Port (Slot+), MSI 00
        Kernel driver in use: pcieport
        Kernel modules: shpchp

00:10.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
        I/O behind bridge: 0000d000-0000dfff
        Memory behind bridge: faf00000-fbffffff
        Prefetchable memory behind bridge: 00000000e0000000-00000000f7ffffff
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 2
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Kernel modules: shpchp

00:15.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
        I/O behind bridge: 0000e000-0000efff
        Memory behind bridge: feb00000-febfffff
        Prefetchable memory behind bridge: 00000000f9f00000-00000000f9ffffff
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [80] Express Root Port (Slot+), MSI 00
        Kernel driver in use: pcieport
        Kernel modules: shpchp

00:16.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [80] Express Root Port (Slot+), MSI 00
        Kernel driver in use: pcieport
        Kernel modules: shpchp

00:17.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=06, subordinate=06, sec-latency=0
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [80] Express Root Port (Slot+), MSI 00
        Kernel driver in use: pcieport
        Kernel modules: shpchp

00:18.0 PCI bridge: nVidia Corporation MCP79 PCI Express Bridge (rev b1) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=07, subordinate=07, sec-latency=0
        Capabilities: [40] Subsystem: nVidia Corporation Device cb79
        Capabilities: [48] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
        Capabilities: [80] Express Root Port (Slot+), MSI 00
        Kernel driver in use: pcieport
        Kernel modules: shpchp

03:00.0 VGA compatible controller: nVidia Corporation ION VGA (rev b1) (prog-if 00 [VGA controller])
        Subsystem: nVidia Corporation Device cb79
        Flags: bus master, fast devsel, latency 0, IRQ 23
        Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f6000000 (64-bit, prefetchable) [size=32M]
        I/O ports at dc00 [size=128]
        [virtual] Expansion ROM at fafe0000 [disabled] [size=128K]
        Capabilities: [60] Power Management version 2
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Kernel driver in use: nvidia
        Kernel modules: nvidia-current, nouveau, nvidiafb

04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
        Flags: bus master, fast devsel, latency 0, IRQ 40
        I/O ports at e800 [size=256]
        Memory at febff000 (64-bit, non-prefetchable) [size=4K]
        Memory at f9ffc000 (64-bit, prefetchable) [size=16K]
        Expansion ROM at febc0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [ac] MSI-X: Enable- Count=4 Masked-
        Capabilities: [cc] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number eb-02-00-00-68-4c-e0-00
        Kernel driver in use: r8169
        Kernel modules: r8169



All times are GMT -5. The time now is 11:14 AM.