Discussion:
[gentoo-user] dhcp error. No network. Address family not supported.
(too old to reply)
Dale
2024-04-27 22:40:02 UTC
Permalink
Howdy,

I finally got Gentoo on the old rig I had laying around.  This is not
the one I usually refer to as NAS box.  I named this one NAS2.  LOL  I
got one problem that is confusing me.  I've compared it to my main rig
and the install guide and I think I got everything right but maybe I
have a typo, missed something or got some other issue.  This is what the
screen says, typing by hand so I hope I don't insert a typo. 


Bringing up interface enp3s0
    dhcp ...
        Running dhcpcd ...
dhcpcd-10.0.6 starting
main: if_opensockets: address family not supported by protocol
dhcpcd exited. 


At first I thought that 10.0.6 was a typo on my part in some config
file.  The usual IP address for that port is 10.0.0.6.  Eventually I
figured out it was the version of dhcp.  So, after getting past that, I
started checking everything network related in the install guide. 
Basically, set it to use dhcp and let er rip.  Well, this is the first
time dhcp has gave me any grief, which is why I think I did something
wrong. 

Anyone ever seen this?  Searching didn't help.  This is a new kernel so
maybe I missed something in there?  All options on the table.  New
install and all.  Oh, network works from from boot media thingy.  

Thanks for any ideas.  Maybe telling me where I boo boo'd.  ROFL

Dale

:-)  :-) 
Daniel Frey
2024-04-27 23:10:01 UTC
Permalink
Post by Dale
Howdy,
I finally got Gentoo on the old rig I had laying around.  This is not
the one I usually refer to as NAS box.  I named this one NAS2.  LOL  I
got one problem that is confusing me.  I've compared it to my main rig
and the install guide and I think I got everything right but maybe I
have a typo, missed something or got some other issue.  This is what the
screen says, typing by hand so I hope I don't insert a typo.
Bringing up interface enp3s0
    dhcp ...
        Running dhcpcd ...
dhcpcd-10.0.6 starting
main: if_opensockets: address family not supported by protocol
dhcpcd exited.
Another thought: did you miss CONFIG_PACKET in networking options? That
possibly could spit that error out too.

Dan
Daniel Frey
2024-04-27 23:10:01 UTC
Permalink
Post by Dale
Howdy,
I finally got Gentoo on the old rig I had laying around.  This is not
the one I usually refer to as NAS box.  I named this one NAS2.  LOL  I
got one problem that is confusing me.  I've compared it to my main rig
and the install guide and I think I got everything right but maybe I
have a typo, missed something or got some other issue.  This is what the
screen says, typing by hand so I hope I don't insert a typo.
Bringing up interface enp3s0
    dhcp ...
        Running dhcpcd ...
dhcpcd-10.0.6 starting
main: if_opensockets: address family not supported by protocol
dhcpcd exited.
At first I thought that 10.0.6 was a typo on my part in some config
file.  The usual IP address for that port is 10.0.0.6.  Eventually I
figured out it was the version of dhcp.  So, after getting past that, I
started checking everything network related in the install guide.
Basically, set it to use dhcp and let er rip.  Well, this is the first
time dhcp has gave me any grief, which is why I think I did something
wrong.
You probably don't have ipv6 enabled in the kernel.

There are more and more packages that will not compile with ipv6
disabled. (Or just do not provide the option to disable ipv6.)

I do not know if dhcpcd is one of them though.

Dan
Michael
2024-04-27 23:10:01 UTC
Permalink
Post by Dale
Howdy,
I finally got Gentoo on the old rig I had laying around. This is not
the one I usually refer to as NAS box. I named this one NAS2. LOL I
got one problem that is confusing me. I've compared it to my main rig
and the install guide and I think I got everything right but maybe I
have a typo, missed something or got some other issue. This is what the
screen says, typing by hand so I hope I don't insert a typo.
Bringing up interface enp3s0
dhcp ...
Running dhcpcd ...
dhcpcd-10.0.6 starting
main: if_opensockets: address family not supported by protocol
dhcpcd exited.
At first I thought that 10.0.6 was a typo on my part in some config
file. The usual IP address for that port is 10.0.0.6. Eventually I
figured out it was the version of dhcp. So, after getting past that, I
started checking everything network related in the install guide.
Basically, set it to use dhcp and let er rip. Well, this is the first
time dhcp has gave me any grief, which is why I think I did something
wrong.
Anyone ever seen this? Searching didn't help. This is a new kernel so
maybe I missed something in there?
Yes, most likely.

What does this show:

grep SOCKET /usr/src/linux/.config

or this:

