Add Persistent Static Route to Skyline Collector
search cancel

Add Persistent Static Route to Skyline Collector

book

Article ID: 317819

calendar_today

Updated On:

Products

VMware

Issue/Introduction

How to add Persistent Static Route to Skyline Collector.


Symptoms:

You are trying to add static routes to your Skyline Collector using the command “route add -p” it will get added but for a temporary period.

 
Once you restart, the Collector service the added route will be removed as shown below.

 

 

 



Cause

The Collector behavior that the route that is added manually using the commands "root add -p" will be for only be stored until the Skyline Collector is active.

Resolution

Please follow the below-mentioned steps to persistently add static routes to the Skyline Collector.

1. To make the route persistent you need to add it to the static route config file which is located under:

     # /etc/systemd/network/XX-eth#.network

2. Where X can take any number depending on your system and # is the number of the interface you want to add the static route to. 

    The file should look like this:

    [Match]

    Name=eth0

    [Network]

    Gateway=10.20.20.20

    Address=10.10.10.10/26

    DHCP=no
    [DHCP]

    UseDNS=false

------------------------------------------------------------------------------

3. Add a new section at the end of the file:

   [Match]

   Name=eth0

   [Network]

   Gateway=10.20.20.20

   Address=10.10.10.10/26

   DHCP=no

   [DHCP]

   UseDNS=false

   [Route]

   Gateway=10.20.30.40

   Destination=192.168.0.0/16

---------------------------------------------------------------------------------------------------------------------

4. Save the file and run the following command to restart the network daemon

    # systemctl restart systemd-networkd.service

5. Check if your route is still present by running:

    # route -n
 

The above-mentioned steps will help you to add permanently Static Routes to Skyline Collector.


Workaround:
N.A.

Additional Information

Impact/Risks:
No major impact