USB tethering detected and up but no internet

I am connceting to internet via usb tethering as my wifi is not detected and drivers not present for freebsd or you can say i am still yet to look into getting it up online

whats happening is usb tethering is detected and up and running but no internet.

so i login as root and manually run dhclient and wow its running.

what must be the issue?

shouldnt dhclient run on its own when the usb tethering is detected and the interface is brought up?

whether at startup or hotplug when necessary but shouldnt dhclient run auto when the connection is made and interface is brought up.

running netif stop start restart also does not start the internet access but just brings the ue0 interface up or down.
 
I am connceting to internet via usb tethering as my wifi is not detected

I guess you mean tethered via a phone? Plenty you don't say here, but I did this for a while, and keep my old .conf settings.

whats happening is usb tethering is detected and up and running but no internet.

What do you have in your /etc/rc.conf to enable tethering?

Here:
ifconfig_ue0="SYNCDHCP"
defaultroute_delay="30"
firewall_simple_oif="ue0"
firewall_nat_interface="ue0"

startup / restart script /root/bin/tether
Code:
#!/bin/sh
# 4/7/18 fix routing etc after USB-tethering phone
service netif restart
service routing restart
service ipfw restart
route add default 192.168.42.129

so i login as root and manually run dhclient and wow its running.

what must be the issue?

shouldnt dhclient run on its own when the usb tethering is detected and the interface is brought up?

No, you may want to specify IP address(es) manually, so tell it DHCP on that interface. There may be other interfaces (mine was also router for other boxes).

Edit: note my phone's DHCP didn't return its address as default route.

whether at startup or hotplug when necessary but shouldnt dhclient run auto when the connection is made and interface is brought up.

Maybe one day it will be able to read our minds :)

I stopped digging when it started working every time.
 
Here:
ifconfig_ue0="SYNCDHCP"
it was "DHCP"

changed to "SYNCDHCP"

and EUREKA it worked.

Thanks.

Please be a bit patient with an absolute BSD newbie from the Linux World.

Also shouldnt SYNCDHCP be added at installation time itself when the installer is detecting and configuring networks?
 
it was "DHCP"
changed to "SYNCDHCP"
and EUREKA it worked.

In some situations opposite is true; often some trial and error is involved with (esp. wireless) networking.

Please be a bit patient with an absolute BSD newbie from the Linux World.

Sorry if you thought I wasn't, just that usually the more info supplied and the less assumed, the better. That said, welcome!

Also shouldnt SYNCDHCP be added at installation time itself when the installer is detecting and configuring networks?

See apropos dhcp for the huge range of dhcp options, also /etc/defaults/rc.conf for more clues.

I can't grok much of it myself. The installer has no idea of your circumstances and goes for a basic setup. Also, phone tethering isn't so common nowadays.

Again, for wifi that can be tricky, so you need to be prepared to fine-tune your system, mostly post-install.
 
While installing it automatically detected my tethering connected to internet and downloaded some files to, so I thought that possibly it would have configured it

in linux as soon as i connect phone via usb the conection is detected configured and brought up all automatically.

since the installer did the same thing i thought post install all would be working fine.
 
in linux as soon as i connect phone via usb the conection is detected configured and brought up all automatically.
Well, on most desktop oriented Linux distribution there is a configuration file present on the system which does that. FreeBSD doesn't provide such a configuration by default.

But you can easily configure one.

In the Devd wiki is an example of a devd event configuration for USB tethering to run dhclient when activating USB tethering on the phone (scroll to the end of the page).

No /etc/rc.conf configuration required or additional custom scripts.

Create the below configuration file, copy/paste the code, run service devd restart, plug in the phone, activate USB tethering on phone.

/usr/local/etc/devd/usb_tethering.conf:
Code:
notify 20 {
        match "system"          "ETHERNET";
        match "type"            "IFATTACH";
        match "subsystem"       "ue[0-9]+";
        action "/sbin/dhclient $subsystem";
};

The ifconfig_ue0="SYNCDHCP" in /etc/rc.conf can be deleted or commented.
 
Back
Top