LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2004, 02:52 PM   #1
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Rep: Reputation: 15
manual setup of dhcp client


I configured a linux server completely
(internet sharing, samba, postgresql, tomcat, apache, ...)
and by some very stupid mistake I lost my internet setup.

Running the wizard in the control centre doesn't help a thing ...

I run mandrake 10,
and connected with a cable modem to the internet.

where can I check things,
what must I do to have my internet connection back ?

I had a (small) spare disk that I plugged in just to get on the net again ...
strangely, when installing mandrake, the wizard does its job ...

Please help me out here
 
Old 09-03-2004, 03:26 PM   #2
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
I am assuming that you are connecting with a Ethernet (CAT 5 wire)? And it is eth0? And that you are using DHCP to get your IP?

If so than you need to edit: /etc/sysconfig/network-scripts/ifcfg-eth0

to have this in it:

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

This will enable the device during boot and get your IP via DHCP...

Andrew
 
Old 09-03-2004, 04:56 PM   #3
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
[root@d576a741 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
MII_NOT_SUPPORTED=no
WIRELESS_ENC_KEY=""
NEEDHOSTNAME=yes

[root@d576a741 etc]# cat resolv.conf
search pandora.be
nameserver 195.130.130.2
nameserver 195.130.130.130

the content of the files like I found them
still no connection to the internet ...
 
Old 09-03-2004, 05:17 PM   #4
NLR
Member
 
Registered: Jun 2004
Posts: 103

Rep: Reputation: 15
post results of ifconfig please
 
Old 09-04-2004, 01:57 AM   #5
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
please bear in mind every time you ask something like this,
I need to power down, change cables of the hard discs,
boot again
check what you want to know, put it on file,
power down, change back hard discs,
boot again,
and finally come online to give you the result

ifconfig is very popular, but the information it gives for this ...
sure, no ip address in there, no surprice there

[root@localhost pelgrim]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:EA:6D:1C
inet6 addr: fe80::250:baff:feea:6d1c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3423 (3.3 Kb) TX bytes:2088 (2.0 Kb)
Interrupt:11 Base address:0x1400

eth1 Link encap:Ethernet HWaddr 00:05:5D:84:250
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::205:5dff:fe84:25d0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:5180 (5.0 Kb)
Interrupt:3 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:118 errors:0 dropped:0 overruns:0 frame:0
TX packets:118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8632 (8.4 Kb) TX bytes:8632 (8.4 Kb

I know, you only try to help ...
whatever it is,
I checked a few files in the configuration
(I don't know much about linux cofiguration ...)
and I can't find the differenence between the my server setup
not able anymore to get on internet
and the setup on this harddisc ...
 
Old 09-04-2004, 02:06 AM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Try running (assuming eth0 is the interface that connects to the Internet):

dhcpcd eth0

or possibly

dhclient

and see what errors are reported, or whether it will magically start working.
 
Old 09-04-2004, 06:36 AM   #7
pelgrimforever
Member
 
Registered: Aug 2004
Location: Pelgrim"s home
Posts: 140

Original Poster
Rep: Reputation: 15
dhcpcd command does not exist

chclient solved the problem.

Thanx.
I would apriciate if you can explain me what happened ?

Here's my story:
I got almost no discspace anymore,
and somebody adviced me to run dd ??? "ls"
command, I don' t know the ??? paramter anymore.
by mistake I thought dd created a file called "ls"
I deleted that file.
Let it be that I was by accident in the bin directory,
yup, I immediatly realised wich huge stupid mistake I made
the moment I pressed enter.
too late, ls was gone,
and when rebooting the ls command is needed to read the
network configurations.
So I got my spare harddisk, installed linux on it just to get ls back,
coppied it to the bin dir
(what i newby all does :+)
but the network was gone ...
 
  


Reply



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
Trying to setup up SUSE 9.3 as DHCP, But Client recieves no IP Th3James Linux - Networking 6 10-08-2005 08:23 AM
DHCP - client setup Mandrake 9.2 ChrisHax Linux - Networking 1 08-07-2004 06:27 AM
Network configuration DHCP/manual pe2338 Linux - Networking 1 08-14-2003 06:21 AM
DHCP, Manual IPs, NAT?? RWild Linux - Networking 6 01-19-2003 08:55 PM
manual setup for dhcp sever using redhat 7.0 for newbie Shaun Linux - Networking 1 06-07-2002 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration