Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-21-2002, 09:42 AM   #1
LQ Newbie
Registered: Jan 2002
Posts: 2

Rep: Reputation: 0
Obtaining and IP address dynamicly

I have been trying for a couple of days now to configure a legacy 3com NIC. I need help. I am working with red hat 7.3. I used the netconfig command and selected DHCP, but when I do a ifconfig -a I get the loop-back address and a message stating routing has not been set up. Do I need to add a default gateway and if so where do I do it. I have turned off Ipchain.Is their a dhcp file or service I have to modify. Please help
Old 11-21-2002, 11:40 PM   #2
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30

Just run dhcpcd command and check u are getting IP address are not ?. Also check the logs.

Old 11-22-2002, 09:13 PM   #3
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
There is a simple set of commands to get you started
/sbin/ifconfig eth0 up
will bring the network interface eth0 up, if it isn't first NIC use eth1 and so on
You can add default gateway with
route add eth0 &&  route add default gw
where is gateway
And verify the routing table with
netstat -rn
Old 12-10-2002, 08:48 AM   #4
LQ Newbie
Registered: Jan 2002
Posts: 2

Original Poster
Rep: Reputation: 0
Thank You

Thank you all who responded. I was finally able to obtain an IP address but I had to do it manually. I will try the up command soon on another box of mine. For those who are interested on how this is done here you go.
1. Remove the affected interface from /etc/hosts.
2. Remove the affected /etc/hostname.[interface] file.
3. Create an empty file called /etc/hostname.[interface] file
/etc/hostname.[interface] file
4. create an empty file called /etc/dhcp.[interface].
Where [interface] is the interface that will be the setup for DHCP requests.
5. ifconfig the affected interface down:
# ifconfig [interface] down
6. Reboot the machine.
Upon rebooting, the directory /etc/dhcp will be created that will have a number of files which, together define the DHCP configuration for this machine. DO NOT TOUCH THESE FILES. Note that there will be a change made to the /etc/hosts file. This entry was added by DHCP and should not be removed.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtaining an IP Address Via Instant Messaging Services Permaximus Linux - Security 2 07-14-2005 10:30 AM
problems obtaining an wireless IP address ELconkestador Linux - Wireless Networking 2 01-23-2005 01:56 PM
Help obtaining ip address colombo187 Linux - Wireless Networking 4 12-28-2004 06:29 PM
obtaining a specific ip address from DHCP true_atlantis Slackware 5 09-28-2004 01:12 AM
a question about obtaining address of variable ....... purpleburple Programming 3 07-06-2002 06:28 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration