Updated on 2026-06-09 GMT+08:00

Manually Configuring IPv4 and IPv6 Policy-based Routes for a Linux ECS with Multiple Network Interfaces (SUSE)

Scenarios

This section describes how to configure policy-based routes for an ECS with two network interfaces running SUSE Linux Enterprise Server 15 SP5 (64-bit).

For details about the background knowledge and networking of an ECS with two network interfaces, see Overview.

Configuring Policy-based Routes for Linux ECSs Using IPv4 Addresses (SUSE)

  1. Collect the ECS network interface information required for configuring policy-based routes.

    For details, see Collecting ECS Network Information.

    In this example, the network information of the ECS is shown in Table 1.

    Table 1 Linux ECSs using IPv4 addresses (SUSE)

    Type

    Primary Network Interface

    Extended Network Interface

    Source

    • Network interface IPv4 address: 10.0.0.139
    • Subnet IPv4 CIDR block: 10.0.0.0/24
    • Subnet IPv4 gateway: 10.0.0.1
    • Network interface IPv4 address: 10.0.1.39
    • Subnet IPv4 CIDR block: 10.0.1.0/24
    • Subnet IPv4 gateway: 10.0.1.1

    Destination

    Network interface IPv4 address: 10.0.2.169

    N/A

  2. Log in to the source ECS.

    For details, see How Do I Log In to My ECS?

  3. Check whether the source ECS can use its primary network interface to communicate with the destination ECS:

    Before configuring policy-based routes, ensure that the source ECS can use its primary network interface to communicate with the destination ECS.

    ping -I <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    Example commands:

    ping -I 10.0.0.139 10.0.2.169

    If information similar to the following is displayed, the source ECS can use its primary network interface to communicate with the destination ECS.
    ecs-suse-s~ # ping -I 10.0.0.139 10.0.2.169
    PING 10.0.2.169 (10.0.2.169) from 10.0.0.139 : 56(84) bytes of data.
    64 bytes from 10.0.2.169: icmp_seq=1 ttl=64 time=3.20 ms
    64 bytes from 10.0.2.169: icmp_seq=2 ttl=64 time=0.096 ms
    64 bytes from 10.0.2.169: icmp_seq=3 ttl=64 time=0.103 ms
    ^C
    -- 10.0.2.169 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2006ms
    rtt min/avg/max/mdev = 0.096/1.132/3.199/1.461 ms
  4. Query the network interface names of the source ECS:

    ip addr

    Search for the network interface names based on IP addresses.
    • The IP address of the primary network interface is 10.0.0.139, and its name is eth0.
    • The IP address of the extended network interface is 10.0.1.39, and its name is eth1.
    ecs-suse-s:~ # ip addr
    ...
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether fa:16:3e:30:30:bb brd ff:ff:ff:ff:ff:ff
        altname enpos3
        altname ens3
        inet 10.0.0.139/24 brd 10.0.0.255 scope global eth0
           valid_lft forever preferred_lft forever
        inet6 2407:c080:1880:9ba:1195:6337:d98d:66c6/64 scope global dynamic noprefixroute
           valid_lft 6931sec preferred_lft 6931sec
        inet6 fe80::f816:3eff:fe30:30bb/64 scope link
           valid_lft forever preferred_lft forever
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether fa:16:3e:30:31:57 brd ff:ff:ff:ff:ff:ff
        altname enp4s4
        inet 10.0.1.39/24 brd 10.0.1.255 scope global eth1
           valid_lft forever preferred_lft forever
        inet6 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce/64 scope global dynamic noprefixroute
           valid_lft 6931sec preferred_lft 6931sec
        inet6 fe80::f816:3eff:fe30:3157/64 scope link
           valid_lft forever preferred_lft forever
  5. Configure temporary routes for the source ECS.

    Temporary routes are applied immediately but are lost after ECS restart. To avoid network interruptions, perform 6 to configure permanent routes after performing 5.

    1. Configure policy-based routes for both the primary and extended network interfaces.
      • Primary network interface

        ip route add default via <subnet-gateway> dev <network-interface-name> table <route-table-name>

        ip route add <subnet-CIDR-block> dev <network-interface-name> table <route-table-name>

        ip rule add from <network-interface-address> table <route-table-name>

      • Extended network interface

        ip route add default via <subnet-gateway> dev <network-interface-name> table <route-table-name>

        ip route add <subnet-CIDR-block> dev <network-interface-name> table <route-table-name>

        ip rule add from <network-interface-address> table <route-table-name>

      Configure the parameters as follows:
      • Network interface name: Enter the name obtained in 4.
      • Route table name: Name the route table with a number.
      • Other network information: Enter the IP addresses collected in 1.

      Example commands:

      • Primary network interface

        ip route add default via 10.0.0.1 dev eth0 table 10

        ip route add 10.0.0.0/24 dev eth0 table 10

        ip rule add from 10.0.0.139 table 10

      • Extended network interface

        ip route add default via 10.0.1.1 dev eth1 table 20

        ip route add 10.0.1.0/24 dev eth1 table 20

        ip rule add from 10.0.1.39 table 20

      If the ECS has multiple network interfaces, configure policy-based routes for all network interfaces one by one.

    2. Check whether the policy-based routes are added.

      ip rule

      ip route show table <route-table-name-of-the-primary-network-interface>

      ip route show table <route-table-name-of-the-extended-network-interface>

      The route table name is the one configured in 5.a.

      Example commands:

      ip rule

      ip route show table 10

      ip route show table 20

      If information similar to the following is displayed, the policy-based routes have been added.
      ecs-suse-s:~ # ip rule
      0:     from all lookup local
      32764:  from 10.0.1.39 lookup 20
      32765:  from 10.0.0.139 lookup 10
      32766:  from all lookup main
      32767:  from all lookup default
      ecs-suse-s:~ # ip route show table 10
      default via 10.0.0.1 dev eth0
      10.0.0.0/24 dev eth0 scope link
      ecs-suse-s:~ # ip route show table 20
      default via 10.0.1.1 dev eth1
      10.0.1.0/24 dev eth1 scope link
    3. Check whether the source and destination ECSs can communicate with each other.

      ping -I <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

      ping -I <IP-address-of-the-extended-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

      Example commands:

      ping -I 10.0.0.139 10.0.2.169

      ping -I 10.0.1.39 10.0.2.169

      If information similar to the following is displayed, both the network interfaces of the source ECS can communicate with the destination ECS.
      ecs-suse-s~ # ping -I 10.0.0.139 10.0.2.169
      PING 10.0.2.169 (10.0.2.169) from 10.0.0.139 : 56(84) bytes of data.
      64 bytes from 10.0.2.169: icmp_seq=1 ttl=64 time=0.168 ms
      64 bytes from 10.0.2.169: icmp_seq=2 ttl=64 time=0.124 ms
      64 bytes from 10.0.2.169: icmp_seq=3 ttl=64 time=0.075 ms
      ^C
      --- 10.0.2.169 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2056ms
      rtt min/avg/max/mdev = 0.075/0.122/0.168/0.037 ms
      ecs-suse-s~ # ping -I 10.0.1.39 10.0.2.169
      PING 10.0.2.169 (10.0.2.169) from 10.0.1.39 : 56(84) bytes of data.
      64 bytes from 10.0.2.169: icmp_seq=1 ttl=64 time=0.568 ms
      64 bytes from 10.0.2.169: icmp_seq=2 ttl=64 time=0.104 ms
      64 bytes from 10.0.2.169: icmp_seq=3 ttl=64 time=0.088 ms
      ^C
      -- 10.0.2.169 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2032ms
      rtt min/avg/max/mdev = 0.088/0.253/0.568/0.222 ms
  6. Configure permanent routes for the source ECS.
    1. Run the following command to add the network-routes.service file to the systemd service:

      vi /etc/systemd/system/network-routes.service

    2. Press i to enter the editing mode.
    3. Add the following content to the end of the file:
      [Unit]
      Description=Network Routes Configuration
      After=network.target
      
      [Service]
      Type=oneshot
      RemainAfterExit=yes
      ExecStart=/bin/bash -c 'for((x=0; x<10; x++)); do [[ $(ip addr show eth0 | grep -w 10.0.0.139 >/dev/null 2>&1 && echo 1) ]] && break; sleep 1; done; ip route flush table 10; ip route add default via  10.0.0.1 dev eth0 table 10; ip route add 10.0.0.0/24 dev eth0 table 10; ip rule add from 10.0.0.139 table 10; for((x=0; x<10; x++)); do [[ $(ip addr show eth1 | grep -w 10.0.1.39 >/dev/null 2>&1 && echo 1) ]] && break; sleep 1; done; ip route flush table 20; ip route add default via 10.0.1.1 dev eth1 table 20; ip route add 10.0.1.0/24 dev eth1 table 20; ip rule add from 10.0.1.39 table 20; ip rule add to 169.254.169.254 table main'
      
      [Install]
      WantedBy=multi-user.target

      The parameters are as follows:

      • for loop: Check whether eth0 or eth1 has obtained an IPv4 address (eth0: 10.0.0.139; eth1: 10.0.1.39) every second up to 10 times.
      • ip route flush table route-table-name: Running this command will delete existing routes from the specified route table. This prevents new routes from being affected.
      • Policy-based routes of the primary network interface: Set it to the same value as that in 5.a.
      • Policy-based routes of the extended network interface: Set it to the same value as that in 5.a.
      • ip rule add to 169.254.169.254 table main: Set the Cloud-Init address to the same value as that in this example.
    4. Press ESC to exit and enter :wq! to save the configuration.
    5. Run the following commands to reload the systemd configuration and start the service:

      systemctl daemon-reload

      systemctl enable network-routes.service

      If information similar to the following is displayed, the service is started:
      root@ecs-s:~# systemctl daemon-reload 
      root@ecs-s:~# systemctl enable network-routes.service
      Created symlink /etc/systemd/system/multi-user.target.wants/network-routes.service → /etc/systemd/system/network-routes.service.
    6. Run the following command to restart the source ECS:

      reboot

      Policy-based routes added to the network-routes.service file only work after the source ECS is restarted. Ensure that workloads on the ECS will not be affected before restarting the ECS.

    7. Repeat 5.b to 5.c to check whether the policy-based routes are added and whether the source ECS and the destination ECS can communicate with each other.

