DSM 7.0 After reboot vlan link loose connection with its parent

Currently reading
DSM 7.0 After reboot vlan link loose connection with its parent

Last edited:
Hi,

I'm struggling to find the source of a very strange bug, at least for me.
I have a Synology DS1821+ with docker installed and a few containers. All containers are connected within the same macvlan "pub_net_20" network created by my docker-composer.yml that has the bond link as it's parent and is in the vlan #20

YAML:
pub_net_20:
    driver: macvlan
    name: pub_net_20
    driver_opts:
      parent: ovs_bond0.20
    ipam:
      config:
        - subnet: 10.25.20.0/24
          gateway: 10.25.20.1
          ip_range: 10.25.20.32/29

Link ovs_bond0.20 with the parent @ovs_bond0 and it's state is up and it is working perfectly.
1637701231203.png

1637701966112.png



It works fine, all containers can communicate with each other and with the host and all other servers in the network.

After a reboot things changes:

1637702037348.png

the link ovs_bond0.20 changes it's type, from vlan to bond, it's no more linked with bond0 and in the docker sid, it sees the network pub_net_20 up, but it has no communication at all. The only way to recovery from this state is to delete this weird link "bond0.20" from my host, delete the pub_net_20 from docker and force a docker composer recreate to be able to have all container communicating again.
We can see that the ovs_bond0.20 interface has id#9, it was created by the system even before docker has started up, so I don't know why...

in the folder "/etc/sysconfig/network-scripts" i do not see anything uncommun,

I'm very newbie with linux environments and these fews days searching for solutions for this helped me to learn a lot, but also it's has been very painful to realise how clueless I'm in this new environment.

I would appreciate very much if any one can at least point me on the right direction of investigation, to figure out why the OS or OVS are creating the interface before docker.

Thanks for the help

Jeison
-- post merged: --

The inspect of the network on docker seems normal:

YAML:
sh-4.4# docker network inspect pub_net_20
[
    {
        "Name": "pub_net_20",
        "Id": "c9eded9cbc6415308d452c06285f4048f9da00562513346669e5eafed920e33b",
        "Created": "2021-11-23T12:09:52.388233558-05:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "10.25.20.0/24",
                    "IPRange": "10.25.20.32/29",
                    "Gateway": "10.25.20.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0bfaacfe2e15fea36f3473bfaa7be99814fd3924415e491148569f451d7fa5a5": {
                "Name": "HomeAssistant",
                *
                *
                N
            }
        },
        "Options": {
            "parent": "ovs_bond0.20"
        },
        "Labels": {
            "com.docker.compose.network": "pub_net_20",
            "com.docker.compose.project": "docker",
            "com.docker.compose.version": "1.28.5"
        }
    }
]
 
Although the topic is very old and you are probably not interested anymore, i'll post my solution here so that everybody landing on this topic can have the answer too.

I've run into the same problem as you, when using Synology + Docker + VLANs(single phyisical interface, multiple VLANs created by docker network create command), the configuration does not seems to be reboot persistent.

This is what makes it persistent:
docker network create -d macvlan --subnet=10.20.0.0/16 --gateway=10.20.0.1 -o parent=eth0.200 apps-vlan200

echo """DEVICE=eth0.200
BOOTPROTO=none
ONBOOT=yes
VLAN_ROW_DEVICE=eth0
VLAN_ID=200""">/etc/sysconfig/network-scripts/ifcfg-eth0.200


The idea is to define the adapter in /etc/sysconfig/network-scripts in order to make it persistent.
* pay attention at VLAN_ROW_DEVICE... it's indeed ROW not RAW
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

i've gave up trying to get pihole to work. turned off the container, re-installed adguard home, pointed...
Replies
18
Views
2,757
I was just upgrading FreshRSS and PostgreSQL containers to the latest images. (see tutorial FreshRSS: A...
Replies
0
Views
1,066

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top