1

All, I am trying to setup a network connection that opennebula can put VMs on (so I think I needs a bridge). This connection would be managed by opennebula and all VM would be given a 192.168.172.X address. The physical interface that is on the bridge (enp130s2) would have to have a 172.18.134.X address (since this is what we use in our lab to connect to the internet).

So something like this:

VM en0 (192.168.172.2) ---- br0 ---- enp130s2 (172.18.134.2) --- SW

I am running Centos 7 and wasn't sure if I need to Nat something and where? The VM routing table should default all traffic out en0 (192.168.172.2)

I know I can setup a bridge and add the enp130s2 interface to it, but can I keep the 172 ip address on that interface and will it automatically nat?

Any help would be appreciated

Greg Brown
  • 111
  • 1
  • 3
    The question shouldn't be, "bridge or NAT?" It should be, "bridge or route?" Routing routes between networks, while bridging switches on the same network. NAT is a kludge to let hosts with private addresses function on the public Internet. Never NAT unless you need to. You are trying to get from a private network (`192.168.0.0/16`) to another private network (`172.16.0.0/12`), so NAT seems unnecessary. – Ron Maupin Jan 30 '17 at 20:21
  • Thanks for the reply, but does the fact that the 192 is on a bridge and that bridge is connected to the 172 interface matter? If I just set up routes in the ip tables to route all 192 to 172 that should work? – Greg Brown Jan 30 '17 at 20:26

0 Answers0