Linux and routing

Linux and routing

Post by Chris Trembl » Tue, 27 Jun 2000 04:00:00



I am trying to set up a small Linux box as a standalone internal
router. I have both NIC cards installed and they work. Thing is that
if I try to ping a machine from one side to the other it comes back
with a request timed out. BUT I can ping the nic card on the other
side of the router. I have the one machine that is sitting in the 2
subnet pointing to the router as default gateway but the 1 subnet is
pointing to 192.168.1.1 which is our internal nic for our proxy.

The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
masks of 255.255.255.0. The ip addresses for the router are
192.168.1.2 and 192.168.2.1. The routing table looks like this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref
Use Iface
192.168.2.1     *               255.255.255.255 UH    0      0
0 eth1
192.168.1.254   *               255.255.255.255 UH    0      0
0 eth0
192.168.2.0     *               255.255.255.0   U     0      0
0 eth1
192.168.1.0     *               255.255.255.0   U     0      0
0 eth0
127.0.0.0       *               255.0.0.0       U     0      0
0 lo
default         192.168.1.1     0.0.0.0         UG    0      0
0 eth1
default         192.168.1.1     0.0.0.0         UG    0      0
0 eth0
default         192.168.2.1     0.0.0.0         UG    1      0
0 eth1

Any suggestions what I am missing and needs to be corrected?
Please respond here as I am sure someone else will have this problem.

Thanks
Chris

 
 
 

Linux and routing

Post by David Efflan » Wed, 28 Jun 2000 04:00:00



>I am trying to set up a small Linux box as a standalone internal
>router. I have both NIC cards installed and they work. Thing is that
>if I try to ping a machine from one side to the other it comes back
>with a request timed out. BUT I can ping the nic card on the other
>side of the router. I have the one machine that is sitting in the 2
>subnet pointing to the router as default gateway but the 1 subnet is
>pointing to 192.168.1.1 which is our internal nic for our proxy.

>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>masks of 255.255.255.0. The ip addresses for the router are
>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>Kernel IP routing table
>Destination     Gateway         Genmask         Flags Metric Ref
>Use Iface
>192.168.2.1     *               255.255.255.255 UH    0      0
>0 eth1
>192.168.1.254   *               255.255.255.255 UH    0      0
>0 eth0
>192.168.2.0     *               255.255.255.0   U     0      0
>0 eth1
>192.168.1.0     *               255.255.255.0   U     0      0
>0 eth0
>127.0.0.0       *               255.0.0.0       U     0      0
>0 lo
>default         192.168.1.1     0.0.0.0         UG    0      0
>0 eth1
>default         192.168.1.1     0.0.0.0         UG    0      0
>0 eth0
>default         192.168.2.1     0.0.0.0         UG    1      0
>0 eth1

>Any suggestions what I am missing and needs to be corrected?
>Please respond here as I am sure someone else will have this problem.

Why would you have a default gw 192.168.2.1 that loops back to yourself?  
And how could you have default gw to 192.168.1.1 on both eth0 and eth1?

You should only have one default gw to whatever IP has internet access or
routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
already have -net routing to the subnets.

Just curious why if eth1 is 192.168.1.2, you have a -host route to
192.168.1.254?  It probably doesn't matter, but does seem strange.

Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to enable
ip_forward.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

 
 
 

Linux and routing

Post by Chris Trembl » Wed, 28 Jun 2000 04:00:00


Thanks for the response.
I noticed the multiple gateways but I am not sure how to get rid of
them permanently. I did a route del default and they disappeared. I
had to shutdown the machine (needed the spot for another machine) but
the three default entries reappeared when the machine was booted up
again (where is it getting these settings from?).
Also the ip_forward is 0 not 1. What do I do to change that so it
stays 1??
Thanks again,
Chris



>>I am trying to set up a small Linux box as a standalone internal
>>router. I have both NIC cards installed and they work. Thing is that
>>if I try to ping a machine from one side to the other it comes back
>>with a request timed out. BUT I can ping the nic card on the other
>>side of the router. I have the one machine that is sitting in the 2
>>subnet pointing to the router as default gateway but the 1 subnet is
>>pointing to 192.168.1.1 which is our internal nic for our proxy.

