anyone know how to connect to internet through a given interface.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
anyone know how to connect to internet through a given interface.
Code:
~ $ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether d0:bf:9c:9d:41:46 brd ff:ff:ff:ff:ff:ff
3: wwp0s20u2: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 2e:ec:91:fa:ed:46 brd ff:ff:ff:ff:ff:ff
5: enp0s20u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 3a:92:c2:e9:cd:77 brd ff:ff:ff:ff:ff:ff
I want to connect through the interface "wwp0s20u2", so I type
Code:
ip link set dev wwp0s20u2 up
and then nothing happens. I am still not connected to the internet. How to fix?
What have you done to configure this interface? It needs a IP address, run the command 'ip addr' and post the results.
It will make getting this working if you post information on the type of internet connection you have. Wired, wireless, router, direct connection, etc.
Admittedly, I don't know nothing about networking, so bear with me please.
I'm not sure which gateway you're talking about. The mobile ISP I'm trying to connect to, doesn't publish no gateway. But, I tried these.
Code:
~ $ ping 169.254.0.0
ping: Do you want to ping broadcast? Then -b. If not, check your local firewall rules
~ $ ping -b 169.254.0.0
WARNING: pinging broadcast address
PING 169.254.0.0 (169.254.0.0) 56(84) bytes of data.
^C
--- 169.254.0.0 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4114ms
~ $ ping 169.254.255.255
ping: Do you want to ping broadcast? Then -b. If not, check your local firewall rules
~ $ ip route
default via 192.168.42.129 dev enp0s20u1 proto dhcp src 192.168.42.43 metric 206
169.254.0.0/16 dev wwp0s20u2 scope link src 169.254.171.226 metric 204
192.168.42.0/24 dev enp0s20u1 proto dhcp scope link src 192.168.42.43 metric 206
This is the gateway that is set now, for your enp0s20u1. This is a class C netowrk, the one not working is Class B network address. There is nothing wrong with that.
You will need to find out what the gateway address is for the connection that is not working. It might help if you posted what type of device this is. Then you can add the new GW address to the kernel wouting table.
169.254.x.x is the link-local or APIPA address that will be automatically assigned if so configured if the DHCP server fails to respond or times out and is not a public IP address.
Unfortunately I lack any expertise using mobile connections.
What distribution / version are you running?
What type of mobile LTE device is connected to your computer?
The good thing is that the device is recognized and seems to be working. I can't tell if it is connected to the mobile carrier or not.
169.254.x.x is the link-local or APIPA address that will be automatically assigned if so configured if the DHCP server fails to respond or times out and is not a public IP address.
Unfortunately I lack any expertise using mobile connections.
What distribution / version are you running?
What type of mobile LTE device is connected to your computer?
The good thing is that the device is recognized and seems to be working. I can't tell if it is connected to the mobile carrier or not.
I remember that address. It came up once when the DHCP server didn't give me an IP address. I am on a shared LAN and the owner didn't know neither what happens. He only suggested to use a static address.
I am using the network manager from xfce, so it's fairly straight forward. For setting up the static address, the gateway address is x.x.x.1, normally. Otherwise, I would check out with nmap what devices are on that LAN or is it a router directly connected to the ISP.
sudo nmap -sn 192.168.1.0/24
e.g.
And not to forget the DNS servers with a static address. Maybe 8.8.8.8 from Google if there are none from the ISP at hand.
~ $ lsusb -vd 2020:4000 | head -n 17
Bus 001 Device 006: ID 2020:4000 Smartlink Network System Ltd DG-BA3321
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x2020
idProduct 0x4000
bcdDevice 3.00
iManufacturer 9 Smartlink Network System Ltd
iProduct 10 DG-BA3321
iSerial 0
bNumConfigurations 1
Mine is a lesser known distro, Void Linux, it has no version. It's a rolling release.
I've used this device before. In my GNOME 2 Mate desktop, I used the nm-applet to create a new connection > mobile broadband > select ISP > select billing plan. Then select the newly created connection. But now, I'm stuck at step where I select the device (see attached image).
Has this device ever worked on Void Linux? If yes, then since Void is a rolling release, how many updates ago did it work? You may have to roll back some updates.
Quote:
I've used this device before. In my GNOME 2 Mate desktop
What operating system was this?
The symptoms from the thumbnail leads me to believe Void is having a problem talking to the device, probably driver related.
I did look for information on the Smartlink DG-BA3321 device. Apparently the drivers are supposed to self install when you plug this device into a USB2 port. Not at all sure if this can work on a linux system. Typically drivers need to be compiled on a particular system, to allow the driver to interact with the kernel. Never seen such a claim for a device on linux ( any distro ) before. Hence, my questions above.
I did not see a claim by Smartlink saying tested and working on linux. Have you seen such a claim?
I used the nm-applet to create a new connection > mobile broadband > select ISP > select billing plan. Then select the newly created connection. But now, I'm stuck at step where I select the device (see attached image).
Are network-manager's optional dependencies installed?
Is modem-manager installed, and its optional dependencies?
Did you reboot after installing those or after connecting the dongle resp. putting in the SIM card? I had to do that on mine.
camorri, I've never tried this device on Void before. But my brother uses Solus Linux and it works on his laptop. This device has two modes of operation, one acts as a USB Storage (ID 2020:0002), which contains some Windows EXE and Mac PKG files. I had to use usb_modeswitch to switch to the modem mode (ID:2020:4000) until it showed up in 'ip link'.
ondoho, I installed NetworkManager, network-manager-applet and ModemManager using my distro's package manager. I didn't have ModemManager installed, but after you told, I installed it and rebooted my computer. Now I can see a device listed on the 'Mobile Broadband' page (which was grayed out before), called, "cdc-wdm0". When I connect to that device, I am still not connected to the internet.
These are the packages installed/available in my distro's repo. Please take a look and tell me which ones do I need. (The installed packages are indicated by[*] and available but not installed is indicated by [-])
Code:
~ $ xbps-query --regex -Rs 'ModemManager|NetworkManager'
[*] ModemManager-1.12.10_1 Mobile broadband modem management service
[-] ModemManager-devel-1.12.10_1 Mobile broadband modem management service - developmen...
[*] NetworkManager-1.22.10_2 Network Management daemon
[-] NetworkManager-devel-1.22.10_2 Network Management daemon - development files
[-] NetworkManager-l2tp-1.8.2_1 NetworkManager VPN plugin for L2TP/IPsec
[-] NetworkManager-openconnect-1.2.6_2 NetworkManager VPN plugin for OpenConnect
[-] NetworkManager-openvpn-1.8.10_2 NetworkManager VPN plugin for OpenVPN
[-] NetworkManager-pptp-1.2.8_3 NetworkManager VPN plugin for pptp
[-] NetworkManager-strongswan-1.4.5_2 Strongswan NetworkManager plugin
[-] NetworkManager-vpnc-1.2.6_3 NetworkManager VPN plugin for VPNC
[*] libnm-gtk-1.8.24_1 NetworkManager panel applet for GNOME - runtime library
[-] modemmanager-qt5-5.72.0_1 Qt wrapper for ModemManager DBus API
[-] modemmanager-qt5-devel-5.72.0_1 Qt wrapper for ModemManager DBus API - development
[*] network-manager-applet-1.8.24_1 NetworkManager panel applet for GNOME
[-] network-manager-applet-devel-1.8.24_1 NetworkManager panel applet for GNOME - development files
[-] networkmanager-dmenu-1.1_2 Control NetworkManager via dmenu
[-] networkmanager-qt5-5.72.0_1 Qt wrapper for NetworkManager API
[-] networkmanager-qt5-devel-5.72.0_1 Qt wrapper for NetworkManager API - development
[-] nm-tray-0.4.3_1 NetworkManager tray icon implmeneted with Qt
[-] plasma-nm-5.19.3_1 NetworkManager Plasma applet
I installed NetworkManager, network-manager-applet and ModemManager using my distro's package manager. I didn't have ModemManager installed, but after you told, I installed it and rebooted my computer. Now I can see a device listed on the 'Mobile Broadband' page (which was grayed out before), called, "cdc-wdm0". When I connect to that device, I am still not connected to the internet.
Can you be more specific?
Did you choose the right options in MM?
Can you ping numericalIP addresses?
Etc.
Also, I'm unfamilar with Void's package manager, but I'm sure you can figure out optional dependencies and if they're all installed; I'm thinking usb_modeswitch or some such.
PS: it's possible you messed things up for MM & NM with your previous low level attempts.
In the attachment few post ago, I showed you a gray dropdown box which was inactive. That has now become active with a option 'cdc-wdm0.' I select that option and create a new connection after going through the wizard. Then, I use the newly created connection to access the internet. I when I ping Cloudflare (ping 1.1.1.1), I get a new error, "100% packet loss" instead of the usual "ping: connect: Network is unreachable."
I didn't select nothing in ModemManager. I just installed it.
Code:
~ $ ModemManager
ModemManager[20408]: <info> ModemManager (version 1.12.10) starting in system bus...
ModemManager[20408]: <warn> Could not acquire the 'org.freedesktop.ModemManager1' service name
ModemManager[20408]: <info> ModemManager is shut down
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.