bonienl Posted March 28 Share Posted March 28 Some users experience kernel panics when they have Docker containers set up using a custom network connection, which uses by default a docker macvlan network type. In such a case the general advice is to switch the connection to a docker ipvlan network type, which usually solves the issue, but for some users may introduce a network connectivity issue, depending on the network equipment (router) in use and if it can handle the specifics of ipvlan. In such a situation neither macvlan nor ipvlan is a 100% perfect solution and becomes a trade-off between stability and connectivity. To counter this situation the following solution is proposed to solve the macvlan / ipvlan issue once and for all. THE SOLUTION - USE A DEDICATED ETHERNET PORT FOR DOCKER ONLY You will need an additional ethernet port of your server to make this solution work. This additional port is connected to your local router or switch just like the main port. No network modifications are required for your main connection eth0/br0 unless it is configured as bond or bridge interface with multiple ports and you need to free up one port from the bond or bridge interface and turn it into a dedicated port for docker connections. 1. Configure the dedicated interface in network settings (array must be stopped). - Enable bridging for this interface - Use IPv4 only or IPv4 and IPv6 as per your case - No IP addresses are assigned to this interface 2. Configure Docker to use this dedicated interface - Use default values for custom network - Disable the IP assignment(s) of eth0 / br0 which is going to be replaced - Assign manually the "old" assignments to the new dedicated interface 3. Configure the Docker containers with the new custom network - IP addresses may be fixed (as in the example below) or dynamic using DHCP (configured in the previous step) THAT'S IT - NOW YOUR DOCKER CONTAINER(S) OPERATE ON A DEDICATED CUSTOM NETWORK 5 2 Quote Link to comment
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.