/etc/gateway file and easy networking

/etc/gateway file and easy networking

Post by Adam Nelso » Thu, 16 May 2002 01:17:17



I was reading the other thread "Routing to mulitiple Gateways, is it
possible?" and it seems like there must be an easier way to do what I want
to do

I have two gateways 10.10.1.1 and 10.10.2.1

The two ethernet addresses are 10.10.1.10 and 10.10.2.10

There doesn't need to be any routing between the two subnets (in fact, I
don't want it).  Adding an entry such as

GATEWAY=10.10.1.1

to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I thought it
might.  I've seen that /etc/gateway is supposed to be available, but I can't
find any documentation on this.  Any ideas?

 
 
 

/etc/gateway file and easy networking

Post by jan geertsm » Thu, 16 May 2002 03:34:28


This is not easy, there is an howto named advanced routing....

chapter ten is about teql loadbalancing ... basically you create a virtual
device (teql) that consists of multiple devices.
http://www.tldp.org/HOWTO/Adv-Routing-HOWTO-10.html

goodluck


Quote:> I was reading the other thread "Routing to mulitiple Gateways, is it
> possible?" and it seems like there must be an easier way to do what I want
> to do

> I have two gateways 10.10.1.1 and 10.10.2.1

> The two ethernet addresses are 10.10.1.10 and 10.10.2.10

> There doesn't need to be any routing between the two subnets (in fact, I
> don't want it).  Adding an entry such as

> GATEWAY=10.10.1.1

> to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I thought
it
> might.  I've seen that /etc/gateway is supposed to be available, but I
can't
> find any documentation on this.  Any ideas?


 
 
 

/etc/gateway file and easy networking

Post by Adam Nelso » Thu, 16 May 2002 05:57:48


It was very simple to do in one way:

 /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

