Simple routing question...

Simple routing question...

Post by Christian Williamso » Mon, 09 Jul 2007 21:35:02



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 <Computer C - 7.48.29.221> <Computer B - 192.9.200.2>

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 <Network 1>
    route add 7.48.29.221 <Network 2>

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

    route add <Computer A - 192.9.200.1> <Computer B - 7.48.29.220>

Does this look right?

 
 
 

Simple routing question...

Post by Moe Tr » Tue, 10 Jul 2007 00:36:34


On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in

Quote:>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'

Quote:>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).

Quote:>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 <Computer C - 7.48.29.221> <Computer B - 192.9.200.2>

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.

Quote:>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.

Quote:>Or do I need to add routes like this?

>    route add 192.9.200.1 <Network 1>
>    route add 7.48.29.221 <Network 2>

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

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

As above

Quote:>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

 
 
 

Simple routing question...

Post by Christian Williamso » Tue, 10 Jul 2007 00:43:47



> On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in

>> 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 <Computer C - 7.48.29.221> <Computer B - 192.9.200.2>

> 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 <Network 1>
>>    route add 7.48.29.221 <Network 2>

> 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.
 
 
 

Simple routing question...

Post by NPG » Wed, 18 Jul 2007 04:46:08



> On Sun, 08 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in

>> 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
 
 
 

Simple routing question...

Post by Moe Tr » Thu, 19 Jul 2007 09:31:39


On Mon, 16 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in



>> 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

 
 
 

Simple routing question...

Post by NPG » Fri, 20 Jul 2007 01:59:32



> On Mon, 16 Jul 2007, in the Usenet newsgroup comp.os.linux.networking, in


>>> 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
Quote:> 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.
 
 
 

1. Simple routing question about my setup

When I bootup this is what sets up my network/eth0.

# Network Block: 49.90.8.176 / 28

# Add loopback
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# Ethernet Config Info
IPADDR="49.90.8.180"            
NETMASK="255.255.255.240"
NETWORK="49.90.8.176"
BROADCAST="49.90.8.191"
GATEWAY="49.90.8.177"

/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
/sbin/route add -net ${NETWORK} netmask ${NETMASK} dev eth0
/sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1

It results in this (route command output):

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
49.90.8.176     0.0.0.0         255.255.255.240 U     0      0        0 eth0
49.90.8.176     0.0.0.0         255.255.255.240 U     0      0        0 eth0
49.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         69.90.8.177     0.0.0.0         UG    1      0        0 eth0

What is causing the net 49.0.0.0 netmask 255.0.0.0 to be there?  I need to
remove that, I know I can do a "route del -net..." but I don't want it to be
there to begin with at bootup.  What do I have to change to get rid of that?  
Its causing all packets from any ip thats starts with 49. to go nowhere.

This is linux 2.4.26/slackware 9.1.

Thanks.

2. Ghostscript and Canon BJ-200

3. Simple routing question

4. debugger windows for parent/child

5. ytalk does not work

6. A simple routing question

7. rdate info please?

8. help with simple routing question

9. simple routing question

10. Simple Route Question?

11. Eth0 RH5.0/NT4 simple routing question