I ended up with a network that looks like:
Virtual Network <-> Vyatta Router <-> VMware NIC <-> Network
- The Virtual Network has all of my VMs running on 172.16.0.0/24
- The Vyatta Router routes traffic received on 172.16.0.1 to its other virtual NIC at 192.168.0.3 and applies NAT
- VMware supplies the networking to take traffic from Vyatta's virtual NIC to the physical NIC at 192.168.0.4
- My existing Linux router (CentOS 5.3 with IP tables configured to do NAT) does it's thing and routes the traffic, as appropriate, on my network or to the Internet.
Vyatta reports my routing information as:
vyatta:~# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - ISIS, B - BGP, > - selected route, * - FIB route
S>* 0.0.0.0/0 [1/0] via 192.168.0.1, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 172.16.0.0/24 is directly connected, eth1
C>* 192.168.0.0/24 is directly connected, eth0
The above configuration works just fine from each of the VMs. I am able to browse the Internet, run the specific OS's update protocol, etc. I dumped the "history" to a file. This looks like (time stamps removed):
204 configure
205 set interfaces ethernet eth0 address 192.168.0.4/24
206 set interfaces ethernet eth1 address 172.16.0.1/24
207 set service nat rule 1 source address 172.16.0.0/24
208 set service nat rule 1 outbound-interface eth0
209 set service nat rule 1 type masquerade
210 commit
211 set system gateway-address 192.168.0.1
212 set system host-name vyatta
213 set system domain-name davenjudy.org
214 commit
There was a "save" after the last commit (that doesn't show up in the history) to make things "permanent."
I'm guessing that we could run OSPF instead of setting up the static route to my real gateway (see the "set system gateway" command, above). That seems like creating a lot of overhead for something that will "never" change.
Cheers,
Dave Miller

What kind of box are you running your ESXi on?
ReplyDelete