[CLUE-Tech] Some RedHat 7.2 questions

Randy Arabie rrarabie at arabie.org
Fri Apr 5 08:13:17 MST 2002


On Fri, 5 Apr 2002, Sean LeBlanc wrote:

> On 04-05 07:32, Randy Arabie wrote:
> > On Fri, 5 Apr 2002, Sean LeBlanc wrote:
> > 
> > > 2. Where and how do I config static IP in RH? I know an unused IP address
> > > range I can select from, and would like to try that.
> > 
> > You can use ifconfig to manually configure your interfaces.  BTW, it is 
> > a standard *nix command, not RH specific.
> 
> Yes, but what happens on a reboot?

Nothing unless you tie the config into your init process.  I thought you were just 
looking for a temporary troubleshooting solution. 

My RH7.1 calls /etc/sysconfig/network-scripts/ifcfg-eth0 during bootup.  
That file looks like this:

[rrarabie at voldemort network-scripts]$ cat ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no

As the BOOTPROTO parameter indicates, it is set up for DHCP.  Change that to "" and then 
set the IPADDR and NETMASK to the proper parameters and you have a static config that 
will persist across reboots.

> Where is the proper place to disable DHCP
> so it doesn't hang on trying to start up eth0? And I'd like the static IP to
> be set on startup, too. 

See above.  I don't know if RH7.2 still uses the 'linuxconfig' interface.  If it does (and 
if you have installed) there is a sort-of-gui to config networking.  I don't know about 
any Gnome or KDE GUIs.

> Also, when I type ifconfig eth0 up, nothing happens
> (after startup is finally done). Ifconfig DOES list eth0 interace (along
> with lo), but no associated IP with it.

Are you passing any other arguments...lie and IP address?

[rrarabie at voldemort network-scripts]$ /sbin/ifconfig --help
Usage:
  ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]
  [add <address>[/<prefixlen>]]
  [del <address>[/<prefixlen>]]
  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]
  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]
  [outfill <NN>] [keepalive <NN>]
  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]
  [[-]trailers]  [[-]arp]  [[-]allmulti]
  [multicast]  [[-]promisc]
  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]
  [txqueuelen <NN>]
  [[-]dynamic]
  [up|down] ...

HTH
-- 
Cheerio!

Randy

================================================================
Randy Arabie
GnuPG Key Info -- 

 Fingerprint: 7E25 DFA2 EF72 9551 9C6C  8AA6 6E8C A0F5 7E33 D981
 Key ID: 7C603AEF
 http://www.arabie.org/keys/rrarabie.gnupg
================================================================




More information about the clue-tech mailing list