0

I have problem with the configuration of bridge and lxc container on cloud server.

I Have two cloud servers. On each cloud I've created bridge by brctl like:

brctl addbr $bridge

ip addr add 10.99.0.100/24 dev $bridge

ip link set $bridge up
brctl addif $bridge eth2
iptables -I INPUT -i $bridge -j ACCEPT

iptables -I FORWARD -i $bridge -j ACCEPT

and then I have lxc container up and link to bridge on each cloud server.
Here is container configuration :

lxc.utsname=$name
lxc.network.type=veth
lxc.network.name=eth1

lxc.network.flags=up
lxc.network.link=$bridge
lxc.network.hwaddr=02:00:$hex:01:00:01
lxc.network.ipv4=10.99.0.$nodeid/24
lxc.network.veth.pair=veth$nodeid.1

lxc.network.type=veth
lxc.network.name=eth2
lxc.network.hwaddr=02:00:$hex:02:00:01
lxc.network.veth.pair=veth$nodeid.2

lxc.network.type = empty
lxc.network.flags=up

lxc.console = none
lxc.tty = 1
lxc.pts = 128
lxc.cgroup.devices.allow = a

My problem:

I am able to reach my bridges and ping my bridges from and on each cloud server, but I'm not able to reach or ping containers on the first cloud server from second server or vice versa.

I also bind bridge on each server to the local interface that I've created (eth2)

brctl addif $bridge eth2
0

you didn't provide much info..

2 diff cloud servers in same cloud or diff cloud providers

which cloud? aws, digital ocean etc?

what IP subnet are the LXC containers on server 1 and on server 2? all on the

same subnet/different 10.x.x.x subnets?

do you need to add a default route on each to point traffic to the other if the destination is unknown?

  • thanks for reply, 1- 2 diff cloud servers in the same cloud 2- it is Rackspace cloud service 3- containers are on the same subnet 10.99.0.0/24 – sam Feb 6 '16 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.