Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] dhcpcd not working for IPv6

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
roboto
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Feb 15, 2017 3:55 pm
Location: My IP address.

[SOLVED] dhcpcd not working for IPv6

  • Quote

Post by roboto » Wed Sep 06, 2017 1:33 am

I followed the dhcp set up instructions step by step in the Gentoo Handbook.

I rebooted and it did the dhcp method for IPv6, instead of IPv4.

So I couldn't connect to the internet.

The kernel .config:
https://paste.pound-python.org/show/AMT ... cXCMGdAr2/

rc.log for my dhcpcd output: https://paste.pound-python.org/show/Nfc ... lPPh4vzZr/

Is there any way I can just use IPv4 instead of IPv6?

dhcp in portage is set to version 4, instead of 6, which is stupid.
Last edited by roboto on Sun Sep 10, 2017 1:13 am, edited 1 time in total.
Answers please.

The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Dude. Minus 30 credibility points.
Yep
Top
Maxxx
Guru
Guru
User avatar
Posts: 595
Joined: Tue Jan 12, 2016 4:00 pm
Location: Italia

  • Quote

Post by Maxxx » Wed Sep 06, 2017 10:06 am

I don't be able to open your kernel config:
https://paste.pound-python.org/show/AMT ... cXCMGdAr2/

Maybe you must enable IPV4 and disable IPV6.
I disabled IPV6 in my kernel and now i have only IPV4.

Furthermore, posting /etc/conf.d/net file would be usefull
Top
roboto
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Feb 15, 2017 3:55 pm
Location: My IP address.

  • Quote

Post by roboto » Wed Sep 06, 2017 9:17 pm

I'm not sure on how you disable IPv6 and enable IPv4, considering there's no "CONFIG_IPV4" option. Only CONFIG_IPV6

/etc/conf.d/net:

config_enp2s0="dhcp"



.config: https://paste.pound-python.org/show/RFW ... 4N4mMAy1j5
Answers please.

The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Dude. Minus 30 credibility points.
Yep
Top
roboto
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Feb 15, 2017 3:55 pm
Location: My IP address.

  • Quote

Post by roboto » Wed Sep 06, 2017 9:41 pm

I disabled IPv6 entirely just now in my .config and dhcpcd still uses IPv6 addresses. Its output this boot was slightly different.

https://paste.pound-python.org/show/gb8 ... VRsHVfguD8
Answers please.

The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Dude. Minus 30 credibility points.
Yep
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Thu Sep 07, 2017 12:45 am

Normally, an IPv6-enabled system will also configure an IPv4 address. This is necessary because key parts of the Internet (in particular, residential ISPs) are years behind on their IPv6 deployment, so trying to run an IPv6 only stack is painful. Please explain why you believe you had only an IPv6 address.
roboto wrote:dhcp in portage is set to version 4, instead of 6, which is stupid.
Please explain this statement. The DHCP server package version in Portage is version 4. The DHCPCD (client) package in Portage is version 6. Neither of these has any bearing on what IP versions are supported.
roboto wrote:I disabled IPv6 entirely just now in my .config and dhcpcd still uses IPv6 addresses. Its output this boot was slightly different.
That log appears to cover several reboots, including ones from Tuesday, the day before your post. You did not indicate your local time at the time of the post, so we must guess which log entries were made with your IPv6-disabled kernel. I see one boot at 16:22 that tried to use IPv6. I see another boot at 16:33 that did not.
Top
Maxxx
Guru
Guru
User avatar
Posts: 595
Joined: Tue Jan 12, 2016 4:00 pm
Location: Italia

  • Quote

Post by Maxxx » Thu Sep 07, 2017 8:07 am

What's the output of

Code: Select all

ifconfig
In this output, there should be "inet" line which means IPV4 while "inet6" means IPV6.
If you have "inet" line, your IPV4 is active and loaded from kernel.

For example, i disabled ipv6 directly in kernel and i haven't "inet6" line.
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Fri Sep 08, 2017 7:56 pm

dhcp_open: enp2s0: Address family not supported by protocol
Oh dear, looks like AF_PACKET aka the Packet Filter isn't enabled in your kernel config.
# CONFIG_PACKET is not set
Yup, I was right :)
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Fri Sep 08, 2017 9:24 pm

UberLord wrote:
dhcp_open: enp2s0: Address family not supported by protocol
Oh dear, looks like AF_PACKET aka the Packet Filter isn't enabled in your kernel config.
# CONFIG_PACKET is not set
Yup, I was right :)
Maybe nitpicking, but shouldn't all the dhcp client packages be using linux-info.eclass to check for that?
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Sat Sep 09, 2017 12:37 am

That's a good point. Feel free to file a Gentoo bug, hopeful the maintainers can fix all DHCP packages.

But to really pick more nits, they use also add an ipv4 use flag and only test that if enabled.
IPv6 only kernels are a thing as well you know and afaik only dhcpcd supports building as IPv6 only
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Sep 09, 2017 12:40 am

While that warning could be useful, remember that not all systems even have a kernel configuration available when the DHCP client is built, so the test needs to be optional. I have a bit of a sore point about the linux-info.eclass functions from a few years ago when packages kept needlessly dying because, while my kernel was configured correctly, they couldn't prove it, so they aborted.

Also, even when the configuration is available and shows AF_PACKET support, there's no guarantee that the package will be run on a well-configured system, only that the current build host is well-configured.
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Sat Sep 09, 2017 8:12 am

Hu wrote: I have a bit of a sore point about the linux-info.eclass functions from a few years ago when packages kept needlessly dying because, while my kernel was configured correctly, they couldn't prove it, so they aborted.
That is truely nefarious!
It should just be a warning at most because it's not API/ABI breaking, just a runtime requirement and guess what - dhcpcd keeps running regardless because other protocols might just work.
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Top
roboto
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Feb 15, 2017 3:55 pm
Location: My IP address.

  • Quote

Post by roboto » Sun Sep 10, 2017 1:12 am

Enabling AF_PACKET solved my issue, dhcpcd now uses IPv6.

Thank you all very much.
Answers please.

The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Dude. Minus 30 credibility points.
Yep
Top
UberLord
Retired Dev
Retired Dev
User avatar
Posts: 6838
Joined: Thu Sep 18, 2003 10:26 am
Location: Blighty
Contact:
Contact UberLord
Website

  • Quote

Post by UberLord » Sun Sep 10, 2017 1:15 am

So AF_PACKET is only needed for IPv4.
AF_INET6 is the sole requirement (afaik) for IPv6.
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Top
roboto
Apprentice
Apprentice
User avatar
Posts: 156
Joined: Wed Feb 15, 2017 3:55 pm
Location: My IP address.

  • Quote

Post by roboto » Sun Sep 10, 2017 1:23 am

Oops, I meant to say IPv4, sorry.
Answers please.

The true hater of man expects nothing from him and is indiscriminate to his works.
-Ayn Rand
Dude. Minus 30 credibility points.
Yep
Top
Post Reply

14 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic