How to set default gateway

Paul Howarth paul at city-fan.org
Tue Jul 19 12:50:11 UTC 2005


Hanny Tidore wrote:
> For the /etc/sysconfig/network-scripts/ifcfg-interfacename, do I
> specify at ifcfg-bond0 only or do I also need to specify at ifcfg-eth1
> and ifcfg-eth2 ?

You specify the netmask for the network interfaces you are using, which 
would be eth0 and bond0. The two may be different.

> For /etc/sysconfig/network, do I have to specify the netmask of the
> default gateway ?

The default gateway is the IP address of the router that forwards 
packets to places you don't have explicit routes for. It's a single 
address, not a network, and so it does not have a netmask. When you 
specify a gateway, a default route will be set up with destination 
0.0.0.0, netmask 0.0.0.0 and your specified gateway address. You don't 
need to specify anything else.

P.S. Please do not top-post on this mailing list.

Paul.




More information about the fedora-list mailing list