On Mon, 8 Jul 2002, Ashwin Kutty wrote:

> 
> Try..
> 
> man ifconfig

while ifconfig is the system utility that controls ethernet interfaces,
the clean way to do this is by editing the configuration files for
the ethernet interfaces:

/etc/sysconfig/network-scripts/ifcfg-eth0

and to restart, use the scripts:
/etc/sysconfig/network-scripts/ifdown eth0   and  ifup eth0

The dhcp-client version format of ifcfg-eth0 should look like:

DEVICE=eth0
BOOTPROT=dhcp
ONBOOT=yes

A static IP version looks like:

DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.1.221
NETMASK=255.255.255.0
ONBOOT=yes

If you are going to make a backup of the current ifcfg-eth0 file, I
suggest you don't name it something like:  _ifcfg-eth0  (not 
ifcfg-eth0.bak)

you could also have GATEWAY= set here, but this may be set else where
are by the route add default command, or it may be set in 
/etc/sysconfig/network file along with system hostname).

The scripts:  /etc/sysconfig/network-scripts/ifup  and ifdown can
can be used to "restart" your ethernet card cleanly:  
if-down eth0
if-up eth0
ifconfig   (lists eth0 status)

If you are not going to use a *tool or gui to configure stuff on Linux,
then it's good to learn what the configuration files are (they are 
generally text files or are re-created from text files) and can be 
hand-edited.  That way you always know exactly what you've done to your
system.  I always do it this way, since I have learned over the years
to NEVER trust a GUI config tool, even (especially?) my own!


> 
> On Mon, 8 Jul 2002, [iso-8859-1] cana rich wrote:
> 
> > Hi,
> >
> >     Is some one know what is the command line to
> > change the IP address, the netmask ?
> >
> > THanks for your help.
> >
> > Canarich
> >
> > ___________________________________________________________
> > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> > Yahoo! Mail : http://fr.mail.yahoo.com
> >
> >
> >
> > _______________________________________________
> > Redhat-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/redhat-list
> >
> 
> ---
> "The difference between genius and stupidity is that genius has its
> limits."  - Albert Einstein
> 
> Ashwin
> kutty..
> Systems Administrator
> Dalhousie University Libraries
> (902) 494-2694
> 
> 
> 
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
> 

-- 
***************************************************************************
Jerry Winegarden        OIT/Technical Support           Duke University
[EMAIL PROTECTED]            http://www-jerry.oit.duke.edu
***************************************************************************



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to