两个在Proxmox上贿赂。两个网桥的默认路由

时间:2013-04-07 09:49:44

标签: networking routing debian routed

在VRACK over VRACK LAN上的场景Proxmox 2.2

两个VLAN的两个桥接接口:

  • 5.135.XXX.XXX/26 Gateway 5.135.XXX.126 Netmask 255.255.255.192此网络是Vrack上的第一个
  • 176.31.XXX.XXX/26 Gateway 176.31.XXX.254 Netmask 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

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

0 个答案:

没有答案