Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-18-2002, 06:14 AM
|
#1
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Rep:
|
problems connecting to dhcp server
Hi there,
First of all I would like to say that I don't know what my problem exactly is, so don't kill me for being vague.
A few day's ago, I booted my computer and typed "dhcpcd" to connect my self to the dhcp server of my ISP. But it just woulden't connect. So I called the help desk of my ISP and asked what was wrong. I told him the problem and that I have a dual boot machine (linux and windows xp). He told me the problem was probably because of a ip violation. I have never heard of this, maby someone here has. Anyway he told me to unplug my cable modem for 35 minutes and the problem should get solved. So I did and indeed, after 35 min. I had a connection again.
So I was finish'd with what ever I was doing and halted my computer. Later that day my brother booted to windows and did some stuff on the net (mostly kazaa). After that I booted to linux again and I had the same prob. all over again. Unplugging the modem again resolved the problem.
Today, I boot up again and, well you know, there is the problem again. To check I booted to windows and it to can't connect.
What is going on? How can I solve the problem? I called the help desk again, but they coulden't tell me anything useful. What I did thought of is putting a router between my computer and the ISP, but in my case, that's not a feasible solution.
The core of the problem I thinks is that the dual booting is the problem. Ate the help desk they said that connecting the cable modem to another computer can result in problems. I guess that when windows is booted, my computer is seen as another computer then when linux is booted.
How do I solve this problem?
Some helpful info:
NIC card: usb network adapter
OS1: debian linux
OS2: windows XP
And i'm getting a dynamic IP adress from the dhcp server.
|
|
|
12-18-2002, 12:08 PM
|
#2
|
Member
Registered: Dec 2002
Location: NC (no comment)
Distribution: Psyche (RH8.0) / LFS / OS X.2 / MDK 9.0 / Win2k Server
Posts: 49
Rep:
|
More than likely, when you disconnect from the internet, the dhcp server isn't releasing your ip address. So, when you reconnect with a new computer, the dhcp server thinks you have an ip address based on your mac address and your computer doesn't know what it is, because that OS didn't get the address.
|
|
|
12-18-2002, 03:35 PM
|
#3
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
Um...
>the dhcp server thinks you have an ip address based on your mac address
His MAC address hasn't changed. The MAC is unique to the network card he's using. It's not something that can change.
Added to which, the ISP shouldn't care about the mac on the other end of the cable modem - they care about the one the cable modem presents to their internal network - it's through that, that they hand out IP's, track your usage, and other nefarious stuff.
The fact that you're experiencing the same problem in Windows and Linux leads me to believe it's an issue with your cable modem.
The fact that it works if you unplug, leave, and return (the cable modem 'loses' it's information after a period of being unplugged and re-asks for it) leads me to believe it's a cable modem issue, not an OS issue.
You shouldn't have to type 'dhcpcd'. Your network scripts should pick up that you're configured for dhcp and run it for you. You can run :
/etc/init.d/network restart
or
ifconfig /renew
to force a renewal of your dhcp lease. Either way I don't think it's your OS that's the problem.
My only caveat here is that you're using a USB adapter and I have absolutely no idea how they work, and wether they're flaky or not.
If you happen across the problem again the techs can 'ping' your cable modem to make sure it's ailve. They can also reset it remotely (you can watch the pretty lights flashing) and ensure it's not an issue with a futzed up cable modem config. (I've seen it happen).
Slick.
|
|
|
12-18-2002, 04:53 PM
|
#4
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
" You shouldn't have to type 'dhcpcd'. Your network scripts should pick up that you're configured for dhcp and run it for you. You can run :
/etc/init.d/network restart"
There are a few things I want to aks about this.
1) I didn't configure anything for dhcp. I didn't know I had to.
2) Should I do "/etc/init.d/network restart" every time I want to connect to the internet?
3) I don't have that peticular file. I do have "/etc/init.d/networking". Is that what you mean?
|
|
|
12-18-2002, 05:11 PM
|
#5
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
Hi there bobo_daclown, so if i'm reading right, you are saying that the dhcp server is assuming that the ip adress is know to my OS because it's based on the MAC adress of my NIC card. But now the OS has changed things have gone wrong. Is that what you are saying?
You said : " So, when you reconnect with a new computer, the ..." But so you know, I did'nt reconnect with a new computer. I only have one.
P.S. I want to thank both you guy's for the help
Last edited by qanopus; 12-18-2002 at 05:14 PM.
|
|
|
12-18-2002, 05:28 PM
|
#6
|
Member
Registered: Dec 2002
Location: NC (no comment)
Distribution: Psyche (RH8.0) / LFS / OS X.2 / MDK 9.0 / Win2k Server
Posts: 49
Rep:
|
Okay first off: You have a cable modem which is basically a PPP adapter to your ISP. That device has a MAC address (i'd bet heavily on it).
Now, my mistake was in thinking that it was internal. If it is, I would say that my earlier suggestion holds. If the cable modem is external, then I won't be so bold.
|
|
|
12-18-2002, 05:46 PM
|
#7
|
LQ Newbie
Registered: Dec 2002
Location: Argentina
Distribution: Fedora Core 1
Posts: 15
Rep:
|
I've had the same problem here. I think that the problem is with the modem that maintains the IP address. You have to force it to request another IP (I don't remember how)
As I'm not an expert take it as it is, just a hint
|
|
|
12-18-2002, 06:04 PM
|
#8
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
No the cable modem is external.
But wait a minute, could it help if I were to ask a different kind of a cable modem? If so, what kind should I get?
Last edited by qanopus; 12-18-2002 at 06:09 PM.
|
|
|
12-18-2002, 06:06 PM
|
#9
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
serquicia, if you can come up with ANY thing, I would be really greatfull
|
|
|
12-19-2002, 09:39 AM
|
#10
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
I'm going to back away from this one slowly I think.
That you don't have any network script leads me to believe that your machine isn't um.. networking. Quite how you're getting the USB network card to work I have no idea - I've never had one and wouldn't touch one with a bargepole.
Ordinarily (if you had an ethernet card instead of a USB) you'd have a script :
/etc/sysconfig/network-scripts/ifcfg-eth0
which would contain a line :
BOOTPROTO=dhcp
That is enough to let your machine do the client request.
You might want to look in the above directory for something like : ifcfg-usb
I know they have configurations for wireless and suchlike in there. If you see it, then try running ./ifup-usb
ifup <device> will 'activate' the device and if it needs an address go fetch one (Normally via dhcpcd)
Other than that I really don't know what to tell you. If your modem has an ethernet jack in the back (mine has both USB and ethernet) you might want to consider getting a 'real' network card for your pc, and running a bit of cable to the network jack instead of the USB.
You would then need to configure the networking on your machine with you can do by :
1) setup
2) select Network Configuration
3) click 'use dhcp'
4) Ok, Ok,
5) /etc/init.d/network start
Bob's your long lost uncle from Iowa.
Slick.
|
|
|
12-19-2002, 10:51 AM
|
#11
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
"Quite how you're getting the USB network card to work I have no idea"
It's quite simple. You plug it in and if you are using a 2.4.19 or later kernel, a driver named pegasus will automatically recoginse the ethernet adapter. At boot-up, You will see somthing like :
"usb: eth0: SOHOware nub 110"
You will have a divice called eth0 which can be aproached as a normal ethernet card.
" You would then need to configure the networking on your machine with you can do by :
1) setup
2) select Network Configuration
3) click 'use dhcp'
4) Ok, Ok,
5) /etc/init.d/network start"
I don't quite understand what you are talking about here. Should I be in KDE to do this or gnome, or somthing else? And then what. Click on "setup" where.
|
|
|
12-19-2002, 03:11 PM
|
#12
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
>Should I be in KDE to do this or gnome
Oh.. um... Oops. No. This is all on the command line.
Run a terminal, and type it. I'm sure there's a gnome / kde clicky program you could use aswell, but I'm a command line person
>Click on "setup" where.
No clicky... type.
[edit]
When I say 'click use dhcp' what you actually need to do is press 'TAB' until it's highlighted, then hit space to select it.
[/edit]
Did you find anything usb related in your /etc/sysconfig/network-scripts
or an ifcfg-eth0?
Slick.
Last edited by SlickWilly; 12-19-2002 at 03:13 PM.
|
|
|
12-19-2002, 05:10 PM
|
#13
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
Not that I don't apriciate the help, but nothing what you told me to do works.
I have to type in "setup" in a terminal? But that will give me a "command not found"
I don't have a "sysconfig" directory in "etc" or any were else for that matter. I can't find a file called "network-scripts". I looked with "locate". And "ifcfg-eth0" is equally invisible to me.
What I did found was :
/etc/dhcpc/dhcpcd-eth0.cache
/etc/dhcpc/dhcpcd-eth0.info
/etc/dhcpc/dhcpcd-eth0.info.old
/etc/dhcpc/dhcpcd-eth0.pid
But something just happend a while ago.
I booted my computer in to linux and tried to connect to the dhcp server, which, like before, it coulden't. Then I tried what was sugested before :
"/etc/init.d/networking restart"
and then
"dhcpcd"
and voila, go connection. I still don't know what's giong on, but I set a step in the right direction, with the help of some buddies over the net ofcource
Last edited by qanopus; 12-19-2002 at 05:12 PM.
|
|
|
12-20-2002, 10:23 AM
|
#14
|
Member
Registered: Dec 2002
Posts: 327
Rep:
|
Oh slap me with a wet fish...
My bad, I've been incorrectly giving you directions for a RedHat system. setup, /etc/sysconfig and others are all Redhat specific. And you quite clearly state in your first post that you're using Debian. I shall ritually disembowel myself as soon as I've hit send..
From what you've said it sounds like your network interface isn't being picked up by dhcp in your network scripts.
Now, I dont' know where Debbi puts 'em. But try searching your file system for ifcfg-eth0 and look in there for the BOOTPROTO I mentioned earlier.
The files you mention in dhcpc are those used by the client. The .info contains your current information, the pid is the number of the process currently running, and the cache is a stack of old addresses you've been given which it'll try to use if you can't get a current one.
Anyone else know where Debian puts their network scripts?
Slick.
|
|
|
12-20-2002, 02:39 PM
|
#15
|
Senior Member
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358
Original Poster
Rep:
|
He man, give your self a break. No big deal!
I tried looking for "ifcfg-eth0" but I coulden't find it. I look again and report back.
And I must say this : I don't understand jack shit about my situation and this is why:
Ten minutes ago, I tried to get on the net again, but as so often I got stuck. I tried doing "/etc/init.d/networking restart" but this time, it did'nt work. It just say'd " reconfigureing network interfaces" and just sat there. But you might wonder how the hell i'm writing this message know, right? Well, what I did is I poped a debian knoppix CD in my box and booted from it. Typed "dhcpcd" at the prompt which didn't work. But doing "/etc/init.d/networking restart" and the "dhcpcd" did work. As you can imagin, i'm VERY "confused". To make a long story short I just wan't to ask : WHAT THE HELL IS GOING ON ?????
|
|
|
All times are GMT -5. The time now is 03:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|