# USB Ethernet adapter gets or reciev no IP

## lovelytux

Hey,

I bought a usb-ethernet-adapter and now i try to use it. This gadget gets no IPv4 Adress.

```
grep USB_RTL8152 /usr/src/linux/.config: CONFIG_USB_RTL8152=y
```

```
lsusb: Bus 013 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
```

```
udevadm test-builtin net_id /sys/class/net/enp12s0u1 2>/dev/null

ID_NET_NAME_MAC=enx00e04c0012bd

ID_OUI_FROM_DATABASE=REALTEK SEMICONDUCTOR CORP.

ID_NET_NAME_PATH=enp12s0u1
```

/etc/conf.d/net is empty. I use dhcpcd.

```
killall -9 dhcpcd

dhcpcd   enp12s0u1 --noipv4ll

main: control_open: Connection refused

DUID 00:01:00:01:1a:c1:97:8a:30:85:a9:92:cd:d5

enp12s0u1: IAID 4c:00:12:bd

enp12s0u1: soliciting a DHCP lease

enp12s0u1: soliciting an IPv6 router

enp12s0u1: no IPv6 Routers available

timed out

dhcpcd exited
```

If I plugin the gadget in LinuxMint it doesn't works to. If plugin in windows the gadget recievs a IPV 4 adress. I do all atempts in the same network behind pfsense.

Thanks for help!

lovelyluxLast edited by lovelytux on Sun Nov 25, 2018 1:16 pm; edited 3 times in total

----------

## NeddySeagoon

lovelytux,

With the device unplugged, both the system from powered off.

Plug in the device

Put dmesg on a pastebin site and post the link.  This will tell what the kernel did when the device was discovered.

----------

## lovelytux

Hey,

https://paste.pound-python.org/show/RMXTlPyussn0JW2iR15v/

Tanks 

lovelytux

----------

## NeddySeagoon

lovelytux,

Here is your USB3 being started and your USB LAN being started. 

```
[    1.196435] usb 13-1: new SuperSpeed USB device number 2 using xhci_hcd

[    1.208973] usb 13-1: New USB device found, idVendor=0bda, idProduct=8153

[    1.209078] usb 13-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6

...

[    1.209617] usb 13-1: Product: USB 10/100/1000 LAN

[    1.209710] usb 13-1: Manufacturer: Realtek

[    1.209810] usb 13-1: SerialNumber: 000002
```

Then root mounts

```
[    1.586382] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
```

and lastly, udev renames it

```
[    3.817665] r8152 13-1:1.0 eth0: v1.09.9

[    3.820288] r8152 13-1:1.0 enp12s0u1: renamed from eth0

```

I don't see any signs of a driver loading. You have 

```
CONFIG_USB_RTL8152=y
```

which is correct.

What does 

```
modprobe r8152
```

tell. The right answer is nothing as its built in.

What does 

```
uname -a
```

 show?

In particular the date/time

```
uname -a

Linux NeddySeagoon_Static 4.19.0-gentoo #1 SMP PREEMPT Thu Oct 25 19:29:44 BST 2018 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux
```

That's the build date/time of the running kernel. Does it show what you expect?

----------

## lovelytux

Hello NedySeagoon,

 *NeddySeagoon wrote:*   

> Here is your USB3 being started and your USB LAN being started. 

 

Yes, because if I connected my LAN onboard, the PC is going into reboot all time, somtetimes more, sometimes less. If deactivate lan in Bios, this phenomenon goes away. I think the Lan onboard is broken down. Therfore the usb choise. 

 *NeddySeagoon wrote:*   

> 
> 
> I don't see any signs of a driver loading. You have 
> 
> ```
> ...

 

I choose as module before, built it just new as build in!

The answer is: nothing

 *NeddySeagoon wrote:*   

> That's the build date/time of the running kernel. Does it show what you expect?

 

Yes the time before and now:  *Quote:*   

> inux lx 4.14.78-gentoo #12 SMP Sat Nov 24 17:08:29 CET 2018 x86_64 AMD FX(tm)-8150 Eight-Core Processor AuthenticAMD GNU/Linux

 

I use, what I see and what I think to use. But thank you. Your words let my eyes went over the timestamp.

The driver not loading? WHY?

Here is the new dmesg after kernel with build in driver: 

```
https://paste.pound-python.org/show/q12aqaZKt8vsycYotQcA/
```

lovelytux

Edit:

```
ls -hasl  /sys/class/net/enp12s0u1/device/driver/module: ../module/r8152
```

 That doesn't shows driver is loaded?

----------

## NeddySeagoon

lovelytux,

Can you try a newer kernel please or try the dongle in a USB2 port?

This Red Hat bug suggests that there are problems with your device and USB 3.

It was fixed there in 4.13 but the fix may not have got upstream in time for 4.14.

The gentoo testing kernel is worth trying.

----------

## lovelytux

Hello!

After hour and hour! Thanks for your help. That it is!   :Very Happy: 

I have to : 

```
rm  /sys/class/net/enp12s0u1/ -Rf
```

 and after this, put in USB 2. IT WORKS!

With: 

```
Linux lx 4.14.78-gentoo #12 SMP Sat Nov 24 17:08:29 CET 2018 x86_64 AMD FX(tm)-8150 Eight-Core Processor AuthenticAMD GNU/Linux
```

Thank you very much!

lovelytux   :Cool: 

----------

## NeddySeagoon

lovelytux,

USB2 cannot support 1G Ethernet as its only 440Mbit. Using USB2 is a workaround.

----------

