本帖最后由 pony 于 2022-1-8 20:08 编辑
找到MJJ的教程了 https://hostloc.com/thread-436385-1-1.html 感谢
求助,PVE里面怎么弄DHCP?
现在网卡的配置如下 还未装DHCP服务
主要是不知道怎么弄
求大佬指教
- source /etc/network/interfaces.d/*
-
- auto lo
- iface lo inet loopback
- iface lo inet6 loopback
-
- auto enp0s31f6
- iface enp0s31f6 inet manual
- up route add -net 主IP netmask 255.255.255.192 gw 主IP网关 dev enp0s31f6
-
- auto vmbr0
- iface vmbr0 inet static
- address 主IP
- netmask 255.255.255.192
- gateway 主IP网关
- bridge_ports enp0s31f6
- bridge_stp off
- bridge_fd 0
-
- iface vmbr0 inet6 static
- address IPV6::2/64
- netmask 64
- gateway IPV6网关
-
- auto vmbr1
- iface vmbr1 inet static
- address 10.10.10.1
- netmask 255.255.255.0
- bridge_ports none
- bridge_stp off
- bridge_fd 0
- post-up echo 1 > /proc/sys/net/ipv4/ip_forward
- post-up iptables -t nat -A POSTROUTING -s ‘10.10.10.0/24’ -o vmbr0 -j MASQUERADE
- post-down iptables -t nat -D POSTROUTING -s ‘10.10.10.0/24’ -o vmbr0 -j MASQUERADE
复制代码
现在就是想让小鸡自动分配vmbr1这个网卡的IP(10.10.10.1/24 内网IP,) |