Routing between Two Subnets under linux - Network

This is a discussion on Routing between Two Subnets under linux - Network ; Hello, Here's my setup 192.168.0.0/24 (192.168.0.190) router (90.0.0.133) 90.0.0.0/24 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 90.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 127.0.0.0 127.0.0.1 255.0.0.0 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Routing between Two Subnets under linux

  1. Routing between Two Subnets under linux

    Hello,

    Here's my setup

    192.168.0.0/24 <-> (192.168.0.190) router (90.0.0.133) <-> 90.0.0.0/24

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref
    Use Iface
    90.0.0.0 0.0.0.0 255.255.255.0 U 0 0
    0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
    0 eth1
    127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0
    0 lo
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0
    0 eth1

    From the 90.0.0.0/24 I'd like to be able to access computers on the
    192.0.0.0/24 network. I assume I can add the following route to a
    machine on the 90.0.0.0/24 network to use the router as a gateway:

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref
    Use Iface
    90.0.0.0 0.0.0.0 255.255.255.0 U 0 192.168.0.0
    90.0.0.133 255.255.255.0 UG 0 0 0 eth0 0
    0 eth0
    127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0
    0 lo
    0.0.0.0 90.0.0.135 0.0.0.0 UG 0 0
    0 eth0

    What route do I have to add to the gateway machine to get this to
    work?

    Any help would be appreciated,

    James

  2. Re: Routing between Two Subnets under linux

    Your set up looks correct. All required routes are present on the
    router. The only thing you need to do is enable routing (ip
    forwarding) on the linux box. Not quite sure how to do this (probably
    depends on the kernel and or distro) but you should be able to find it
    online.

    Scott



    jamessapara@yahoo.com (James) wrote in message news:<8456c585.0409091450.2f249a40@posting.google.com>...
    > Hello,
    >
    > Here's my setup
    >
    > 192.168.0.0/24 <-> (192.168.0.190) router (90.0.0.133) <-> 90.0.0.0/24
    >
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref
    > Use Iface
    > 90.0.0.0 0.0.0.0 255.255.255.0 U 0 0
    > 0 eth0
    > 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0
    > 0 eth1
    > 127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0
    > 0 lo
    > 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0
    > 0 eth1
    >
    > From the 90.0.0.0/24 I'd like to be able to access computers on the
    > 192.0.0.0/24 network. I assume I can add the following route to a
    > machine on the 90.0.0.0/24 network to use the router as a gateway:
    >
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref
    > Use Iface
    > 90.0.0.0 0.0.0.0 255.255.255.0 U 0 192.168.0.0
    > 90.0.0.133 255.255.255.0 UG 0 0 0 eth0 0
    > 0 eth0
    > 127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0
    > 0 lo
    > 0.0.0.0 90.0.0.135 0.0.0.0 UG 0 0
    > 0 eth0
    >
    > What route do I have to add to the gateway machine to get this to
    > work?
    >
    > Any help would be appreciated,
    >
    > James


+ Reply to Thread