[SOLVED] Public ip via vlan to virtual machine

trabogano

New Member
May 12, 2023
13
0
1
Hi, i have a dedicated server on ionos, i need to have an additional public ip to one of my virtual machines behind proxmox.
The additional public ip for this scope are delivered via vlan 1010
the additional ip is 217.xxx.xxx.164
The gateway is the same 10.255.255.1

so i have do this:
auto lo
iface lo inet loopback

auto enp35s0 <-This is wan interface of the server
iface enp35s0 inet static
address 217.xxx.xxx.10/32
gateway 10.255.255.1
#Wan
auto enp35s0.1010 <- I try to add this vlan on wan interface
iface enp35s0.1010 inet manual


auto vmbr0
iface vmbr0 inet manual
bridge-ports enp35s0.1010 <- Added the vlan to bridge (The virtual machine has ethernet1 on this bridge)
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094

I set on the virtual machine ethernet1 the additional public ip and set his gayeway to 10.255.255.1 via ethernet1 but not work :(

I have do something wrong?

Thank You
 
Routing vlan? I think that routing apply if I have a pool of public ip's in this case I have 2 public ip address/32 one oh this is delivered via vlan.
Maybe I missunderstood your initial request, what do you mean by delivered via VLAN?
 
I'm trying to get this to work:
https://www.ionos.com/help/server-c...fentliches-netzwerk/overview-public-networks/

I have request an additional public ip for my virtualized machine, they assigned me 217.xxx.xxx.160 vlan id 1010 gateway 10.255.255.1
So i have created vlan 1010 on enp35s0 (This is the server ethernet uplink interface), and i've added vlan1010 to a bridge, the virtual machine has ethernet1 in this bridge so i've added ip 217.xxx.xxx.160/32 to virtual machine ethernet, ad i set the gateway 10.255.255.1, i can ping 10.255.255.1 but i can't exit to internet ping 1.1.1.1 for example not work.
 
Hmm, okay I see. Try the following:
  • Instead of tagging the traffic on the host, set the VLAN tag on the VM interface, and the second public IP and gateway from within the VM
  • create the VLAN aware bridge, setting the primary IP and default gateway
  • Attach the WAN interface as bridge port
  • Attach the VM to the same bridge
By this you should be connected to the same network on layer 2, with the difference that VLAN tags are only set to the VMs traffic.

Check the traffic flow for debugging purposes via tcpdump and check your arp table via ip neighbor on the host and the VM.
 
Hmm, okay I see. Try the following:
  • Instead of tagging the traffic on the host, set the VLAN tag on the VM interface, and the second public IP and gateway from within the VM
  • create the VLAN aware bridge, setting the primary IP and default gateway
  • Attach the WAN interface as bridge port
  • Attach the VM to the same bridge
By this you should be connected to the same network on layer 2, with the difference that VLAN tags are only set to the VMs traffic.

Check the traffic flow for debugging purposes via tcpdump and check your arp table via ip neighbor on the host and the VM.
Thank You Chris, now is working!
I am able to go in internet with the virtualized CHR RouterOS and receive all ports and protocols but eoip tunnel in direction of the routeros not work. I have read something about promiscuity on the bridge for this problem, i have do:
ip link set vmbr0 promisc on
But not work :(
I set this post as resolved please if you can you give me some advice on the EoIP issue?
 

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!