Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Nested bridge interfaces
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Nested bridge interfaces

Hi there,

I'm trying to run an LXC container with a public IP in my KVM VPS (got 2 IPs). Basically I bridged my eth0 interface to br0, where I assign my IP, and I dynamically add the veth interface to the bridge (for testing pupose). While it seems to work (container is reachable for the outside), as soon as I add the veth interface to the bridge my network connection becomes VERY slow, on both the host and my container. It's so slow that I even have a hard time typing in the console via SSH. I monitored the CPU with htop and everything seems normal (no process going wild).

Anyone tried to do something similar?

Thanks!

PS: I tried to use macvlan instead of a bridge but I can't get the container network to work. Even if everything looks fine (IP, netmask, routes are set properly), the container can't ping anything...

Comments

  • Route it inside the server rather than bridging.

    Host IP 1.1.1.1
    VPS IP 1.1.1.2

    On the host:
    route add 1.1.1.2/32 veth0 (whatever the VPS's device is on the host server)

    On the VPS:
    route add default dev eth0 (or whatever the network device is)

    Enable IP routing on the host machine:
    sysctl -w net.ipv4.ip_forward=1

Sign In or Register to comment.