Proxmox Additional IP Address - networking

So, I've managed to get my subnet to work however I can not get a single additional IP to work
I'm new to this, so not sure exactly the best way to do stuff, if what I've done is wrong.
Here's my interfaces:
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
address [main-ip]
gateway [gateway]
pointopoint [gateway]
iface eno1 inet6 static
address [ipv6-addr]/128
gateway [ipv6-gateway]
up sysctl -p
auto vmbr0
iface vmbr0 inet static
address [subnet-ip]/28
bridge-ports none
bridge-stp off
bridge-fd 0
#Subnet
iface vmbr0 inet6 static
address [ipv6-addr]/64
up ip -6 route add [ipv6-subnet]/64 dev vmbr0
auto vmbr1
iface vmbr1 inet static
address 10.0.0.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
#LAN
auto vmbr2
iface vmbr2 inet static
address [additional-ip]/24
bridge-ports none
bridge-stp off
bridge-fd 0
# Additional IP

In vmbrX interfaces you should have bridge-ports mapped to physical interfaces and that vmbrX interface set IP static IP address
For example
iface **eno1** inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.10.2/24
gateway 192.168.10.1
**bridge-ports eno1**
bridge-stp off
bridge-fd 0
https://pve.proxmox.com/wiki/Network_Configuration#_default_configuration_using_a_bridge

Related

Ubuntu 16.04 reboots with a different ip address then the static one assigned in /etc/network/interfaces

When my server reboots the ip address for eth0 is 192.168.1.2 when it should be 192.168.1.100 per the static ip address settings in /etc/network/interfaces. After boot if I run service networking restart it will assigning 192.168.1.100 to eth0. Also I don't know if this matters but the hostname displayed in my router is different the the hostname displayed in /etc/hosts.
/etc/network/interfaces
auto lo eth0
iface lo inet loopback
# IPv4 address
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether a4:1f:72:7c:61:8d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.1.2/24 brd 192.168.1.255 scope global secondary dynamic eth0
valid_lft 85312sec preferred_lft 85312sec
ip route show
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100
192.168.1.1 dev eth0 proto dhcp scope link src 192.168.1.2 metric 1024
I don't know about 16.04 but in previous versions you have Network Manager daemon setting the IPs. Use the applet 'nm-applet' to set up your static address. Right click it and go for 'edit connections'.
https://help.ubuntu.com/community/NetworkManager
I fixed part of the problem it was as simple as changing the file to the parameters outline below.
/etc/network/interfaces
# IPv4 address
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
Now when the server boots up it will auto assigning 192.168.1.100 although it will also still assigning 192.168.1.2. If I find a way to have it stop assigning the 2nd ip address I will update my answer. Thanks

Debian Network-Configuration for KVM - Provider OVH

I need some help to configure the network for my KVM. My Hostingprovider is OVH, and since they are a bit different, I'm in need of help.
My old Network-Interfaces File:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 94.23.209.170
netmask 255.255.255.0
network 94.23.209.0
broadcast 94.23.209.255
gateway 94.23.209.254
auto br0
iface br0 inet static
address 91.134.173.185
netmask 255.255.255.0
broadcast 91.134.173.185
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
dns-nameservers 8.8.8.8
iface eth0 inet6 static
address 2001:41d0:0002:54aa::
netmask 64
dns-nameservers 2001:41d0:3:163::1
post-up /sbin/ip -family inet6 route add 2001:41d0:0002:54ff:ff:ff:ff:ff dev eth0
post-up /sbin/ip -family inet6 route add default via 2001:41d0:0002:54ff:ff:ff:ff:ff
pre-down /sbin/ip -family inet6 route del default via 2001:41d0:0002:54ff:ff:ff:ff:ff
pre-down /sbin/ip -family inet6 route del 2001:41d0:0002:54ff:ff:ff:ff:ff dev eth0
I had to go into the resecue mode and remove the bridge, otherwise my machine wouldn't come up again. Can someone help me maybe, and tell me what I did wrong?
Thanks, and have a good day/night! :)
I had a similar problem. I just moved to OVH from Phoenix nap. I like the control panel better but their networking is a little weird. I have an IP on a /24 and I ordered a /29 for whm/cpanel and some other virtual machines.
My config to get the host functional:
auto eth0
iface eth0 inet manual
address 111.222.333.145
netmask 255.255.255.0
network 111.222.333.0
broadcast 111.222.333.255
gateway 111.222.333.254
auto br0
iface br0 inet static
address 111.222.333.145
netmask 255.255.255.0
network 111.222.333.0
broadcast 111.222.333.255
gateway 111.222.333.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
dns-nameservers 213.186.33.99
NOTE: 111.222.333 is your first 3 octets. Obviously change them. the .145 was arbitrary to illustrate a host assigned to you.
Then restart the networking service.
service networking restart
Now I had to get a CentOS container for WHM/cPanel going and a few debian containers.
I'm assuming you bought a block of IPs and need to get that IP into a VM. Log into the OVH control panel, Select IP. Expand the IP block. to right you will see a gear you can click on. Create an OVH Virtual MAC. Take note of that MAC!
For CentOS the guide is correct.
In Debian it was a missing little something.
You want to edit the /etc/libvirt/qemu/autostart/YOU_VM_NAME.xml
...
<interface type='bridge'>
<mac address='YO:UR:VI:RT:MA:CA'/>
...
After saving restart the libvirtd service. Restart your debian container to pick up the new MAC and you should be good.
When installing I could not set an IP out side the range of my network. After getting virt-manager up, I logged in blew out the GW and modified the interfaces file according to the guide:
Don't need to change your host network config.
You need a Failover IP (create in OVH Panel). Then, assign a Virtual MAC for it.
In your dedicated server:
virsh net-edit default
Change this way:
<network>
<name>default</name>
<uuid>...</uuid>
<bridge name='virbr0' stp='off' delay='0'/>
<mac address='...'/>
</network>
Now edit the VM:
virsh edit myvmname
and set (change "eno1" to your network card name, like "eth0" or "ens0p0" etc):
<interface type='direct'>
<mac address='--VIRTUAL MAC CREATED IN OVH PANEL--'/>
<source dev='eno1' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
Now edit your VM network (in my example, a Debian /etc/network/interfaces and change the network name as well):
auto eno1
iface eno1 inet static
address -FAILOVER IP-
netmask 255.255.255.255
gateway -HOST GATEWAY-
broadcast -FAILOVER IP-
So, the VM will have the failover IP and use the same gateway than the host. In OVH the gateway is final .254 (or use ip r in the host).

