LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-27-2020, 07:52 AM   #1
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Rep: Reputation: Disabled
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?
 
Old 07-27-2020, 08:27 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,236

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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.
 
Old 07-27-2020, 09:50 AM   #3
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camorri View Post
post information on the type of internet connection you have
This is connection to a mobile network through a SIM card. There is no ip address, or gateway aything that the mobile networks provides.

Code:
~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UP 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: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether d0:bf:9c:9d:41:46 brd ff:ff:ff:ff:ff:ff
3: enp0s20u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 1e:8d:1a:30:c9:8d brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.44/24 brd 192.168.42.255 scope global dynamic noprefixroute enp0s20u1
       valid_lft 3307sec preferred_lft 3307sec
    inet 192.168.42.43/24 brd 192.168.42.255 scope global secondary dynamic noprefixroute enp0s20u1
       valid_lft 3311sec preferred_lft 2861sec
    inet6 fe80::4aaa:bb47:3c2:ed80/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: wwp0s20u2: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 72:cb:1a:1f:57:00 brd ff:ff:ff:ff:ff:ff
    inet 169.254.171.226/16 brd 169.254.255.255 scope global noprefixroute wwp0s20u2
       valid_lft forever preferred_lft forever
    inet6 fe80::8194:37aa:507:24bc/64 scope link 
       valid_lft forever preferred_lft forever
Please ignore 'enp0s20u1'. This is a temporary connection I am on to make this post.
 
Old 07-27-2020, 10:28 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,236

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Can you ping the gateway for this connection? If not, post the output of 'route' command.
 
Old 07-27-2020, 10:41 AM   #5
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-27-2020, 10:51 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,236

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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.

Last edited by camorri; 07-27-2020 at 10:52 AM.
 
Old 07-27-2020, 11:13 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,763

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
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.
 
Old 07-27-2020, 12:19 PM   #8
dilbert_uk
Member
 
Registered: Aug 2011
Location: Lima, Peru
Distribution: Debian 10.4, xubuntu 20.04, Ubuntu 20.04 LTS
Posts: 83

Rep: Reputation: 4
Quote:
Originally Posted by michaelk View Post
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.
 
Old 07-28-2020, 05:01 AM   #9
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Original Poster
Rep: Reputation: Disabled
This is the device I'm using.
Code:
~ $ 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).
Attached Thumbnails
Click image for larger version

Name:	new_connection.png
Views:	9
Size:	73.7 KB
ID:	33744  
 
Old 07-28-2020, 06:04 AM   #10
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,236

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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?
 
Old 07-28-2020, 07:01 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by SegFault1 View Post
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.
 
Old 07-28-2020, 08:13 AM   #12
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-28-2020, 12:44 PM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by SegFault1 View Post
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.

PPS: two search results for "2020:4000":
https://www.linuxquestions.org/quest...pp-4175537653/
https://www.linuxliteos.com/forums/n...-olicard-300)/

Last edited by ondoho; 07-28-2020 at 12:49 PM.
 
Old 07-29-2020, 05:40 AM   #14
SegFault1
LQ Newbie
 
Registered: Jul 2018
Distribution: Void Linux
Posts: 23

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Linux - Newbie 2 06-04-2011 04:59 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Programming 7 06-04-2011 11:47 AM
Any command to know what networking interface am i using to connect to internet tirengarfio Linux - Networking 1 02-02-2010 06:45 AM
merge files, given its odd and even given timepassman Linux - Software 1 05-08-2008 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration