Simple routing question... - Networking

This is a discussion on Simple routing question... - Networking ; I have two physical networks, and I want to set up a Linux router between them. 1. I have Computer A with IP address 192.9.200.1 on Network 1. 2. I have Linux Computer B on Network 1, with an ethernet ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Simple routing question...

  1. Simple routing question...

    I have two physical networks, and I want to set up a Linux router
    between them.

    1. I have Computer A with IP address 192.9.200.1 on Network 1.

    2. I have Linux Computer B on Network 1, with an ethernet interface
    having the address of 192.9.200.2. That same Linux Computer B has
    another ethernet interface with address 7.48.29.220 on Network 2.

    3. Finally, I have Computer C with IP address 7.48.29.221 on Network
    2.

    I want Computer A to talk to Computer C, and I want Computer C to talk
    to Computer A. The question is: How do I set up Computers A, B, and C
    to make this happen?

    I think I have to do the following:

    o Add a route to Computer A that says whenever I want to send to
    Computer C, go through Computer B.

    route add

    o Set up Computer B to pass packets from both networks

    turn on IP packet forwarding
    Is that all? Or do I need to add routes like this?

    route add 192.9.200.1
    route add 7.48.29.221

    o Add a route to Computer C that says whenever I want to send to
    Computer A, go through Computer B.

    route add

    Does this look right?

  2. Re: Simple routing question...

    On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
    article , Christian Williamson wrote:

    >I have two physical networks, and I want to set up a Linux router
    >between them.


    Been done tens of thousands of times. Did you glance through the
    HOWTOs that should be included on your system?

    40490 Jun 22 2000 Home-Network-mini-HOWTO
    45604 Apr 18 2006 Networking-Overview-HOWTO
    71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO

    Those are merely the first ones to come to mind. There is also the
    Linux Network Administrator's Guide from the LDP - also should be on
    your system - look for the 'nag2'

    >1. I have Computer A with IP address 192.9.200.1 on Network 1.
    >
    >2. I have Linux Computer B on Network 1, with an ethernet interface
    > having the address of 192.9.200.2. That same Linux Computer B has
    > another ethernet interface with address 7.48.29.220 on Network 2.
    >
    >3. Finally, I have Computer C with IP address 7.48.29.221 on Network
    > 2.


    OK - but see RFC3330 which lists a whole bunch of address ranges you
    can use - rather than "real" ones (192.9.200.1 is assigned to Sun
    Microsystems - 7.48.29.221 is a reserved address).

    >I want Computer A to talk to Computer C, and I want Computer C to talk
    >to Computer A. The question is: How do I set up Computers A, B, and C
    >to make this happen?
    >
    >I think I have to do the following:
    >
    >o Add a route to Computer A that says whenever I want to send to
    > Computer C, go through Computer B.
    >
    > route add


    man route the syntax could be

    /sbin/route add -host 7.48.29.221 -gw 192.9.200.2

    but all distributions have their own "cute" helper programs that can
    be configured to do this. Each distribution knows how to do it better
    than anyone else, so each uses different files and different formats.

    >o Set up Computer B to pass packets from both networks
    >
    > turn on IP packet forwarding
    > Is that all?


    Basically, yes. Again, each distribution has their own cute way of
    configuring this, but the results are the same.

    >Or do I need to add routes like this?
    >
    > route add 192.9.200.1
    > route add 7.48.29.221


    Those should be added automatically when the boot scripts bring up
    each interface.

    >o Add a route to Computer C that says whenever I want to send to
    > Computer A, go through Computer B.


    As above

    >Does this look right?


    On computer "A" and assuming a /24 mask, rather than host routes, and
    ignoring the loopback:

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    7.48.29.0 192.9.200.2 255.255.255.0 UG 0 0 0 eth0

    On computer "B":

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

    On computer "C":

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    192.9.200.0 7.48.29.220 255.255.255.0 UG 0 0 0 eth0

    Piece of cake!

    Old guy


  3. Re: Simple routing question...

    Moe Trin wrote:
    > On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
    > article , Christian Williamson wrote:
    >
    >> I have two physical networks, and I want to set up a Linux router
    >> between them.

    >
    > Been done tens of thousands of times. Did you glance through the
    > HOWTOs that should be included on your system?
    >
    > 40490 Jun 22 2000 Home-Network-mini-HOWTO
    > 45604 Apr 18 2006 Networking-Overview-HOWTO
    > 71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO
    >
    > Those are merely the first ones to come to mind. There is also the
    > Linux Network Administrator's Guide from the LDP - also should be on
    > your system - look for the 'nag2'
    >
    >> 1. I have Computer A with IP address 192.9.200.1 on Network 1.
    >>
    >> 2. I have Linux Computer B on Network 1, with an ethernet interface
    >> having the address of 192.9.200.2. That same Linux Computer B has
    >> another ethernet interface with address 7.48.29.220 on Network 2.
    >>
    >> 3. Finally, I have Computer C with IP address 7.48.29.221 on Network
    >> 2.

    >
    > OK - but see RFC3330 which lists a whole bunch of address ranges you
    > can use - rather than "real" ones (192.9.200.1 is assigned to Sun
    > Microsystems - 7.48.29.221 is a reserved address).
    >
    >> I want Computer A to talk to Computer C, and I want Computer C to talk
    >> to Computer A. The question is: How do I set up Computers A, B, and C
    >> to make this happen?
    >>
    >> I think I have to do the following:
    >>
    >> o Add a route to Computer A that says whenever I want to send to
    >> Computer C, go through Computer B.
    >>
    >> route add

    >
    > man route the syntax could be
    >
    > /sbin/route add -host 7.48.29.221 -gw 192.9.200.2
    >
    > but all distributions have their own "cute" helper programs that can
    > be configured to do this. Each distribution knows how to do it better
    > than anyone else, so each uses different files and different formats.
    >
    >> o Set up Computer B to pass packets from both networks
    >>
    >> turn on IP packet forwarding
    >> Is that all?

    >
    > Basically, yes. Again, each distribution has their own cute way of
    > configuring this, but the results are the same.
    >
    >> Or do I need to add routes like this?
    >>
    >> route add 192.9.200.1
    >> route add 7.48.29.221

    >
    > Those should be added automatically when the boot scripts bring up
    > each interface.
    >
    >> o Add a route to Computer C that says whenever I want to send to
    >> Computer A, go through Computer B.

    >
    > As above
    >
    >> Does this look right?

    >
    > On computer "A" and assuming a /24 mask, rather than host routes, and
    > ignoring the loopback:
    >
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref Use Iface
    > 192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    > 7.48.29.0 192.9.200.2 255.255.255.0 UG 0 0 0 eth0
    >
    > On computer "B":
    >
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref Use Iface
    > 192.9.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    > 7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    >
    > On computer "C":
    >
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref Use Iface
    > 7.48.29.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    > 192.9.200.0 7.48.29.220 255.255.255.0 UG 0 0 0 eth0
    >
    > Piece of cake!
    >
    > Old guy
    >


    Thanks much, Moe! I'll give it a try, let you know how it goes.

  4. Re: Simple routing question...

    * Moe Trin wrote:
    > On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
    > article , Christian Williamson wrote:
    >
    >> I have two physical networks, and I want to set up a Linux router
    >> between them.

    >
    > Been done tens of thousands of times. Did you glance through the
    > HOWTOs that should be included on your system?
    >
    > 40490 Jun 22 2000 Home-Network-mini-HOWTO
    > 45604 Apr 18 2006 Networking-Overview-HOWTO
    > 71626 Apr 4 2004 Unix-and-Internet-Fundamentals-HOWTO
    >
    > Those are merely the first ones to come to mind. There is also the
    > Linux Network Administrator's Guide from the LDP - also should be on
    > your system - look for the 'nag2'
    >
    >> 1. I have Computer A with IP address 192.9.200.1 on Network 1.
    >>
    >> 2. I have Linux Computer B on Network 1, with an ethernet interface
    >> having the address of 192.9.200.2. That same Linux Computer B has
    >> another ethernet interface with address 7.48.29.220 on Network 2.
    >>
    >> 3. Finally, I have Computer C with IP address 7.48.29.221 on Network
    >> 2.

    >
    > OK - but see RFC3330 which lists a whole bunch of address ranges you
    > can use - rather than "real" ones (192.9.200.1 is assigned to Sun
    > Microsystems - 7.48.29.221 is a reserved address).
    >

    7.48.29.221 is assigned to the DoD NIC

  5. Re: Simple routing question...

    On Mon, 16 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
    article , NPG wrote:

    >* Moe Trin wrote:


    >> 7.48.29.221 is a reserved address).

    >
    >7.48.29.221 is assigned to the DoD NIC


    IANA says it's reserved (http://www.iana.org/assignments/ipv4-address-space)
    while ARIN says it belongs to DISA - both in a whois and in the zonefiles.
    However, no one seems to be advertising a route to the block, and the three
    upstreams I can reach (eli, level3 and att) are all claiming "Unreachable"

    Old guy


  6. Re: Simple routing question...

    * Moe Trin wrote:
    > On Mon, 16 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in
    > article , NPG wrote:
    >
    >> * Moe Trin wrote:

    >
    >>> 7.48.29.221 is a reserved address).

    >> 7.48.29.221 is assigned to the DoD NIC

    >
    > IANA says it's reserved (http://www.iana.org/assignments/ipv4-address-space)
    > while ARIN says it belongs to DISA - both in a whois and in the zonefiles.

    Point taken. However IANA works in white collar. Whois and DNS in blue
    collar. Management never really knows what is going on. Take
    133.0.0.0/8 for instance. Management thinks it is assigned to a bunch of
    Registries. Whois knows it is assigned to JPNIC
    > However, no one seems to be advertising a route to the block, and the three
    > upstreams I can reach (eli, level3 and att) are all claiming "Unreachable"
    >

    I was discussing assignment not reachability.

+ Reply to Thread