Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux as a DHCP client. -- Config Help!!

Status
Not open for further replies.

Rockman75

Technical User
Nov 2, 2002
17
US
Hi, Anyone!!

I use RedHat 7.2 and am trying to connect the Internet as a client Linux, direct point-to-point connection to the cable modem. I will be a DHCP client of my ISP.
Anyways, my FILE is configured as
------------------------------------------------
cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp

cat /etc/sysconfig/network
NETWORK=yes
HOSTNAME=localhost.localdomain

/etc/rc.d/init.d/network restart <-- Command.

Then I type, ifconfig eth0, and result is.
inet addr: 192.168.0.1 <-- shows old ipaddress.

Why is this? This should be no IP address since this machine is a DHCP client. I cant erase this address from eth0.

I did ifdown-eth0, ifup-eth0
eth0 ....... [failed] <-- Never been OK!!

So, eth0 still shows old static IP address, but configured as DHCP in a text file, and never able to obtain IP address from my ISP.

Question:
1. Am I missing any other configuratoin?
2. Is there a way to delete/add eth0 port or IP address?

Please let me know if anyone could help!
Thank you




 
You might be able to use "setup" to configure your network. If you don't run X, "setup" will provide an ansi graphics interface to help you setup parts of your system. Just type "setup" at the shell prompt.
 
I don't use a cable-modem, but dsl, and I'm no dhcp-profi.

But I get an IP by dhcp from my ISP which is bound to ppp0 - a 82.83.x.y-Adress, and still have a static local network adress 192.168.j.k .

Perhaps you try 'ifconfig' and look at all the output?


seeking a job as java-programmer in Berlin:
 
Also,
You may have to set the hostname to something specific to your cable provider. @Home for example needs your cc number to be able to give you a dhcp lease.
 
Try running the following to grab an IP from their DHCP server on /dev/eth0...

Code:
/sbin/pump -R -i eth0

ChrisP
RHCE, LPIC-1, CCNA, CNE, MCSE, +10 others
 
Can't you just type "netconfig" at the prompt, and select DHCP while you're setting it up?

deletion mistake
no I can't recover that
you didn't save it

-Shrubble
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top