| How to use VLAN to separate multiple PDN |
| ======================================== |
| Here we take 1802s (i.e. NezhaS) as example, 1826 (i.e. Nezha3) is similar. |
| The host PC system tested in this paper is Ubuntu 5.4.0-6Ubuntu 1~16.04.12. |
| Here we explains both the IPv4 and IPv6, you can ignore the IPv6 part if deploy the IPv4 only. |
| |
| 1, PIPE mode |
| 1) Diag |
| default PDN: |
| "serial_client" |
| "AT+ZGDCONT=1,IPV4V6,CMNET" |
| "AT+ZGACT=1,1" |
| PDN2: |
| "AT*ZGDCONT=2,IPV4V6,CMWAP,1" |
| "AT+ZGACT=1,2" |
| PDN3: |
| "AT*ZGDCONT=3,IPV4V6,GPRS,1" |
| "AT+ZGACT=1,3" |
| |
| Query the dial results with command "AT+CGDCONT?", you will get some information like this: |
| |
| +CGDCONT: 1,"IPV4V6","cmnet","10.171.20.111 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1",0,0,0,2,0,0 |
| |
| +CGDCONT: 2,"IPV4V6","CMWAP","10.184.75.11 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1",0,0,0,2,0,0 |
| |
| +CGDCONT: 3,"IPV4V6","GPRS","10.185.130.179 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1",0,0,0,2,0,0 |
| |
| As listed above , "10.171.20.111" is the IPv4 address of PDN1 and same for the others. |
| |
| 2) Configure /etc/config/network |
| Add the following configuration to "/etc/config/network": |
| |
| config switch |
| option name 'switch0' |
| option reset '1' |
| option enable_vlan '1' |
| |
| config interface 'lan2' |
| option ifname 'usbnet0.100' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ipaddr '10.184.75.244' |
| option netmask '255.255.255.0' |
| option ip6assign '60' |
| |
| config interface 'lan3' |
| option ifname 'usbnet0.200' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ipaddr '10.185.130.76' |
| option netmask '255.255.255.0' |
| option ip6assign '60' |
| |
| usbnet0.100 and usbnet0.200 represent VLAN100 and VLAN200, "option ipaddr" is the ip address of PDN, |
| but the last bit requires an xor operation. |
| Then execute "/etc/init.d/network reload" to apply the configuration. |
| |
| 3) Configure /etc/config/dhcp |
| Add the following configuration to "/etc/config/dhcp": |
| |
| config dhcp 'lan2' |
| option interface 'lan2' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| option start '11' |
| option limit '0' |
| list dhcp_option '3,10.184.75.244' |
| list dhcp_option '1,255.255.255.0' |
| list dhcp_option '6,61.132.163.68,202.102.213.68' |
| list dns '240e:46:4088::4088' |
| list dns '240e:46:4888::4888' |
| |
| config dhcp 'lan3' |
| option interface 'lan3' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| option start '179' |
| option limit '0' |
| list dhcp_option '3,10.185.130.76' |
| list dhcp_option '1,255.255.255.0' |
| list dhcp_option '6,202.102.213.68,61.132.163.68' |
| list dns '240e:46:4088::4088' |
| list dns '240e:46:4888::4888' |
| |
| "option start" is the offset from the PDN address of the underlying interface to calculate the minimum address that may be leased to clients. |
| Then execute "/etc/init.d/dnsmasq reload" to apply the configuration. |
| |
| 4) Bind the virtual LAN to PDN |
| Query the local IPv6 address for usbnet0: |
| "cd /sys/kernel/mpipe/devices" |
| "cat usbnet0/ll6addr", you will get the local IPv6 address: |
| "fe80::e8c9:89ff:fe4a:3455" |
| |
| Configure virtual LAN: |
| "echo 192.168.100.1 > usbnet0.100/ipaddr" |
| "echo fe80::e8c9:89ff:fe4a:3455 > usbnet0.100/ll6addr" |
| "echo 1 > usbnet0.100/up" |
| "echo 1 > usbnet0.100/up6" |
| |
| "echo 192.168.200.1 > usbnet0.200/ipaddr" |
| "echo fe80::e8c9:89ff:fe4a:3455 > usbnet0.200/ll6addr" |
| "echo 1 > usbnet0.200/up" |
| "echo 1 > usbnet0.200/up6" |
| |
| Bind the virtual LAN to PDN |
| "echo usbnet0.100 > ccinet1/combineif" |
| "echo usbnet0.200 > ccinet2/combineif" |
| Now the ccinet1 serves as VLAN100, and ccinet2 as VLAN200. |
| |
| 5) Configuration in Ubuntu16.04 |
| Add virtual network card: |
| "vconfig add enp0s26u1u1 100" |
| "vconfig add enp0s26u1u1 200" |
| |
| Get IP address through DHCP: |
| "dhcpcd enp0s26u1u1" |
| "dhcpcd enp0s26u1u1.100" |
| "dhcpcd enp0s26u1u1.200" |
| |
| # ifconfig |
| enp0s26u1u1 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3 |
| inet addr:10.171.20.111 Bcast:10.171.20.255 Mask:255.255.255.0 |
| inet6 addr: 240e:9a:875:27a8:9094:7d7b:6bc9:904a/64 Scope:Global |
| inet6 addr: 240e:9a:875:27a8:ae42:2167:938a:268/64 Scope:Global |
| inet6 addr: fe80::a0ca:7eff:fe71:c8e3/64 Scope:Link |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:709 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:574 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:69649 (69.6 KB) TX bytes:118056 (118.0 KB) |
| |
| enp0s26u1u1.100 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3 |
| inet addr:10.184.75.11 Bcast:10.184.75.255 Mask:255.255.255.0 |
| inet6 addr: 240e:9a:868:af6d:693a:c829:7dbe:c2d5/64 Scope:Global |
| inet6 addr: fe80::a0ca:7eff:fe71:c8e3/64 Scope:Link |
| inet6 addr: 240e:9a:868:af6d:fcf6:78f5:3ef3:d159/64 Scope:Global |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:9 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:123 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:1019 (1.0 KB) TX bytes:18273 (18.2 KB) |
| |
| enp0s26u1u1.200 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3 |
| inet addr:10.185.130.179 Bcast:10.185.130.255 Mask:255.255.255.0 |
| inet6 addr: fe80::52c1:fbe:ad29:61c9/64 Scope:Link |
| inet6 addr: 240e:9a:874:b759:61f5:109:a46c:fe33/64 Scope:Global |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:8 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:98 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:923 (923.0 B) TX bytes:13673 (13.6 KB) |
| |
| Add the IPv4 routing: |
| "route add -net 1.1.1.0/24 dev enp0s26u1u1" |
| "route add -net 8.8.8.0/24 dev enp0s26u1u1.100" |
| "route add -net 114.114.114.0/24 dev enp0s26u1u1.200" |
| |
| 6) Test in Ubuntu16.04 |
| # ping 1.1.1.1 |
| PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. |
| 64 bytes from 1.1.1.1: icmp_seq=1 ttl=53 time=257 ms |
| 64 bytes from 1.1.1.1: icmp_seq=2 ttl=53 time=171 ms |
| |
| # ping 8.8.8.8 |
| PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. |
| 64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=130 ms |
| 64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=73.0 ms |
| |
| # ping 114.114.114.114 |
| PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. |
| 64 bytes from 114.114.114.114: icmp_seq=2 ttl=78 time=103 ms |
| 64 bytes from 114.114.114.114: icmp_seq=3 ttl=92 time=20.9 ms |
| |
| # ping6 www.sohu.com -I enp0s26u1u1 |
| PING www.sohu.com(2408:80f0:4100:4007::4) from 240e:9a:875:27a8:9094:7d7b:6bc9:904a enp0s26u1u1: 56 data bytes |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=1 ttl=53 time=47.6 ms |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=2 ttl=53 time=46.7 ms |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=3 ttl=53 time=49.8 ms |
| |
| # ping6 www.sohu.com -I enp0s26u1u1.100 |
| PING www.sohu.com(2408:80f0:4100:4007::4) from 240e:9a:868:af6d:693a:c829:7dbe:c2d5 enp0s26u1u1.100: 56 data bytes |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=1 ttl=53 time=72.3 ms |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=2 ttl=53 time=63.8 ms |
| 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=3 ttl=53 time=50.8 ms |
| |
| # ping6 www.sohu.com -I enp0s26u1u1.200 |
| PING www.sohu.com(2408:80f0:4100:4007::5) from 240e:9a:874:b759:61f5:109:a46c:fe33 enp0s26u1u1.200: 56 data bytes |
| 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=1 ttl=53 time=73.7 ms |
| 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=2 ttl=53 time=54.8 ms |
| 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=3 ttl=53 time=45.6 ms |
| |
| 7) VLAN for the default PDN |
| Since the default PDN is bound to the br-lan, you need to re-bind it to the desired VLAN and re-specify the br-lan address. |
| For example, bind to the VLAN 10: |
| First, modify the /etc/config/network configure file: |
| |
| config interface 'lan' |
| option ifname 'usbnet0 hsicnet0 eth0' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ip6assign '60' |
| option netmask '255.255.255.0' |
| list ipaddr '192.168.1.1' |
| |
| config switch |
| option name 'switch0' |
| option reset '1' |
| option enable_vlan '1' |
| |
| config interface 'lan1' |
| option ifname 'usbnet0.10' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ipaddr '10.171.20.144' |
| option netmask '255.255.255.0' |
| option ip6assign '60' |
| |
| Second, modify the /etc/config/dhcp configure file, then execute "/etc/init.d/network reload" to apply the configuration: |
| config dhcp 'lan' |
| option interface 'lan' |
| option start '100' |
| option limit '150' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| |
| config dhcp 'lan1' |
| option interface 'lan1' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| option start '111' |
| option limit '0' |
| list dhcp_option '3,10.171.20.144' |
| list dhcp_option '1,255.255.255.0' |
| list dhcp_option '6,202.102.213.68,61.132.163.68' |
| list dns '240e:46:4088::4088' |
| list dns '240e:46:4888::4888' |
| |
| Last, bind the virtual LAN to the default PDN: |
| "echo 192.168.10.1 > /sys/kernel/mpipe/devices/usbnet0.10/ipaddr" |
| "echo fe80::e8c9:89ff:fe4a:3455 > /sys/kernel/mpipe/devices/usbnet0.10/ll6addr" |
| "echo 1 > /sys/kernel/mpipe/devices/usbnet0.10/up" |
| "echo 1 > /sys/kernel/mpipe/devices/usbnet0.10/up6" |
| "echo usbnet0.10 > /sys/kernel/mpipe/devices/ccinet0/combineif" |
| |
| The routing configuration in ubuntu is similar to the above step (5). |
| |
| 8) Note |
| If you disconnect the usb, you may need to follow the above steps to reconfigure after reconnect. |
| If the default PDN is also bound to the VLAN, the ubutun PC can only access the internet via the virtual VLAN network card, while the enumerated real network card will not be able to access the internet. |
| |
| ---------------------------------------- |
| |
| 2, MIFI mode |
| 1) Diag |
| default PDN: |
| "serial_client" |
| "AT+ZGDCONT=1,IPV4V6,CMNET" |
| "AT+ZGACT=1,1" |
| PDN2: |
| "AT*ZGDCONT=2,IPV4V6,CMWAP,1" |
| "AT+ZGACT=1,2" |
| PDN3: |
| "AT*ZGDCONT=3,IPV4V6,GPRS,1" |
| "AT+ZGACT=1,3" |
| Query the dial results with command "AT+CGDCONT?", you will get some information like this: |
| |
| +CGDCONT: 1,"IP","ctnet.mnc011.mcc460.gprs","10.159.180.217",0,0,,,, |
| |
| +CGDCONT: 2,"IP","cmwap","10.156.82.62",0,0,0,2,0,0 |
| |
| +CGDCONT: 3,"IP","cmwap","10.146.8.82",0,0,0,2,0,0 |
| |
| As listed above , "10.159.180.217" is the IPv4 address of PDN1 and same for the others. |
| |
| Modify the route configuration, such as: |
| "route add -net 114.114.114.0/24 gw 10.146.8.82" |
| "route add -net 8.8.8.0/24 gw 10.156.82.62" |
| "route add -net 1.1.1.0/24 gw 10.159.180.217" |
| |
| # route |
| Kernel IP routing table |
| Destination Gateway Genmask Flags Metric Ref Use Iface |
| 1.1.1.0 10.159.180.217 255.255.255.0 UG 0 0 0 ccinet0 |
| 8.8.8.0 10.156.82.62 255.255.255.0 UG 0 0 0 ccinet1 |
| 114.114.114.0 10.146.8.82 255.255.255.0 UG 0 0 0 ccinet2 |
| 192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan |
| 192.168.100.0 * 255.255.255.0 U 0 0 0 br-lan2 |
| 192.168.200.0 * 255.255.255.0 U 0 0 0 br-lan3 |
| |
| 2) Configure /etc/config/network |
| Add the following configuration to "/etc/config/network": |
| |
| config switch |
| option name 'switch0' |
| option reset '1' |
| option enable_vlan '1' |
| |
| config interface 'lan2' |
| option ifname 'usbnet0.100' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ipaddr '192.168.100.1' |
| option netmask '255.255.255.0' |
| option ip6assign '60' |
| |
| config interface 'lan3' |
| option ifname 'usbnet0.200' |
| option type 'bridge' |
| option bridge_empty '1' |
| option proto 'static' |
| option ipaddr '192.168.200.1' |
| option netmask '255.255.255.0' |
| option ip6assign '60' |
| |
| usbnet0.100 and usbnet0.200 represent VLAN100 and VLAN200. |
| Then execute "/etc/init.d/network reload" to apply the configuration. |
| |
| 3) Modify /etc/config/firewall |
| The forwarding rules are set as follows: |
| |
| config zone |
| option name lan |
| list network 'lan' |
| option input ACCEPT |
| option output ACCEPT |
| option forward ACCEPT |
| |
| config zone |
| option name wan |
| list network 'wan0' |
| list network 'wan3' |
| list network 'wan4' |
| list network 'wan5' |
| list network 'wan6' |
| list network 'wan7' |
| list network 'wan60' |
| list network 'wan63' |
| list network 'wan64' |
| list network 'wan65' |
| list network 'wan66' |
| list network 'wan67' |
| list network 'wlan' |
| list network 'wlan6' |
| option input REJECT |
| option output ACCEPT |
| option forward REJECT |
| option masq 1 |
| option mtu_fix 1 |
| |
| config forwarding |
| option src lan |
| option dest wan |
| |
| config zone |
| option name lan2 |
| list network 'lan2' |
| option input ACCEPT |
| option output ACCEPT |
| option forward ACCEPT |
| |
| config zone |
| option name wan_100 |
| list network 'wan1' |
| list network 'wan61' |
| option input REJECT |
| option output ACCEPT |
| option forward REJECT |
| option masq 1 |
| option mtu_fix 1 |
| |
| config forwarding |
| option src lan2 |
| option dest wan_100 |
| |
| config zone |
| option name lan3 |
| list network 'lan3' |
| option input ACCEPT |
| option output ACCEPT |
| option forward ACCEPT |
| |
| config zone |
| option name wan_200 |
| list network 'wan2' |
| list network 'wan62' |
| option input REJECT |
| option output ACCEPT |
| option forward REJECT |
| option masq 1 |
| option mtu_fix 1 |
| |
| config forwarding |
| option src lan3 |
| option dest wan_200 |
| |
| Then execute "/etc/init.d/firewall reload" to apply the configuration. |
| |
| 4) Configure /etc/config/dhcp |
| Add the following configuration to "/etc/config/dhcp": |
| |
| config dhcp 'lan2' |
| option interface 'lan2' |
| option start '100' |
| option limit '150' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| |
| config dhcp 'lan3' |
| option interface 'lan3' |
| option start '100' |
| option limit '150' |
| option leasetime '2h' |
| option dhcpv6 'server' |
| option ra 'relay' |
| option ndp 'relay' |
| |
| Then execute "/etc/init.d/dnsmasq reload" to apply the configuration. |
| |
| 5) Configuration in Ubuntu16.04 |
| Add virtual network card: |
| "vconfig add enp0s26u1u1 100" |
| "vconfig add enp0s26u1u1 200" |
| |
| Get IP address through DHCP: |
| "dhcpcd enp0s26u1u1" |
| "dhcpcd enp0s26u1u1.100" |
| "dhcpcd enp0s26u1u1.200" |
| |
| # ifconfig |
| enp0s26u1u1 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81 |
| inet addr:192.168.1.134 Bcast:192.168.1.255 Mask:255.255.255.0 |
| inet6 addr: 240e:9a:428:44c9:acae:1690:47d3:710c/64 Scope:Global |
| inet6 addr: 240e:9a:428:44c9:29:f2ff:feb7:fa81/64 Scope:Global |
| inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:13141 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:2393 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:1284895 (1.2 MB) TX bytes:570332 (570.3 KB) |
| |
| enp0s26u1u1.100 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81 |
| inet addr:192.168.100.203 Bcast:192.168.100.255 Mask:255.255.255.0 |
| inet6 addr: 240e:9a:417:66b8:29:f2ff:feb7:fa81/64 Scope:Global |
| inet6 addr: 240e:9a:428:44c9:f6e7:c272:3fba:6a7d/64 Scope:Global |
| inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:3969 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:898 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:398354 (398.3 KB) TX bytes:131123 (131.1 KB) |
| |
| enp0s26u1u1.200 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81 |
| inet addr:192.168.200.203 Bcast:192.168.200.255 Mask:255.255.255.0 |
| inet6 addr: 240e:9a:419:2597:29:f2ff:feb7:fa81/64 Scope:Global |
| inet6 addr: 240e:9a:419:2597:6433:4697:bff4:45c9/64 Scope:Global |
| inet6 addr: 240e:9a:428:44c9:29:f2ff:feb7:fa81/64 Scope:Global |
| inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| RX packets:3898 errors:0 dropped:0 overruns:0 frame:0 |
| TX packets:629 errors:0 dropped:0 overruns:0 carrier:0 |
| collisions:0 txqueuelen:1000 |
| RX bytes:404558 (404.5 KB) TX bytes:118583 (118.5 KB) |
| |
| Add the IPv4 routing: |
| "route add -net 1.1.1.0/24 gw 192.168.1.1" |
| "route add -net 8.8.8.0/24 gw 192.168.100.1" |
| "route add -net 114.114.114.0/24 gw 192.168.200.1" |
| |
| # route |
| Kernel IP routing table |
| Destination Gateway Genmask Flags Metric Ref Use Iface |
| 1.1.1.0 192.168.1.1 255.255.255.0 UG 0 0 0 enp0s26u1u1 |
| 8.8.8.0 192.168.100.1 255.255.255.0 UG 0 0 0 enp0s26u1u1.100 |
| 114.114.114.0 192.168.200.1 255.255.255.0 UG 0 0 0 enp0s26u1u1.200 |
| 192.168.1.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1 |
| 192.168.100.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1.100 |
| 192.168.200.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1.200 |
| |
| 6) Test in Ubuntu16.04 |
| # ping 1.1.1.1 |
| PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. |
| 64 bytes from 1.1.1.1: icmp_seq=1 ttl=52 time=223 ms |
| 64 bytes from 1.1.1.1: icmp_seq=2 ttl=52 time=173 ms |
| 64 bytes from 1.1.1.1: icmp_seq=3 ttl=52 time=169 ms |
| |
| # ping 8.8.8.8 |
| PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. |
| 64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=54.7 ms |
| 64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=52.3 ms |
| 64 bytes from 8.8.8.8: icmp_seq=4 ttl=113 time=53.0 ms |
| |
| # ping 114.114.114.114 |
| PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. |
| 64 bytes from 114.114.114.114: icmp_seq=1 ttl=65 time=201 ms |
| 64 bytes from 114.114.114.114: icmp_seq=2 ttl=86 time=25.0 ms |
| 64 bytes from 114.114.114.114: icmp_seq=3 ttl=90 time=25.0 ms |
| |
| # ping6 240e:83:201:3700::4 -I enp0s26u1u1 |
| PING 240e:83:201:3700::4(240e:83:201:3700::4) from 240e:9a:428:44c9:acae:1690:47d3:710c enp0s26u1u1: 56 data bytes |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=45.2 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=32.8 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=32.0 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=31.2 ms |
| |
| # ping6 240e:83:201:3700::4 -I enp0s26u1u1.100 |
| PING 240e:83:201:3700::4(240e:83:201:3700::4) from 240e:9a:417:66b8:29:f2ff:feb7:fa81 enp0s26u1u1.100: 56 data bytes |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=42.0 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=33.8 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=33.8 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=30.7 ms |
| |
| # ping6 240e:83:201:3700::4 -I enp0s26u1u1.200 |
| PING 240e:83:201:3700::4(240e:83:201:3700::4) from 240e:9a:419:2597:6433:4697:bff4:45c9 enp0s26u1u1.200: 56 data bytes |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=31.9 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=33.0 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=35.1 ms |
| 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=33.7 ms |
| |
| 7) VLAN for the default PDN |
| In MIFI mode, you just need to modify the /etc/config/firewall configure file. |
| For example, bind to the VLAN 10: |
| Modify the /etc/config/firewall configure file, then execute "/etc/init.d/firewall reload" to apply the configuration.: |
| |
| config zone |
| option name lan |
| list network 'lan' |
| option input ACCEPT |
| option output ACCEPT |
| option forward ACCEPT |
| |
| config zone |
| option name wan |
| list network 'wan3' |
| list network 'wan4' |
| list network 'wan5' |
| list network 'wan6' |
| list network 'wan7' |
| list network 'wan63' |
| list network 'wan64' |
| list network 'wan65' |
| list network 'wan66' |
| list network 'wan67' |
| list network 'wlan' |
| list network 'wlan6' |
| option input REJECT |
| option output ACCEPT |
| option forward REJECT |
| option masq 1 |
| option mtu_fix 1 |
| |
| config forwarding |
| option src lan |
| option dest wan |
| |
| config zone |
| option name lan1 |
| list network 'lan1' |
| option input ACCEPT |
| option output ACCEPT |
| option forward ACCEPT |
| |
| config zone |
| option name wan_10 |
| list network 'wan0' |
| list network 'wan60' |
| option input REJECT |
| option output ACCEPT |
| option forward REJECT |
| option masq 1 |
| option mtu_fix 1 |
| |
| config forwarding |
| option src lan1 |
| option dest wan_10 |
| |
| The routing configuration in ubuntu is similar to the above step (5) and module is similar to the above step (1). |
| |
| 8) Note |
| If you disconnect the usb, you may need to follow the above steps to reconfigure after reconnect. |
| If the default PDN is also bound to the VLAN, the ubutun PC can only access the internet via the virtual VLAN network card, while the enumerated real network card will not be able to access the internet. |