Xen dom0 cannot connect to the internet

I configured a Linux Mint 17 host O/S to install Xen as per the following guide
Xen Project Beginner's Guide
Now, after configuring the network interfaces as instructed, I rebooted the machine. I can see that the bridge has an IP assigned to it via DHCP, but I cannot connect to the internet.
I can even successfully ping to the gateway, but not any other address.
What am I doing wrong?
This is my /etc/network/interfaces file
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
In my case, I only added eth0 and eth1 interfaces into the bridge
bridge name bridge id STP enabled interfaces
br0 8000.00259e1c426c no eth0
eth1
But there was an interface called vif3.0 which has to be included into the bridge interface. So, i did this
brctl addif br0 vif3.0
Everything works fine.

Debian KVM Bridge Networking on remote host

I have a dedicated server that I'd like to run some VMs on using KVM.
I'm trying to set up bridge networking so the VMs can be accessed from the outside with dedicated IPs.
I tried doing this using this article, but once I bring up br0 I lose connectivity to my server over ssh (and anything else for that matter).
Here is my /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 66.147.230.23
netmask 255.255.255.0
network 66.147.230.0
broadcast 66.147.230.255
gateway 66.147.230.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 208.67.222.222 208.67.220.220
dns-search samgwydir.com
# bridge
auto br0
iface br0 inet static
# address 216.120.250.44
# netmask 255.255.255.0
# network 216.120.250.0
# broadcast 216.120.250.255
# gateway 216.120.250.1
address 192.168.1.1
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
I have commented out a failed setup that had br0 use a dedicated IP and instead tried a local IP to no avail.
don't configure the eth0, as eth0 is the bridge device (with the IP 192.168.1.1):
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet manual
# bridge
auto br0
iface br0 inet static
address 192.168.1.1
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
bridge_ports eth0
bridge_stp off
bridge_fd 0
you might be able to assign multiple IP addresses to br0, if you want your host to be multihomed

Xen Dom0 and DomU in different subnets on Ubuntu/Debian

ISP gave me two IP configs:
10.0.1.5 / 255.255.255.0 / gw 10.0.1.1
10.0.9.8 / 255.255.255.0 / gw 10.0.9.1
I've set up Dom0 is 10.0.1.5 with bridge.
There is the config:
auto lo
iface lo inet loopback
auto eth0
auto br0
iface br0 inet static
address 10.0.1.5
netmask 255.255.255.0
gateway 10.0.1.1
bridge_ports eth0
bridge_stp no
VM config:
...
vif = [ 'type=ioemu, bridge=br0' ]
...
So, when I launch and configure my VM to 10.0.9.8 - the network is unreachable from the VM.
I know that 10.0.9.1 is connected directly via switch with my 10.0.1.5.
Any ideas?
would the following work:
ip route add default via 10.0.1.5
like was done in: https://github.com/mcclurmc/devstack/blob/xcp-toolstack/tools/xcp-toolstack/build_domU.sh

Resources