OpenVZ Forum


Home » General » Support » OpenVZ via Veth with Proxmox (How to do it?)
OpenVZ via Veth with Proxmox [message #48736] Mon, 12 November 2012 22:19
limitmaker is currently offline  limitmaker
Messages: 1
Registered: November 2012
Junior Member
I'm new to networking.

I can gain internet via venet by setting the ip address to 192.16.1.x ; however, this doesn't allow me to set an ip address for each container.

I'm trying to point an ip address to use for a virtual container. I'm guessing I need to use veth?

What I'm Building:


I am using Proxmox to build a Virtual Server Environment with KVN and OpenVZ.


- I have Proxmox Virual Environment Installed with KVN and OpenVZ.
- I can create a virtual container with venet and gain internet access


My Problem:

- Deciding the best solution on how to enable each network with it's own IP address
- Trying to point an ip address to use for a virtual container.

I have a dedicated server that is being hosted by my provider and it is virtualization capable; however, I do not have experience beyond installing and managing lamp servers on a single IP address.


They have issued to me what appears to be 2 ethernet cards.
I have multiple ip addresses on one NIC (Eth0) that has a vlan with eth0:0, eth0:1, eth0:2, etc.


What is the best way to set up the network to point to my array of IP addresses to different containers or hardware virtualizations?


What should my files show?


pveversion -v


pve-manager: 2.2-26 (pve-manager/2.2/c1614c8c)
running kernel: 2.6.32-16-pve
proxmox-ve-2.6.32: 2.2-80
pve-kernel-2.6.32-16-pve: 2.6.32-80
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.4-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.93-1
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.9-1
pve-cluster: 1.0-28
qemu-server: 2.0-64
pve-firmware: 1.0-21
libpve-common-perl: 1.0-37
libpve-access-control: 1.0-25
libpve-storage-perl: 2.0-34
vncterm: 1.0-3
vzctl: 4.0-1pve2
vzprocps: 2.0.11-2
vzquota: 3.1-1
pve-qemu-kvm: 1.2-7
ksm-control-daemon: 1.1-1


sysctl -p


net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.ip_forward = 1



ifconfig


eth0      Link encap:Ethernet  HWaddr 00:XX:67:6a:XX:e9  
          inet addr:XX.XX.XX.X7  Bcast:XX.XX.XX.63  Mask:255.255.255.224
          inet6 addr: fe80::21e:67ff:fe6a:36e9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3685980 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2437943 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2826075165 (2.6 GiB)  TX bytes:325157714 (310.0 MiB)
          Interrupt:19 Memory:c1b00000-c1b20000 


eth0:0    Link encap:Ethernet  HWaddr 00:XX:67:6a:XX:e9   
          inet addr:XX.XX.XX.X4  Bcast:XX.XX.XX.X55  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:19 Memory:c1b00000-c1b20000 


eth0:1    Link encap:Ethernet  HWaddr 000:XX:67:6a:XX:e9   
          inet addr:XX.XX.XX.X5  Bcast:XX.XX.XX.X55  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:19 Memory:c1b00000-c1b20000 


eth0:2    Link encap:Ethernet  HWaddr 00:XX:67:6a:XX:e9   
          inet addr:XX.XX.XX.X6  Bcast:XX.XX.XX.X55  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:19 Memory:c1b00000-c1b20000 


eth0:3    Link encap:Ethernet  HWaddr 00:XX:67:6a:XX:e9  
          inet addr:XX.XX.XX.X7  Bcast:XX.XX.XX.X55  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:19 Memory:c1b00000-c1b20000 


lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:32140 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7208623 (6.8 MiB)  TX bytes:7208623 (6.8 MiB)


venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: fe80::1/128 Scope:Link
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:84 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:3 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5835 (5.6 KiB)  TX bytes:0 (0.0 B)




/etc/network/interfaces


# network interface settings
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet static
        address  XX.XX.XX.X7
        netmask  255.255.255.224
        gateway  XX.XX.XX.X3


iface eth1 inet manual


auto eth0:0
iface eth0:0 inet static
        address  XX.XX.XX.X4
        netmask  255.255.255.255


auto eth0:1
iface eth0:1 inet static
        address  XX.XX.XX.X5
        netmask  255.255.255.255


auto eth0:2
iface eth0:2 inet static
        address  XX.XX.XX.X6
        netmask  255.255.255.255


auto eth0:3
iface eth0:3 inet static
        address  XX.XX.XX.X7
        netmask  255.255.255.255




I'm lost! Thank you!
Previous Topic: failcnt in privvmpages
Next Topic: CT starts in vz init, even if stopped before and disabled.
Goto Forum:
  


Current Time: Fri Aug 09 23:06:23 GMT 2024

Total time taken to generate the page: 0.02811 seconds