Bug 257213

Summary: dhclient on ue0 not working correctly
Product: Base System Reporter: Michael <michael.hmich>
Component: usbAssignee: freebsd-usb (Nobody) <usb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: 13.0-RELEASE   
Hardware: amd64   
OS: Any   

Description Michael 2021-07-15 21:53:52 UTC
I use usb tethering on my mobil for network access which comes up correctly

ugen1.3: <LG Electronics Inc. LGE Android Phone> at usbus1
urndis0 on uhub2
urndis0: <RNDIS Communications Control> on usbus1
ue0: <USB Ethernet> on urndis0
ue0: Ethernet address: 02:41:4e:11:33:02

the interface is in rc.conf
 
interface_ue0=DHCP up
dhclient_enable=YES
 
dhclient.conf
interface "ue0" {
                request subnet-mask, broadcast-address, time-offset, routers,
                       domain-name, host-name;
}

thing is, it get an IPaddress only occasionally, that is when I tap on the phone to activate the usb tethering at the moment when usb devices are scanned, but that is good luck and I need to do it manually, service dhclient stop | sudo dhclient ue0

I guess that is not the right way to do it
may be I'm doing something wrong  

thanks
Comment 1 Michael 2021-07-20 09:54:25 UTC
if somebody is interested, I solved the issue with acceptable result

ifconfig_ue0="SYNCDHCP"
background_dhclient="YES"

with "acceptable" I mean it need some time to get an IP after re-establishing the link