Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]NetworkManager: can't connect using dhcp.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 18, 2016 4:40 pm    Post subject: [SOLVED]NetworkManager: can't connect using dhcp. Reply with quote

Hello Fellows!

I am having issues to use dhcp with NetworkManager. It simple does not work. There is "setting network address" thing then fail. On some rarelly times works...
I did not touch on the configuration files assuming it should be handled by NetworkManager. I tested with dhcpcd instead dhclient and it worked.

Quote:

Portage 2.3.0 (python 3.4.4-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r2, 4.6.4-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-4.6.4-gentoo-x86_64-AMD_A6-4400M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem: 5561064 total, 2308800 free
KiB Swap: 3145724 total, 3145724 free
Timestamp of repository gentoo: Mon, 18 Jul 2016 15:42:54 +0000
sh bash 4.3_p46
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash: 4.3_p46::gentoo
dev-lang/perl: 5.24.0-r1::gentoo
dev-lang/python: 2.7.11-r2::gentoo, 3.4.4::gentoo
dev-util/cmake: 3.6.0::gentoo
dev-util/pkgconfig: 0.29.1::gentoo
sys-apps/baselayout: 2.2-r1::gentoo
sys-apps/openrc: 0.21.2::gentoo
sys-apps/sandbox: 2.10-r2::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.26.1::gentoo
sys-devel/gcc: 5.4.0::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r2::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc: 2.23-r2::gentoo
Repositories:

gentoo
location: /usr/portage
sync-type: git
sync-uri: git://github.com/gentoo-mirror/gentoo.git
priority: -1000

local
location: /usr/local/portage
masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/43kdepaths /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/ssh/ssh_config /etc/ssh/sshd_config /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://gentoo.c3sl.ufpr.br/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 apparmor berkdb bluetooth branding bzip2 cairo caps cdda cdr cli consolekit cracklib crypt cups custom-cflags custom-optimization cxx dbus declarative dri dts dvd dvdr egl emboss encode exif fam ffmpeg firefox flac fontconfig gdbm gif glamor gpg gpm iconv ipv6 jit jpeg kde kipi lcms libnotify lz4 mad matroska mmx mmxext mng modules mp3 mp4 mpeg ncurses networkmanager nls nptl offensive ogg opencl opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vdpau vim-syntax vlc vorbis vpx wayland widgets x264 x265 xattr xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel loopback" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
Package Settings
=================================================================

net-misc/networkmanager-1.2.2::gentoo was built with the following:
USE="bluetooth consolekit dhclient ncurses nss wext wifi -connection-sharing -gnutls -introspection -modemmanager -ppp -resolvconf (-selinux) -systemd -teamd -test -vala" ABI_X86="64 -32 -x32"


Thanks!


Last edited by alexcortes on Wed Jul 20, 2016 5:50 am; edited 1 time in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1629
Location: United Kingdom

PostPosted: Mon Jul 18, 2016 5:11 pm    Post subject: Reply with quote

Did you specify dhclient in NetworkManager.conf? In my case, for example:

Code:
clevow230ss ~ # cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
rc-manager=none
dhcp=dhclient
no-auto-default=*

[keyfile]
hostname=clevow230ss

Below is how NetworkManager is installed in my case:
Code:
clevow230ss ~ # eix -I net-misc/networkmanager
[I] net-misc/networkmanager
     Available versions:  1.0.12-r1 ~1.2.2 {bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection +modemmanager ncurses +nss +ppp resolvconf selinux systemd teamd test vala +wext +wifi zeroconf ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="linux"}
     Installed versions:  1.0.12-r1(10:55:59 18/04/16)(bluetooth consolekit dhclient introspection modemmanager ncurses nss ppp wext wifi zeroconf -connection-sharing -dhcpcd -gnutls -resolvconf -selinux -systemd -teamd -test -vala ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="linux")
     Homepage:            https://wiki.gnome.org/Projects/NetworkManager
     Description:         A set of co-operative tools that make networking simple and straightforward

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 18, 2016 5:22 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
Did you specify dhclient in NetworkManager.conf? In my case, for example:

Code:
clevow230ss ~ # cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
rc-manager=none
dhcp=dhclient
no-auto-default=*

[keyfile]
hostname=clevow230ss

Below is how NetworkManager is installed in my case:
Code:
clevow230ss ~ # eix -I net-misc/networkmanager
[I] net-misc/networkmanager
     Available versions:  1.0.12-r1 ~1.2.2 {bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection +modemmanager ncurses +nss +ppp resolvconf selinux systemd teamd test vala +wext +wifi zeroconf ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="linux"}
     Installed versions:  1.0.12-r1(10:55:59 18/04/16)(bluetooth consolekit dhclient introspection modemmanager ncurses nss ppp wext wifi zeroconf -connection-sharing -dhcpcd -gnutls -resolvconf -selinux -systemd -teamd -test -vala ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="linux")
     Homepage:            https://wiki.gnome.org/Projects/NetworkManager
     Description:         A set of co-operative tools that make networking simple and straightforward


@Fitzcarraldo

I don't ever have a /etc/NetworkManager/NetworkManager.conf file.
I barely use dhcp, so I never bored to look at this issue.

I will try now.
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 18, 2016 6:32 pm    Post subject: Reply with quote

Creating /etc/NetworkManager/NetworkManager.conf won't help either. :x
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 18, 2016 9:13 pm    Post subject: Reply with quote

I tried running dhclient manually:

Quote:
irs_resconf_load failed: 30.
Unable to set resolver from resolv.conf; startup continuing but DDNS support may be affected
/sbin/dhclient-script: line 152: /bin/ifconfig: Permission denied
/sbin/dhclient-script: line 166: /bin/hostname: Permission denied
/sbin/dhclient-script: line 190: /bin/ifconfig: Permission denied
/sbin/dhclient-script: line 198: /bin/route: Permission denied
/sbin/dhclient-script: line 69: /etc/resolv.conf: Permission denied
/sbin/dhclient-script: line 70: /bin/chmod: Permission denied


I found something here.

EDIT: downgrading it does not helped.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Tue Jul 19, 2016 7:59 am    Post subject: Reply with quote

Quote:
I tested with dhcpcd instead dhclient and it worked.


Silly question I know ..... if dhcpcd works why not stay with dhcpcd?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 19, 2016 3:54 pm    Post subject: Reply with quote

UberLord wrote:
Quote:
I tested with dhcpcd instead dhclient and it worked.


Silly question I know ..... if dhcpcd works why not stay with dhcpcd?


I am trying to stay with defaults flags as possible. If I will need to install/use dhcpcd I will ditch NetworkManager in favor of /etc/init.d/net.XXX way. :D

Thanks.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Tue Jul 19, 2016 4:19 pm    Post subject: Reply with quote

The dhcpcd "way" is not init.d/net.* ..... It is just dhcpcd :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 19, 2016 4:27 pm    Post subject: Reply with quote

Yes, but I still need to connect with static address, I barely use dhcp, to not say rarely.
Basically a connect using ethernet with static address, and use dhcp on wireless when I need it for some reason.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Tue Jul 19, 2016 4:36 pm    Post subject: Reply with quote

And you can configure that... It's all document ed in dhcpcd.conf(5)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 19, 2016 4:38 pm    Post subject: Reply with quote

UberLord wrote:
And you can configure that... It's all document ed in dhcpcd.conf(5)


Thanks, I will take a look there! :o
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Wed Jul 20, 2016 5:50 am    Post subject: Reply with quote

At the end NetworkManager worked very well with the internal dhcp. I am still considering move on dhcpcd.

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum