venet problem with 2 ip adresses

informant

Renowned Member
Jan 31, 2012
780
10
83
Hi all,

we have a big problem with venet.
we have a lokal network and a internet network.
if we add 2 ips, one for intranet and one for internet, we can use only one, first or second ip.
if we add first internet ip and than intranet ip, we can use only the internet ip, and if we add first intranet ip and than internet ip, we can use only intranet ip.
we would use both ips. how can we do this?

we have 2 network cards and on host we have eth0 (internet) bridge to vmbr0 and eth1 (intranet) bridge vmbr1.
the internet doesn´t route over the internet ip, if we add first intranet ip, and it we add first internet ip, we intranet ip doesn´t route over intranet ip.

please help, we need access to internet and lokal network. very thanks.

regards.
 
Last edited:
Host have this configuration:

eth0 YES NO
eth1 YES NO
vmbr0 YES YES eth0 <internet-ip> 255.255.254.0 <internet-gateway>
vmbr1 YES YES eth1 10.11.12.63 255.0.0.0


ct have this configuration:

venet: <internet-ip>
veth: eth0 vmbr1 <mac> <hostifname> <host mac>

if i login to ct and ping to
10.11.12.1/63/64/65 ... also to router and to other nodes in intranet, i receive a answer. but if i ping to my storage, i don´t get a answer.


traceroute said:

traceroute 10.11.12.50
traceroute to 10.11.12.50 (10.11.12.50), 30 hops max, 60 byte packets
1 s1.domain.de (internet-ip) 0.062 ms 0.012 ms 0.010 ms
2 * * *
3 10.11.12.50 (10.11.12.50) 753.659 ms 753.679 ms 753.665 ms


i can only ping the 10.11.12.50, if i add first venet with intranet ip and than internet ip as venet. but if i do this, i doesn´t have connection to internet, only to intranet.

how can i use 2 networks in the ct normlay. please help.

very thanks.

regards
 
Host have this configuration:

eth0 YES NO
eth1 YES NO
vmbr0 YES YES eth0 <internet-ip> 255.255.254.0 <internet-gateway>
vmbr1 YES YES eth1 10.11.12.63 255.0.0.0


ct have this configuration:

venet: <internet-ip>
veth: eth0 vmbr1 <mac> <hostifname> <host mac>

if i login to ct and ping to
10.11.12.1/63/64/65 ... also to router and to other nodes in intranet, i receive a answer. but if i ping to my storage, i don´t get a answer.


traceroute said:

traceroute 10.11.12.50
traceroute to 10.11.12.50 (10.11.12.50), 30 hops max, 60 byte packets
1 s1.domain.de (internet-ip) 0.062 ms 0.012 ms 0.010 ms
2 * * *
3 10.11.12.50 (10.11.12.50) 753.659 ms 753.679 ms 753.665 ms


i can only ping the 10.11.12.50, if i add first venet with intranet ip and than internet ip as venet. but if i do this, i doesn´t have connection to internet, only to intranet.

how can i use 2 networks in the ct normlay. please help.

very thanks.

regards
Hi,
you can't ping your storage? Is the storage in the same 10.11.12.0/8 network (and has also an /8-Netmask)?

Why you don't use bridged network also for CTs? Looks that you have plenty of IPs (if your /23 nm is right).
An working entry for an CT with two NICs:
Code:
NETIF="ifname=eth0,bridge=vmbr30,mac=DE:BE:3C:2A:42:60,host_ifname=veth400.0,host_mac=A2:DE:56:93:82:6D;ifname=eth1,bridge=vmbr20,mac=96:02:DB:FC:C0:B5,host_ifname=veth400.1,host_mac=56:F8:89:E3:14:60"
Udo
 
hi udo,

the storage have intranet ip 10.11.12.50 with mask 255.0.0.0 and the ct´s intranet ip is 10.11.13.10 with subnet 255.0.0.0 on same switch. i have test it with 10.11.12.200 and 255.0.0.0. it´s the same issue.

what you mean with bridged network, i have test it with

venet = internet ip
veth = intranet ip (bridged to eth1 on host)

i have test many options, but not with working for 2 ip-networks.

if you use 2 bridged networks, how can you connect with internet ip to the ct?

do you need screenshots of hostconfiguration and ct network configuration? i hope, you have time to help. very thanks.

regards
 
hi udo,

the storage have intranet ip 10.11.12.50 with mask 255.0.0.0 and the ct´s intranet ip is 10.11.13.10 with subnet 255.0.0.0 on same switch. i have test it with 10.11.12.200 and 255.0.0.0. it´s the same issue.

what you mean with bridged network, i have test it with

venet = internet ip
veth = intranet ip (bridged to eth1 on host)

i have test many options, but not with working for 2 ip-networks.

if you use 2 bridged networks, how can you connect with internet ip to the ct?

do you need screenshots of hostconfiguration and ct network configuration? i hope, you have time to help. very thanks.

regards
Hi,
simply use a network-config like in my post before - than you have eth0 and eth1 inside your CT and can use a normal /etc/network/interface (if you run debian inside your CT) to configure the CT-network.
For accress from internet it's nessesary to use as default-gateway your next hop of the internet connection, of course. If you have more than one different internal networks, you must create single routes for that.

Udo
 
hi udo, i don´t know, what you direct mean.

here are screens of my configuration. i hope you can help me.

10.11.12.* network is a own switch, and internet ips, are on a other own switch.

host conf:
host.png
ct conf 1 without work:
ct-conf-1.png
ct conf 2 without work:
ct-conf-2.png

what do i must create or change on options, to have access to the both networks in the ct and can ping to internet ip and 10.11.12.50?

regards
 
Last edited:
hi udo, i don´t know, what you direct mean.

here are screens of my configuration. i hope you can help me.

10.11.12.* network is a own switch, and internet ips, are on a other own switch.

host conf:
View attachment 1419
ct conf 1 without work:
View attachment 1420
ct conf 2 without work:
View attachment 1421

what do i must create or change on options, to have access to the both networks in the ct and can ping to internet ip and 10.11.12.50?

regards
Hi,
look here (the result is the same like posted in the example (/etc/pve/openvz/VMID.conf)
ct.png

Udo
 
Ok, and how do i configure the network ips for intranet and internet? in /etc/network/interfaces or how? do you have a exsample?

regards
 
Hi udo, if we add two bridges and add eth0 and eth1 on interfaces manually, it´s works very nice.

biggest thanks for your help.

regards
 

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!