#楼主# 2023-7-17

跳转到指定楼层
本帖最后由 Henry998 于 2023-7-17 12:21 编辑

和这个帖子的情况类似,求教,host模式下该如何配置NIC?另外,之前也试过bridge网络,wxedge容器也是可以正常检测到upnp为开启,并且upnp租期文件中,也有wxedge添加的映射条目。但是,依旧显示端口映射型,目前只有DMZ模式是可以可以检测为DMZ映射型的,但是不是很希望直接使用DMZ模式。
https://bbs.onethingcloud.com/forum.php?mod=viewthread&tid=4092
以下是上述帖子中追问的问题内容,希望各位大佬帮忙解答,谢谢了:

请问,这个NIC对应的eth0是pppoe拨号所在的那个物理网口吗?还是拨号后生成的虚拟网口(wan)?
这是我这边的配置,eth0,eth2,eth3是物理lan口,eth1是拨号口(并且,由于光猫开启的是混合模式,eth1上还叠加了一个DHCP客户端-用于让路由器子网可以直接访问光猫子网,DHCP客户端获取的IP是192.168.1.2),eth1上pppoe拨号生成了pppoe-wan,pppoe-wan还生成了一个虚拟的wan6(没有显示在ifconfig中),而且,也试过把eth1上的DHCP客户端关掉,仅使用pppoe,问题依旧。vethe9b2cc5是docker容器的网口。

请问,这种情况下,环境变量NIC的值是应该写eth1还是写pppoe,还是写其它的什么值?

```
root@OpenWrt:/app/wxedge# docker exec -i wxedge ifconfig
br-lan: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fd88::1  prefixlen 64  scopeid 0x0<global>
        inet6 *************::1  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::c683:4fff:fe23:130  prefixlen 64  scopeid 0x20<link>
        ether c4:83:4f:23:01:30  txqueuelen 1000  (Ethernet)
        RX packets 6139609  bytes 706453842 (706.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14603531  bytes 16271582479 (16.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 32:f7:a1:cc:94:16  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

docker_app_upnp: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
        inet6 fe80::1  prefixlen 64  scopeid 0x20<link>
        inet6 fd00:21::1  prefixlen 32  scopeid 0x0<global>
        inet6 fe80::e4bb:beff:fe4d:9c9  prefixlen 64  scopeid 0x20<link>
        inet6 *************:4e9a  prefixlen 64  scopeid 0x0<global>
        ether ee:0e:4a:3e:a4:10  txqueuelen 1000  (Ethernet)
        RX packets 59816549  bytes 56936377360 (56.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47609230  bytes 24633690663 (24.6 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether c4:83:4f:23:01:30  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 337660  bytes 137485460 (137.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::c683:4fff:fe23:131  prefixlen 64  scopeid 0x20<link>
        ether c4:83:4f:23:01:31  txqueuelen 1000  (Ethernet)
        RX packets 80955876  bytes 55734840607 (55.7 GB)
        RX errors 0  dropped 15011  overruns 0  frame 0
        TX packets 90829970  bytes 67683935065 (67.6 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21


eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether c4:83:4f:23:01:32  txqueuelen 1000  (Ethernet)
        RX packets 6160599  bytes 707534946 (707.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14603709  bytes 16272374282 (16.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 22  

eth3: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c4:83:4f:23:01:33  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
        device interrupt 23  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 834414672  bytes 1072809219489 (1.0 TB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 834414672  bytes 1072809219489 (1.0 TB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pppoe-wan: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1492
        inet *************  netmask 255.255.255.255  destination 100.79.128.1
        inet6 fe80::2dbf:9c9f:5b65:1907  prefixlen 128  scopeid 0x20<link>
        inet6 *************:1907  prefixlen 64  scopeid 0x0<global>
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 80060178  bytes 54951567198 (54.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 89420856  bytes 64635041157 (64.6 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethe9b2cc5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::ac08:7cff:fe0e:41b7  prefixlen 64  scopeid 0x20<link>
        ether ae:08:7c:0e:41:b7  txqueuelen 0  (Ethernet)
        RX packets 734  bytes 179941 (179.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10202  bytes 2476645 (2.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


...无关网口的信息已删除...
```

转播转播 分享淘帖
回复

使用道具

成为第一个回答人

关于作者

Henry998

幼儿园

  • 主题

    0

  • 帖子

    3

  • 关注者

    0