Re: usb0 unmanaged (g_ether)



On Thu, 2018-01-18 at 19:20 +0100, Ana Rodriguez Lopez wrote:
Hi Thomas,

could have been, but the cable is connected :-)

I can see also on the other side of the cable (my PC) when I
disconnect
and connect the cable:

[274579.667313] usb 1-1.2: new full-speed USB device number 38 using
ehci-pci
[274579.779275] usb 1-1.2: New USB device found, idVendor=0525,
idProduct=a4a2
[274579.779295] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[274579.779299] usb 1-1.2: Product: RNDIS/Ethernet Gadget
[274579.779303] usb 1-1.2: Manufacturer: Linux 4.13.0 with at91_udc
[274579.785787] cdc_subset: probe of 1-1.2:1.0 failed with error -22
[274579.787109] cdc_ether 1-1.2:1.0 usb0: register 'cdc_ether' at
usb-0000:00:1a.0-1.2, CDC Ethernet Device, 8e:8e:76:6c:34:0e
[274579.811909] cdc_ether 1-1.2:1.0 enp0s26u1u2: renamed from usb0
[274579.862089] IPv6: ADDRCONF(NETDEV_UP): enp0s26u1u2: link is not
ready


I tried to set usb0 in /etc/network/interfaces

auto usb0
iface usb0 inet dhcp

and the connection is there!

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 8c:8e:76:00:44:bb brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.101/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 86230sec preferred_lft 86230sec
    inet6 fe80::d475:83ed:251b:3c19/64 scope link
       valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
    link/ether 8e:8e:76:28:44:ab brd ff:ff:ff:ff:ff:ff
    inet 169.254.7.90/16 brd 169.254.255.255 scope link usb0:avahi
       valid_lft forever preferred_lft forever
    inet6 fe80::8c8e:76ff:fe28:44ab/64 scope link
       valid_lft forever preferred_lft forever

