I have production network in some IP series say 192.168.X.X in Vmware. In this i have some machine. I need to create a test setup. I have created a separate VLAN. Those VLAN were not connected to any physical adapter. I call it as "ISOLATED ENV". i have created the same machines as prod in "ISOLATED ENV".
Physical_adpter----VLAN X ----> PROD_MACHINE ISOLATED_ENV---->TEST_PROD_MACHI
i have gave same ip series in the production network to Isolated_Env. So ISOLATED_ENV machine IP's are same as production IP like 192.168.X.X.
Now i need to make a communication in between these network. i used a linux machine with 2 nic as router for this purpose.
But the issue, the communication will takes place either from one side. if i enabled the nic2 and gave the production network gateway is the IP in NIC2, the communication from Linux machine to ISOLATED_ENV will works. But I cant ping from prod network to Linux machine (Router).
How can i achieve this? i configured IP forwarding some other ip rules in the Linux machine.
If i configured this with 2 different networks means it will work. if i am giving the same ip address as prod it wont.
Help me out. Thanks in advance.
When you give 2 addresses in the same range on one Linux machine, it will choose (maybe randomly) which one will be the default route for the range.
The solution for you is I think to bridge the both NIC so, they will answer the same IP on the two ports.
Lets assume your interface are eth0 and eth1, you can acheive this doing:
You can replace the 3 last steps by edditing /etc/syconfig/network-scripts/ifcfg{eth0/eth1/br0} You then only want to have your eht0 and eth1 activated but with bootproto=none and setup your "virtual" nic br0 as dhcp or static ip.
Kind regards