* [gentoo-user] Handbook and question about manual network setup @ 2024-04-19 14:05 Dale 2024-04-19 14:22 ` Matt Connell ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Dale @ 2024-04-19 14:05 UTC (permalink / raw To: gentoo-user Howdy, I'm playing around with my NAS box again. I ran into a network issue. I sorta forgot I unplugged the network cable so obviously, it made it difficult to ssh into the thing from my main rig. After hooking up a monitor and keyboard, I found the problem and plugged the network cable back in. ROFLMBO Told y'all I forget stuff. Anyway, while investigating this, I realized the network setup is not like on my old rig. Heck, I couldn't even figure out how to restart it other than switching to the boot runlevel and back to default, or rebooting. After a bit, I think I can restart DHCP and it restart the network. I figured out the cable was unplugged before trying that. I'm wanting to set up the NAS box network the same way as my main rig. That's the old manual way. I went back to the install handbook, that's what I followed when installing on my main rig. Thing is, it has been updated and the old way isn't all there. I followed what little bit is there but it defaults back to the new way. I'm sure I'm missing some file I need to edit but I can't figure out which one it is. So, is there a way to get the old instructions again? The ones I followed several years ago for my main rig? I tried searching but it seems they all gone. Maybe there is a place I'm not aware of tho. Basically, I want to be able to start/stop/restart enp3s0 as a service and have it in a runlevel. Also, I'd like to get the install handbook as one large page. My intention is to save it locally for future reference as it is now. I may even print a copy. I looked at all the places that have different options but can't find the whole thing as one large page. I looked under several drop down menus and such. A long time ago, it was a option. I just can't find it now. May that option isn't available anymore. I wish I had a copy of the one from several years ago. Back when I installed on my main rig. Some network info. Lines that are commented out are options I tried but didn't work. It was worth a shot. o_O nas / # grep -r '!net' /etc/ /etc/rc.conf:rc_hotplug="!net.*" nas / # grep -r 'enp3s0' /etc/ /etc/resolv.conf:# Generated by dhcpcd from enp3s0.dhcp /etc/conf.d/net:config_enp3s0="dhcp" /etc/conf.d/net:dns_servers_enp3s0="8.8.8.8 8.8.4.4" /etc/conf.d/net:#config_enp3s0="10.0.0.5" nas / #nas / # ifconfig -s enp3s0 Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg enp3s0 1500 16802 0 0 0 17196 0 0 0 BMRU nas / # Thoughts? If I had the old install info, I think I could get it to work. I did last time. ;-) Dale :-) :-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 14:05 [gentoo-user] Handbook and question about manual network setup Dale @ 2024-04-19 14:22 ` Matt Connell 2024-04-19 16:20 ` Dale 2024-04-19 15:16 ` Michael 2024-04-21 19:36 ` J. Roeleveld 2 siblings, 1 reply; 15+ messages in thread From: Matt Connell @ 2024-04-19 14:22 UTC (permalink / raw To: gentoo-user On Fri, 2024-04-19 at 09:05 -0500, Dale wrote: > Basically, I want to be able to start/stop/restart enp3s0 as a > service and have it in a runlevel. You should just need to create a symlink at /etc/init.d/net.enp3s0 that points to /etc/init.d/net.lo and then you can do the usual rc-service stuff with it. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 14:22 ` Matt Connell @ 2024-04-19 16:20 ` Dale 2024-04-19 16:38 ` Michael 0 siblings, 1 reply; 15+ messages in thread From: Dale @ 2024-04-19 16:20 UTC (permalink / raw To: gentoo-user Matt Connell wrote: > On Fri, 2024-04-19 at 09:05 -0500, Dale wrote: >> Basically, I want to be able to start/stop/restart enp3s0 as a >> service and have it in a runlevel. > You should just need to create a symlink at /etc/init.d/net.enp3s0 that > points to /etc/init.d/net.lo and then you can do the usual rc-service > stuff with it. > > I did that and went from default to boot runlevel and back to default again but I still couldn't restart with the net.enp3s0 file. Luckily, I shut the rig down a bit ago. I went to mow some grass. Using push mower since battery went bad on riding mower. Anyway, when I booted it back up just now, it worked. I can start/stop/restart with the enp3s0 file like on my main rig. It still says it is defaulting to DHCP which makes me think I'm still missing something. It says, I'm typing this in manually. Bringing up interface enp3s0 config_enp3s0 not specified; defaulting to DHCP Then it continues bringing up the network. I have this set: nas / # cat /etc/conf.d/net config_enp3s0="dhcp" dns_servers_enp3s0="8.8.8.8 8.8.4.4" nas / # Since I have it set to use DHCP already, why is it saying it is defaulting to it? Did I miss a file or something? Shouldn't it just use it without saying it is defaulting to it? I don't recall seeing this on my main rig. Dale :-) :-) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 16:20 ` Dale @ 2024-04-19 16:38 ` Michael 2024-04-19 17:04 ` Dale 0 siblings, 1 reply; 15+ messages in thread From: Michael @ 2024-04-19 16:38 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1937 bytes --] On Friday, 19 April 2024 17:20:44 BST Dale wrote: > Matt Connell wrote: > > On Fri, 2024-04-19 at 09:05 -0500, Dale wrote: > >> Basically, I want to be able to start/stop/restart enp3s0 as a > >> service and have it in a runlevel. > > > > You should just need to create a symlink at /etc/init.d/net.enp3s0 that > > points to /etc/init.d/net.lo and then you can do the usual rc-service > > stuff with it. > > I did that and went from default to boot runlevel and back to default > again but I still couldn't restart with the net.enp3s0 file. Luckily, I > shut the rig down a bit ago. I went to mow some grass. Using push > mower since battery went bad on riding mower. Anyway, when I booted it > back up just now, it worked. I can start/stop/restart with the enp3s0 > file like on my main rig. It still says it is defaulting to DHCP which > makes me think I'm still missing something. It says, I'm typing this in > manually. > > > Bringing up interface enp3s0 > config_enp3s0 not specified; defaulting to DHCP > > > Then it continues bringing up the network. I have this set: > > nas / # cat /etc/conf.d/net > config_enp3s0="dhcp" > dns_servers_enp3s0="8.8.8.8 8.8.4.4" > nas / # > > > Since I have it set to use DHCP already, why is it saying it is > defaulting to it? Did I miss a file or something? Shouldn't it just > use it without saying it is defaulting to it? I don't recall seeing > this on my main rig. > > Dale > > :-) :-) Normally you would use netifrc to configure a gateway and static IP address. DHCP is a fallback, in case the static IP subnet has changed - e.g. because you changed your home router. If you *are* using dhcpcd to obtain an IP address from the router then arguably your don't need netifrc at all, as I explained in my other message earlier. Regarding the messages you see on your main rig Vs the old rig, you can compare the two PC's conf.net files for any differences. [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 16:38 ` Michael @ 2024-04-19 17:04 ` Dale 2024-04-19 17:13 ` Michael 0 siblings, 1 reply; 15+ messages in thread From: Dale @ 2024-04-19 17:04 UTC (permalink / raw To: gentoo-user Michael wrote: > On Friday, 19 April 2024 17:20:44 BST Dale wrote: >> Matt Connell wrote: >>> On Fri, 2024-04-19 at 09:05 -0500, Dale wrote: >>>> Basically, I want to be able to start/stop/restart enp3s0 as a >>>> service and have it in a runlevel. >>> You should just need to create a symlink at /etc/init.d/net.enp3s0 that >>> points to /etc/init.d/net.lo and then you can do the usual rc-service >>> stuff with it. >> I did that and went from default to boot runlevel and back to default >> again but I still couldn't restart with the net.enp3s0 file. Luckily, I >> shut the rig down a bit ago. I went to mow some grass. Using push >> mower since battery went bad on riding mower. Anyway, when I booted it >> back up just now, it worked. I can start/stop/restart with the enp3s0 >> file like on my main rig. It still says it is defaulting to DHCP which >> makes me think I'm still missing something. It says, I'm typing this in >> manually. >> >> >> Bringing up interface enp3s0 >> config_enp3s0 not specified; defaulting to DHCP >> >> >> Then it continues bringing up the network. I have this set: >> >> nas / # cat /etc/conf.d/net >> config_enp3s0="dhcp" >> dns_servers_enp3s0="8.8.8.8 8.8.4.4" >> nas / # >> >> >> Since I have it set to use DHCP already, why is it saying it is >> defaulting to it? Did I miss a file or something? Shouldn't it just >> use it without saying it is defaulting to it? I don't recall seeing >> this on my main rig. >> >> Dale >> >> :-) :-) > Normally you would use netifrc to configure a gateway and static IP address. > DHCP is a fallback, in case the static IP subnet has changed - e.g. because > you changed your home router. > > If you *are* using dhcpcd to obtain an IP address from the router then > arguably your don't need netifrc at all, as I explained in my other message > earlier. > > Regarding the messages you see on your main rig Vs the old rig, you can > compare the two PC's conf.net files for any differences. That's thing. I think they are the same. Here is my main rig, fireball. root@fireball / # cat /etc/conf.d/net config_enp3s0="dhcp" dns_servers_enp3s0="8.8.8.8 8.8.4.4" root@fireball / # NAS box: nas / # cat /etc/conf.d/net config_enp3s0="dhcp" dns_servers_enp3s0="8.8.8.8 8.8.4.4" nas / # One says it is defaulting, the other doesn't. I've used grep to search, I've looked everywhere I can think of that even might have some config file for network stuff and I can't find any difference. On your other reply. I think I did set up the router to set IP addresses. I know I did for my phone and printer. That printer used to drive me nuts. Every time the power would blink, it wouldn't print. No IP address so can't access it except through that tiny little display and the buttons on the printer. What a drag. o_O I'm missing something. I set up the network on this rig almost a decade ago. I have very little memory of how I did it. I always thought I could just refer back to the install guide. Didn't occur to me they would remove stuff. Dale :-) :-) P. S. Back to mowing grass. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 17:04 ` Dale @ 2024-04-19 17:13 ` Michael 2024-04-21 2:32 ` Dale 0 siblings, 1 reply; 15+ messages in thread From: Michael @ 2024-04-19 17:13 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 388 bytes --] On Friday, 19 April 2024 18:04:57 BST Dale wrote: > I'm missing something. I don't think you are. Shutdown your main rig. Pull the ethernet cable. Reboot. If the main rig's config is the same as the old rig, AND the router addressing is analogous on both PCs, THEN their behaviour and messages ought to be the same. > > Dale > > :-) :-) > > P. S. Back to mowing grass. [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 17:13 ` Michael @ 2024-04-21 2:32 ` Dale 2024-04-21 9:52 ` Michael 0 siblings, 1 reply; 15+ messages in thread From: Dale @ 2024-04-21 2:32 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1403 bytes --] Michael wrote: > On Friday, 19 April 2024 18:04:57 BST Dale wrote: > >> I'm missing something. > I don't think you are. Shutdown your main rig. Pull the ethernet cable. > Reboot. If the main rig's config is the same as the old rig, > > AND > > the router addressing is analogous on both PCs, > > THEN > > their behaviour and messages ought to be the same. > >> Dale >> >> :-) :-) >> >> P. S. Back to mowing grass. OK. I did my weekend OS updates on my main rig, fireball. That involves me switching to boot runlevel and back again. When the network started, no message about going to default. It just showed it starting up and using DHCP. Looks like this: * Bringing up interface enp3s0 * dhcp ... * Running dhcpcd ... I thought of something. My NAS box is shutdown right now so can't check. I bet DHCP is set to start in the default runlevel. On my main rig it is not set to start the DHCP service at all. I suspect the NAS box finds the DHCP service first and starts the network and then finds the network service but it is already started. When it starts the network with the DHCP service, it does the default thing. I'll test that next time I boot up the NAS box. I guess no one else found a way to get the install handbook on a single page. I'll have to copy and paste I guess. That's gonna take a while. O_O Dale :-) :-) [-- Attachment #2: Type: text/html, Size: 2502 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-21 2:32 ` Dale @ 2024-04-21 9:52 ` Michael 2024-04-22 14:34 ` Dale 0 siblings, 1 reply; 15+ messages in thread From: Michael @ 2024-04-21 9:52 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2318 bytes --] Hi Dale, On Sunday, 21 April 2024 03:32:32 BST Dale wrote: > OK. I did my weekend OS updates on my main rig, fireball. That > involves me switching to boot runlevel and back again. When the network > started, no message about going to default. It just showed it starting > up and using DHCP. Looks like this: > > > * Bringing up interface enp3s0 > * dhcp ... > * Running dhcpcd ... > > > > I thought of something. My NAS box is shutdown right now so can't > check. I bet DHCP is set to start in the default runlevel. On my main > rig it is not set to start the DHCP service at all. I suspect the NAS > box finds the DHCP service first and starts the network and then finds > the network service but it is already started. When it starts the > network with the DHCP service, it does the default thing. I'll test > that next time I boot up the NAS box. On one box here I have neither netifrc configured, nor dhcpcd, although both are installed. I have also made sure networkmanager is not installed. However, netmount is in the default runlevel and netmount has the default net dependency enabled: $ grep -v "^#" /etc/conf.d/netmount rc_need="net" $ rc-update show -v | grep -i net local | default nonetwork net-online | net.lo | netmount | default I believe this is what kicks in on my system first and brings up dhcpcd, which in turn obtains an IP address from my router. I mostly configure static IP addresses for known devices in my LAN on the router. You can compare which network services are configured to come up on your NAS Vs your main PC and also check any differences in /etc/rc.conf. Finally search for "rc_need=" dependencies defined in your /etc/conf.d/*. https://wiki.gentoo.org/wiki/OpenRC#Dependency_behavior > I guess no one else found a way to get the install handbook on a single > page. I'll have to copy and paste I guess. That's gonna take a while. > O_O > > Dale > > :-) :-) To save you copying: https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation but note the warning about links redirecting to individual pages: https://wiki.gentoo.org/wiki/Handbook:AMD64/Full [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-21 9:52 ` Michael @ 2024-04-22 14:34 ` Dale 0 siblings, 0 replies; 15+ messages in thread From: Dale @ 2024-04-22 14:34 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 3962 bytes --] Michael wrote: > Hi Dale, > > On Sunday, 21 April 2024 03:32:32 BST Dale wrote: > >> OK. I did my weekend OS updates on my main rig, fireball. That >> involves me switching to boot runlevel and back again. When the network >> started, no message about going to default. It just showed it starting >> up and using DHCP. Looks like this: >> >> >> * Bringing up interface enp3s0 >> * dhcp ... >> * Running dhcpcd ... >> >> >> >> I thought of something. My NAS box is shutdown right now so can't >> check. I bet DHCP is set to start in the default runlevel. On my main >> rig it is not set to start the DHCP service at all. I suspect the NAS >> box finds the DHCP service first and starts the network and then finds >> the network service but it is already started. When it starts the >> network with the DHCP service, it does the default thing. I'll test >> that next time I boot up the NAS box. > On one box here I have neither netifrc configured, nor dhcpcd, although both > are installed. I have also made sure networkmanager is not installed. > > However, netmount is in the default runlevel and netmount has the default net > dependency enabled: > > $ grep -v "^#" /etc/conf.d/netmount > rc_need="net" > > $ rc-update show -v | grep -i net > local | default nonetwork > net-online | > net.lo | > netmount | default > > I believe this is what kicks in on my system first and brings up dhcpcd, which > in turn obtains an IP address from my router. I mostly configure static IP > addresses for known devices in my LAN on the router. > > You can compare which network services are configured to come up on your NAS > Vs your main PC and also check any differences in /etc/rc.conf. Finally > search for "rc_need=" dependencies defined in your /etc/conf.d/*. > > https://wiki.gentoo.org/wiki/OpenRC#Dependency_behavior > > >> I guess no one else found a way to get the install handbook on a single >> page. I'll have to copy and paste I guess. That's gonna take a while. >> O_O >> >> Dale >> >> :-) :-) > To save you copying: > > https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation > > but note the warning about links redirecting to individual pages: > > https://wiki.gentoo.org/wiki/Handbook:AMD64/Full My thought was right. My main rig does not have dhcpcd in any runlevel. I booted up the NAS box and checked to see if dhcpcd was listed anywhere. Sure enough, it was in the default runlevel. I removed it and then rebooted. There was no mention of defaulting to anything, the network just came up. So, I guess dhcpcd was trying to start the network first which means it never really saw any of the config files I was adding info too. It was starting before those came into the picture. So, now both rigs work the same and I can start/stop/restart the network on both machines the same way. I suspect if I edited some dhcp config file and set up the ethernet the proper way, it would just come up like it does now, after the change. Also, nothing against dhcp on my part. My main rig uses it. I wanted the NAS box to use it as well, just the same as my main rig. It works great, even if one doesn't do anything to it. Having it set up tho does give more consistent results, as in the same IP address. I can't recall the last time I had dhcp to fail actually. Thanks for the links on the full docs on one page. I already copy and pasted it to a LOo doc and am editing out parts I won't ever use. It's 116 pages and I'm sure there are parts in there that won't ever apply to me, systemd for example. Maybe I can get the page count down to 100 or so. If I'm lucky. Is there anyway to know when the doc changes and what changes? And how did you find that link? I looked everywhere. :/ Dale :-) :-) [-- Attachment #2: Type: text/html, Size: 5475 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 14:05 [gentoo-user] Handbook and question about manual network setup Dale 2024-04-19 14:22 ` Matt Connell @ 2024-04-19 15:16 ` Michael 2024-04-19 16:26 ` Dale 2024-04-21 19:36 ` J. Roeleveld 2 siblings, 1 reply; 15+ messages in thread From: Michael @ 2024-04-19 15:16 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2643 bytes --] On Friday, 19 April 2024 15:05:47 BST Dale wrote: > Anyway, while investigating this, I realized the network setup is not > like on my old rig. Heck, I couldn't even figure out how to restart it > other than switching to the boot runlevel and back to default, or > rebooting. After a bit, I think I can restart DHCP and it restart the > network. I figured out the cable was unplugged before trying that. I'm > wanting to set up the NAS box network the same way as my main rig. > That's the old manual way. I went back to the install handbook, that's > what I followed when installing on my main rig. Thing is, it has been > updated and the old way isn't all there. I followed what little bit is > there but it defaults back to the new way. I'm sure I'm missing some > file I need to edit but I can't figure out which one it is. So, is > there a way to get the old instructions again? The ones I followed > several years ago for my main rig? I tried searching but it seems they > all gone. Maybe there is a place I'm not aware of tho. Basically, I > want to be able to start/stop/restart enp3s0 as a service and have it in > a runlevel. Without knowing what you refer to as 'The Old Way' Vs 'The New Way', or how your 'main rig', Vs your 'old rig' may have been configured, I'll try to make a guess, or two: 1. Old Way = netifrc You configure /etc/conf.d/net using the well commented example provided in: /usr/share/doc/netifrc-*/net.example.bz2 You symlink your interface enp3s0 to the net.lo netifrc init script and add it to the default runlevel: ln -s /etc/init.d/net.lo /etc/init.d/net.enp3s0 rc-update add net.enp3s0 default then (re)start, check the status, or stop your newly configured interface, e.g.: rc-service -v net.enp3s0 status rc-service -v net.enp3s0 restart More detailed info than you should ever need and all on one page, is provided here: https://wiki.gentoo.org/wiki/Netifrc 2. New Way = DHCP (?) Although dhcp can be configured as a fallback option within /etc/conf.d/net in addition to static addresses, gateways, etc., it can also be set up as a standalone service without netifrc. Emerge dhcpcd and add it to the default runlevel. If you have set static IP address(es) at your home router for the old box and its MAC address, then that's all you need to do before you run: rc-service -v dhcpcd restart If you prefer to not set up a configuration for your old rig on the router, then you can add a static IP address in your /etc/dhcpcd.conf. Again, more info than you should need is provided here: https://wiki.gentoo.org/wiki/Dhcpcd HTH, otherwise ask if you get stuck. [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 15:16 ` Michael @ 2024-04-19 16:26 ` Dale 2024-04-19 16:34 ` Michael 0 siblings, 1 reply; 15+ messages in thread From: Dale @ 2024-04-19 16:26 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 3318 bytes --] Michael wrote: > On Friday, 19 April 2024 15:05:47 BST Dale wrote: > >> Anyway, while investigating this, I realized the network setup is not >> like on my old rig. Heck, I couldn't even figure out how to restart it >> other than switching to the boot runlevel and back to default, or >> rebooting. After a bit, I think I can restart DHCP and it restart the >> network. I figured out the cable was unplugged before trying that. I'm >> wanting to set up the NAS box network the same way as my main rig. >> That's the old manual way. I went back to the install handbook, that's >> what I followed when installing on my main rig. Thing is, it has been >> updated and the old way isn't all there. I followed what little bit is >> there but it defaults back to the new way. I'm sure I'm missing some >> file I need to edit but I can't figure out which one it is. So, is >> there a way to get the old instructions again? The ones I followed >> several years ago for my main rig? I tried searching but it seems they >> all gone. Maybe there is a place I'm not aware of tho. Basically, I >> want to be able to start/stop/restart enp3s0 as a service and have it in >> a runlevel. > Without knowing what you refer to as 'The Old Way' Vs 'The New Way', or how > your 'main rig', Vs your 'old rig' may have been configured, I'll try to make > a guess, or two: > > 1. Old Way = netifrc > > You configure /etc/conf.d/net using the well commented example provided in: > > /usr/share/doc/netifrc-*/net.example.bz2 > > You symlink your interface enp3s0 to the net.lo netifrc init script and add it > to the default runlevel: > > ln -s /etc/init.d/net.lo /etc/init.d/net.enp3s0 > rc-update add net.enp3s0 default > > then (re)start, check the status, or stop your newly configured interface, > e.g.: > > rc-service -v net.enp3s0 status > rc-service -v net.enp3s0 restart > > More detailed info than you should ever need and all on one page, is provided > here: > > https://wiki.gentoo.org/wiki/Netifrc > > > 2. New Way = DHCP (?) > > Although dhcp can be configured as a fallback option within /etc/conf.d/net in > addition to static addresses, gateways, etc., it can also be set up as a > standalone service without netifrc. Emerge dhcpcd and add it to the default > runlevel. > > If you have set static IP address(es) at your home router for the old box and > its MAC address, then that's all you need to do before you run: > > rc-service -v dhcpcd restart > > If you prefer to not set up a configuration for your old rig on the router, > then you can add a static IP address in your /etc/dhcpcd.conf. > > Again, more info than you should need is provided here: > > https://wiki.gentoo.org/wiki/Dhcpcd > > HTH, otherwise ask if you get stuck. Rebooting the NAS box improved things. See reply to Matt. By old way, I mean using a symlink to net.lo with the interface/card name such as enp3s0 to start/stop/restart the service. It still uses DHCP to get connection info but I'd also like to specify the IP address if I can. I like to set those so that they don't change even if I move cables around. Main rig, NAS box, cell phone and printer. The printer really gets upset when something changes. I think I should have used the word "older" instead of "old". ROFL :-D Dale :-) :-) [-- Attachment #2: Type: text/html, Size: 4191 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 16:26 ` Dale @ 2024-04-19 16:34 ` Michael 2024-04-19 16:47 ` Matt Connell 0 siblings, 1 reply; 15+ messages in thread From: Michael @ 2024-04-19 16:34 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 4185 bytes --] On Friday, 19 April 2024 17:26:43 BST Dale wrote: > Michael wrote: > > On Friday, 19 April 2024 15:05:47 BST Dale wrote: > >> Anyway, while investigating this, I realized the network setup is not > >> like on my old rig. Heck, I couldn't even figure out how to restart it > >> other than switching to the boot runlevel and back to default, or > >> rebooting. After a bit, I think I can restart DHCP and it restart the > >> network. I figured out the cable was unplugged before trying that. I'm > >> wanting to set up the NAS box network the same way as my main rig. > >> That's the old manual way. I went back to the install handbook, that's > >> what I followed when installing on my main rig. Thing is, it has been > >> updated and the old way isn't all there. I followed what little bit is > >> there but it defaults back to the new way. I'm sure I'm missing some > >> file I need to edit but I can't figure out which one it is. So, is > >> there a way to get the old instructions again? The ones I followed > >> several years ago for my main rig? I tried searching but it seems they > >> all gone. Maybe there is a place I'm not aware of tho. Basically, I > >> want to be able to start/stop/restart enp3s0 as a service and have it in > >> a runlevel. > > > > Without knowing what you refer to as 'The Old Way' Vs 'The New Way', or > > how > > your 'main rig', Vs your 'old rig' may have been configured, I'll try to > > make a guess, or two: > > > > 1. Old Way = netifrc > > > > You configure /etc/conf.d/net using the well commented example provided > > in: > > > > /usr/share/doc/netifrc-*/net.example.bz2 > > > > You symlink your interface enp3s0 to the net.lo netifrc init script and > > add it to the default runlevel: > > > > ln -s /etc/init.d/net.lo /etc/init.d/net.enp3s0 > > rc-update add net.enp3s0 default > > > > then (re)start, check the status, or stop your newly configured interface, > > e.g.: > > > > rc-service -v net.enp3s0 status > > rc-service -v net.enp3s0 restart > > > > More detailed info than you should ever need and all on one page, is > > provided here: > > > > https://wiki.gentoo.org/wiki/Netifrc > > > > > > 2. New Way = DHCP (?) > > > > Although dhcp can be configured as a fallback option within > > /etc/conf.d/net in addition to static addresses, gateways, etc., it can > > also be set up as a standalone service without netifrc. Emerge dhcpcd > > and add it to the default runlevel. > > > > If you have set static IP address(es) at your home router for the old box > > and its MAC address, then that's all you need to do before you run: > > > > rc-service -v dhcpcd restart > > > > If you prefer to not set up a configuration for your old rig on the > > router, > > then you can add a static IP address in your /etc/dhcpcd.conf. > > > > Again, more info than you should need is provided here: > > > > https://wiki.gentoo.org/wiki/Dhcpcd > > > > HTH, otherwise ask if you get stuck. > > Rebooting the NAS box improved things. See reply to Matt. By old way, > I mean using a symlink to net.lo with the interface/card name such as > enp3s0 to start/stop/restart the service. It still uses DHCP to get > connection info but I'd also like to specify the IP address if I can. I > like to set those so that they don't change even if I move cables > around. Main rig, NAS box, cell phone and printer. The printer really > gets upset when something changes. > > I think I should have used the word "older" instead of "old". ROFL :-D > > Dale > > :-) :-) OKey, dOKey, you can: Configure static IP addresses for all your LAN devices on your home router. Then set your devices to use DHCP to obtain an address from the router when they come up. With a large number of devices which often change (e.g. guests in a hotel) this is inadvisable, but with a home LAN with a handful of devices this is not too much of a chore. Alternatively, you can configure each of your devices with static IP addresses. The URLs I sent you explain how to do this. For a couple of PCs this should take less than 5 minutes, inc. restarting the NIC service, or a reboot to make sure all works as intended on statup. [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 16:34 ` Michael @ 2024-04-19 16:47 ` Matt Connell 0 siblings, 0 replies; 15+ messages in thread From: Matt Connell @ 2024-04-19 16:47 UTC (permalink / raw To: gentoo-user On Fri, 2024-04-19 at 17:34 +0100, Michael wrote: > Configure static IP addresses for all your LAN devices on your home > router. Then set your devices to use DHCP to obtain an address from > the router when they come up. With a large number of devices which > often change (e.g. guests in a hotel) this is inadvisable, but with a > home LAN with a handful of devices this is not too much of a chore. This is what I do, for the sake of the argument. I never touch client configuration on anything; the router is the boss. Much easier that way in my experience. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-19 14:05 [gentoo-user] Handbook and question about manual network setup Dale 2024-04-19 14:22 ` Matt Connell 2024-04-19 15:16 ` Michael @ 2024-04-21 19:36 ` J. Roeleveld 2024-04-22 7:36 ` Michael 2 siblings, 1 reply; 15+ messages in thread From: J. Roeleveld @ 2024-04-21 19:36 UTC (permalink / raw To: gentoo-user On Friday, 19 April 2024 16:05:47 CEST Dale wrote: > Howdy, > > I'm playing around with my NAS box again. I ran into a network issue. > I sorta forgot I unplugged the network cable so obviously, it made it > difficult to ssh into the thing from my main rig. After hooking up a > monitor and keyboard, I found the problem and plugged the network cable > back in. ROFLMBO Told y'all I forget stuff. > > Anyway, while investigating this, I realized the network setup is not > like on my old rig. Heck, I couldn't even figure out how to restart it > other than switching to the boot runlevel and back to default, or > rebooting. After a bit, I think I can restart DHCP and it restart the > network. I figured out the cable was unplugged before trying that. I'm > wanting to set up the NAS box network the same way as my main rig. > That's the old manual way. I went back to the install handbook, that's > what I followed when installing on my main rig. Thing is, it has been > updated and the old way isn't all there. I followed what little bit is > there but it defaults back to the new way. I'm sure I'm missing some > file I need to edit but I can't figure out which one it is. So, is > there a way to get the old instructions again? The ones I followed > several years ago for my main rig? I tried searching but it seems they > all gone. Maybe there is a place I'm not aware of tho. Basically, I > want to be able to start/stop/restart enp3s0 as a service and have it in > a runlevel. > > Also, I'd like to get the install handbook as one large page. My > intention is to save it locally for future reference as it is now. I > may even print a copy. I looked at all the places that have different > options but can't find the whole thing as one large page. I looked > under several drop down menus and such. A long time ago, it was a > option. I just can't find it now. May that option isn't available > anymore. I wish I had a copy of the one from several years ago. Back > when I installed on my main rig. > > Some network info. Lines that are commented out are options I tried but > didn't work. It was worth a shot. o_O > > > nas / # grep -r '!net' /etc/ > /etc/rc.conf:rc_hotplug="!net.*" > nas / # grep -r 'enp3s0' /etc/ > /etc/resolv.conf:# Generated by dhcpcd from enp3s0.dhcp > /etc/conf.d/net:config_enp3s0="dhcp" > /etc/conf.d/net:dns_servers_enp3s0="8.8.8.8 8.8.4.4" > /etc/conf.d/net:#config_enp3s0="10.0.0.5" > nas / #nas / # ifconfig -s enp3s0 > Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP > TX-OVR Flg > enp3s0 1500 16802 0 0 0 17196 0 > 0 0 BMRU > nas / # > > > Thoughts? If I had the old install info, I think I could get it to > work. I did last time. ;-) Yes, try: config_enp3s0="10.0.0.5/24" routes_enp3s0="default gw <ip of your router>" Changes to what I see: 1) You forgot the netmask ( /24 ) for the network 2) I don't see a default route -- Joost ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Handbook and question about manual network setup 2024-04-21 19:36 ` J. Roeleveld @ 2024-04-22 7:36 ` Michael 0 siblings, 0 replies; 15+ messages in thread From: Michael @ 2024-04-22 7:36 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 3371 bytes --] On Sunday, 21 April 2024 20:36:56 BST J. Roeleveld wrote: > On Friday, 19 April 2024 16:05:47 CEST Dale wrote: > > Howdy, > > > > I'm playing around with my NAS box again. I ran into a network issue. > > I sorta forgot I unplugged the network cable so obviously, it made it > > difficult to ssh into the thing from my main rig. After hooking up a > > monitor and keyboard, I found the problem and plugged the network cable > > back in. ROFLMBO Told y'all I forget stuff. > > > > Anyway, while investigating this, I realized the network setup is not > > like on my old rig. Heck, I couldn't even figure out how to restart it > > other than switching to the boot runlevel and back to default, or > > rebooting. After a bit, I think I can restart DHCP and it restart the > > network. I figured out the cable was unplugged before trying that. I'm > > wanting to set up the NAS box network the same way as my main rig. > > That's the old manual way. I went back to the install handbook, that's > > what I followed when installing on my main rig. Thing is, it has been > > updated and the old way isn't all there. I followed what little bit is > > there but it defaults back to the new way. I'm sure I'm missing some > > file I need to edit but I can't figure out which one it is. So, is > > there a way to get the old instructions again? The ones I followed > > several years ago for my main rig? I tried searching but it seems they > > all gone. Maybe there is a place I'm not aware of tho. Basically, I > > want to be able to start/stop/restart enp3s0 as a service and have it in > > a runlevel. > > > > Also, I'd like to get the install handbook as one large page. My > > intention is to save it locally for future reference as it is now. I > > may even print a copy. I looked at all the places that have different > > options but can't find the whole thing as one large page. I looked > > under several drop down menus and such. A long time ago, it was a > > option. I just can't find it now. May that option isn't available > > anymore. I wish I had a copy of the one from several years ago. Back > > when I installed on my main rig. > > > > Some network info. Lines that are commented out are options I tried but > > didn't work. It was worth a shot. o_O > > > > > > nas / # grep -r '!net' /etc/ > > /etc/rc.conf:rc_hotplug="!net.*" > > nas / # grep -r 'enp3s0' /etc/ > > /etc/resolv.conf:# Generated by dhcpcd from enp3s0.dhcp > > /etc/conf.d/net:config_enp3s0="dhcp" > > /etc/conf.d/net:dns_servers_enp3s0="8.8.8.8 8.8.4.4" > > /etc/conf.d/net:#config_enp3s0="10.0.0.5" > > nas / #nas / # ifconfig -s enp3s0 > > Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP > > TX-OVR Flg > > enp3s0 1500 16802 0 0 0 17196 0 > > 0 0 BMRU > > nas / # > > > > > > Thoughts? If I had the old install info, I think I could get it to > > work. I did last time. ;-) > > Yes, try: > config_enp3s0="10.0.0.5/24" > routes_enp3s0="default gw <ip of your router>" > > Changes to what I see: > 1) You forgot the netmask ( /24 ) for the network > 2) I don't see a default route > > -- > Joost That'll certainly work to specify a static IP address on the PC, but I understood Dale wanted to use DHCP to obtain an IP dynamically from the router and only use netifrc to set up DNS resolvers. [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-04-22 14:35 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-19 14:05 [gentoo-user] Handbook and question about manual network setup Dale 2024-04-19 14:22 ` Matt Connell 2024-04-19 16:20 ` Dale 2024-04-19 16:38 ` Michael 2024-04-19 17:04 ` Dale 2024-04-19 17:13 ` Michael 2024-04-21 2:32 ` Dale 2024-04-21 9:52 ` Michael 2024-04-22 14:34 ` Dale 2024-04-19 15:16 ` Michael 2024-04-19 16:26 ` Dale 2024-04-19 16:34 ` Michael 2024-04-19 16:47 ` Matt Connell 2024-04-21 19:36 ` J. Roeleveld 2024-04-22 7:36 ` Michael
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox