AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1118595
Accepted
Bill Door
Bill Door
Asked: 2019-02-16 10:54:51 +0800 CST2019-02-16 10:54:51 +0800 CST 2019-02-16 10:54:51 +0800 CST

如何在 18.04 上为 WWAN 建立 IP 连接

  • 772

如何建立与 Sierra Wireless MC7354 的 WWAN 的 IP 连接?

我有一个带有运行 Ubuntu 18.04的Sierra Wireless MC7354 调制解调器的系统。

ModemManager 可以查看和控制调制解调器。

$ mmcli --modem 0

返回大量重要信息。(这就是我知道调制解调器是 MC7354 的原因。)

/org/freedesktop/ModemManager1/Modem/0 (device id '232972a04adf83122a392fd83b274431de596ebd')
  -------------------------
  Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
           |          model: 'MC7354'
           |       

端口列表显示了几个端口:

ports: 'ttyUSB0 (qcdm), wwp0s20u5i8 (net), wwp0s20u5i10 (net), cdc-wdm0 (qmi), cdc-wdm1 (qmi), ttyUSB2 (at)'

$ mmcli --modem 0 --simple-connect="apn=internet"

是成功的

$ mmcli --bearer 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'yes'
                     |   suspended: 'no'
                     |   interface: 'wwp0s20u5i8'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'internet'
                     |     roaming: 'allowed'
                     |     IP type: 'none'
                     |        user: 'none'
                     |    password: 'none'
                     |      number: 'none'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'static'
                     |  address: '100.232.81.142'
                     |   prefix: '30'
                     |  gateway: '100.232.81.141'
                     |      DNS: '10.177.0.34', '10.177.0.210'
                     |      MTU: '1430'
  -------------------------
  IPv6 configuration |   method: 'unknown'
  -------------------------
  Stats              |          Duration: '839'
                     |    Bytes received: 'N/A'
                     | Bytes transmitted: 'N/A'

显示调制解调器已连接到互联网 (?)。

如何在 Ubuntu 上建立连接以使用此界面?

$ ifconfig -a 

wwp0s20u5i8: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 0e:ff:cc:40:45:be  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wwp0s20u5i10: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 12:4e:ee:54:3e:3e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

如何建立与此设备的 IP 连接?

谢谢您的帮助!

modem-manager ip 18.04 wwan
  • 1 1 个回答
  • 13261 Views

