[SOLVED] Simple container configuration

jonski

New Member
Nov 25, 2016
3
0
1
44
Hi,

I'm new to proxmox and I'm very confuse with network configuration.

I installed Proxmox VE 4.3 and I'm trying to setup a simple LXC container with
a web access.

This is the default configuration

Code:
# The loopback network interface
auto lo
iface lo inet loopback

# for Routing
auto vmbr1
iface vmbr1 inet manual
        post-up /etc/pve/kvm-networking.sh      
        bridge_ports none
        bridge_stp off
        bridge_fd 0


# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
        address PUBLIC_IP
        netmask 255.255.255.0
        network PUBLIC_IP_NETWORK
        broadcast PUBLIC_IP_BROADCAST
        gateway PUBLIC_IP_GW
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

iface vmbr0 inet6 static
        ...

and this how I tried to change it, following this tutorial : http://mcamuzat.github.io/blog/2016/02/28/installation-dun-proxmox-4-dot-0/

Code:
# for Routing
auto vmbr1
iface vmbr1 inet manual
        #post-up /etc/pve/kvm-networking.sh      
        address 192.168.100.1/24
        bridge_ports none
        bridge_stp off
        bridge_fd 0

Ifconfig returns

Code:
eth0      Link encap:Ethernet  HWaddr xxx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5726 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3389056 (3.2 MiB)  TX bytes:2634024 (2.5 MiB)

veth100i0 Link encap:Ethernet  HWaddr xxx
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1302 (1.2 KiB)  TX bytes:0 (0.0 B)

vmbr0     Link encap:Ethernet  HWaddr f8:32:e4:cc:f1:81
          inet addr:PUBLIC_IP  Bcast:PUBLIC_IP_BC  Mask:255.255.255.0
          inet6 addr: XXX Scope:Link
          inet6 addr: XXX Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5389 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2996678 (2.8 MiB)  TX bytes:2615826 (2.4 MiB)

vmbr1     Link encap:Ethernet  HWaddr XXX
          inet6 addr: XXXX Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1008 (1008.0 B)  TX bytes:618 (618.0 B)

And route command output:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         PUBLIC_IP_GW  0.0.0.0         UG    0      0        0 vmbr0
PUBLIC_IP    0.0.0.0         255.255.255.0   U     0      0        0 vmbr0

Then in the web interface, I created a container and completed the "network tab" with the following
informations :

Code:
Bridge : vmbr1
IPv4: static
IPv4/Cidr: 192.168.100.100
Gateway: 192.168.100.1

But when start the container and try to ping an IP (8.8.8.8) it returns
FROM 192.168.100.100 icmp_seq=1 Destination Host Unreachable


What I'm missing ?

Regards
 
Not resolved, but It's getting better after replacing

Code:
iface vmbr1 inet manual

Code:
iface vmbr1 inet static

now ifconfig returns :

Code:
vmbr1     Link encap:Ethernet  HWaddr 0a:61:15:d2:1d:0b
          inet addr:192.168.100.254  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::861:15ff:fed2:1d0b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:438 (438.0 B)
 
And problem solved with the classic :

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward

it's strange, because I'm pretty sure that was already enabled.

Thanks
 

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!