找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2116|回复: 17

请教在R86s平台中虚拟机OpenWrt的VLAN设置问题

[复制链接]
发表于 2022-9-27 10:25 | 显示全部楼层 |阅读模式
本帖最后由 birdmouth 于 2022-9-27 10:25 编辑

本人在万兆版R86s平台的PVE中安装了一台虚拟机OpenWrt,目前想把R86s的未用网口添加到LAN中,但是始终搞不定,特上来请教。

R86s万兆版,有5个网口,我的分配如下图,eth2作为WAN口拨号,第一个万兆口连接LAN:


在PVE里直通给OpenWrt的网口顺序是这样的:

在OpenWrt里的网口顺序是这样的:

请教一下,我在交换机上应该怎么设置标记,才能将上图中1GB(未用)网口和2.5GB(未用)网口添加到LAN中呢?


OpenWrt中的网络配置文件如下,生效后并不成功,:
root@OpenWrt:~# cat/etc/config/network

config interface'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface'LAN'
       option proto 'static'
       option ifname 'eth0.0'
       option ipaddr '192.168.2.1'
       option netmask '255.255.255.0'
       option gateway '192.168.2.1'
       option dns '192.168.2.1'

config interface'wan'
        option _orig_bridge 'false'
        option proto 'pppoe'
        option username 'ad*******'
        option password '*********'
        option ipv6 'auto'
        option keepalive '0'
        option _orig_ifname 'eth1'
        option ifname 'eth0.1'

config interface'docker'
        option ifname 'docker0'
        option proto 'none'
        option auto '0'

config device
        option type 'bridge'
        option name 'docker0'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '0'
        option vid '0'
        option ports '0 23 5t'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option ports '15t'

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2022-9-27 18:37 | 显示全部楼层
谢谢楼上各位,我的问题是在交换机里,哪几个口应该是未标记

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-9-27 10:55 | 显示全部楼层
改lan口有图形界面,为什么要改config

点评

问题是怎么改?  详情 回复 发表于 2022-9-27 11:39
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-9-27 11:03 | 显示全部楼层
还是ikuai好用。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-9-27 11:03 | 显示全部楼层
先在openwrt里设置好物理网口,再分vlan吧

点评

怎么设置?  详情 回复 发表于 2022-9-27 16:42
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-9-27 11:39 | 显示全部楼层
funison 发表于 2022-9-27 10:55
改lan口有图形界面,为什么要改config

问题是怎么改?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-9-27 16:42 | 显示全部楼层
funison 发表于 2022-9-27 11:03
先在openwrt里设置好物理网口,再分vlan吧

怎么设置?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-9-27 18:10 | 显示全部楼层
为什么不爱快+OP呢,     进OP后天  lan口设置里添加
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-9-27 19:48 | 显示全部楼层
我的问题是,在交换机里应该怎么设置端口的标记呢?现在完全搞不清楚op里哪个端口对应的是哪个物理端口


我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-9-28 11:44 | 显示全部楼层
沉得好快
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-9-30 08:25 | 显示全部楼层
有人知道吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-10-6 10:45 | 显示全部楼层
有人知道吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-10-20 03:05 | 显示全部楼层
vlan1 port5 未标记就好了

点评

port5是WAN口?  详情 回复 发表于 2022-10-24 09:20
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2022-10-24 09:20 | 显示全部楼层
masmk 发表于 2022-10-20 03:05
vlan1 port5 未标记就好了

port5是WAN口?

点评

1G—eth0 2.5G-eth1 2.5g-eth2 10-eth4 10g-eth3 1G下面那个端口就是port5 openwrt下面应该是eth4  详情 回复 发表于 2024-1-27 01:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-11-8 23:07 | 显示全部楼层
楼主用的哪一版固件?可以分享一下吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 07:51

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表