1 个回答

  • Voted
  1. Best Answer
    Anders F. U. Kiær
    2019-02-27T09:58:10+08:002019-02-27T09:58:10+08:00

    我想你仍然想知道。

    如何建立与 Sierra Wireless MC7354 的 WWAN 的 IP 连接?

    你已经这样做了:

    $ mmcli --bearer 0
    
    Bearer '/org/freedesktop/ModemManager1/Bearer/0'
      -------------------------
      Status             |   connected: 'yes'
    

    所以基本上剩下的就是用给定的 IP 和网络掩码设置适当的 WWAN 接口。但是,您还必须将要通过接口的流量路由到定义的网关。

    您可能应该阅读服务器指南中第 43 页左右的整个部分。 请注意,如果您使用 netplan,它会搞砸您,例如,它将忽略您手动添加的网络管理器连接。

      IPv4 configuration 
                     |   method: 'static'
                     |  address: '100.232.81.142'
                     |   prefix: '30'
                     |  gateway: '100.232.81.141'
                     |      DNS: '10.177.0.34', '10.177.0.210'
                     |      MTU: '1430'
    

    它说静态无关紧要,仅意味着只要承载保持连接,您就会拥有该IP。除非您为静态 IP 付费,否则当您重新连接承载时,ISP 很可能会给您一个新 IP。

    您收到的设置很可能基于您连接的 APN。

    依赖于 ISP,他们也可以强制使用他们的 dns。

    所以,我的问题是,当您至少有一个易于使用的网络管理器可以处理它时,为什么还要手动执行此操作?

        $ apt show network-manager
    Package: network-manager
    Version: 1.10.6-2ubuntu1.1
    Priority: optional
    Section: net
    Origin: Ubuntu
    Maintainer: Ubuntu Developers <[email protected]>
    Original-Maintainer: Utopia Maintenance Team <[email protected]>
    Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    Installed-Size: 5 927 kB
    Depends: libaudit1 (>= 1:2.2.1), libbluetooth3 (>= 4.91), libc6 (>= 2.25), libcurl3-gnutls (>= 7.16.3), libglib2.0-0 (>= 2.43.2), libgnutls30 (>= 3.5.0), libjansson4 (>= 2.0.1), libmm-glib0 (>= 1.0.0), libndp0 (>= 1.2), libnewt0.52, libnl-3-200 (>= 3.2.21), libnm0 (>= 1.10.2), libpolkit-agent-1-0 (>= 0.99), libpolkit-gobject-1-0 (>= 0.104), libpsl5 (>= 0.13.0), libreadline7 (>= 6.0), libselinux1 (>= 1.32), libsystemd0 (>= 221), libteamdctl0 (>= 1.9), libudev1 (>= 183), libuuid1 (>= 2.16), lsb-base (>= 3.2-14), wpasupplicant (>= 0.7.3-1), dbus (>= 1.1.2), udev, adduser, isc-dhcp-client (>= 4.1.1-P1-4), libpam-systemd, policykit-1
    Recommends: ppp, dnsmasq-base, iptables, modemmanager, network-manager-pptp, crda, iputils-arping
    Suggests: avahi-autoipd, libteam-utils
    Breaks: ppp (>= 2.4.7-3~), ppp (<< 2.4.7-2+~)
    Homepage: https://wiki.gnome.org/Projects/NetworkManager
    Task: ubuntu-desktop, kubuntu-desktop, kubuntu-full, xubuntu-core, xubuntu-desktop, lubuntu-gtk-desktop, lubuntu-desktop, lubuntu-qt-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
    Supported: 5y
    Download-Size: 1 500 kB
    APT-Manual-Installed: yes
    APT-Sources: http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
    Description: network management framework (daemon and userspace tools)
     NetworkManager is a system network service that manages your network devices
     and connections, attempting to keep active network connectivity when
     available. It manages ethernet, WiFi, mobile broadband (WWAN), and PPPoE
     devices, and provides VPN integration with a variety of different VPN
     services.
     .
     This package provides the userspace daemons and a command line interface to
     interact with NetworkManager.
     .
     Optional dependencies:
      * avahi-autoipd: Used for IPv4LL, a protocol for automatic Link-Local IP
        address configuration.
      * ppp: Required for establishing dial-up connections (e.g. via GSM).
      * dnsmasq-base/iptables: Required for creating Ad-hoc connections and
        connection sharing.
      * libteam-utils: Network Team driver allows multiple network interfaces to be
        teamed together and act like a single one. This process is called "ethernet
        bonding", "channel teaming" or "link aggregation".
    

    如果您阅读了上面的内容,它并不是需要桌面的任何地方,实际上它正好相反,桌面将完全拉入它以完成网络部分。

    所以我的建议还是一样,安装网络管理器。

    如果您已经使用了任何其他网络管理器,例如 networkd,只需将 network-manager 配置为仅配置 wwan。

    这可以通过编辑来完成/etc/NetworkManager/conf.d/10-globally-managed-devices.conf

    unmanaged-devices=*,except:type:wwan,except:type:gsm
    

    要设置连接,您可以使用nmcli或手动创建配置:

    sudo vim /etc/NetworkManager/system-connections/myisp

    [connection]
    id=myisp
    uuid=755d5082-e2e3-4691-873a-0669b27aaaa2
    type=gsm
    interface-name=cdc-wdm0
    permissions=
    timestamp=1547308598
    
    [gsm]
    apn=internet.public
    number=*99#
    
    [ipv4]
    dns=8.8.8.8;8.8.4.4;1.1.1.1;
    dns-search=
    ignore-auto-dns=true
    method=auto
    
    [ipv6]
    addr-gen-mode=stable-privacy
    dns-search=
    method=auto
    

    希望这将引导您朝着正确的方向前进,最良好的祝愿:)

    • 2

相关问题

  • 拨入多个 PPP 连接

  • 如何让 CSL Usb 调制解调器 U1-TF 工作?

  • 如何连接我的 Verizon 移动宽带加密狗?

  • 让 GOBI 2000 HS 工作的问题[关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve