Static IP

Scott Mertens smertens at mho.com
Tue Apr 12 19:11:53 UTC 2005


On Tue, 2005-04-12 at 11:35 -0700, Rick Stevens wrote:
> Scott Mertens wrote:
> > On Tue, 2005-04-12 at 10:55 -0700, Rick Stevens wrote:
> > 
> >>Scott Mertens wrote:
> >>
> >>>On Tue, 2005-04-12 at 10:21 -0700, Rick Stevens wrote:
> >>>
> >>>
> >>>>Scott Mertens wrote:
> >>>>
> >>>>
> >>>>>On Tue, 2005-04-12 at 10:00 -0700, Rick Stevens wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Scott Mertens wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>New Linux User:  Red Hat Enterprise Linux ES release 4 (Nahant)
> >>>>>>>
> >>>>>>>I am in the process of setting up Printer sharing on this Linux box for
> >>>>>>>WIN XP users. I think some of my problems might be resolved if I can set
> >>>>>>>up a static IP for this box.  Currently it gets one from a Linksys
> >>>>>>>router connected to ISP.
> >>>>>>>
> >>>>>>>How can I tell Linux to use a static IP, but use DNS and other info
> >>>>>>>provided by ISP/Linksys router?
> >>>>>>
> >>>>>>First off, get into the router and write down the DNS info it uses.
> >>>>>>Also check the router's "DHCP Pool" (those are the addresses that the
> >>>>>>DHCP server will give out) and the router's IP address and netmask.
> >>>>>>
> >>>>>>Run "redhat-config-network" (or "RedHatIcon->System Settings->Network"
> >>>>>
> >>>>>>from the Gnome GUI) and configure the NIC for a fixed IP address.  You
> >>>>>
> >>>>>
> >>>>>>will want to select a fixed IP that is NOT in the DHCP pool for the
> >>>>>>router.  Your netmask will probably be 255.255.255.0, but use the one
> >>>>>>you saw that the router was using.  Your default gateway will be the
> >>>>>>router (usually 192.168.0.1) and you'll put in the DNS servers you
> >>>>>>grabbed from the router.  That should be it.
> >>>>>
> >>>>>
> >>>>>Thanks, I'll give that a try.
> >>>>
> >>>>Go for it, Scott.  We'll be waiting for a status report.
> >>>
> >>>
> >>>Is there just a file I can edit?  My practice is to always make a backup
> >>>of files before editing, and I'm not sure the GUI will do that.  Also
> >>>running the following as you suggest throws an error.
> >>>
> >>>[root at RHServer01 ~]# redhat-config-network
> >>>-bash: redhat-config-network: command not found
> >>
> >>That's odd.  Hmmm.  Try "system-config-network".  One or the other
> >>should be in /usr/bin.
> >>
> >>Anyway, yes, you can edit files if you wish.  You're interested in
> >>these two files:
> >>
> >>	/etc/sysconfig/network
> >>	/etc/sysconfig/network-scripts/ifcfg-eth0
> >>
> >>/etc/sysconfig/network contains three lines generally.  Here's a typical
> >>file:
> >>
> >>	NETWORKING=yes
> >>	HOSTNAME=hostname.domainname.tld
> >>	GATEWAY=xxx.xxx.xxx.xxx
> >>
> >>The values in there should be pretty obvious.  Put your desired hostname
> >>as the value of the "HOSTNAME=" line, and the IP address of your gateway
> >>in the "GATEWAY=" line (as I said, your gateway is probably
> >>192.168.0.1, but use whatever the router's LAN port's address is).
> >>
> >>The second file, /etc/sysconfig/network-scripts/ifcfg-eth0, sets up the
> >>specifics for your NIC.  The only data that is REQUIRED in that file
> >>are the following:
> >>
> >>	DEVICE=eth0
> >>	BOOTPROTO=static
> >>	IPADDR=xxx.xxx.xxx.xxx
> >>	NETMASK=yyy.yyy.yyy.yyy
> >>	ONBOOT=yes
> >>
> >>Make sure you set the "DEVICE=" to the proper device.  If you only have
> >>one NIC, then "eth0" is the right value (it should match the name of the
> >>file).
> >>
> >>"BOOTPROTO=static" is what makes the device use a static IP rather than
> >>one from DHCP (which is triggered by "BOOTPROTO=dhcp").  Obviously, you
> >>put your desired IP address in the "IPADDR=" line and your netmask in
> >>"NETMASK=".
> >>
> >>The final line, "ONBOOT=yes" tells the system to bring up this interface
> >>at boot time.
> >>
> >>Once you've got all that set up, do "/etc/rc.d/init.d/network restart"
> >>and the system should switch over to your new network settings.
> > 
> > 
> > Thanks system-config-network did work.  And if this message goes
> > through, the setup and file edits worked as well.
> 
> We see the message, so apparently they did.
> 
> Regarding the name of the script, Ah, HAH!  Sneaky of them!
> 
> HISTORY:  Red Hat Linux (RHL) 8.0 and 9 had those scripts named
> "redhat-config-whatever".  Fedora Core 1 also used that nomenclature
> (since it was going to be Red Hat Linux 10, before Red Hat decided to
> go fully commercial).
> 
> Fedora Core 2 started using "system-config-whatever" to differentiate
> it from RHL or RHEL.  I know that RHEL4 is based on Fedora Core 2, but
> since Fedora isn't an "official" Red Hat product, I had (wrongly)
> assumed they had reverted to calling them "redhat-config-whatever" to
> pull them back into the Red Hat product range.  That's what I get for
> making assumptions. Now I know better and I thank you for the education.
> 
> (I am now kicking myself--quite a feat for an old geezer like me)

I wasn't aware Redhat went commercial. I most likey got duped as I
called Rh and told them I wanted to set up a file and Print server in
RH, and was told I needed this RHEL4 or I couldn't set up a print server
win Windows Clients.  Then I found these boards. Looks like it happened
back to front for me.

So I purchased - I think as much as I hate using support, I'll get my
monies worth.  However most days you just don't have time to sit on hold
and wait for a tech.  Most days I have time to send email in questions,
then MAYBE check during the day for replies, today is an exception.

I did buy a book on RHES, and it came with 4 CD's for FC.  Problem was 2
CD's were numbered Disc #1, and 2 CD's were numbereed Disc #4.  I
somehow didn't think that would work.

Thanks again, I really like Linux as it makes me think, and when I'm
brain dead others on these boards help me think.

> 
> > Great board for us beginners.  Appreciate all the help!!
> 
> "That's what we're here for!" (c)2005, Red Hat Install List  :-)
> ----------------------------------------------------------------------
> - Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
> - VitalStream, Inc.                       http://www.vitalstream.com -
> -                                                                    -
> -        Brain:  The organ with which we think that we think.        -
> ----------------------------------------------------------------------
> 
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request at redhat.com
> Subject: unsubscribe




More information about the Redhat-install-list mailing list