Now, all requests to/from 10.1.*.* will be routed through the proper
gateway.  The thing for me to figure out is how to make this permanent (it
won't survive a reboot).  Does anyone know what configuration file this can
go into?


Quote:> I was reading the other thread "Routing to mulitiple Gateways, is it
> possible?" and it seems like there must be an easier way to do what I want
> to do

> I have two gateways 10.10.1.1 and 10.10.2.1

> The two ethernet addresses are 10.10.1.10 and 10.10.2.10

> There doesn't need to be any routing between the two subnets (in fact, I
> don't want it).  Adding an entry such as

> GATEWAY=10.10.1.1

> to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I thought
it
> might.  I've seen that /etc/gateway is supposed to be available, but I
can't
> find any documentation on this.  Any ideas?

 
 
 

/etc/gateway file and easy networking

Post by Samm » Thu, 16 May 2002 08:43:40


That's a static route, and not a gateway (default route) ..

The config file in redhat 7.2/7.3 is /etc/sysconfig/static-routes

Or if you go into the gui network configuration tool then u can set your
static routes for each interface ..

Cheers


> It was very simple to do in one way:

>  /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

> Now, all requests to/from 10.1.*.* will be routed through the proper
> gateway.  The thing for me to figure out is how to make this permanent (it
> won't survive a reboot).  Does anyone know what configuration file this
can
> go into?



> > I was reading the other thread "Routing to mulitiple Gateways, is it
> > possible?" and it seems like there must be an easier way to do what I
want
> > to do

> > I have two gateways 10.10.1.1 and 10.10.2.1

> > The two ethernet addresses are 10.10.1.10 and 10.10.2.10

> > There doesn't need to be any routing between the two subnets (in fact, I
> > don't want it).  Adding an entry such as

> > GATEWAY=10.10.1.1

> > to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I thought
> it
> > might.  I've seen that /etc/gateway is supposed to be available, but I
> can't
> > find any documentation on this.  Any ideas?

 
 
 

/etc/gateway file and easy networking

Post by Michael F » Thu, 16 May 2002 09:51:01


On Tue, 14 May 2002 16:57:48 -0400, "Adam Nelson"


>It was very simple to do in one way:

> /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

>Now, all requests to/from 10.1.*.* will be routed through the proper
>gateway.  The thing for me to figure out is how to make this permanent (it
>won't survive a reboot).  Does anyone know what configuration file this can
>go into?

What distro do you use?

Thanks

 
 
 

/etc/gateway file and easy networking

Post by lincoln.fessen.. » Fri, 17 May 2002 00:58:31



> It was very simple to do in one way:

> /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

> Now, all requests to/from 10.1.*.* will be routed through the proper
> gateway.  The thing for me to figure out is how to make this permanent (it
> won't survive a reboot).  Does anyone know what configuration file this can
> go into?

Stick it in rc.local where you can find it easilly if you ever need to.
--
-Linc Fessenden

In the Beginning there was nothing, which exploded - Yeah right...

 
 
 

/etc/gateway file and easy networking

Post by Adam Nelso » Fri, 17 May 2002 23:09:55


hmm, I'm using Redhat 7.2 as installed by the Dell ServerAssistant software.

I'm going to go with Sammo's suggestion and work from there.  Thanks for all
the help everyone.  I think this should be worked out better in the docs
(which means I should just take it by the horns and do it myself).  One
shouldn't have to be a routing engineer to do something like this.


> It was very simple to do in one way:

>  /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

> Now, all requests to/from 10.1.*.* will be routed through the proper
> gateway.  The thing for me to figure out is how to make this permanent (it
> won't survive a reboot).  Does anyone know what configuration file this
can
> go into?



> > I was reading the other thread "Routing to mulitiple Gateways, is it
> > possible?" and it seems like there must be an easier way to do what I
want
> > to do

> > I have two gateways 10.10.1.1 and 10.10.2.1

> > The two ethernet addresses are 10.10.1.10 and 10.10.2.10

> > There doesn't need to be any routing between the two subnets (in fact, I
> > don't want it).  Adding an entry such as

> > GATEWAY=10.10.1.1

> > to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I thought
> it
> > might.  I've seen that /etc/gateway is supposed to be available, but I
> can't
> > find any documentation on this.  Any ideas?

 
 
 

/etc/gateway file and easy networking

Post by Karl Heye » Sat, 18 May 2002 03:01:07



> hmm, I'm using Redhat 7.2 as installed by the Dell ServerAssistant software.

> I'm going to go with Sammo's suggestion and work from there.  Thanks for all
> the help everyone.  I think this should be worked out better in the docs
> (which means I should just take it by the horns and do it myself).  One
> shouldn't have to be a routing engineer to do something like this.

If you are wanting to do load sharing then use the ip command to state
the two gateways,  the /etc/gateway will only be a lookup file in used,
not sure that it is.

Without knowing the LAN layout, ie IP range with netmask then it's hard
to say exactly.

karl.

 
 
 

/etc/gateway file and easy networking

Post by Samm » Sat, 18 May 2002 08:49:37


I think there are 2 lines about this in the Redhat Reference Manual .. Also,
it is possible to set static routes from the gui network-config program ..

Yeh and I agree with you .. documentation is a bit misleading ..

cheers


> hmm, I'm using Redhat 7.2 as installed by the Dell ServerAssistant
software.

> I'm going to go with Sammo's suggestion and work from there.  Thanks for
all
> the help everyone.  I think this should be worked out better in the docs
> (which means I should just take it by the horns and do it myself).  One
> shouldn't have to be a routing engineer to do something like this.



> > It was very simple to do in one way:

> >  /sbin/route add -net 10.1.0.0 netmask 255.255.0.0 gw 10.10.2.1 eth1

> > Now, all requests to/from 10.1.*.* will be routed through the proper
> > gateway.  The thing for me to figure out is how to make this permanent
(it
> > won't survive a reboot).  Does anyone know what configuration file this
> can
> > go into?



> > > I was reading the other thread "Routing to mulitiple Gateways, is it
> > > possible?" and it seems like there must be an easier way to do what I
> want
> > > to do

> > > I have two gateways 10.10.1.1 and 10.10.2.1

> > > The two ethernet addresses are 10.10.1.10 and 10.10.2.10

> > > There doesn't need to be any routing between the two subnets (in fact,
I
> > > don't want it).  Adding an entry such as

> > > GATEWAY=10.10.1.1

> > > to /etc/sysconfig/network-scripts/ifcfg-eth1 doesn't work like I
thought
> > it
> > > might.  I've seen that /etc/gateway is supposed to be available, but I
> > can't
> > > find any documentation on this.  Any ideas?