1

OVH over VRACK LAN 上的场景 Proxmox 2.2

两个 VLAN 的两个桥接接口:

  • 5.135.XXX.XXX/26 网关 5.135.XXX.126 网络掩码 255.255.255.192 这是 Vrack 上的第一个网络
  • 176.31.XXX.XXX/26 网关 176.31.XXX.254 网络掩码 255.255.255.192

手动配置的接口(不使用 Proxmox 的 Web 界面)

为两个 VLAN 工作,但有任何问题。

从主机 ping 到: - 5.135.XXX.126 不工作 - 176.31.XXX.254 不工作

使用两个 VLAN 中的任何一个将主机上的所有 VPS 都正常工作

    cat /etc/network/interfaces
auto lo
iface lo inet loopback

# for Routing
    auto vmbr1
    iface vmbr1 inet manual
post-up /etc/pve/kvm-networking.sh
bridge_ports dummy0
bridge_stp off
bridge_fd 0

# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
address 5.39.XXX.XXX
netmask 255.255.255.0
network 5.39.XXX.0
broadcast 5.39.XXX.255
gateway 5.39.XXX.254
bridge_ports eth0
bridge_stp off
bridge_fd 0

 iface vmbr0 inet6 static
address XXXX:XXXX:8:8D23::1
netmask 64
post-up /sbin/ip -f inet6 route add XXXX:XXXX:8:8Dff:ff:ff:ff:ff dev vmbr0
post-up /sbin/ip -f inet6 route add default via XXXX:XXXX:8:8Dff:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del default via XXXX:XXXX:8:8Dff:ff:ff:ff:ff
pre-down /sbin/ip -f inet6 route del XXXX:XXXX:8:8Dff:ff:ff:ff:ff dev vmbr0

# vmbr11: Bridging vRack
auto vmbr10
iface vmbr10 inet static
    address 5.135.XXX.XXX
    netmask 255.255.255.240  # With 255.255.255.192 Don't work any.
    network 5.135.XXX.64
broadcast 5.135.XXX.127
    gateway 5.135.XXX.126
    bridge_ports auto eth0.2674
    bridge_stp off
    bridge_fd 0

# vrack 2674
auto eth0.2674
iface eth0.2674 inet static
address 5.135.XXX.XXX
network 5.135.XXX.64
broadcast 5.135.XXX.127
gateway 5.135.XXX.126
netmask 255.255.255.240 # With 255.255.255.192 Don't work any.

# vmbr11: Bridging vRack
auto vmbr11
iface vmbr11 inet static
    address 176.XXX.XXX.250
    netmask 255.255.255.240 # With 255.255.255.192 Don't work any.
    network 176.XXX.XXX.192
    broadcast 176.XXX.XXX.255
    gateway 176.XXX.XXX.254
    bridge_ports auto eth0.2673
    bridge_stp off
    bridge_fd 0

# vrack 2673
  auto eth0.2673
  iface eth0.2673 inet static
  address 176.XXX.XXX.193
  network 176.XXX.XXX.192
  broadcast 176.XXX.XXX.255
  gateway 176.XXX.XXX.254
  netmask 255.255.255.240 # With 255.255.255.192 Don't work any.

post-up /sbin/ip route add default via 176.XXX.XXX.254 dev eth0.2673 table 125
post-up /sbin/ip rule add from 176.XXX.XXX.192/26 table 125
post-up /sbin/ip route add default via 5.XXX.XXX.126 dev eth0.2674 table 125
post-up /sbin/ip rule add from 5.XXX.XXX.64/26 table 125

post-down /sbin/ip route del default 176.XXX.XXX.254 dev eth0.2673 table 125
post-down /sbin/ip rule del from 176.XXX.XXX.192/26 table 125
post-down /sbin/ip route del default 5.XXX.XXX.126 dev eth0.2674 table 125
post-down /sbin/ip rule del from 5.XXX.XXX.64/26 table 125

也在 /etc/sysctl.conf

net.ipv4.conf.default.proxy_arp = 1
net.ipv4.conf.eth0/2673.proxy_arp = 1
net.ipv4.conf.eth0/2674.proxy_arp = 1

也在 etc/network/if-up.d/static-routes 上用于到 NAS 的静态路由

 #!/bin/sh
/sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 5.XXX.XXX.254 #eth0 OR vmbr0

    Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
5.135.XXX.112    0.0.0.0         255.255.255.240 U     0      0        0 vmbr10
5.135.XXX.80     0.0.0.0         255.255.255.240 U     0      0        0 eth0.2674
176.31.XXX.192   0.0.0.0         255.255.255.240 U     0      0        0 eth0.2673
176.31.XXX.240   0.0.0.0         255.255.255.240 U     0      0        0 vmbr11
5.39.XXX.0       0.0.0.0         255.255.255.0   U     0      0        0 vmbr0
10.0.0.0        5.39.XXX.254     255.0.0.0       UG    0      0        0 vmbr0
0.0.0.0         176.31.XXX.254   0.0.0.0         UG    0      0        0 vmbr11
0.0.0.0         5.135.XXX.126    0.0.0.0         UG    0      0        0 vmbr10
0.0.0.0         5.39.XXX.254     0.0.0.0         UG    0      0        0 vmbr0

这个问题的精确帮助。我在这个问题上花了很多时间却没有找到正确的输出。它有效,但不如预期。

4

0 回答 0