grep PACKET /usr/src/linux/.config
Dale
2024-04-28 02:30:01 UTC
Permalink
Post by Michael
Post by Dale
Howdy,
I finally got Gentoo on the old rig I had laying around. This is not
the one I usually refer to as NAS box. I named this one NAS2. LOL I
got one problem that is confusing me. I've compared it to my main rig
and the install guide and I think I got everything right but maybe I
have a typo, missed something or got some other issue. This is what the
screen says, typing by hand so I hope I don't insert a typo.
Bringing up interface enp3s0
dhcp ...
Running dhcpcd ...
dhcpcd-10.0.6 starting
main: if_opensockets: address family not supported by protocol
dhcpcd exited.
At first I thought that 10.0.6 was a typo on my part in some config
file. The usual IP address for that port is 10.0.0.6. Eventually I
figured out it was the version of dhcp. So, after getting past that, I
started checking everything network related in the install guide.
Basically, set it to use dhcp and let er rip. Well, this is the first
time dhcp has gave me any grief, which is why I think I did something
wrong.
Anyone ever seen this? Searching didn't help. This is a new kernel so
maybe I missed something in there?
Yes, most likely.
grep SOCKET /usr/src/linux/.config
grep PACKET /usr/src/linux/.config
OK.  Some of those were turned off.  I cut on anything that looked like
something I'd need.  Recompiled the kernel and rebooted.  What do you
know, it worked. 

Now some questions, why is something that most anyone would need turned
off by default?  Why is it not mentioned along with other things in the
install docs?  I went through the install docs for those options needed,
I don't recall seeing those.  The only things I left out were the UEFI
thingy stuff.  I so dread that UEFI thingy on the new build.  o_O

Thanks to all.  It running, apparently with IPv6 at that.  O_O 

Dale

:-)  :-) 
Michael
2024-04-28 10:00:01 UTC
Permalink
[snip ...]
Post by Michael
Post by Dale
Anyone ever seen this? Searching didn't help. This is a new kernel so
maybe I missed something in there?
Yes, most likely.
grep SOCKET /usr/src/linux/.config
grep PACKET /usr/src/linux/.config
OK. Some of those were turned off. I cut on anything that looked like
something I'd need. Recompiled the kernel and rebooted. What do you
know, it worked.
Cool :-)
Now some questions, why is something that most anyone would need turned
off by default? Why is it not mentioned along with other things in the
install docs? I went through the install docs for those options needed,
I don't recall seeing those.
I don't know what the devs' thinking on this has been, but it could be such
options are not enabled by default because the network configuration can
affect security. For a binary desktop distro, more generic options would be
preconfigured, as I expect is the case with genkernel.
The only things I left out were the UEFI
thingy stuff. I so dread that UEFI thingy on the new build. o_O
I think UEFI is rather simpler to set up, no "BIOS Boot Partition" required.
Just create a partition with type ef00 (GUID type C12A7328-F81F-11D2-
BA4B-00A0C93EC93B - EFI system partition) and format it as FAT32, before you
mount it as /efi.

The handbook details how to set up a UEFI system with ESP, so spend some time
reading through the docs before you jump in and consider options and
permutations if you will be using openrc or systemd.
Thanks to all. It running, apparently with IPv6 at that. O_O
Consider your firewall settings to include IPv6, if IPv6 is enabled.
Dale
2024-04-29 15:20:01 UTC
Permalink
Post by Michael
[snip ...]
Post by Michael
Post by Dale
Anyone ever seen this? Searching didn't help. This is a new kernel so
maybe I missed something in there?
Yes, most likely.
grep SOCKET /usr/src/linux/.config
grep PACKET /usr/src/linux/.config
OK. Some of those were turned off. I cut on anything that looked like
something I'd need. Recompiled the kernel and rebooted. What do you
know, it worked.
Cool :-)
Now some questions, why is something that most anyone would need turned
off by default? Why is it not mentioned along with other things in the
install docs? I went through the install docs for those options needed,
I don't recall seeing those.
I don't know what the devs' thinking on this has been, but it could be such
options are not enabled by default because the network configuration can
affect security. For a binary desktop distro, more generic options would be
preconfigured, as I expect is the case with genkernel.
The only things I left out were the UEFI
thingy stuff. I so dread that UEFI thingy on the new build. o_O
I think UEFI is rather simpler to set up, no "BIOS Boot Partition" required.
Just create a partition with type ef00 (GUID type C12A7328-F81F-11D2-
BA4B-00A0C93EC93B - EFI system partition) and format it as FAT32, before you
mount it as /efi.
The handbook details how to set up a UEFI system with ESP, so spend some time
reading through the docs before you jump in and consider options and
permutations if you will be using openrc or systemd.
I saw the instructions when doing the old Dell install.  My dread is,
I've never done one before.  One good thing tho, it's been around a good
while now.  All the bugs and kinks in the install docs have been worked
out by now.  Follow the docs and it should work. 
Post by Michael
Thanks to all. It running, apparently with IPv6 at that. O_O
Consider your firewall settings to include IPv6, if IPv6 is enabled.
When I was on DSL, no IPv6 at all.  New fiber has it tho.  Of course, it
is all new down to the cables.  Kinda be stupid not to include something
that will be a necessity before to long anyway.  Almost feel sorry for
the DSL folks.  I tried to tell them competition was going to come and
clean their clock.  They lost almost all their customers to fiber within
two months.  Cheaper and around 20 times faster.  I might add, down time
for maintenance is announced in advance.  Even that is rare.  The DSL
folks, it just went down.  No warning or anything.  Only bad side of
IPv6, it's a lot of typing for all that.  o_O

Dale

:-)  :-) 
Peter Humphrey
2024-04-29 20:20:01 UTC
Permalink
Only bad side of IPv6, it's a lot of typing for all that. o_O
There's a worse aspect: you have to undersand what you're doing. Or you can
just tell your firewall not to allow any IPv6 packets in or out at all.
--
Regards,
Peter.
Dale
2024-04-29 20:30:01 UTC
Permalink
Post by Peter Humphrey
Only bad side of IPv6, it's a lot of typing for all that. o_O
There's a worse aspect: you have to undersand what you're doing. Or you can
just tell your firewall not to allow any IPv6 packets in or out at all.
When I said a lot of typing, I was thinking about if one has to use IPv6
to ssh into a rig.  As it is here, ssh ***@10.0.0.6 is it.  Now replace
that IP with a IPv6 address.  I'm hoping for a copy and paste option or
tab completion would be nice.  Let's not even get into the increased
odds of a typo.  After all, one wrong character, no worky.  :/ 

Given that we running out of IPv4 tho, IPv6 it is.  Something had to
change.  I guess IPv6 was the best long term option.  Still, gonna be a
head scratcher for some of us. 

Dale

:-)  :-) 
Michael
2024-04-29 20:40:01 UTC
Permalink
Post by Dale
Post by Peter Humphrey
Only bad side of IPv6, it's a lot of typing for all that. o_O
There's a worse aspect: you have to undersand what you're doing. Or you can
just tell your firewall not to allow any IPv6 packets in or out at all.
When I said a lot of typing, I was thinking about if one has to use IPv6
that IP with a IPv6 address. I'm hoping for a copy and paste option or
tab completion would be nice. Let's not even get into the increased
odds of a typo. After all, one wrong character, no worky. :/
Given that we running out of IPv4 tho, IPv6 it is. Something had to
change. I guess IPv6 was the best long term option. Still, gonna be a
head scratcher for some of us.
Dale
:-) :-)
If we're talking about connecting regularly to the same IP you can set it up
as an alias in your ~/.ssh/config and not have to invoke IP addresses on the
CLI at all.
Dale
2024-04-29 21:10:02 UTC
Permalink
Post by Michael
Post by Dale
Post by Peter Humphrey
Only bad side of IPv6, it's a lot of typing for all that. o_O
There's a worse aspect: you have to undersand what you're doing. Or you can
just tell your firewall not to allow any IPv6 packets in or out at all.
When I said a lot of typing, I was thinking about if one has to use IPv6
that IP with a IPv6 address. I'm hoping for a copy and paste option or
tab completion would be nice. Let's not even get into the increased
odds of a typo. After all, one wrong character, no worky. :/
Given that we running out of IPv4 tho, IPv6 it is. Something had to
change. I guess IPv6 was the best long term option. Still, gonna be a
head scratcher for some of us.
Dale
:-) :-)
If we're talking about connecting regularly to the same IP you can set it up
as an alias in your ~/.ssh/config and not have to invoke IP addresses on the
CLI at all.
I'd likely just add it to the host file thing and then type in the
name.  Right now it is NAS or NAS2.  Pretty short. 

While I'm sure whoever came up with IPv6 tried to keep it simple, I
suspect they also wanted to make the newer method work long term.  Quite
often, long term solutions get complicated.  If that is the case, it
explains a lot.  10.0.0.6 is way simple.  fe80::1eef:2ca0:c378:2eec is
anything but simple.  Now try being a admin and having to remember a few
dozen of those.  ROFL  Poor thang.  It's a good thing there are options
like your alias one or the hosts file one.  We'd have a lot of bald
people running around.  Admins and some other geeky types would be
pulling out their hair.  :/ 

Dale

:-)  :-) 

P. S.  the perl cleaner thing fixed the whole problem.  Everything is as
it should be, I think. 
Sergey Filatov
2024-04-30 08:50:01 UTC
Permalink
Post by Michael
Post by Dale
Post by Peter Humphrey
Only bad side of IPv6, it's a lot of typing for all that. o_O
There's a worse aspect: you have to undersand what you're doing. Or you can
just tell your firewall not to allow any IPv6 packets in or out at all.
When I said a lot of typing, I was thinking about if one has to use IPv6
that IP with a IPv6 address. I'm hoping for a copy and paste option or
tab completion would be nice. Let's not even get into the increased
odds of a typo. After all, one wrong character, no worky. :/
Given that we running out of IPv4 tho, IPv6 it is. Something had to
change. I guess IPv6 was the best long term option. Still, gonna be a
head scratcher for some of us.
Dale
:-) :-)
If we're talking about connecting regularly to the same IP you can set it up
as an alias in your ~/.ssh/config and not have to invoke IP addresses on the
CLI at all.
In my case, given that it's publicly routable anyway I just set the AAAA
records on my DNS server for my IPv6 enabled servers.

Loading...