blob: d4cb5afa312c37cae7a21f0e47c223746ff8e80e [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001How to use VLAN to separate multiple PDN
2========================================
3Here we take 1802s (i.e. NezhaS) as example, 1826 (i.e. Nezha3) is similar.
4The host PC system tested in this paper is Ubuntu 5.4.0-6Ubuntu 1~16.04.12.
5Here we explains both the IPv4 and IPv6, you can ignore the IPv6 part if deploy the IPv4 only.
6
71, PIPE mode
81) Diag
9 default PDN:
10 "serial_client"
11 "AT+ZGDCONT=1,IPV4V6,CMNET"
12 "AT+ZGACT=1,1"
13 PDN2:
14 "AT*ZGDCONT=2,IPV4V6,CMWAP,1"
15 "AT+ZGACT=1,2"
16 PDN3:
17 "AT*ZGDCONT=3,IPV4V6,GPRS,1"
18 "AT+ZGACT=1,3"
19
20 Query the dial results with command "AT+CGDCONT?", you will get some information like this:
21
22 +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
23
24 +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
25
26 +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
27
28 As listed above , "10.171.20.111" is the IPv4 address of PDN1 and same for the others.
29
302) Configure /etc/config/network
31 Add the following configuration to "/etc/config/network":
32
33 config switch
34 option name 'switch0'
35 option reset '1'
36 option enable_vlan '1'
37
38 config interface 'lan2'
39 option ifname 'usbnet0.100'
40 option type 'bridge'
41 option bridge_empty '1'
42 option proto 'static'
43 option ipaddr '10.184.75.244'
44 option netmask '255.255.255.0'
45 option ip6assign '60'
46
47 config interface 'lan3'
48 option ifname 'usbnet0.200'
49 option type 'bridge'
50 option bridge_empty '1'
51 option proto 'static'
52 option ipaddr '10.185.130.76'
53 option netmask '255.255.255.0'
54 option ip6assign '60'
55
56 usbnet0.100 and usbnet0.200 represent VLAN100 and VLAN200, "option ipaddr" is the ip address of PDN,
57 but the last bit requires an xor operation.
58 Then execute "/etc/init.d/network reload" to apply the configuration.
59
603) Configure /etc/config/dhcp
61 Add the following configuration to "/etc/config/dhcp":
62
63 config dhcp 'lan2'
64 option interface 'lan2'
65 option leasetime '2h'
66 option dhcpv6 'server'
67 option ra 'relay'
68 option ndp 'relay'
69 option start '11'
70 option limit '0'
71 list dhcp_option '3,10.184.75.244'
72 list dhcp_option '1,255.255.255.0'
73 list dhcp_option '6,61.132.163.68,202.102.213.68'
74 list dns '240e:46:4088::4088'
75 list dns '240e:46:4888::4888'
76
77 config dhcp 'lan3'
78 option interface 'lan3'
79 option leasetime '2h'
80 option dhcpv6 'server'
81 option ra 'relay'
82 option ndp 'relay'
83 option start '179'
84 option limit '0'
85 list dhcp_option '3,10.185.130.76'
86 list dhcp_option '1,255.255.255.0'
87 list dhcp_option '6,202.102.213.68,61.132.163.68'
88 list dns '240e:46:4088::4088'
89 list dns '240e:46:4888::4888'
90
91 "option start" is the offset from the PDN address of the underlying interface to calculate the minimum address that may be leased to clients.
92 Then execute "/etc/init.d/dnsmasq reload" to apply the configuration.
93
944) Bind the virtual LAN to PDN
95 Query the local IPv6 address for usbnet0:
96 "cd /sys/kernel/mpipe/devices"
97 "cat usbnet0/ll6addr", you will get the local IPv6 address:
98 "fe80::e8c9:89ff:fe4a:3455"
99
100 Configure virtual LAN:
101 "echo 192.168.100.1 > usbnet0.100/ipaddr"
102 "echo fe80::e8c9:89ff:fe4a:3455 > usbnet0.100/ll6addr"
103 "echo 1 > usbnet0.100/up"
104 "echo 1 > usbnet0.100/up6"
105
106 "echo 192.168.200.1 > usbnet0.200/ipaddr"
107 "echo fe80::e8c9:89ff:fe4a:3455 > usbnet0.200/ll6addr"
108 "echo 1 > usbnet0.200/up"
109 "echo 1 > usbnet0.200/up6"
110
111 Bind the virtual LAN to PDN
112 "echo usbnet0.100 > ccinet1/combineif"
113 "echo usbnet0.200 > ccinet2/combineif"
114 Now the ccinet1 serves as VLAN100, and ccinet2 as VLAN200.
115
1165) Configuration in Ubuntu16.04
117 Add virtual network card:
118 "vconfig add enp0s26u1u1 100"
119 "vconfig add enp0s26u1u1 200"
120
121 Get IP address through DHCP:
122 "dhcpcd enp0s26u1u1"
123 "dhcpcd enp0s26u1u1.100"
124 "dhcpcd enp0s26u1u1.200"
125
126 # ifconfig
127 enp0s26u1u1 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3
128 inet addr:10.171.20.111 Bcast:10.171.20.255 Mask:255.255.255.0
129 inet6 addr: 240e:9a:875:27a8:9094:7d7b:6bc9:904a/64 Scope:Global
130 inet6 addr: 240e:9a:875:27a8:ae42:2167:938a:268/64 Scope:Global
131 inet6 addr: fe80::a0ca:7eff:fe71:c8e3/64 Scope:Link
132 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
133 RX packets:709 errors:0 dropped:0 overruns:0 frame:0
134 TX packets:574 errors:0 dropped:0 overruns:0 carrier:0
135 collisions:0 txqueuelen:1000
136 RX bytes:69649 (69.6 KB) TX bytes:118056 (118.0 KB)
137
138 enp0s26u1u1.100 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3
139 inet addr:10.184.75.11 Bcast:10.184.75.255 Mask:255.255.255.0
140 inet6 addr: 240e:9a:868:af6d:693a:c829:7dbe:c2d5/64 Scope:Global
141 inet6 addr: fe80::a0ca:7eff:fe71:c8e3/64 Scope:Link
142 inet6 addr: 240e:9a:868:af6d:fcf6:78f5:3ef3:d159/64 Scope:Global
143 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
144 RX packets:9 errors:0 dropped:0 overruns:0 frame:0
145 TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
146 collisions:0 txqueuelen:1000
147 RX bytes:1019 (1.0 KB) TX bytes:18273 (18.2 KB)
148
149 enp0s26u1u1.200 Link encap:Ethernet HWaddr a2:ca:7e:71:c8:e3
150 inet addr:10.185.130.179 Bcast:10.185.130.255 Mask:255.255.255.0
151 inet6 addr: fe80::52c1:fbe:ad29:61c9/64 Scope:Link
152 inet6 addr: 240e:9a:874:b759:61f5:109:a46c:fe33/64 Scope:Global
153 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
154 RX packets:8 errors:0 dropped:0 overruns:0 frame:0
155 TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
156 collisions:0 txqueuelen:1000
157 RX bytes:923 (923.0 B) TX bytes:13673 (13.6 KB)
158
159 Add the IPv4 routing:
160 "route add -net 1.1.1.0/24 dev enp0s26u1u1"
161 "route add -net 8.8.8.0/24 dev enp0s26u1u1.100"
162 "route add -net 114.114.114.0/24 dev enp0s26u1u1.200"
163
1646) Test in Ubuntu16.04
165 # ping 1.1.1.1
166 PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
167 64 bytes from 1.1.1.1: icmp_seq=1 ttl=53 time=257 ms
168 64 bytes from 1.1.1.1: icmp_seq=2 ttl=53 time=171 ms
169
170 # ping 8.8.8.8
171 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
172 64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=130 ms
173 64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=73.0 ms
174
175 # ping 114.114.114.114
176 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
177 64 bytes from 114.114.114.114: icmp_seq=2 ttl=78 time=103 ms
178 64 bytes from 114.114.114.114: icmp_seq=3 ttl=92 time=20.9 ms
179
180 # ping6 www.sohu.com -I enp0s26u1u1
181 PING www.sohu.com(2408:80f0:4100:4007::4) from 240e:9a:875:27a8:9094:7d7b:6bc9:904a enp0s26u1u1: 56 data bytes
182 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=1 ttl=53 time=47.6 ms
183 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=2 ttl=53 time=46.7 ms
184 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=3 ttl=53 time=49.8 ms
185
186 # ping6 www.sohu.com -I enp0s26u1u1.100
187 PING www.sohu.com(2408:80f0:4100:4007::4) from 240e:9a:868:af6d:693a:c829:7dbe:c2d5 enp0s26u1u1.100: 56 data bytes
188 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=1 ttl=53 time=72.3 ms
189 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=2 ttl=53 time=63.8 ms
190 64 bytes from 2408:80f0:4100:4007::4: icmp_seq=3 ttl=53 time=50.8 ms
191
192 # ping6 www.sohu.com -I enp0s26u1u1.200
193 PING www.sohu.com(2408:80f0:4100:4007::5) from 240e:9a:874:b759:61f5:109:a46c:fe33 enp0s26u1u1.200: 56 data bytes
194 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=1 ttl=53 time=73.7 ms
195 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=2 ttl=53 time=54.8 ms
196 64 bytes from 2408:80f0:4100:4007::5: icmp_seq=3 ttl=53 time=45.6 ms
197
1987) VLAN for the default PDN
199 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.
200 For example, bind to the VLAN 10:
201 First, modify the /etc/config/network configure file:
202
203 config interface 'lan'
204 option ifname 'usbnet0 hsicnet0 eth0'
205 option type 'bridge'
206 option bridge_empty '1'
207 option proto 'static'
208 option ip6assign '60'
209 option netmask '255.255.255.0'
210 list ipaddr '192.168.1.1'
211
212 config switch
213 option name 'switch0'
214 option reset '1'
215 option enable_vlan '1'
216
217 config interface 'lan1'
218 option ifname 'usbnet0.10'
219 option type 'bridge'
220 option bridge_empty '1'
221 option proto 'static'
222 option ipaddr '10.171.20.144'
223 option netmask '255.255.255.0'
224 option ip6assign '60'
225
226 Second, modify the /etc/config/dhcp configure file, then execute "/etc/init.d/network reload" to apply the configuration:
227 config dhcp 'lan'
228 option interface 'lan'
229 option start '100'
230 option limit '150'
231 option leasetime '2h'
232 option dhcpv6 'server'
233 option ra 'relay'
234 option ndp 'relay'
235
236 config dhcp 'lan1'
237 option interface 'lan1'
238 option leasetime '2h'
239 option dhcpv6 'server'
240 option ra 'relay'
241 option ndp 'relay'
242 option start '111'
243 option limit '0'
244 list dhcp_option '3,10.171.20.144'
245 list dhcp_option '1,255.255.255.0'
246 list dhcp_option '6,202.102.213.68,61.132.163.68'
247 list dns '240e:46:4088::4088'
248 list dns '240e:46:4888::4888'
249
250 Last, bind the virtual LAN to the default PDN:
251 "echo 192.168.10.1 > /sys/kernel/mpipe/devices/usbnet0.10/ipaddr"
252 "echo fe80::e8c9:89ff:fe4a:3455 > /sys/kernel/mpipe/devices/usbnet0.10/ll6addr"
253 "echo 1 > /sys/kernel/mpipe/devices/usbnet0.10/up"
254 "echo 1 > /sys/kernel/mpipe/devices/usbnet0.10/up6"
255 "echo usbnet0.10 > /sys/kernel/mpipe/devices/ccinet0/combineif"
256
257 The routing configuration in ubuntu is similar to the above step (5).
258
2598) Note
260 If you disconnect the usb, you may need to follow the above steps to reconfigure after reconnect.
261 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.
262
263----------------------------------------
264
2652, MIFI mode
2661) Diag
267 default PDN:
268 "serial_client"
269 "AT+ZGDCONT=1,IPV4V6,CMNET"
270 "AT+ZGACT=1,1"
271 PDN2:
272 "AT*ZGDCONT=2,IPV4V6,CMWAP,1"
273 "AT+ZGACT=1,2"
274 PDN3:
275 "AT*ZGDCONT=3,IPV4V6,GPRS,1"
276 "AT+ZGACT=1,3"
277 Query the dial results with command "AT+CGDCONT?", you will get some information like this:
278
279 +CGDCONT: 1,"IP","ctnet.mnc011.mcc460.gprs","10.159.180.217",0,0,,,,
280
281 +CGDCONT: 2,"IP","cmwap","10.156.82.62",0,0,0,2,0,0
282
283 +CGDCONT: 3,"IP","cmwap","10.146.8.82",0,0,0,2,0,0
284
285 As listed above , "10.159.180.217" is the IPv4 address of PDN1 and same for the others.
286
287 Modify the route configuration, such as:
288 "route add -net 114.114.114.0/24 gw 10.146.8.82"
289 "route add -net 8.8.8.0/24 gw 10.156.82.62"
290 "route add -net 1.1.1.0/24 gw 10.159.180.217"
291
292 # route
293 Kernel IP routing table
294 Destination Gateway Genmask Flags Metric Ref Use Iface
295 1.1.1.0 10.159.180.217 255.255.255.0 UG 0 0 0 ccinet0
296 8.8.8.0 10.156.82.62 255.255.255.0 UG 0 0 0 ccinet1
297 114.114.114.0 10.146.8.82 255.255.255.0 UG 0 0 0 ccinet2
298 192.168.1.0 * 255.255.255.0 U 0 0 0 br-lan
299 192.168.100.0 * 255.255.255.0 U 0 0 0 br-lan2
300 192.168.200.0 * 255.255.255.0 U 0 0 0 br-lan3
301
3022) Configure /etc/config/network
303 Add the following configuration to "/etc/config/network":
304
305 config switch
306 option name 'switch0'
307 option reset '1'
308 option enable_vlan '1'
309
310 config interface 'lan2'
311 option ifname 'usbnet0.100'
312 option type 'bridge'
313 option bridge_empty '1'
314 option proto 'static'
315 option ipaddr '192.168.100.1'
316 option netmask '255.255.255.0'
317 option ip6assign '60'
318
319 config interface 'lan3'
320 option ifname 'usbnet0.200'
321 option type 'bridge'
322 option bridge_empty '1'
323 option proto 'static'
324 option ipaddr '192.168.200.1'
325 option netmask '255.255.255.0'
326 option ip6assign '60'
327
328 usbnet0.100 and usbnet0.200 represent VLAN100 and VLAN200.
329 Then execute "/etc/init.d/network reload" to apply the configuration.
330
3313) Modify /etc/config/firewall
332 The forwarding rules are set as follows:
333
334 config zone
335 option name lan
336 list network 'lan'
337 option input ACCEPT
338 option output ACCEPT
339 option forward ACCEPT
340
341 config zone
342 option name wan
343 list network 'wan0'
344 list network 'wan3'
345 list network 'wan4'
346 list network 'wan5'
347 list network 'wan6'
348 list network 'wan7'
349 list network 'wan60'
350 list network 'wan63'
351 list network 'wan64'
352 list network 'wan65'
353 list network 'wan66'
354 list network 'wan67'
355 list network 'wlan'
356 list network 'wlan6'
357 option input REJECT
358 option output ACCEPT
359 option forward REJECT
360 option masq 1
361 option mtu_fix 1
362
363 config forwarding
364 option src lan
365 option dest wan
366
367 config zone
368 option name lan2
369 list network 'lan2'
370 option input ACCEPT
371 option output ACCEPT
372 option forward ACCEPT
373
374 config zone
375 option name wan_100
376 list network 'wan1'
377 list network 'wan61'
378 option input REJECT
379 option output ACCEPT
380 option forward REJECT
381 option masq 1
382 option mtu_fix 1
383
384 config forwarding
385 option src lan2
386 option dest wan_100
387
388 config zone
389 option name lan3
390 list network 'lan3'
391 option input ACCEPT
392 option output ACCEPT
393 option forward ACCEPT
394
395 config zone
396 option name wan_200
397 list network 'wan2'
398 list network 'wan62'
399 option input REJECT
400 option output ACCEPT
401 option forward REJECT
402 option masq 1
403 option mtu_fix 1
404
405 config forwarding
406 option src lan3
407 option dest wan_200
408
409 Then execute "/etc/init.d/firewall reload" to apply the configuration.
410
4114) Configure /etc/config/dhcp
412 Add the following configuration to "/etc/config/dhcp":
413
414 config dhcp 'lan2'
415 option interface 'lan2'
416 option start '100'
417 option limit '150'
418 option leasetime '2h'
419 option dhcpv6 'server'
420 option ra 'relay'
421 option ndp 'relay'
422
423 config dhcp 'lan3'
424 option interface 'lan3'
425 option start '100'
426 option limit '150'
427 option leasetime '2h'
428 option dhcpv6 'server'
429 option ra 'relay'
430 option ndp 'relay'
431
432 Then execute "/etc/init.d/dnsmasq reload" to apply the configuration.
433
4345) Configuration in Ubuntu16.04
435 Add virtual network card:
436 "vconfig add enp0s26u1u1 100"
437 "vconfig add enp0s26u1u1 200"
438
439 Get IP address through DHCP:
440 "dhcpcd enp0s26u1u1"
441 "dhcpcd enp0s26u1u1.100"
442 "dhcpcd enp0s26u1u1.200"
443
444 # ifconfig
445 enp0s26u1u1 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81
446 inet addr:192.168.1.134 Bcast:192.168.1.255 Mask:255.255.255.0
447 inet6 addr: 240e:9a:428:44c9:acae:1690:47d3:710c/64 Scope:Global
448 inet6 addr: 240e:9a:428:44c9:29:f2ff:feb7:fa81/64 Scope:Global
449 inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link
450 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
451 RX packets:13141 errors:0 dropped:0 overruns:0 frame:0
452 TX packets:2393 errors:0 dropped:0 overruns:0 carrier:0
453 collisions:0 txqueuelen:1000
454 RX bytes:1284895 (1.2 MB) TX bytes:570332 (570.3 KB)
455
456 enp0s26u1u1.100 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81
457 inet addr:192.168.100.203 Bcast:192.168.100.255 Mask:255.255.255.0
458 inet6 addr: 240e:9a:417:66b8:29:f2ff:feb7:fa81/64 Scope:Global
459 inet6 addr: 240e:9a:428:44c9:f6e7:c272:3fba:6a7d/64 Scope:Global
460 inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link
461 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
462 RX packets:3969 errors:0 dropped:0 overruns:0 frame:0
463 TX packets:898 errors:0 dropped:0 overruns:0 carrier:0
464 collisions:0 txqueuelen:1000
465 RX bytes:398354 (398.3 KB) TX bytes:131123 (131.1 KB)
466
467 enp0s26u1u1.200 Link encap:Ethernet HWaddr 02:29:f2:b7:fa:81
468 inet addr:192.168.200.203 Bcast:192.168.200.255 Mask:255.255.255.0
469 inet6 addr: 240e:9a:419:2597:29:f2ff:feb7:fa81/64 Scope:Global
470 inet6 addr: 240e:9a:419:2597:6433:4697:bff4:45c9/64 Scope:Global
471 inet6 addr: 240e:9a:428:44c9:29:f2ff:feb7:fa81/64 Scope:Global
472 inet6 addr: fe80::29:f2ff:feb7:fa81/64 Scope:Link
473 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
474 RX packets:3898 errors:0 dropped:0 overruns:0 frame:0
475 TX packets:629 errors:0 dropped:0 overruns:0 carrier:0
476 collisions:0 txqueuelen:1000
477 RX bytes:404558 (404.5 KB) TX bytes:118583 (118.5 KB)
478
479 Add the IPv4 routing:
480 "route add -net 1.1.1.0/24 gw 192.168.1.1"
481 "route add -net 8.8.8.0/24 gw 192.168.100.1"
482 "route add -net 114.114.114.0/24 gw 192.168.200.1"
483
484 # route
485 Kernel IP routing table
486 Destination Gateway Genmask Flags Metric Ref Use Iface
487 1.1.1.0 192.168.1.1 255.255.255.0 UG 0 0 0 enp0s26u1u1
488 8.8.8.0 192.168.100.1 255.255.255.0 UG 0 0 0 enp0s26u1u1.100
489 114.114.114.0 192.168.200.1 255.255.255.0 UG 0 0 0 enp0s26u1u1.200
490 192.168.1.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1
491 192.168.100.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1.100
492 192.168.200.0 * 255.255.255.0 U 0 0 0 enp0s26u1u1.200
493
4946) Test in Ubuntu16.04
495 # ping 1.1.1.1
496 PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
497 64 bytes from 1.1.1.1: icmp_seq=1 ttl=52 time=223 ms
498 64 bytes from 1.1.1.1: icmp_seq=2 ttl=52 time=173 ms
499 64 bytes from 1.1.1.1: icmp_seq=3 ttl=52 time=169 ms
500
501 # ping 8.8.8.8
502 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
503 64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=54.7 ms
504 64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=52.3 ms
505 64 bytes from 8.8.8.8: icmp_seq=4 ttl=113 time=53.0 ms
506
507 # ping 114.114.114.114
508 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.
509 64 bytes from 114.114.114.114: icmp_seq=1 ttl=65 time=201 ms
510 64 bytes from 114.114.114.114: icmp_seq=2 ttl=86 time=25.0 ms
511 64 bytes from 114.114.114.114: icmp_seq=3 ttl=90 time=25.0 ms
512
513 # ping6 240e:83:201:3700::4 -I enp0s26u1u1
514 PING 240e:83:201:3700::4(240e:83:201:3700::4) from 240e:9a:428:44c9:acae:1690:47d3:710c enp0s26u1u1: 56 data bytes
515 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=45.2 ms
516 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=32.8 ms
517 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=32.0 ms
518 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=31.2 ms
519
520 # ping6 240e:83:201:3700::4 -I enp0s26u1u1.100
521 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
522 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=42.0 ms
523 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=33.8 ms
524 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=33.8 ms
525 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=30.7 ms
526
527 # ping6 240e:83:201:3700::4 -I enp0s26u1u1.200
528 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
529 64 bytes from 240e:83:201:3700::4: icmp_seq=1 ttl=57 time=31.9 ms
530 64 bytes from 240e:83:201:3700::4: icmp_seq=2 ttl=57 time=33.0 ms
531 64 bytes from 240e:83:201:3700::4: icmp_seq=3 ttl=57 time=35.1 ms
532 64 bytes from 240e:83:201:3700::4: icmp_seq=4 ttl=57 time=33.7 ms
533
5347) VLAN for the default PDN
535 In MIFI mode, you just need to modify the /etc/config/firewall configure file.
536 For example, bind to the VLAN 10:
537 Modify the /etc/config/firewall configure file, then execute "/etc/init.d/firewall reload" to apply the configuration.:
538
539 config zone
540 option name lan
541 list network 'lan'
542 option input ACCEPT
543 option output ACCEPT
544 option forward ACCEPT
545
546 config zone
547 option name wan
548 list network 'wan3'
549 list network 'wan4'
550 list network 'wan5'
551 list network 'wan6'
552 list network 'wan7'
553 list network 'wan63'
554 list network 'wan64'
555 list network 'wan65'
556 list network 'wan66'
557 list network 'wan67'
558 list network 'wlan'
559 list network 'wlan6'
560 option input REJECT
561 option output ACCEPT
562 option forward REJECT
563 option masq 1
564 option mtu_fix 1
565
566 config forwarding
567 option src lan
568 option dest wan
569
570 config zone
571 option name lan1
572 list network 'lan1'
573 option input ACCEPT
574 option output ACCEPT
575 option forward ACCEPT
576
577 config zone
578 option name wan_10
579 list network 'wan0'
580 list network 'wan60'
581 option input REJECT
582 option output ACCEPT
583 option forward REJECT
584 option masq 1
585 option mtu_fix 1
586
587 config forwarding
588 option src lan1
589 option dest wan_10
590
591 The routing configuration in ubuntu is similar to the above step (5) and module is similar to the above step (1).
592
5938) Note
594 If you disconnect the usb, you may need to follow the above steps to reconfigure after reconnect.
595 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.