252 字
1 分钟
openwrt作为主路由

openwrt作为主路由#

首先pve一网口A作为wan,两个网口BC作为lan

A网口可以直通给openwrt虚拟机,BC桥接成vmbr0给虚拟机

首先,网络全是乱的情况下,电脑网线插入B口或C口

pve设置网关和ip

Terminal window
nano /etc/network/interfaces
Terminal window
# 本地回环
auto lo
iface lo inet loopback
# 物理网口都设 manual
iface eno1 inet manual
iface enp4s0 inet manual
iface enp5s0 inet manual
# 内网桥(LAN)给 OpenWrt 和其他 VM
auto vmbr0
iface vmbr0 inet static
address 192.168.5.9
netmask 255.255.255.0
gateway 192.168.5.10
bridge-ports enp4s0 enp5s0
bridge-stp off
bridge-fd 0

电脑设置ip为同子网内ip,如192.168.5.120,此时可以通过ip访问pve页面

安装istoreOS:

PVE虚拟化下安装iStoreOS软路由

安装后使用quickstart命令,设置lan ip为同子网下ip,如192.168.5.10,访问网页进行后续配置。

配置完成后将电脑和pve网关,dns指向openwrt,并设置静态ipv4

也可设置为自动,由openwrt里设置静态dhcp-v4

ipv4地址分配区间可以在这里设置:

openwrt作为主路由
https://www.raythalis.cn/posts/笔记/硬核搞机/openwrt/openwrt作为主路由/
作者
Raythalis
发布于
2026-01-17
许可协议
CC BY-NC-SA 4.0