so the issue is that i am using hetzner for my server hosting and they suck at making any working tutorial. i have purchased a /29 subnet block. / 29 - subnet - main server ip

How do i configure a bridge on the host server (centos) so that the guests (ubuntu) can use the subnet ips?

centos eth0 file


what should the config look like to add the bridge and route the subnet?

i have tried there wiki http://wiki.hetzner.de/index.php/Netzkonfiguration_CentOS/en but this is a useless guide.

1 Answer 1

# ip link add name bridge_name type bridge
# ip link set bridge_name up

# ip link set eth0 master bridge_name

This is using the now standard way of managing IP's and links using the iproute2 tool.

To remove a link and delete the bride do:

# ip link set eth0 nomaster
# ip link delete bridge_name type bridge

The old way to do it but isn't obsolete in any way is via bridge-utils:

# brctl addbr bridge_name
# brctl addif bridge_name eth0

But I fail to see why you would need bridge utils these days.

Also almost every distro these days have poor documentation, but one distro that does upstream documentation really well is the Arch Linux Wiki, it's rare that they fail to have a good updated wiki that is applicable on most other distros. There might be path issues because for instance Debian or Debian based distros have odd naming conventions, but those are easy fixes and well in this case it's only commands that you need to run and those are the same.

But why bridges?

I completely understand why you would need a bridge. But if your VM does not require direct Internet access I would strongly recommend using tap interfaces and on the host machine and do ip forwarding and some iptable rules.

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.