>>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>>masks of 255.255.255.0. The ip addresses for the router are
>>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>>Kernel IP routing table
>>Destination     Gateway         Genmask         Flags Metric Ref
>>Use Iface
>>192.168.2.1     *               255.255.255.255 UH    0      0
>>0 eth1
>>192.168.1.254   *               255.255.255.255 UH    0      0
>>0 eth0
>>192.168.2.0     *               255.255.255.0   U     0      0
>>0 eth1
>>192.168.1.0     *               255.255.255.0   U     0      0
>>0 eth0
>>127.0.0.0       *               255.0.0.0       U     0      0
>>0 lo
>>default         192.168.1.1     0.0.0.0         UG    0      0
>>0 eth1
>>default         192.168.1.1     0.0.0.0         UG    0      0
>>0 eth0
>>default         192.168.2.1     0.0.0.0         UG    1      0
>>0 eth1

>>Any suggestions what I am missing and needs to be corrected?
>>Please respond here as I am sure someone else will have this problem.

>Why would you have a default gw 192.168.2.1 that loops back to yourself?  
>And how could you have default gw to 192.168.1.1 on both eth0 and eth1?

>You should only have one default gw to whatever IP has internet access or
>routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
>already have -net routing to the subnets.

>Just curious why if eth1 is 192.168.1.2, you have a -host route to
>192.168.1.254?  It probably doesn't matter, but does seem strange.

>Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to enable
>ip_forward.

>--

>http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
>http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

 
 
 

Linux and routing

Post by Chris Trembl » Wed, 28 Jun 2000 04:00:00


OK I figured out why it was doing 3 default gateways. I had a gateway
setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
Now how do I set up ip_forwarding?



>Thanks for the response.
>I noticed the multiple gateways but I am not sure how to get rid of
>them permanently. I did a route del default and they disappeared. I
>had to shutdown the machine (needed the spot for another machine) but
>the three default entries reappeared when the machine was booted up
>again (where is it getting these settings from?).
>Also the ip_forward is 0 not 1. What do I do to change that so it
>stays 1??
>Thanks again,
>Chris



>>>I am trying to set up a small Linux box as a standalone internal
>>>router. I have both NIC cards installed and they work. Thing is that
>>>if I try to ping a machine from one side to the other it comes back
>>>with a request timed out. BUT I can ping the nic card on the other
>>>side of the router. I have the one machine that is sitting in the 2
>>>subnet pointing to the router as default gateway but the 1 subnet is
>>>pointing to 192.168.1.1 which is our internal nic for our proxy.

>>>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>>>masks of 255.255.255.0. The ip addresses for the router are
>>>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>>>Kernel IP routing table
>>>Destination     Gateway         Genmask         Flags Metric Ref
>>>Use Iface
>>>192.168.2.1     *               255.255.255.255 UH    0      0
>>>0 eth1
>>>192.168.1.254   *               255.255.255.255 UH    0      0
>>>0 eth0
>>>192.168.2.0     *               255.255.255.0   U     0      0
>>>0 eth1
>>>192.168.1.0     *               255.255.255.0   U     0      0
>>>0 eth0
>>>127.0.0.0       *               255.0.0.0       U     0      0
>>>0 lo
>>>default         192.168.1.1     0.0.0.0         UG    0      0
>>>0 eth1
>>>default         192.168.1.1     0.0.0.0         UG    0      0
>>>0 eth0
>>>default         192.168.2.1     0.0.0.0         UG    1      0
>>>0 eth1

>>>Any suggestions what I am missing and needs to be corrected?
>>>Please respond here as I am sure someone else will have this problem.

>>Why would you have a default gw 192.168.2.1 that loops back to yourself?  
>>And how could you have default gw to 192.168.1.1 on both eth0 and eth1?

>>You should only have one default gw to whatever IP has internet access or
>>routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
>>already have -net routing to the subnets.

>>Just curious why if eth1 is 192.168.1.2, you have a -host route to
>>192.168.1.254?  It probably doesn't matter, but does seem strange.

>>Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to enable
>>ip_forward.

>>--

>>http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
>>http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/

 
 
 

Linux and routing

Post by Clifford Kit » Wed, 28 Jun 2000 04:00:00



> OK I figured out why it was doing 3 default gateways. I had a gateway
> setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
> Now how do I set up ip_forwarding?

Put "echo -n 1 > /proc/sys/net/ipv4/ip_forward" in an appropriate
boot-up file (maybe rc.local or rc.inet1, can depend on the distribution)
under /etc/rc.d.  IP forwarding must also be compiled into the kernel.

--

/* Better is the enemy of good enough. */

 
 
 

Linux and routing

Post by david.effla.. » Thu, 29 Jun 2000 04:00:00




>I am trying to set up a small Linux box as a standalone internal
>router. I have both NIC cards installed and they work. Thing is that
>if I try to ping a machine from one side to the other it comes back
>with a request timed out. BUT I can ping the nic card on the other
>side of the router. I have the one machine that is sitting in the 2
>subnet pointing to the router as default gateway but the 1 subnet is
>pointing to 192.168.1.1 which is our internal nic for our proxy.

>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>masks of 255.255.255.0. The ip addresses for the router are
>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>Kernel IP routing table
>Destination     Gateway         Genmask         Flags Metric Ref
>Use Iface
>192.168.2.1     *               255.255.255.255 UH    0      0
>0 eth1
>192.168.1.254   *               255.255.255.255 UH    0      0
>0 eth0
>192.168.2.0     *               255.255.255.0   U     0      0
>0 eth1
>192.168.1.0     *               255.255.255.0   U     0      0
>0 eth0
>127.0.0.0       *               255.0.0.0       U     0      0
>0 lo
>default         192.168.1.1     0.0.0.0         UG    0      0
>0 eth1
>default         192.168.1.1     0.0.0.0         UG    0      0
>0 eth0
>default         192.168.2.1     0.0.0.0         UG    1      0
>0 eth1

>Any suggestions what I am missing and needs to be corrected?
>Please respond here as I am sure someone else will have this

 problem.

Why would you have a default gw 192.168.2.1 that loops back to
 yourself?  
And how could you have default gw to 192.168.1.1 on both eth0 and
 eth1?

You should only have one default gw to whatever IP has internet
 access or
routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
already have -net routing to the subnets.

Just curious why if eth1 is 192.168.1.2, you have a -host route to
192.168.1.254?  It probably doesn't matter, but does seem strange.

Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to enable
ip_forward.

--

http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/
 http://cgi-help.virtualave.net/

 
 
 

Linux and routing

Post by chris.tremb.. » Thu, 29 Jun 2000 04:00:00



OK I figured out why it was doing 3 default gateways. I had a gateway
setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
Now how do I set up ip_forwarding?



>Thanks for the response.
>I noticed the multiple gateways but I am not sure how to get rid of
>them permanently. I did a route del default and they disappeared. I
>had to shutdown the machine (needed the spot for another machine)
 but
>the three default entries reappeared when the machine was booted up
>again (where is it getting these settings from?).
>Also the ip_forward is 0 not 1. What do I do to change that so it
>stays 1??
>Thanks again,
>Chris





>>>I am trying to set up a small Linux box as a standalone internal
>>>router. I have both NIC cards installed and they work. Thing is
 that
>>>if I try to ping a machine from one side to the other it comes
 back
>>>with a request timed out. BUT I can ping the nic card on the other
>>>side of the router. I have the one machine that is sitting in the
 2
>>>subnet pointing to the router as default gateway but the 1 subnet
 is
>>>pointing to 192.168.1.1 which is our internal nic for our proxy.

>>>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>>>masks of 255.255.255.0. The ip addresses for the router are
>>>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>>>Kernel IP routing table
>>>Destination     Gateway         Genmask         Flags Metric Ref
>>>Use Iface
>>>192.168.2.1     *               255.255.255.255 UH    0      0
>>>0 eth1
>>>192.168.1.254   *               255.255.255.255 UH    0      0
>>>0 eth0
>>>192.168.2.0     *               255.255.255.0   U     0      0
>>>0 eth1
>>>192.168.1.0     *               255.255.255.0   U     0      0
>>>0 eth0
>>>127.0.0.0       *               255.0.0.0       U     0      0
>>>0 lo
>>>default         192.168.1.1     0.0.0.0         UG    0      0
>>>0 eth1
>>>default         192.168.1.1     0.0.0.0         UG    0      0
>>>0 eth0
>>>default         192.168.2.1     0.0.0.0         UG    1      0
>>>0 eth1