Configuring Policy-based Routes for Linux ECSs Using IPv6 Addresses (SUSE)

  1. Collect the ECS network interface information required for configuring policy-based routes.

    For details, see Collecting ECS Network Information.

    In this example, the network information of the ECS is shown in Table 2.

    Table 2 Linux ECSs using IPv6 addresses (SUSE)

    Type

    Primary Network Interface

    Extended Network Interface

    Source

    • Network interface IPv4 address: 10.0.0.139
    • Network interface IPv6 address: 2407:c080:1880:9ba:1195:6337:d98d:66c6
    • Subnet IPv6 CIDR block: 2407:c080:1880:9ba::/64
    • Subnet IPv6 gateway: 2407:c080:1880:9ba::1
    • Network interface IPv4 address: 10.0.1.39
    • Network interface IPv6 address: 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce
    • Subnet IPv6 CIDR block: 2407:c080:1880:9bb::/64
    • Subnet IPv6 gateway: 2407:c080:1880:9bb::1

    Destination

    • Network interface IPv4 address: 10.0.2.169
    • Network interface IPv6 address: 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5

    N/A

  2. Log in to the source ECS.

    For details, see How Do I Log In to My ECS?

  3. Check whether the ECSs have IPv6 enabled and have IPv6 addresses.

    Perform this step for both the source and destination ECSs to ensure that the ECSs have IPv6 addresses. Otherwise, the ECSs cannot communicate with each other using IPv6 addresses.

    ECSs in this example run SUSE Linux Enterprise Server 15 SP5 (64-bit). For details about how to assign IPv6 addresses for ECSs running other OSs, see Linux (Manually Enabling Dynamic Assignment of IPv6 Addresses).

    1. Run the following command to check whether the source ECS has IPv6 addresses:

      ip addr

      Information similar to the following is displayed. eth0 and eth1 are the network interfaces of the ECS. There is an inet6 entry starting with fe80, which indicates that the ECS has IPv6 enabled. There is also an inet6 entry starting with 2407, which indicates that the ECS has obtained an IPv6 address automatically. In this example, no additional configuration is required for the image.
      ecs-suse-s:~ # ip addr
      ...
      2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether fa:16:3e:30:30:bb brd ff:ff:ff:ff:ff:ff
          altname enpos3
          altname ens3
          inet 10.0.0.139/24 brd 10.0.0.255 scope global eth0
             valid_lft forever preferred_lft forever
          inet6 2407:c080:1880:9ba:1195:6337:d98d:66c6/64 scope global dynamic noprefixroute
             valid_lft 6931sec preferred_lft 6931sec
          inet6 fe80::f816:3eff:fe30:30bb/64 scope link
             valid_lft forever preferred_lft forever
      3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether fa:16:3e:30:31:57 brd ff:ff:ff:ff:ff:ff
          altname enp4s4
          inet 10.0.1.39/24 brd 10.0.1.255 scope global eth1
             valid_lft forever preferred_lft forever
          inet6 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce/64 scope global dynamic noprefixroute
             valid_lft 6931sec preferred_lft 6931sec
          inet6 fe80::f816:3eff:fe30:3157/64 scope link
             valid_lft forever preferred_lft forever
    2. Locate the network interface names based on their IP addresses in the previous command output.
      In this example, the network interface names are as follows:
      • The IP address of the primary network interface is 10.0.0.139, and its name is eth0.
      • The IP address of the extended network interface is 10.0.1.39, and its name is eth1.
  4. Log in to the source ECS and check whether it can communicate with the destination ECS.

    Before configuring policy-based route for an ECS with multiple network interfaces, ensure that at least one of the primary or extended network interface of the source ECS can communicate with the destination ECS.

    ping6 -I <IP-address-of-a-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    Example command:

    ping6 -I 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5

    If information similar to the following is displayed, the source ECS can communicate with the destination ECS.
    ecs-suse-s:~ # ping6 -I 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5
    PING 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5(2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5) from 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce : 56 data bytes
    64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=1 ttl=64 time=0.163 ms
    64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=2 ttl=64 time=0.104 ms
    64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=3 ttl=64 time=0.070 ms
    64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=4 ttl=64 time=0.065 ms
    ^C
    -- 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3058ms
    tt min/avg/max/mdev = 0.065/0.100/0.163/0.039 ms
  5. Log in to the source ECS and configure temporary routes for the ECS.

    Temporary routes are applied immediately but are lost after ECS restart. To avoid network interruptions, perform 6 to configure permanent routes after performing 5.

    1. Configure policy-based routes for both the primary and extended network interfaces.
      • Primary network interface

        ip -6 route add default via <subnet-gateway> dev <network-interface-name> table <route-table-name>

        ip -6 route add <subnet-CIDR-block> dev <network-interface-name> table <route-table-name>

        ip -6 rule add from <network-interface-address> table <route-table-name>

      • Extended network interface

        ip -6 route add default via <subnet-gateway> dev <network-interface-name> table <route-table-name>

        ip -6 route add <subnet-CIDR-block> dev <network-interface-name> table <route-table-name>

        ip -6 rule add from <network-interface-address> table <route-table-name>

      Configure the parameters as follows:
      • Network interface name: Enter the name obtained in 3.b.
      • Route table name: Name the route table with a number.
      • Other network information: Enter the IP addresses collected in 1.

      Example commands:

      • Primary network interface

        ip -6 route add default via 2407:c080:1880:9ba::1 dev eth0 table 10

        ip -6 route add 2407:c080:1880:9ba::/64 dev eth0 table 10

        ip -6 rule add from 2407:c080:1880:9ba:1195:6337:d98d:66c6 table 10

      • Extended network interface

        ip -6 route add default via 2407:c080:1880:9bb::1 dev eth1 table 20

        ip -6 route add 2407:c080:1880:9bb::/64 dev eth1 table 20

        ip -6 rule add from 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce table 20

      If the ECS has multiple network interfaces, configure policy-based routes for all network interfaces one by one.

    2. Check whether the policy-based routes are added.

      ip -6 rule

      ip -6 route show table <route-table-name-of-the-primary-network-interface>

      ip -6 route show table <route-table-name-of-the-extended-network-interface>

      The route table name is the one configured in 5.a.

      Example commands:

      ip -6 rule

      ip -6 route show table 10

      ip -6 route show table 20

      If information similar to the following is displayed, the policy-based routes have been added.
      ecs-suse-s:~ # ip -6 rule
      0:     from all lookup local
      32764:  from 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce lookup 20
      32765:  from 2407:c080:1880:9ba:1195:6337:d98d:66c6 lookup 10
      32766:  from all lookup main
      ecs-suse-s:~ # ip -6 route show table 10
      2407:c080:1880:9ba::/64 dev eth0 metric 1024 pref medium
      default via 2407:c080:1880:9ba::1 dev eth0 metric 1024 pref medium
      ecs-suse-s:~ # ip -6 route show table 20
      2407:c080:1880:9bb::/64 dev eth1 metric 1024 pref medium
      default via 2407:c080:1880:9bb:1 dev eth1 metric 1024 pref medium
    3. Check whether the source and destination ECSs can communicate with each other.

      ping6 -I <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

      ping6 -I <IP-address-of-the-extended-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

      Example commands:

      ping6 -I 2407:c080:1880:9ba:1195:6337:d98d:66c6 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5

      ping6 -I 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5

      If information similar to the following is displayed, both the network interfaces of the source ECS can communicate with the destination ECS.
      ecs-suse-s:~ # ping6 -I 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5
      PING 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5(2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5) from 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce:56 data bytes
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=1 ttl=64 time=0.213 ms
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=2 ttl=64 time=0.105 ms
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=3 ttl=64 time=0.071 ms
      ^C
      --- 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2036ms
      rtt min/avg/max/mdev = 0.071/0.129/0.213/0.060 ms
      ecs-suse-st~ # ping6 -I 2407:c080:1880:9ba:1195:6337:d98d:66c6 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5
      PING 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5(2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5) from 2407:c080:1880:9ba:1195:6337:d98d:66c6:56data bytes
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=1 ttl=64 time=0.183 ms
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=2 ttl=64 time=0.096 ms
      64 bytes from 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5: icmp_seq=3 ttl=64 time=0.076 ms
      ^C
      --- 2407:c080:1880:9bc:4ea7:ba3d:be05:e7f5 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2047ms
      rtt min/avg/max/mdev = 0.076/0.118/0.183/0.046 ms
  6. Configure permanent routes for the source ECS.
    1. Run the following command to create the network-routes6.service file for the systemd service:

      vi /etc/systemd/system/network-routes6.service

    2. Press i to enter the editing mode.
    3. Add the following content to the end of the file:
      [Unit]
      Description=Network Routes Configuration
      After=network.target
      
      [Service]
      Type=oneshot
      RemainAfterExit=yes
      
      ExecStart=/bin/bash -c 'for((x=0; x<10; x++)); do [[ $(ip addr show eth0 | grep -w 2407:c080:1880:9ba:1195:6337:d98d:66c6 >/dev/null 2>&1 && echo 1) ]] && break; sleep 1; done; ip route flush table 10; ip -6 route add default via 2407:c080:1880:9ba::1 dev eth0 table 10; ip -6 route add 2407:c080:1880:9ba::/64 dev eth0 table 10; ip -6 rule add from 2407:c080:1880:9ba:1195:6337:d98d:66c6 table 10; for((x=0; x<10; x++)); do [[ $(ip addr show eth1 | grep -w 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce >/dev/null 2>&1 && echo 1) ]] && break; sleep 1; done; ip route flush table 20; ip -6 route add default via 2407:c080:1880:9bb::1 dev eth1 table 20; ip -6 route add 2407:c080:1880:9bb::/64 dev eth1 table 20; ip -6 rule add from 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce table 20'
      
      [Install]
      WantedBy=multi-user.target

      The parameters are as follows:

      • for loop: Check whether eth0 or eth1 has obtained an IPv6 address (eth0: 2407:c080:1880:9ba:1195:6337:d98d:66c6; eth1: 2407:c080:1880:9bb:6c7b:6fc7:d78e:2dce) every second up to 10 times.
      • ip route flush table route-table-name: Running this command will delete existing routes from the specified route table. This prevents new routes from being affected.
      • Policy-based routes of the primary network interface: Set it to the same value as that in 5.a.
      • Policy-based routes of the extended network interface: Set it to the same value as that in 5.a.
    4. Press ESC to exit and enter :wq! to save the configuration.
    5. Run the following commands to reload the systemd configuration and start the service:

      systemctl daemon-reload

      systemctl enable network-routes6.service

      If information similar to the following is displayed, the service is started:
      ecs-suse-s:/etc/netplan# systemctl daemon-reload
      ecs-suse-s:/etc/netplan# systemctl enable network-routes6.service
      Created symlink /etc/systemd/system/multi-user.target.wants/network-routes6.service → /etc/systemd/system/network-routes6.service.
    6. Run the following command to restart the source ECS:

      reboot

      Policy-based routes added to the network-routes6.service file only work after the source ECS is restarted. Ensure that workloads on the ECS will not be affected before restarting the ECS.

    7. Repeat 5.b to 5.c to check whether the policy-based routes are added and whether the source ECS and the destination ECS can communicate with each other.