Networking Forums

Networking Forums > Computer Networking > Linux Networking > Which way -- Gateway

Reply
Thread Tools Display Modes

Which way -- Gateway

 
 
delphinuscadmus@yahoo.com
Guest
Posts: n/a

 
      03-31-2006, 08:37 PM
The gateway, I assume, can go into either of these two files.
/etc/sysconfig/network or ...
/etc/sysconfig/network-scripts/ifcfg-eth0

Why should it make a difference?
Is the only difference that the gateway should go in
/etc/sysconfig/network ...
unless you have more than one i/f with each i/f having its own gateway.
In which the gateway should be configured in
/etc/sysconfig/network-scripts/ifcfg-eth1???

I may be making some assumptions...
Can someone point me in the right direction?

Thanks!

 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      03-31-2006, 08:55 PM
On 31 Mar 2006 12:37:50 -0800, (E-Mail Removed) wrote:
> The gateway, I assume, can go into either of these two files.
> /etc/sysconfig/network or ...
> /etc/sysconfig/network-scripts/ifcfg-eth0
>
> Why should it make a difference?
> Is the only difference that the gateway should go in
> /etc/sysconfig/network ...
> unless you have more than one i/f with each i/f having its own gateway.
> In which the gateway should be configured in
> /etc/sysconfig/network-scripts/ifcfg-eth1???
>
> I may be making some assumptions...
> Can someone point me in the right direction?


I suggest putting the default gateway in /etc/sysconfig/network.
That allows you to delete/change eth0 and still not affect default
routing.

Then again, it depends on what distribution you are using and if
static or dhcp.

Your default gateway is normally where to send packets which will do not
route on your LAN. It is usually the next node on the way to the
internet.

If you want to hardcode some routing I'll suggest puting them in
/etc/sysconfig/static-routes
or /etc/sysconfig/network-scripts/route-ethX
depending on your distribution and release/verision.
 
Reply With Quote
 
delphinuscadmus@yahoo.com
Guest
Posts: n/a

 
      03-31-2006, 10:04 PM
Hmmm,

Thank you for the reply!

I'm just curious...
So you are suggesting not to put the gateway in ifcfg-eth0?
Why not put a gateway in each ifcfg-ethx file?
Centralized management?

Thanks again!

 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      03-31-2006, 11:09 PM
On 31 Mar 2006 14:04:15 -0800, (E-Mail Removed) wrote:

> I'm just curious...
> So you are suggesting not to put the gateway in ifcfg-eth0?


Yes.

> Why not put a gateway in each ifcfg-ethx file?


Why maintain gateway in more than one place.

> Centralized management?


Yes. Also allows my custom dhclient-exit-hooks script to run faster and
allows my custom network_ck script to load only one file.


$ cat /etc/sysconfig/network
HOSTNAME=wb.home.invalid
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAYDEV=eth0
GATEWAY=192.168.2.1
 
Reply With Quote
 
delphinuscadmus@yahoo.com
Guest
Posts: n/a

 
      04-01-2006, 01:11 AM
THANKS!!!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GSM GATEWAY proza Broadband 0 08-27-2005 06:56 AM
gateway to gateway vpn clients can connect Nick Windows Networking 4 11-11-2004 10:01 PM
What gateway? Phil Wireless Internet 3 07-08-2004 05:12 PM
help gateway for T1 w64 ips first middle last Linux Networking 0 11-14-2003 05:27 AM
Windows98 Gateway will not accept static gateway Steve Windows Networking 2 09-21-2003 05:45 AM



1 2 3 4 5 6 7 8 9 10 11