LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-14-2005, 11:26 PM   #1
MurphyB2005
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1
Posts: 9

Rep: Reputation: 0
Post How do I configure DHCP??


I am on a college network and i am trying to access the Internet. I am fairly new to Linux although I am a quick learner. I know basics....does anyone know how I can configure my ethernet card?? DHCP will be used. Thanks in advance!!
 
Old 04-14-2005, 11:52 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Become root
Fire up netconfig
Select DHCP when asked ...



Cheers,
Tink
 
Old 04-15-2005, 12:49 AM   #3
MurphyB2005
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1
Posts: 9

Original Poster
Rep: Reputation: 0
I have done that. When it asks for 'hostname' that's any name right? Also, what is domain name? I'm pretty cure its my colleges, csc.edu. I have actually tried copying the stuff I recieved from typing in "ifconfig -a" but it does not let me copy it to my mounted C drive. I typed in /sbin/dhcpcd and nothing happens. eth0 shows up under the ifconfig command. I have my IP address, Default Gateway, DHCP Server addy, and my DNS Server information i recieved from looking at Windows....any further help would be appreciated ) Also, my sound isn't working either....I have an ADI Integrated Audio card. DELL 4550.
 
Old 04-15-2005, 01:11 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
What values does ifconfig display for eth0?
When you run dhcpcd, what makes you say/think
it doesn't work, are you getting any error messages?


Cheers,
Tink
 
Old 04-15-2005, 02:12 AM   #5
MurphyB2005
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1
Posts: 9

Original Poster
Rep: Reputation: 0
/sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:E9:BD:64:13
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1224 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:135188 (132.0 Kb) TX bytes:6490 (6.3 Kb)
Interrupt:11 Base address:0x7000

...and I am getting nothing when i type dhcpcd...it freezes like it's searching then goes back to the prompt.
 
Old 04-15-2005, 02:23 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
You were doing all this as root?
And as far as dhcpcd goes - you can try doing
ifconfig eth0 down
dhcpcd eth0

And then check ifconfigs output again.


Cheers,
Tink
 
Old 04-15-2005, 02:38 AM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 52
dhcpcd doesn't really print messages. it does it's stuff and goes in the background. If you're lucky, then you just run that command, and your network comes up.

Last edited by whansard; 04-15-2005 at 02:41 AM.
 
Old 04-15-2005, 07:34 AM   #8
JaBa
LQ Newbie
 
Registered: Oct 2004
Posts: 13

Rep: Reputation: 0


Does a DHCP_HOSTNAME have to be set ? (check /etc/sysconfig/network-scripts/ifcfg-eth0)
 
Old 04-15-2005, 08:46 AM   #9
marvin00001
Member
 
Registered: Apr 2005
Posts: 59

Rep: Reputation: 15
You dont need a hostname to be set and it does not get set in /etc/sysconfig/network-scripts/ifcfg-eth0 hostnames are set in
/etc/sysconfig/netwrok

To get you ethernet card to use DHCP just go into /etc/sysconfig/network-scripts/ifcfg-eth0 and make sure BOOTPROTO is set to dhcp
and ONBOOT is set to YES HWADDR=Mac addres and type is ethernet and Device is eth0

then run /etc/rc.d/init.d/network restart

Last edited by marvin00001; 04-15-2005 at 08:48 AM.
 
Old 04-15-2005, 02:35 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
There is no /etc/sysconfig in Slackware, what
are you guys talking about? :)


Cheers,
Tink
 
Old 04-15-2005, 03:20 PM   #11
MurphyB2005
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1
Posts: 9

Original Poster
Rep: Reputation: 0
There sure isn't.

Anyway, I have done pretty much everything I can think of and what you all told me to do. I notice at the end of the netconfig program it asks me if I want to set a DHCP Hostname? Grrr!! I am confused...lol.
 
Old 04-15-2005, 03:36 PM   #12
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,091

Rep: Reputation: 45
you probably don't need to set a dhcp hostname...i didn't.
 
Old 04-15-2005, 05:56 PM   #13
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
Quote:
You dont need a hostname to be set and it does not get set in /etc/sysconfig/network-scripts/ifcfg-eth0 hostnames are set in
/etc/sysconfig/netwrok

To get you ethernet card to use DHCP just go into /etc/sysconfig/network-scripts/ifcfg-eth0 and make sure BOOTPROTO is set to dhcp
and ONBOOT is set to YES HWADDR=Mac addres and type is ethernet and Device is eth0

then run /etc/rc.d/init.d/network restart

hehe. in slackware the easiest way to set up dhcp is to run netconfig, as other people have mentioned. but if you want to do it by hand, then open up /etc/rc.d/rc.inet1.conf and each interface has a section (forgive me if it looks slightly different, i'm at work so i can't remember the exact format):

eth1

IP=""
USE_DHCP=""
DHCP_HOST=""


something like that. anyway, all you need is USE_DHCP="yes", so put those three letters in, save and close the file. then restart your internet services from the command line like this:

su
(password)
/etc/rc.d/rc.inet1 stop
/etc/rc.d/rc.inet1 start


you _should_ see dhcpcd start and assign you an ip address before it returns you to the command prompt. you can examine your settings with ifconfig and route -n.
 
Old 04-15-2005, 06:04 PM   #14
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
In /etc/rc.d/rc.inet1.conf you can also setup the gateway, look for a line that says GATEWAY and edit it to your needs.
You don't have to enter anything in DHCP Hostname (when you use netconfig) unless your ISP or the admin of your college said so, this options is rarely used, just leave it blank.
 
Old 04-15-2005, 07:09 PM   #15
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
Quote:
In /etc/rc.d/rc.inet1.conf you can also setup the gateway, look for a line that says GATEWAY and edit it to your needs.

that's a good thing to mention. in my case, my gateway is my linksys wireless router, which is 192.168.1.1. however, i was under the impression that dhcp would assign that automatically...i don't remember ever having to enter the gw until i messed around with static ips. is that right?
 
  


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
Configure dhcpd (Configure DHCP Server) hanserver2004 LinuxQuestions.org Member Success Stories 3 10-23-2006 07:39 AM
Help to configure dhcp vijeesh_ep Linux - Networking 1 12-15-2004 06:24 PM
Configure dhcpd (Configure DHCP Server) hanserver2004 General 1 08-16-2004 02:39 PM
dhcp - configure? rajeshdorai Linux - Networking 7 10-09-2003 04:41 PM
how to configure DHCP farhan Linux - General 3 05-02-2003 07:24 AM


All times are GMT -5. The time now is 07:46 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