In this simple virtual lab that I am setting up, I have installed a vyatta 5400 vrouter on vmplayer and a windows 7 client machine on another vm.
Configuration on the vyatta 5400 vRouter
- 2 ethernet interface, eth0 (dhcp client), eth1 (10.0.0.1/24). If you are running vmplayer, make sure that eth0 is set up as bridged and eth1 as host only vmnet3.
- dhcp server that will be handing out 99 IP addresses clients on the eth1 from the 10.0.0.0/24 network.
- default gateway: 10.0.0.1
- dns-server 220.127.116.11
- start ip: 10.0.0.2 stop ip: 10.0.0.100
- PAT will also be configured so clients on the 10.0.0.0/24 network can access the internet
Configuration on the Windows 7 client machine
- ethernet set up as dhcp client on vmnet3
This lab assumes that you have successfully install vRouter on your virtual machine and not running off as a live CD.
- type configure > set interfaces ethernet eth0 address dhcp > commit > save
- to verify, type run show interfaces
- to configure the ip on eth1, make sure you are still on configuration mode: set interfaces ethernet eth1 address 10.0.0.1/24 > commit > save
To configure the vRouter as a DHCP server for the 10.0.0.0/24 network, do the following:
- from operational mode type: configure > set service dhcp-server shared-network-name <name> subnet <network/subnet>, press enter then type edit service dhcp-server shared-network-name <name> subnet <network/subnet>
- in this scenario it would be: set service dhcp-server share-network-name my_pool subnet 10.0.0.0/24, enter then edit service dhcp-server share-network-name my_pool subnet 10.0.0.0/24.
- type set start 10.0.0.2 stop 10.0.0.100, enter
- type set default-router 10.0.0.1, enter. Remember this is the IP address on eth1.
- type set dns-server 18.104.22.168, enter. This is the IP address of my home router.
- optional: you can add a domain-name by typing: set domain-name delan.local, enter.
At this point your Windows 7 PC should get an IP address from the vRouter.
Note: My apologies for the image above. It is showing an incorrect DNS Server address. It is supposed to be 22.214.171.124 or the DNS server’s IP address of your network.
Now lets perform NAT, Cisco would normally call it PAT for Brocade its Source NAT.
- let us set a nat rule by typing: edit nat source rule <no.>, in our scenario I typed in: set nat source rule 10, enter.
- then type: set source address <network/mask> -> set source address 10.0.0.0/24. enter
- then: set translation address <ip address of the interface facing the internet>, set translation address 192.168.0.11
- set outbound-interface <outbound interface>. set outbound-interface eth0
- commit and save
And viola!!! my windows 7 computer has now internet access…