通过本地网络共享 Android USB 调制解调器互联网(切换)

通过本地网络共享 Android USB 调制解调器互联网(切换)

我尝试寻找一些关于如何做到这一点的精确信息。但至今仍未奏效。

所以我通过 USB 将我的 Android 手机连接到我的 Ubuntu 16.04 LTS。有一个空闲的以太网卡端口,我想将交换机连接到该端口,以便与连接到它的其他 PC 在 LAN 上共享互联网。

所以我知道我应该使用 Ubuntu 的功能来充当路由器,但我不知道正确的步骤。

有人能帮帮我吗?非常感谢。

大卫

编辑

jean@Jean:~$ ifconfig -a
enp0s25   Link encap:Ethernet  HWaddr 00:24:7e:6b:4c:f4  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:1927872 erreurs:0 :0 overruns:0 frame:0
          TX packets:9242541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:138358559 (138.3 MB) Octets transmis:13916091176 (13.9 GB)
          Interruption:20 Mémoire:fc000000-fc020000 

lo        Link encap:Boucle locale  
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          Packets reçus:29275 erreurs:0 :0 overruns:0 frame:0
          TX packets:29275 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:2542001 (2.5 MB) Octets transmis:2542001 (2.5 MB)

wlp3s0    Link encap:Ethernet  HWaddr 00:21:6a:48:d6:1c  
          inet adr:192.168.43.141  Bcast:192.168.43.255  Masque:255.255.255.0
          adr inet6: fe80::ca90:4d01:8c81:12d1/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:6669318 erreurs:0 :0 overruns:0 frame:0
          TX packets:3355799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:9380453011 (9.3 GB) Octets transmis:885574119 (885.5 MB)

wwp0s29f7u4i7 Link encap:Ethernet  HWaddr 02:80:37:ec:02:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          Packets reçus:0 erreurs:0 :0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:0 (0.0 B) Octets transmis:0 (0.0 B)

jean@Jean:~$ ip route show
default via 192.168.43.1 dev wlp3s0  proto static  metric 600 
169.254.0.0/16 dev wlp3s0  scope link  metric 1000 
192.168.43.0/24 dev wlp3s0  proto kernel  scope link  src 192.168.43.141  metric 600 
jean@Jean:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 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: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:24:7e:6b:4c:f4 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:21:6a:48:d6:1c brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.141/24 brd 192.168.43.255 scope global dynamic wlp3s0
       valid_lft 3514sec preferred_lft 3514sec
    inet6 fe80::ca90:4d01:8c81:12d1/64 scope link 
       valid_lft forever preferred_lft forever
19: wwp0s29f7u4i7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 02:80:37:ec:02:00 brd ff:ff:ff:ff:ff:ff

相关内容