Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   NetworkManager, DHCP and DNS (http://www.linux-archive.org/archlinux-general-discussion/708818-networkmanager-dhcp-dns.html)

"Guillermo Leira" 10-01-2012 05:03 PM

NetworkManager, DHCP and DNS
 
Hello!

I have been using wicd for a long time. I have installed and enabled
NetworkManager service (with systemd). It seems to work, but I have found
that when asking for a DHCP address, it does not register the conexion in
the DNS server (as wicd does). I can't find anything about this issue...

I have gone back to wicd, but it can't connect to my office's wifi (or I
have been unable to configure it) and NetworkManager worked at the first
attempt.

Any suggestions?

Best Regards,

Guillermo Leira

Ike Devolder 10-01-2012 06:18 PM

NetworkManager, DHCP and DNS
 
On Mon, Oct 01, 2012 at 07:03:50PM +0200, Guillermo Leira wrote:
> Hello!
>
> I have been using wicd for a long time. I have installed and enabled
> NetworkManager service (with systemd). It seems to work, but I have found
> that when asking for a DHCP address, it does not register the conexion in
> the DNS server (as wicd does). I can't find anything about this issue...
>
> I have gone back to wicd, but it can't connect to my office's wifi (or I
> have been unable to configure it) and NetworkManager worked at the first
> attempt.
>
> Any suggestions?
>
> Best Regards,
>
> Guillermo Leira
>
>
>
>
>
>
>

Hello,

Are you using NetworkManager with dhclient ?
NetworkManager with dhcpcd should give you no issues since dhcpcd sends
the hostname along with the dhcp request.

dhclient does not with the defaults given by NetworkManager.
You can easily create a default /etc/dhclient.conf with content:

--- dhclient.conf ---
send host-name = pick-first-value(gethostname(), "ISC-dhclient");
--- dhclient.conf ---

the above is just a copy from the example configuration.

if you have eth0, eth1, ... just create a symlink in etc since
NetworkManager will pick up the /etc/dhclient-eth0.conf for eth0

ls -l /etc/dhclient.conf /etc/dhclient-eth0.conf

if you have a dhcp which registers the clients to your dns server all
should work fine now.

--
Ike

Jan Steffens 10-01-2012 10:54 PM

NetworkManager, DHCP and DNS
 
On Mon, Oct 1, 2012 at 8:18 PM, Ike Devolder <ike.devolder@gmail.com> wrote:
> Are you using NetworkManager with dhclient ?
> NetworkManager with dhcpcd should give you no issues since dhcpcd sends
> the hostname along with the dhcp request.
>
> dhclient does not with the defaults given by NetworkManager.

Actually, it does. Here, /var/run/nm-dhclient-wlan0.conf contains:

# Created by NetworkManager

send host-name "philomeena"; # added by NetworkManager

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer 8;
option wpad code 252 = string;

also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request wpad;
also request ntp-servers;

---

"philomeena" being the hostname of my laptop.

Ike Devolder 10-02-2012 04:44 AM

NetworkManager, DHCP and DNS
 
On Tue, Oct 02, 2012 at 12:54:24AM +0200, Jan Steffens wrote:
> On Mon, Oct 1, 2012 at 8:18 PM, Ike Devolder <ike.devolder@gmail.com> wrote:
> > Are you using NetworkManager with dhclient ?
> > NetworkManager with dhcpcd should give you no issues since dhcpcd sends
> > the hostname along with the dhcp request.
> >
> > dhclient does not with the defaults given by NetworkManager.
>
> Actually, it does. Here, /var/run/nm-dhclient-wlan0.conf contains:
>
> # Created by NetworkManager
>
> send host-name "philomeena"; # added by NetworkManager
>
> option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
> option ms-classless-static-routes code 249 = array of unsigned integer 8;
> option wpad code 252 = string;
>
> also request rfc3442-classless-static-routes;
> also request ms-classless-static-routes;
> also request wpad;
> also request ntp-servers;
>
> ---
>
> "philomeena" being the hostname of my laptop.

well then for the people where networkmanager is not so nice to:
the following is an actual example and consistent over all my machines
with dhclient (4 desktops having the exact same output)

--- /var/run/nm-dhclient-eth0.conf --- (without dhclient-eth0.conf)
# Aangemaakt door NetworkManager

option rfc3442-classless-static-routes code 121 = array of unsigned
integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer
8;
option wpad code 252 = string;

also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request wpad;
also request ntp-servers;
--- /var/run/nm-dhclient-eth0.conf ---

if NetworkManager does not do the trick, create the dhclient-eth0.conf
file or symlink and your hostname will be sent for sure

--
Ike

"Guillermo Leira" 10-02-2012 04:04 PM

NetworkManager, DHCP and DNS
 
> -----Mensaje original-----
> De: arch-general [mailto:arch-general-bounces@archlinux.org] En nombre de
Ike
> Devolder
> Enviado el: lunes, 01 de octubre de 2012 20:18
> Para: General Discussion about Arch Linux
> Asunto: Re: [arch-general] NetworkManager, DHCP and DNS
>
> On Mon, Oct 01, 2012 at 07:03:50PM +0200, Guillermo Leira wrote:
> > Hello!
> >
> > I have been using wicd for a long time. I have installed and enabled
> > NetworkManager service (with systemd). It seems to work, but I have
found
> > that when asking for a DHCP address, it does not register the conexion
in
> > the DNS server (as wicd does). I can't find anything about this issue...
> >
> > I have gone back to wicd, but it can't connect to my office's wifi (or I
> > have been unable to configure it) and NetworkManager worked at the first
> > attempt.


> Are you using NetworkManager with dhclient ?
> NetworkManager with dhcpcd should give you no issues since dhcpcd sends
> the hostname along with the dhcp request.
>
> dhclient does not with the defaults given by NetworkManager.
> You can easily create a default /etc/dhclient.conf with content:
>
> --- dhclient.conf ---
> send host-name = pick-first-value(gethostname(), "ISC-dhclient");
> --- dhclient.conf ---
>
> the above is just a copy from the example configuration.
>
> if you have eth0, eth1, ... just create a symlink in etc since
> NetworkManager will pick up the /etc/dhclient-eth0.conf for eth0
>
> ls -l /etc/dhclient.conf /etc/dhclient-eth0.conf
>
> if you have a dhcp which registers the clients to your dns server all
> should work fine now.
>
> --
> Ike

Thanks!

I didn't notice the change from dhcpcd to dhclient.

I'll create symlink for wlan0.

Best Regards,

Guillermo Leira

Jan Steffens 10-02-2012 04:33 PM

NetworkManager, DHCP and DNS
 
On Tue, Oct 2, 2012 at 6:44 AM, Ike Devolder <ike.devolder@gmail.com> wrote:
> well then for the people where networkmanager is not so nice to:
> the following is an actual example and consistent over all my machines
> with dhclient (4 desktops having the exact same output)
>
> --- /var/run/nm-dhclient-eth0.conf --- (without dhclient-eth0.conf)
> # Aangemaakt door NetworkManager
>
> option rfc3442-classless-static-routes code 121 = array of unsigned
> integer 8;
> option ms-classless-static-routes code 249 = array of unsigned integer
> 8;
> option wpad code 252 = string;
>
> also request rfc3442-classless-static-routes;
> also request ms-classless-static-routes;
> also request wpad;
> also request ntp-servers;
> --- /var/run/nm-dhclient-eth0.conf ---
>
> if NetworkManager does not do the trick, create the dhclient-eth0.conf
> file or symlink and your hostname will be sent for sure
>
> --
> Ike

Does it work if you add:

[keyfile]
hostname=foobar

to /etc/NetworkManager/NetworkManager.conf?


All times are GMT. The time now is 12:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.