1826325 Members
3515 Online
109692 Solutions
New Discussion

2 nic router Linux

 
DeafFrog
Valued Contributor

2 nic router Linux


Hi there ,

 

I have setup a Linux (mac1) ,RH 5.1 , guest with 2 nic , assigned 192.168.1.10/24 (eth0) and
128.1.150.10/24 (eth1) respectively.I plan to put some more vm on each side of these 2
network.

i have net.ipv4.ip_forward = 1 , in sysctl and iptables and Selinux are disable
as of now , and i did a #route add -net 128.1.150.0/24 128.1.150.10 on mac1.
However , the system on 192 subnet is not able to communicate to those in 128 , thru mac1.


Plase let me how can i have machines on these 2 vlan communicate with each other
thru mach1.Machines on 192.168.1.0 will have 192.168.1.10 as their default gateway
and Machine on 128.1.150.0 netwrok will have 128.1.150.10 as their default gateway.

 

Regards,

FrogIsDeaf
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: 2 nic router Linux

> I have setup [...]

   As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations.  Reading this,
it's not clear to me what the IP addresses and subnet masks are for each
interface on each system, nor what's in the routing tables for any of
these systems.

      netstat -r[n]

> [...] the system on 192 subnet is not able to communicate to those in
> 128 , thru mac1.

   What, exactly, is "the system on 192 subnet"?  "Is not able" is not a
useful problem description.  What, exactly, did you do?  What, exactly,
happened when you did it?

> [...] i did a #route add -net 128.1.150.0/24 128.1.150.10 on mac1.

   Why?  If mac1 has an interface on that subnet, then doesn't it
already know how to talk to systems on that subnet?

      netstat -r[n]

   How should "the system on 192 subnet" know how to get to a system on
the 128.1.150.x subnet?  What have you done to tell "the system on 192
subnet" how to get to a system on the 128.1.150.x subnet?  _That_ may be
where you need to do a "route add" command.

DeafFrog
Valued Contributor

Re: 2 nic router Linux

Hi Steven ,

 

                  Thank you very much . while i was preparing for a notepad reply to your thread i found out that the guest vm on the 128 subnet where connected to different vswitch.This also should not have any link to the problem , but i just changed the 128 machines on to the same vswitch as 192 subnet machine.this has solved my issue.

thank you once again.

 

Regards,

FrogIsDeaf