Allocating a particular network config to a specific network card on startup

More
25 Jun 2023 21:51 #274211 by Waldemar
So I've dropped a second network card into my Linux box so that I can access a shared folder over on my Windows CAD machine (and do away with the somewhat tedious USB stick file transfers...)

All working very nicely, but one thing that I'd like to do is set the Linux OS to automatically select the correct network for the intended purpose - for example: occasionally on start-up Linux will assign the Ethernet Connection to Mesa 7i96 config to the network card that's connected to the local network and the Ethernet Connection to Laptop config to the network card that's plugged into the Mesa card.

It's simply a case of assigning the correct network config to the relevant hardware to fix this at the start of the session, but it would be nice if it was all set correctly on start-up.

Any ideas?

Wal.

Please Log in or Create an account to join the conversation.

More
25 Jun 2023 22:31 #274213 by tommylight

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 08:14 #274227 by rodw
Should just happen. set a fixed IP address for your mesa card eg 10.10.10.1 and leave the other one to use DHCP. eg should end up in the 192.168.1.X range assuming your router is 192.168,1.1

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 09:04 #274230 by Waldemar
Hi rodw,

Yep - both IPs are static - I'll try using DHCP for the connection to the laptop - I'm not using a router though, just s simple 5 port switch, so that may present an issue (the laptop is in the 192.168 range - also on a static IP).

tommylight - I'll have a dig around.

Wal.

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 12:05 #274241 by tommylight
Mesa boards should be wired dirrctly to the PC, never through a hub or switch.
That was my initial thought on the issue, but skipped as it should be mentioned everywhere.
Apparently ut is not mentioned enough. :)
Also, use two subnets, meaning, set the Mesa board to 10.10.10.10 and edit the PC accordingly.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 12:16 #274243 by Waldemar
Sure thing - the Mesa is directly wired to the on-board ethernet and the additional card is doing the biz for the networking side of things.

Mesa uses the 10.10... network ID and the networking config is on something totally different. It all works wonderfully, just the luck of the draw when it comes to which config the OS assigns to which card on startup.

One way around this is to not power up my control box (which houses the Mesa card) until the OS has booted, that way the system always assigns the networking config to the card that's connected to the network and the Mesa connection goes active when I fire up the control box and the Mesa card gets power. It's odd that this happens, but it's no big deal, I was just wondering if you could force a network card to adopt a config (the same config) on startup.

Wal.

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 13:14 #274246 by tommylight
Something does not add up, the OS does not choose what network to use for what if it is manually set, ever, even when using the same type of network card.
-Linux is very, very good at networking, you can have several active IP addresses for a single network card, all working at the same time.
-I use a lot of PC's with all kinds of network cards with Mesa boards, i never ever had them change anything.
--
The first one is important as it seems you have dual IP's for both cards.

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 15:27 - 26 Jun 2023 15:30 #274254 by Waldemar
I'll make a video to let you see exactly what's going on. Again, it's not causing me any issues whatsoever in terms of functionality, everything works how I expect it to, just odd that it swaps configs between the two cards, which I can assure you 100% that it's doing. Look, here's a video to prove it:



Prior to the restart, note how the Ethernet Connection to Laptop is assigned to the RTL810xE network card and the Ethernet Connection to Mesa is assigned to the RTL811//etc.  After re-boot they've swapped.

Once again, the configs use entirely different IP addresses - the Mesa is on 10.10.10.10 and the network card that connects to it is on 10.10.10.11 (and this network card connects directly to the Mesa card with no intermediate switch/router etc.) whilst the config for the card that does the networking uses an entirely different IP - ie. 20.20. and connects to the laptop via a switch (I would have used the standard 192.168 but when I tried that Adobe CC over on the laptop decided to start trying to use the wired (private no internet) instead of the readily available wireless.  There's absolutely nothing that you can configure in the Adobe software to change this (I've asked Adobe).  For clarity, here's a diagram of my set up.

 
Attachments:
Last edit: 26 Jun 2023 15:30 by Waldemar.

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 15:40 #274255 by tommylight
Did you use the "add new connection" from the network manager?
Delete the created configs, edit the existing ones and change their names if you want to.

Please Log in or Create an account to join the conversation.

More
26 Jun 2023 15:57 #274256 by Waldemar
I used Applications/Settings/Advanced Network Configuration then in that window the + button to add new connections.

>Delete the created configs, edit the existing ones and change their names if you want to.

Sorry, this line isn't making any sense to me - do I delete the configs, or edit them? What good is changing their names going to do?

To be honest I've already tried new configs etc. and it makes no difference. Guess it's just a quirk that I'll navigate by letting the OS boot before powering up the control box.

Thanks for your time, though. Appreciate it.

Wal.

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum