0

I have created three RedHat virtual machines named: server, client1, client2 in VirtualBox manager. server is connected to client1 on network 10.1.1.x with NIC card (internal network = inet1) and server is also connected with client2 on network 10.2.2.x with another NIC card (internal network = inet2).

I want to communicate from 10.1.1.x network to 10.2.2.x. However, I did route configuration in client1 and client2 to communicate with server and both machines (client1, client2) are able to communicate with server and vice versa. I also enabled the IP forwarding in my server machine but I'm not able to communicate between client1 and client2.

Below are IP configurations of my three machines

server: /etc/sysconfig/network-scripts/ifcfg-enp0s8

static
ip add 10.1.1.1
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255

server: /etc/sysconfig/network-scripts/ifcfg-enp0s9

static
ip add 10.2.2.1
netmask 255.255.255.0
network 10.2.2.0
broadcast 10.2.2.255

client1: /etc/sysconfig/network-scripts/ifcfg-enp08

static
ip add 10.1.1.10
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255

client2: /etc/sysconfig/network-scripts/ifcfg-enp08

ip add 10.2.2.10
netmask 255.255.255.0
network 10.2.2.0
broadcast 10.2.2.255

Route configurations

client1:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.1.1.1 dev enp0s8

client2:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.2.2.1 dev enp0s8 

Note: Firewall services are also disabled

That is all I have configured, please suggest me what can I do to communicate between 10.1.1.x and 10.2.2.x.

0

Could you try ( am not sure though ):

client 1: route add -net 10.2.2.0 netmask 255.255.255.0 gw 10.1.1.1 dev enp0s8

client 2: route add -net 10.1.1.0 netmask 255.255.255.0 gw 10.2.2.1 dev enp0s8

4
  • I only did client1 route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.1.1.1 dev enp0s8 client2 route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.2.2.1 dev enp0s8 Apr 10 '20 at 14:12
  • It works , thank you Apr 10 '20 at 16:01
  • can you tell that why the above mentioned route config not work where i have given the 10.0.0.0 whole network to route Apr 10 '20 at 16:05
  • Thanks and Welcome !!! You mentioned the network and netmask wrongly thats it i guess..All other are fine...10.0.0.0 is not the network ,each network is different as mentioned in the configuration... Apr 10 '20 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.