【问题标题】:proxmox KVM routed network with multiple public IPs具有多个公共 IP 的 proxmox KVM 路由网络
【发布时间】:2016-02-05 10:53:09
【问题描述】:

我与 hetzner 有一个专门的托管。另外我买了一个6IP子网。

我的主IP是:88.198.60.125 我的主子网是:255.255.255.224

我的附加 IP 是 46.4.214.81 到 46.4.214.86

Windows 服务器上的互联网访问工作。但是centos给了我无效的主机 我不能使用桥接模式,因为 hetzner 不允许在同一个外部 ip 上使用多个 MAC,所以我必须使用路由模式。这是主机的 /etc/network/interfaces 文件:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  88.198.60.125
        netmask  255.255.255.255
        pointopoint 88.198.60.97
        gateway  88.198.60.97
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

auto vmbr0
iface vmbr0 inet static
    address  88.198.60.125
    netmask  255.255.255.255
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

    #subnet
    up ip route add 46.4.214.80/29 dev vmbr0
    up ip route add 46.4.214.81/29 dev vmbr0
    up ip route add 46.4.214.82/29 dev vmbr0
    up ip route add 46.4.214.83/29 dev vmbr0
    up ip route add 46.4.214.84/29 dev vmbr0
    up ip route add 46.4.214.85/29 dev vmbr0
    up ip route add 46.4.214.86/29 dev vmbr0
    up ip route add 46.4.214.87/29 dev vmbr0

这是我的 vm 接口

auto eth0                                                                                   
 iface eth0 inet static                                                                        
 address 46.4.214.81                                                                        
 netmask 255.255.255.255                                                                     
 pointopoint 88.198.60.125                                                                  
 gateway 88.198.60.125  

【问题讨论】:

    标签: virtual-machine kvm subnet proxmox routed


    【解决方案1】:

    好的,这就是我解决问题的方法 您需要指定要使用 "up route add -host" 将它们与 WINDOWS SERVER 一起使用的 IP,其他 IP 可以使用 create container 直接与 Linux 一起使用....安装 Linux 手册不起作用与我一起 这是我的 /etc/network/interfaces 文件

    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
            address  88.198.60.125
            netmask  255.255.255.255
            pointopoint 88.198.60.97
            gateway  88.198.60.97
            post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
    
    auto vmbr0
    iface vmbr0 inet static
        address  88.198.60.125
        netmask  255.255.255.255
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
    
        #subnet ips  used with windows server only
         up route add -host 46.4.214.80 dev vmbr0
         up route add -host 46.4.214.81 dev vmbr0
         up route add -host 46.4.214.82 dev vmbr0
         up route add -host 46.4.214.87 dev vmbr0
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-07-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-09
      • 2021-12-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多