LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-21-2002, 08:42 AM   #1
getatmefosho
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, 10:40 PM   #2
siddiqu
Member
 
Registered: Mar 2001
Location: India
Posts: 332

Rep: Reputation: 30
Hi..


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



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

Rep: Reputation: 55
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
Code:
route add xxx.xxx.xxx.x eth0 &&  route add default gw xxx.xxx.xxx.x
where xxx.xxx.xxx.x is gateway
And verify the routing table with
netstat -rn
 
Old 12-10-2002, 07:48 AM   #4
getatmefosho
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].
/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.
 
  


Reply


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 09:30 AM
problems obtaining an wireless IP address ELconkestador Linux - Wireless Networking 2 01-23-2005 12:56 PM
Help obtaining ip address colombo187 Linux - Wireless Networking 4 12-28-2004 05:29 PM
obtaining a specific ip address from DHCP true_atlantis Slackware 5 09-28-2004 12:12 AM
a question about obtaining address of variable ....... purpleburple Programming 3 07-06-2002 05:28 AM


All times are GMT -5. The time now is 12:37 PM.

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