Skip navigation.
Home
Now Shipping Version 7.0

Using dhcpcd as a DHCP client by default

omnio's picture

Posts: 6

Hello,

So far I tested several distros using different DHCP clients, and for some strange reasons those using dhclient (including Mepis) fail to get correctly the IP addresses from the ISPs. The received IPs are far from the right ones, e.g. if the machine should get 10.10.2.14 it receives something like 192.168.1.12. Fortunately this doesn't happen when the DHCP client used is dhcpcd. I also have some Gentoo boxes around which use dhcpcd by default and they always receive the correct IP addresses.

Maybe the users can replace by themselves dhclient with dhcpcd (even though when I tried it seemed to be impossible due to some dependency problems related to the Mepis tools/ utilities), but the point for Mepis is to use dhcpcd by default. Searching the forums I saw that someone else had this problem and managed to get the correct IP after switching to dhcpcd; and this happened to me so many times (and I saw it happening to other people too). Maybe when it comes about the ISPs in the US dhclient works fine but I strongly doubt this is also the case for Europe (or generally, the rest of the world). And since the target users for Mepis are also the beginners I think DHCP should work out-of-the-box.

Please consider this option.

Thank you guys.

Ko Bros's picture

it works fine

I live in Europe too, have used Mepis for three years now and only have had one problem getting an IP assigned with DHCP in Mepis 2004.4. It was partly solved then by replacing the existing dhcp client 'pump' with 'dhcpcd'. At that time Mepis was still based on Debian.

After that the Mepis DHCP client implementations have never failed in correctly assigning IP-addresses and connecting to the internet on bootup.

The problem you have depends on :
#1. how your router (or ISP gateway) has been setup. My router also assigns IP's in the 192.168.1.xx range, but I could change that to another range to be used.
#2. the different interaction of dhcp-clients used.

Since you state that changing dhcp-client is not feasible without running into dependency problems with Mepis Tools/utilities, I recommend that you look into option #1

regards, Ko

Ko Bros

omnio's picture

I was rather reffering to

I was rather reffering to the cases when the user (i.e. the Mepis machine) connects directly to the internet. Should I make a call to the ISP and tell them to change their router/gateway configuration? I don't think they will.

However this happens with more than one single ISP. I see this happening all around me, and different people I know use different ISPs. And the problem is the same. Dhcpcd works, dhclient doesn't.

Sorry, but just because it works for you doesn't mean that it works fine anywhere else. Think of it statistically. In addition, if the default DHCP client is replaced, you will have nothing to loose (your machine will still work fine), but others will gain a lot. And this is more than just statistics.

Cheers.

Ko Bros's picture

Your ISP......

omnio wrote:
I was rather reffering to the cases when the user (i.e. the Mepis machine) connects directly to the internet. Should I make a call to the ISP and tell them to change their router/gateway configuration? I don't think they will.

However this happens with more than one single ISP. I see this happening all around me, and different people I know use different ISPs. And the problem is the same. Dhcpcd works, dhclient doesn't.

Sorry, but just because it works for you doesn't mean that it works fine anywhere else. Think of it statistically. In addition, if the default DHCP client is replaced, you will have nothing to loose (your machine will still work fine), but others will gain a lot. And this is more than just statistics.

Cheers.

If your PC connects directly to the internet and your ISP dynamically assigns you an IP in the 192.168.xx.xx range then there's definitely something wrong with your ISP.
That range is reserved for internal networks. Your dynamically assigned IP-number should be in the same range as your ISP Gateway IP number.

As to statistical validity of what i said: you've come to the right guy; it's not just me, but also several 100 others that I know of -in Europe- who have no problem with getting
a correct IP using Mepis. With either dhcpcd or dhclient.

My current (external) IP is something like 83.xx.yy.zz, but for all machines behind my router they are 192.168.1.zz. My router assigns the (internal) IPs, not my ISP. If I would change my router settings I could get IPs like 10.10.2.xx too. But there's no need. They're just internal ranges.

Ko

Ko Bros

omnio's picture

Not really

Ko Bros wrote:

If your PC connects directly to the internet and your ISP dynamically assigns you an IP in the 192.168.xx.xx range then there's definitely something wrong with your ISP.

I said "the machine should get 10.10.2.14" (the correct IP), "it receives something like 192.168.1.12" (the wrong IP). I am reffering to the cases when first is received a dynamic IP (in an internal network range, you're right) from the ISP, and then the real internet connection follows, using PPPOE (and involving a real-world IP, like 83.xx.yy.zz). Both IP's are assigned from the ISP. This setup is common to A LOT of ISPs which offer internet connections to their clients via PPPOE.

Ko Bros wrote:

there's definitely something wrong with your ISP

As I already said (many times), it's NOT about ONE SINGLE ISP.

And again: just because it works for you (or other 100) doesn't mean that it works everywhere.

Jon Du Quesne's picture

Clarification Please

First off omnio, Ko is not claiming that it works for him therefore it should work for you. He is trying to narrow down exactly where/what the problem is.

Now, a little clarification. If you are hooking your computer directly to the Internet with no intervening boxes of any kind, you should not be served a 192.168.x.y or 10.x.y.z number. Both of those sequences are reserved for INTERNAL, NON-SWITCHING USE. They are to be used by "private networks only", such as behind a firewall. The only IP address that should be served up to you by any external ISP should be in some other sequence. The 10.x.y.z subnet is just a larger subnet than 192.168.x.6, but they are used for the same purpose. Your ISP should not be issueing 10.x.y.z numbers.

Here is a Wikipedia article explaining private networks:
Private network - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Private_network

So, if you are, in fact, getting some of these numbers, then I would start to suspect that there might be some other box on the network handing out IP addresses (that is not from your ISP). It might be worth a call to your friendly ISP helpdesk Smiling

Jon

No computer is magic, no operating system is magic, no website is magic. They all require human interaction, thought, and responsibility to work.

omnio's picture

Clarification - PPPOE

Well, sorry if some frustration is felt into my posts. Now let's get to the facts.

Jon Du Quesne wrote:
If you are hooking your computer directly to the Internet with no intervening boxes of any kind, you should not be served a 192.168.x.y or 10.x.y.z number. Both of those sequences are reserved for INTERNAL, NON-SWITCHING USE. They are to be used by "private networks only", such as behind a firewall. The only IP address that should be served up to you by any external ISP should be in some other sequence. The 10.x.y.z subnet is just a larger subnet than 192.168.x.6, but they are used for the same purpose. Your ISP should not be issueing 10.x.y.z numbers.

I totally agree; this is just how networks work.

I think that the one thing which is not clear enough here is that my ISP (and others' too) doesn't provide an IP like 10.10.x.y to use for internet connectivity. As you both correctly stated, this is a private/internal IP and can't be used for internet connectivity. In this discussion, the subject are the users who access the internet via PPPOE. As you guys know, usually when someone dials to his/her ISP (using PPPOE) gets an unique IP (like 83.x.y.z) to use on the internet. And this is fine, this is indeed an IP to use on the internet and the connection is indeed to the internet.

The problem is somewhere else. BEFORE dialing to the ISP and getting the mentioned IP (which is fit to the internet), the users connect to their ISP using DHCP and get a private/internal IP like 10.10.x.y. This IP has a meaning only in the internal network of the ISP, and is NOT for use on the internet. This is just a previous step, before dialing to the ISP and getting the "real" IP to use on the internet. And this is where dhclient sometimes fails, but dhcpcd always works. Actually all the people I know who use PPPOE (on different ISPs) use these two steps, and sequentially, get these 2 IPs (one internal - attached to eth0, let's say, and after that the real IP, attached to ppp0). As much as I saw by now, this is just how PPPOE works. I hope you guys have seen cases like this before.

And please, do not insist that I should make a call to my ISP, it's not only my ISP which uses this setup.

All I'm trying to say here is just that dhcpcd works with more setups, and a lot of people will benefit from switching to it since a lot of people use PPPOE, for example, and during the first step of making a connection use DHCP.

Cheers and thanks for reading

Jon Du Quesne's picture

Thank You

Thank you for clarifying

Jon

No computer is magic, no operating system is magic, no website is magic. They all require human interaction, thought, and responsibility to work.

omnio's picture

Well I guess it was

Well I guess it was necessary. Anyway, there would be no point for me to post in the Development section if this was an isolated case.

Cheers.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.