>>>Any suggestions what I am missing and needs to be corrected?
>>>Please respond here as I am sure someone else will have this
 problem.

>>Why would you have a default gw 192.168.2.1 that loops back to
 yourself?  
>>And how could you have default gw to 192.168.1.1 on both eth0 and
 eth1?

>>You should only have one default gw to whatever IP has internet
 access or
>>routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
>>already have -net routing to the subnets.

>>Just curious why if eth1 is 192.168.1.2, you have a -host route to
>>192.168.1.254?  It probably doesn't matter, but does seem strange.

>>Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to
 enable
>>ip_forward.

>>--

>>http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
>>http://hammer.prohosting.com/~cgi-wiz/

 http://cgi-help.virtualave.net/

- Show quoted text -

 
 
 

Linux and routing

Post by chris.tremb.. » Thu, 29 Jun 2000 04:00:00



Thanks for the response.
I noticed the multiple gateways but I am not sure how to get rid of
them permanently. I did a route del default and they disappeared. I
had to shutdown the machine (needed the spot for another machine) but
the three default entries reappeared when the machine was booted up
again (where is it getting these settings from?).
Also the ip_forward is 0 not 1. What do I do to change that so it
stays 1??
Thanks again,
Chris





>>I am trying to set up a small Linux box as a standalone internal
>>router. I have both NIC cards installed and they work. Thing is
 that
>>if I try to ping a machine from one side to the other it comes back
>>with a request timed out. BUT I can ping the nic card on the other
>>side of the router. I have the one machine that is sitting in the 2
>>subnet pointing to the router as default gateway but the 1 subnet
 is
>>pointing to 192.168.1.1 which is our internal nic for our proxy.

>>The network is two subnets of 192.168.1.0 and 192.168.2.0 with net
>>masks of 255.255.255.0. The ip addresses for the router are
>>192.168.1.2 and 192.168.2.1. The routing table looks like this:

>>Kernel IP routing table
>>Destination     Gateway         Genmask         Flags Metric Ref
>>Use Iface
>>192.168.2.1     *               255.255.255.255 UH    0      0
>>0 eth1
>>192.168.1.254   *               255.255.255.255 UH    0      0
>>0 eth0
>>192.168.2.0     *               255.255.255.0   U     0      0
>>0 eth1
>>192.168.1.0     *               255.255.255.0   U     0      0
>>0 eth0
>>127.0.0.0       *               255.0.0.0       U     0      0
>>0 lo
>>default         192.168.1.1     0.0.0.0         UG    0      0
>>0 eth1
>>default         192.168.1.1     0.0.0.0         UG    0      0
>>0 eth0
>>default         192.168.2.1     0.0.0.0         UG    1      0
>>0 eth1

>>Any suggestions what I am missing and needs to be corrected?
>>Please respond here as I am sure someone else will have this
 problem.

>Why would you have a default gw 192.168.2.1 that loops back to
 yourself?  
>And how could you have default gw to 192.168.1.1 on both eth0 and
 eth1?

>You should only have one default gw to whatever IP has internet
 access or
>routing to it (probably to your proxy at 192.168.1.1 on eth0).  You
>already have -net routing to the subnets.

>Just curious why if eth1 is 192.168.1.2, you have a -host route to
>192.168.1.254?  It probably doesn't matter, but does seem strange.

>Is 'cat /proc/sys/net/ipv4/ip_forward' 0 or 1?  Should be 1 to
 enable
>ip_forward.

>--

>http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
>http://hammer.prohosting.com/~cgi-wiz/

 http://cgi-help.virtualave.net/

- Show quoted text -

 
 
 

Linux and routing

Post by clifford.k.. » Thu, 29 Jun 2000 04:00:00




> OK I figured out why it was doing 3 default gateways. I had a
 gateway
> setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
> Now how do I set up ip_forwarding?

Put "echo -n 1 > /proc/sys/net/ipv4/ip_forward" in an appropriate
boot-up file (maybe rc.local or rc.inet1, can depend on the
 distribution)
under /etc/rc.d.  IP forwarding must also be compiled into the
 kernel.

--

/* Better is the enemy of good enough. */

 
 
 

Linux and routing

Post by Chris Trembl » Thu, 29 Jun 2000 04:00:00


I am using the default kernel from Redhat 6.2 do you know if it has IP
forwarding in the kernel?
Thanks again
Chris
On Tue, 27 Jun 2000 14:12:29 -0500, Clifford Kite


>> OK I figured out why it was doing 3 default gateways. I had a gateway
>> setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
>> Now how do I set up ip_forwarding?

>Put "echo -n 1 > /proc/sys/net/ipv4/ip_forward" in an appropriate
>boot-up file (maybe rc.local or rc.inet1, can depend on the distribution)
>under /etc/rc.d.  IP forwarding must also be compiled into the kernel.

>--

>/* Better is the enemy of good enough. */

 
 
 

Linux and routing

Post by Chris Trembl » Thu, 29 Jun 2000 04:00:00


Actually don't bother responding. I checked their website. It is in
the kernel.



>I am using the default kernel from Redhat 6.2 do you know if it has IP
>forwarding in the kernel?
>Thanks again
>Chris
>On Tue, 27 Jun 2000 14:12:29 -0500, Clifford Kite


>>> OK I figured out why it was doing 3 default gateways. I had a gateway
>>> setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
>>> Now how do I set up ip_forwarding?

>>Put "echo -n 1 > /proc/sys/net/ipv4/ip_forward" in an appropriate
>>boot-up file (maybe rc.local or rc.inet1, can depend on the distribution)
>>under /etc/rc.d.  IP forwarding must also be compiled into the kernel.

>>--

>>/* Better is the enemy of good enough. */

 
 
 

Linux and routing

Post by Charles Emle » Thu, 29 Jun 2000 04:00:00


Read thru the RedHat Reference Guide, especially the "What's New"
section.  You'll find that IP forwarding is now set in /etc/sysctl.conf



> I am using the default kernel from Redhat 6.2 do you know if it has IP
> forwarding in the kernel?
> Thanks again
> Chris
> On Tue, 27 Jun 2000 14:12:29 -0500, Clifford Kite


> >> OK I figured out why it was doing 3 default gateways. I had a
gateway
> >> setup in both ifcfg-eth0 and ifcfg-eth1 DOH!!.
> >> Now how do I set up ip_forwarding?

> >Put "echo -n 1 > /proc/sys/net/ipv4/ip_forward" in an appropriate
> >boot-up file (maybe rc.local or rc.inet1, can depend on the
distribution)
> >under /etc/rc.d.  IP forwarding must also be compiled into the
kernel.

> >--

> >/* Better is the enemy of good enough. */

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

Linux and routing

Post by Chris Trembl » Thu, 29 Jun 2000 04:00:00


Update:
I have properly (I thought) set up my box to be a router but when I
ping from a host on one side to a host on the other  side I get
request timed out. I can ping both sides of the router though with the
same host and the router can ping everywhere.
I also have set ip_forwarding enabled in sysctl.conf.
Below I have included some relevant files

sysctl.conf
# Disables packet forwarding
net.ipv4.ip_forward = 1
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Disables automatic defragmentation (needed for masquerading, LVS)
net.ipv4.ip_always_defrag = 0
# Disables the magic-sysrq key
kernel.sysrq = 0

NIC cards:
ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes

ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.2.255
IPADDR=192.168.2.1
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes

Here is my routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref
Use Iface
192.168.1.2     *               255.255.255.255 UH    0      0
0 eth0
192.168.2.1     *               255.255.255.255 UH    0      0
0 eth1
192.168.2.0     *               255.255.255.0   U     0      0
0 eth1
192.168.1.0     *               255.255.255.0   U     0      0
0 eth0
127.0.0.0       *               255.0.0.0       U     0      0
0 lo
default         192.168.1.1     0.0.0.0         UG    0      0
0 eth0

I am under the impression that the default Redhat 6.2 (2.2.14-5.0)
kernel has ip_forwarding compiled in it (am I right??)
Thanks to everyone who has answered!
Chris

 
 
 

Linux and routing

Post by Tom East » Thu, 29 Jun 2000 04:00:00



>Update:
>I have properly (I thought) set up my box to be a router but when I
>ping from a host on one side to a host on the other  side I get
>request timed out. I can ping both sides of the router though with the
>same host and the router can ping everywhere.
>I also have set ip_forwarding enabled in sysctl.conf.
>Below I have included some relevant files

Chris -- do the hosts on 192.168.1.0/24 and 192.168.2.0/24 know that the
Linux box is a router to the other subnetwork? You have to let them in on
the secret as well....

-Tom

Quote:>sysctl.conf
># Disables packet forwarding
>net.ipv4.ip_forward = 1
># Enables source route verification
>net.ipv4.conf.all.rp_filter = 1
># Disables automatic defragmentation (needed for masquerading, LVS)
>net.ipv4.ip_always_defrag = 0
># Disables the magic-sysrq key
>kernel.sysrq = 0

>NIC cards:
>ifcfg-eth0:
>DEVICE=eth0
>BOOTPROTO=static
>BROADCAST=192.168.1.255
>IPADDR=192.168.1.2
>NETMASK=255.255.255.0
>NETWORK=192.168.1.0
>ONBOOT=yes

>ifcfg-eth1:
>DEVICE=eth1
>BOOTPROTO=static
>BROADCAST=192.168.2.255
>IPADDR=192.168.2.1
>NETMASK=255.255.255.0
>NETWORK=192.168.2.0
>ONBOOT=yes

>Here is my routing table:

>Kernel IP routing table
>Destination     Gateway         Genmask         Flags Metric Ref
>Use Iface
>192.168.1.2     *               255.255.255.255 UH    0      0
>0 eth0
>192.168.2.1     *               255.255.255.255 UH    0      0
>0 eth1
>192.168.2.0     *               255.255.255.0   U     0      0
>0 eth1
>192.168.1.0     *               255.255.255.0   U     0      0
>0 eth0
>127.0.0.0       *               255.0.0.0       U     0      0
>0 lo
>default         192.168.1.1     0.0.0.0         UG    0      0
>0 eth0

>I am under the impression that the default Redhat 6.2 (2.2.14-5.0)
>kernel has ip_forwarding compiled in it (am I right??)
>Thanks to everyone who has answered!
>Chris

--
Tom Eastep             \  Eastep's First Principle of Computing:
ICQ #60745924           \  "Any sane computer will tell you how it

Shoreline, Washington USA \___________________________________________
 
 
 

Linux and routing

Post by Clifford Kit » Thu, 29 Jun 2000 04:00:00



> I have properly (I thought) set up my box to be a router but when
> I ping from a host on one side to a host on the other side I get
> request timed out. I can ping both sides of the router though with
> the same host and the router can ping everywhere.  I also have set
> ip_forwarding enabled in sysctl.conf.  Below I have included some

...

Quote:> Here is my routing table:
> Kernel IP routing table
> Destination  Gateway      Genmask         Flags Metric Ref Use Iface
> 192.168.1.2  *            255.255.255.255 UH    0      0   0   eth0
> 192.168.2.1  *            255.255.255.255 UH    0      0   0   eth1
> 192.168.2.0  *            255.255.255.0   U     0      0   0   eth1
> 192.168.1.0  *            255.255.255.0   U     0      0   0   eth0
> 127.0.0.0    *            255.0.0.0       U     0      0   0   lo
> default      192.168.1.1  0.0.0.0         UG    0      0   0   eth0

You also need to tell the hosts on each network how to reach the
hosts on the other network.  That's done with

route add -net 192.168.1.0 gw 192.168.2.1 netmask 255.255.255.0 eth0
route add -net 192.168.2.0 gw 192.168.1.2 netmask 255.255.255.0 eth0

for hosts on 192.168.2.0 and 192.168.1.0 respectively, assuming that the
ethernet card on each host other than the gateway is configured as eth0.
I don't know how to do this within the context of RH configuration files.

Quote:> I am under the impression that the default Redhat 6.2 (2.2.14-5.0)
> kernel has ip_forwarding compiled in it (am I right??)

Beats me.  I don't do RH.

--

/* Microsoft is a great marketing organization.
 * It _has_ to be */