Add IP of another subnet

charon

Renowned Member
Nov 30, 2008
120
1
83
Hi,

i gave proxmox a try yesterday and installed it into a debian minimal system (i have no access to a cd-rom drive neither an iso mount)

But I ran into another issue and i hope you can help me.

THe Dedicated Server has got one main IP and a small subnet with some more Ips.
To get it working right now, i had to switch the host ip to one of the new subnet and added all containers within the small subnet.
The new host ip is connected with eth0 and eth1 in bond0.

How can i get the old Main IP working?
When i simply add it into a container, it does not work at all. When i create a eth0.0 an a vmbr1 bridge device and create a container with this vmbr1 the host accepts alle requests, but not the container.
How can i get it working?
 
This seems to be the problem,
but how can i add a route to a subnet that does not exist.
i now have a container running with a venet0 device on the main ip.
then i can't change the route

Code:
SIOCADDRT: Kein passender Prozess gefunden

when i create a bridge device as explained earlier the host "takes over" the IP address and the container ist not reachable, too.
 
you tried somethink like:

Code:
route add -net 12.12.14.0 [B][COLOR=#ff0000]netmask[/COLOR][/B] 255.255.255.0 dev vmbr0

Please can you post your /etc/network/interface

What IP/networks/gateways do you have/want exactly?

- Dietmar
 
thank you for your time

I have the following IPs:
Code:
IP: xxx.xxx.124.207
    Gateway:: xxx.xxx.124.193
    Netmask: 255.255.255.192
    Broadcast: xxx.xxx.124.255

IP: xxx.xxx.127.202
    Gateway:: xxx.xxx.127.129
    Netmask: 255.255.255.128
    Broadcast: xxx.xxx.127.255

IP: xxx.xxx.127.201
    Gateway:: xxx.xxx.127.129
    Netmask: 255.255.255.128
    Broadcast: xxx.xxx.127.255

IP: xxx.xxx.127.200
    Gateway:: xxx.xxx.127.129
    Netmask: 255.255.255.128
    Broadcast: xxx.xxx.127.255
and i simply want to use all of them.
When i get another subnet, there will be the same issue again. so i want to get it working now.

my actual /etc/network/interfaces (it changed a lot in the last two days)

Code:
# cat /etc/network/interfaces
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto bond0
iface bond0 inet static
        address  xxx.xxx.127.200
        netmask  255.255.255.128
        gateway  xxx.xxx.127.129
        broadcast  xxx.xxx.127.255
        slaves eth0 eth1
        bond_miimon 100
        bond_mode balance-rr

auto vmbr0
iface vmbr0 inet static
        address  xxx.xxx.124.207
        netmask  255.255.255.192
        bridge_ports none
        bridge_stp off
        bridge_fd 0


when i try the xxx.xxx.124.207 address i see the proxmox web config
 
Last edited:
try this:

Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
        address  xxx.xxx.124.207
        netmask  255.255.255.192
        gateway  xxx.xxx.124.193
        bridge_ports eth0
        bridge_stp on
        bridge_fd 0
        post-up route add -net xxx.xxx.127.128 netmask 255.255.255.128 dev vmbr0
 
nice, this is working.
but how do i reactivate bonding over the two NICs and keep it still working?
This is needed vor High Availability issues. Can i just add eth1 to vmbr0?
 
Last edited:
thanx dietmar, i was too blind at the end.

everything ist simple to set up.
i really appreciate your patient support.
 
This setup works only for OpenVZ containers.
How can i use the external IPs with KVM's within the same setup as mentioned above?
 
KVM uses bridged networking, so normally there is no routing involved (packets are directly sent over the cable).

That means your setup should work with KVM too.

- Dietmar
 
But when i add a bridge lets say vmbr1 and enter the ip address into the bridge device. then create a kvm container and add the bridge device, the HE responds to external requests and i see the proxmox webinterface instead of the KVM's webserver .


when i add a bridge to eth0.0 , the KVM has got a internet route but is not accessible from the outside.

do i have to manually configure NAT routing on the HE?
 
Last edited:
I do not get the kvm Network working.

I would really appreciate if someon can help me with it again.

Code:
qhost1:~# ifconfig
bond0     Protokoll:Ethernet  Hardware Adresse 00:40:D0:B0:EB:D4
          inet6 Adresse: fe80::240:d0ff:feb0:ebd4/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:64658 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42277 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:19682538 (18.7 MiB)  TX bytes:13983918 (13.3 MiB)

eth0      Protokoll:Ethernet  Hardware Adresse 00:40:D0:B0:EB:D4
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:64658 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42277 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:19682538 (18.7 MiB)  TX bytes:13983918 (13.3 MiB)
          Interrupt:35

eth1      Protokoll:Ethernet  Hardware Adresse 00:40:D0:B0:EB:D4
          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:35

lo        Protokoll:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10324 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10324 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:3929942 (3.7 MiB)  TX bytes:3929942 (3.7 MiB)

tap0      Protokoll:Ethernet  Hardware Adresse 00:FF:FB:B2:DB:D9
          inet6 Adresse: fe80::2ff:fbff:feb2:dbd9/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:1 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:500
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

venet0    Protokoll:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP BROADCAST PUNKTZUPUNKT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:4876 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4056 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:874366 (853.8 KiB)  TX bytes:489149 (477.6 KiB)

vmbr0     Protokoll:Ethernet  Hardware Adresse 00:40:D0:B0:EB:D4
          inet Adresse:XXX.XXX.124.207  Bcast:XXX.XXX.124.255  Maske:255.255.255.192
          inet6 Adresse: fe80::240:d0ff:feb0:ebd4/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64668 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36395 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX bytes:18499746 (17.6 MiB)  TX bytes:13406113 (12.7 MiB)
Code:
qhost1:~# route -n
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
XXX.XXX.127.202   0.0.0.0         255.255.255.255 UH    0      0        0 venet0
XXX.XXX.124.192   0.0.0.0         255.255.255.192 U     0      0        0 vmbr0
XXX.XXX.127.128   0.0.0.0         255.255.255.128 U     0      0        0 vmbr0
0.0.0.0         XXX.XXX.124.193   0.0.0.0         UG    0      0        0 vmbr0
The OpenVZ Containers use XXX.XXX.127.201 and XXX.XXX.127.202.

The KVM is connected to vmbr0 and I want to use XXX.XXX.127.200
I can only ping the other OpenVZ nodes but i just get an internet route with NAT NIC and DHCP active. Then i get a private ip 10.0.2.17.
But the HE does not have any route to this network.
I know I just do not get it, would you recommend a specific document, where the proxmox networking is explained?

sorry about the disturbance
 
The KVM is connected to vmbr0 and I want to use XXX.XXX.127.200
I can only ping the other OpenVZ nodes but i just get an internet route with NAT NIC and DHCP active. Then i get a private ip 10.0.2.17.

I am confused now. Why dont you simple post the guest internet configuration.
 
Because i could not get copy+paste working in the java VNC window.

guest internet configuration:

eth0: XXX.XXX.127.200
netmask: 255.255.255.128
gw: XXX.XXX.127.129

routes:

XXX.XXX.127.128/255.255.255.128 eth0
0.0.0.0 XXX.XXX.127.129 eth0
 
And whats the output of (on the host):

# brctl show

in the guest: can you ping the gateway?

use tcpdump to see where packets get lost.

- Dietmar
 
Code:
qhost1:~# brctl show
bridge name     bridge id               STP enabled     interfaces
vmbr0           8000.0040d0b0ebd4       yes             bond0
                                                        tap0
when i ping the gateway on the guest i only see echo requests on the host



ICMP echo request, id 21002, seq 19, length 64

and i see arp requests for the gateway:
14:16:29.382540 arp who-has static-ip-XXX-XXX-127-129.inaddr.xxx.com tell static-ip-XXX-XXX-127-200.inaddr.xxx.com
14:16:29.382679 IP static-ip-XXX-XXX-127-200.inaddr.xxx.com > static-ip-XXX-XXX-127-129.inaddr.xxx.com: ICMP echo request, id 21002, seq 202, length 64
 
Last edited:
please try to find out where the packets gets lost.

Try tcpdump on the host (vmbr0), then on your gateway, ...
 
i posted the output of the host above and i do not have access to the gateway
 
Seems the gateway does not answer, so there is a rooting problem there. Contact the gateway admin - maybe he can help.

- Dietmar
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!