Hi folks,
I'm using several dedicated server with Proxmox, all server was at Hetzner. On all that server I have added additional IP subnet and DHCP (isc-dhcp) and everything works.
Now I want to use Hetzner vswitch because there I can add several IP subnet in same VLAN.
In anyway I have problem with configuration.
I do everything by manual from Hetzner. On fresh installed proxmox server by default I have this settings:
Then by Hetzner manual I need to add subnet on vswitch over they robot interface and need to assign some vlan ID. That is done.
Than I need to do next:
Example configuration for the network card "enp0s31f6", with the VLAN ID 4000
Create a VLAN device
Configure IP address 192.168.100.1 from the private subnet 192.168.100.0/24
Public subnet You need to create an additional routing table for the public subnet so you can configure another default gateway.
Example configuration for IP 213.239.252.50 from the public subnet 213.239.252.48/29, interface enp0s31f6.4000
Example Debian configuration
Interface enp0s31f6, VLAN 4000, private network
When I did it, I just added vmbr0 interface
When I create and install ubuntu on Proxmox and assign this IP (this is from manual, example IP, not real) 213.239.252.50 I can ping everything but I can't do apt-get update or curl. DNS resolve hostname but not traffic.
When I do traceroute from my computer to 213.239.252.50 they finish without problem.
When I try to connect over ssh, I can connect and login, but if I try to do something stop responding, on example top or ps aux.
I'm using several dedicated server with Proxmox, all server was at Hetzner. On all that server I have added additional IP subnet and DHCP (isc-dhcp) and everything works.
Now I want to use Hetzner vswitch because there I can add several IP subnet in same VLAN.
In anyway I have problem with configuration.
I do everything by manual from Hetzner. On fresh installed proxmox server by default I have this settings:
Code:
### Hetzner Online GmbH installimage
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp2s0
iface enp2s0 inet static
address 78.46.xxx.xxx
netmask 255.255.xxx.xxx
gateway 78.46.xxx.xxx
#route 78.46.xxx.xxx via 78.46.xxx.xxx
up route add -net 78.46.xxx.xxx netmask 255.255.xxx.xxx gw 78.46.xxx.xxx dev enp2s0
iface enp2s0 inet6 static
address 2a01:4f8:xxx:xxx::x
netmask xx
gateway fexx::1
Then by Hetzner manual I need to add subnet on vswitch over they robot interface and need to assign some vlan ID. That is done.
Than I need to do next:
Example configuration for the network card "enp0s31f6", with the VLAN ID 4000
Create a VLAN device
Code:
ip link add link enp0s31f6 name enp0s31f6.4000 type vlan id 4000
ip link set enp0s31f6.4000 mtu 1400
ip link set dev enp0s31f6.4000 up
Configure IP address 192.168.100.1 from the private subnet 192.168.100.0/24
Code:
ip addr add 192.168.100.1/24 brd 192.168.100.255 dev enp0s31f6.4000
Public subnet You need to create an additional routing table for the public subnet so you can configure another default gateway.
Example configuration for IP 213.239.252.50 from the public subnet 213.239.252.48/29, interface enp0s31f6.4000
Code:
echo "1 vswitch" >> /etc/iproute2/rt_tables
ip addr add 213.239.252.50/29 dev enp0s31f6.4000
ip rule add from 213.239.252.50 lookup vswitch
ip rule add to 213.239.252.50 lookup vswitch
ip route add default via 213.239.252.49 dev enp0s31f6.4000 table vswitch
Example Debian configuration
Interface enp0s31f6, VLAN 4000, private network
Code:
# /etc/network/interfaces
auto enp0s31f6.4000
iface enp0s31f6.4000 inet static
address 192.168.100.1
netmask 255.255.255.0
vlan-raw-device enp0s31f6
mtu 1400
When I did it, I just added vmbr0 interface
Code:
auto vmbr0
iface vmbr0 inet static
address 192.168.100.2
netmask 255.255.255.0
bridge_ports enp2s0.4000
bridge_stp off
bridge_fd 0
When I create and install ubuntu on Proxmox and assign this IP (this is from manual, example IP, not real) 213.239.252.50 I can ping everything but I can't do apt-get update or curl. DNS resolve hostname but not traffic.
When I do traceroute from my computer to 213.239.252.50 they finish without problem.
When I try to connect over ssh, I can connect and login, but if I try to do something stop responding, on example top or ps aux.