Jan 18 17:37:42 D130102 NetworkManager[756]: <trace>
[1516297062.4830]
ethtool[4]: ETHTOOL_GLINK, usb0: success
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5000]
device[0x6bc788] (usb0): constructed (NMDeviceEthernet)
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5011]
device[0x6bc788] (usb0): start setup of NMDeviceEthernet, kernel
ifindex 4
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5022]
platform-linux: error reading net:/sys/class/net/usb0/phys_port_id:
error reading 4096 bytes from file descriptor: Operation not
supported
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5031]
platform-linux: sysctl: reading 'net:/sys/class/net/usb0/dev_id':
'0x0'
Jan 18 17:37:42 D130102 NetworkManager[756]: <trace>
[1516297062.5038]
ethtool[4]: ETHTOOL_GDRVINFO, usb0: success
Jan 18 17:37:42 D130102 NetworkManager[756]: <trace>
[1516297062.5044]
ethtool[4]: ETHTOOL_GLINK, usb0: success
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5048]
device[0x6bc788] (usb0): hw-addr: hardware address now
8E:8E:76:28:44:AB
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5052]
device[0x6bc788] (usb0): hw-addr: update initial MAC address
8E:8E:76:28:44:AB
Jan 18 17:37:42 D130102 NetworkManager[756]: <trace>
[1516297062.5057]
ethtool[4]: ETHTOOL_GPERMADDR, usb0: success
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5229]
device[0x6bc788] (usb0): hw-addr: unable to read permanent MAC
address
(use current: 8E:8E:76:28:44:AB)
Jan 18 17:37:42 D130102 NetworkManager[756]: <info> 
[1516297062.5235]
device (usb0): link connected
Jan 18 17:37:42 D130102 NetworkManager[756]: <trace>
[1516297062.5240]
ethtool[4]: ETHTOOL_GSET, usb0: failed: Operation not supported
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5244]
device[0x6bc788] (usb0): carrier is ON
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5266]
device[0x6bc788] (usb0): unmanaged: flags set to
[platform-init,!loopback=0x10/0x18/unmanaged/unrealized, set-managed
[loopback=0x8])
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5272]
device[0x6bc788] (usb0): unmanaged: flags set to
[platform-init,user-udev,!loopback=0x410/0x418/unmanaged/unrealized,
set-unmanaged [user-udev=0x400])
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5276]
device[0x6bc788] (usb0): unmanaged: flags set to
[platform-init,user-settings,user-
udev,!loopback=0x450/0x458/unmanaged/unrealized,
set-unmanaged [user-settings=0x40])
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5280]
device[0x6bc788] (usb0): unmanaged: flags set to
[user-settings,user-udev,!loopback,!platform-
init=0x440/0x458/unmanaged/unrealized,
set-managed [platform-init=0x10])
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.5288]
device[0x6bc788] (usb0): unmanaged: flags set to
[user-settings,user-udev,!sleeping,!loopback,!platform-
init=0x440/0x459/unmanaged/unrealized,
set-managed [sleeping=0x1])
Jan 18 17:37:42 D130102 NetworkManager[756]: <info> 
[1516297062.6257]
manager: (usb0): new Ethernet device
(/org/freedesktop/NetworkManager/Devices/4)
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.6640]
Unmanaged device found: usb0; state CONNECTED forced.
Jan 18 17:37:42 D130102 NetworkManager[756]: <debug>
[1516297062.6658]
Unmanaged device found: usb0; state CONNECTED forced.
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.5643]
Unmanaged device found: usb0; state CONNECTED forced.
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.6827]
Unmanaged device found: usb0; state CONNECTED forced.
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.7202]
device[0x6bc788] (usb0): ip4-config: update (commit=0,
routes-full-sync=0, new-config=0x6c7838)
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.7675]
device[0x6bc788] (usb0): ip4-config: set IP4Config instance
(/org/freedesktop/NetworkManager/IP4Config/4)
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.7679]
default-route: entry[0/dev:0x6bc788:usb0:1:-sync]: record:add   
0.0.0.0/0 via 0.0.0.0 dev 4 metric 1004 mss 0 src rt-boot scope link
(1004)
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.7722]
device[0x6bc788] (usb0): ip6-config: update (commit=0,
routes-full-sync=0, new-config=0x6f78b8)
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.8207]
device[0x6bc788] (usb0): ip6-config: set IP6Config instance
(/org/freedesktop/NetworkManager/IP6Config/4)
Jan 18 17:37:44 D130102 NetworkManager[756]: <debug>
[1516297064.8442]
properties-changed[0x6bc788]: type NMDeviceEthernet, iface
NMDBusDeviceEthernetSkeleton: {'Autoconnect': <true>, 'Carrier':
<true>,
'Driver': <'at91_udc'>, 'DriverVersion': <'29-May-2008'>,
'FirmwareVersion': <'at91_udc'>, 'HwAddress': <'8E:8E:76:28:44:AB'>,
'Interface': <'usb0'>, 'Ip4Address': <uint32 1510473385>,
'Ip4Config':
<objectpath '/org/freedesktop/NetworkManager/IP4Config/4'>,
'Ip6Config':
<objectpath '/org/freedesktop/NetworkManager/IP6Config/4'>, 'Mtu':
<uint32 1500>, 'PermHwAddress': <''>, 'PhysicalPortId': <''>, 'Real':
<true>, 'Udi': <'/virtual/device/placeholder/3'>}
Jan 18 17:37:45 D130102 NetworkManager[756]: <debug>
[1516297065.5295]
device[0x6bc788] (usb0): emit RECHECK_ASSUME signal

But even if NM notices this change, it is not shown in the nmcli:

DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  Ethernet  
usb0    ethernet  unmanaged  --      

Hi,

As you see, usb0 is still configured as unmanaged. 
This time however, it is marked as unmanaged for yet another reason.
See below.

Configure the device as managed instead, as said before.


  
sit0    iptunnel  unmanaged  --        
lo      loopback  unmanaged  --   


Why is the manual connection (without /etc/network/interfaces) not
working?

If you enable ifupdown settings plugin and configure the interface in
/etc/network/interfaces, then it's also marked as unmanaged. Don't do
that, See "managed" in the IFUPDOWN SECTION of `man
NetworkManager.conf`. Just drop the section from interfaces file, or at
least configure NM with ifupdown.managed.


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]