0

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.

1 Answer 1

0

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:

 - brctl addbr br0
 - brctl addif br0 eth0
 - brctl addif br0 eth1
 - ifconfig eth0 0.0.0.0
 - ifconfig eth1 0.0.0.0
 - ifconfig br0 up or ifconfig br0 192.168.100.5 netmask 255.255.255.0 up

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

3
  • am giving same range of IPs in 2 different network.One network is isolated network,it wont connect to any other adaptor or switch. Oct 21, 2016 at 13:31
  • Yes, it's for the routing reason. Can you post the result of (run it on your dual nic linux device) - netstat -rn and - ifconfig Oct 21, 2016 at 13:46
  • serverfault.com/questions/809947/… ... already mentioned in this post .. please take a look.. Oct 24, 2016 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .