View previous topic :: View next topic |
Author |
Message |
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 10:51 am Post subject: |
|
|
NeddySeagoon wrote: | Your bond0 and an interface with an IP address makes me raise an eyebrow.
To make a bond work, you donate interfaces to the bond before they are configured, then the bond gets configured as if it were a physical interface. |
I checked my kernel config and I indeed have the network bonding driver in the kernel and not as a module. I removed it and it is compiling right now. _________________ Expert in non-working solutions |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Fri Jun 10, 2022 11:36 am Post subject: |
|
|
If you wish to bond the two ifaces together your /etc/conf.d/net
should contain
Code: |
config_eno1="null"
config_eno2="null"
slaves_bond0="eno1 eno2"
config_bond0="dhcp"
|
Plz have net.eno1 net.eno2 and net.bond0 enabled @default (### corrected it from @boot)
Disable dhcpcd.
And let netifrc use it when it deems necessary. _________________
Last edited by alamahant on Fri Jun 10, 2022 11:55 am; edited 1 time in total |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 11:43 am Post subject: |
|
|
I removed the bond driver from my kernel. Next I also removed net.eno2 from the default level, removed /etc/init.d/net.eno2 and removed eno2 from /etc/conf.d/net. I doesn't figure anymore during the boot messages. But it still starts eno2...
Code: | $ ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.11 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::899b:f866:bf0d:8c8a prefixlen 64 scopeid 0x20<link>
inet6 fd10:3da9:ee3:0:4cd3:388:7e82:4881 prefixlen 64 scopeid 0x0<global>
inet6 2a02:a03f:610b:1300:a9ce:3fd5:6c09:1931 prefixlen 64 scopeid 0x0<global>
ether ac:1f:6b:ad:42:d2 txqueuelen 1000 (Ethernet)
RX packets 216 bytes 200479 (195.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 107 bytes 8716 (8.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef800000-ef87ffff
eno2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether ac:1f:6b:ad:42:d3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xef700000-ef77ffff
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 14 bytes 1116 (1.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1116 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
alamahant wrote: | If you wish to bond the two ifaces together your /etc/conf.d/net
should contain
Code: |
config_eno1="null"
config_eno2="null"
slaves_bond0="eno1 eno2"
config_bond0="dhcp"
|
Plz have net.eno1 net.eno2 and net.bond0 enabled @boot.
Disable dhcpcd.
And let netifrc use it when it deems necessary. |
Thanks, I will file this for reference later. But first I'd like to get this nas mounted at boot before getting deeper into that. _________________ Expert in non-working solutions |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 11:53 am Post subject: |
|
|
alamahant wrote: | Plz have net.eno1 net.eno2 and net.bond0 enabled @boot. |
Just a tought, should net.eno1 be at runlevel "boot" instead of "default"? _________________ Expert in non-working solutions
Last edited by Spanik on Fri Jun 10, 2022 11:54 am; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Fri Jun 10, 2022 11:54 am Post subject: |
|
|
Yes my mistake.
Plz have them all enabled @default. _________________
|
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 12:27 pm Post subject: |
|
|
I'm lost with this network stuff. Somehow I cannot make it so eno2 does not start. And _netdev that should make mount wait untill network is started does not seem to have any influence.
Is there a way to have this nfs mounted automatically after login? Without having to become root etc. _________________ Expert in non-working solutions |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Fri Jun 10, 2022 12:38 pm Post subject: |
|
|
Your network is a bit of a mess.
I suppose your are not using net.<ifname> files.
But dhcpcd.
So somewhere in dhcpcd conf file you have assigned eno2 to be handled by dhcpcd.
My advice is disable dhcpcd.
And use netifrc.
Code: |
cd /etc/init.d
ln -s net.lo net.eno1
ln -s net.lo net.eno2
rc-update add net.eno1 default
rc-update delete dhcpcd default
### do not enable net.eno2
|
Then
in /etc/conf.d/net
If this a desktop used only at home then I strongly advice you to use static ip.
in /etc/conf.d/net
Code: |
#config_eno1="dhcp"
config_eno1="192.168.2.3/24"
routes_eno1="default via 192.168.2.1" ### router-ip
dns_servers_eno1="192.168.2.1 1.1.1.1 8.8.8.8" ###etc
|
for example.
Plz make sure dhcpcd is DISABLED.
Netifrc will use it if it deems necessary.
Then plz reboot
Quote: |
s there a way to have this nfs mounted automatically after login? Without having to become root etc.
|
Yes plz use autofs
https://wiki.gentoo.org/wiki/AutoFS
The nfs share will be mounted when you try to access it. _________________
|
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 1:08 pm Post subject: |
|
|
alamahant wrote: | Your network is a bit of a mess.
I suppose your are not using net.<ifname> files.
But dhcpcd.
So somewhere in dhcpcd conf file you have assigned eno2 to be handled by dhcpcd.
My advice is disable dhcpcd.
And use netifrc.
Code: |
cd /etc/init.d
ln -s net.lo net.eno1
ln -s net.lo net.eno2
rc-update add net.eno1 default
rc-update delete dhcpcd default
### do not enable net.eno2
|
Then
in /etc/conf.d/net
|
I do have dhcpcd. But do have the network configured as you give in your example with /etc/init.d/net.eno1 as a link and /etc/conf.d/net as follows:
Code: | dns_domain_lo="home"
config_eno1="dhcp" |
I removed the /etc/init.d/net.eno2 link and also removed it from level default. However after a reboot I still see eno2 when I run ifconfig.
What if I remove dhcpcd? Can I still use dhcp?
Quote: |
s there a way to have this nfs mounted automatically after login? Without having to become root etc.
|
Yes plz use autofs
https://wiki.gentoo.org/wiki/AutoFS
The nfs share will be mounted when you try to access it.[/quote]
I'll check that out. Thanks. _________________ Expert in non-working solutions |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 1:11 pm Post subject: |
|
|
Ok, so I removed dhcpcd from level default and now after a reboot I only have eno1 when I do ifconfig.
Time to go back to start for this nfs. _________________ Expert in non-working solutions |
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 1:36 pm Post subject: |
|
|
Ok, so after removing dhcpcd from runlevel default and a reboot the only connected network interface came up and only that one.
I added the line in fstab again.
Code: | 192.168.2.6:/Public /mnt/nas nfs rw,suid,_netdev 0 0 |
And now it is mounted at boot. What I see now in the messages that come during boot before logging in is that the interface is started and then dhcpcd is called. There are a lot more lines there now with info. And it takes a bit longer to boot.
Thanks to all of you! _________________ Expert in non-working solutions |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Fri Jun 10, 2022 1:39 pm Post subject: |
|
|
Good news.
If you decide to go with autofs then in fstab nfs share line delete "_netdev" and add "noauto"
Or comment out the whole line.
Then configure autofs and it will be nice and cool.
Quote: |
There are a lot more lines there now with info. And it takes a bit longer to boot.
|
That is why i suggested static ip.It will be blazing fast during boot.
If it is a desktop it is what you should do really. _________________
|
|
Back to top |
|
|
Spanik Veteran
Joined: 12 Dec 2003 Posts: 1014 Location: Belgium
|
Posted: Fri Jun 10, 2022 1:56 pm Post subject: |
|
|
alamahant wrote: | Good news.
If you decide to go with autofs then in fstab nfs share line delete "_netdev" and add "noauto"
Or comment out the whole line.
Then configure autofs and it will be nice and cool.
Quote: |
There are a lot more lines there now with info. And it takes a bit longer to boot.
|
That is why i suggested static ip.It will be blazing fast during boot.
If it is a desktop it is what you should do really. |
This motherboard is not "blazing fast to boot". It takes quite some time before it goes through all the screens. So those few extra seconds make not much difference. I'm going to stay with dhcp however. That way the laptop and desktop are similar. It is easier if they are similar (for me to remember how to do things). But this means I'll have to disable dhcpcd in runlevel default on the laptop as well.
This autofs however is something I'm going to check out. It would be good to have the backup USB-disks mountable that way. And for the laptop to connect to the nas. No need that the laptop tries to mount the nas if not on the home network.
Next on the list will be that bonding of the interfaces. But I'll have to re-read the manual of the switch first so I can configure that one as well. _________________ Expert in non-working solutions |
|
Back to top |
|
|
|