[RFC] [nmstate] Linux routing in nmstate



Hi Guys,

Could you review below schema for routing in nmstate before we start
add routing support in nmstate?

```
    {
        "ipv4-routes": [    # Sorted with 'table-id' then 'destination'
            {
                "table-name": "main",   # Empty if no name attached
                "table-id": 254,
                "protocol": "dhcp",     # "static" or "dhcp"
                "metric": 100,
                "destination": "0.0.0.0/0",
                "next-hop-iface": "eth0",       # Mandatory
                "next-hop-address": "192.0.2.1"
                # ^ Empty on point-to-point link
            },
        ],
        "ipv6-routes": [    # Sorted with 'table-id' then 'destination'
            {
                "table-name": "main",   # Empty if no name attached
                "table-id": 254,
                "protocol": "auto",     # "static" or "auto"[1]
                "metric": 100,
                "destination": "::/0",
                "next-hop-iface": "eth0",   # Mandatory
                "next-hop-address": "fe80::1"
            },
        ],
    }
```

Notes:
 * The 'auto' or 'dhcp' route entry will be ignored when applying via
   nmstate.
 * For single route entry with multiple next-hops, nmstate will show it
   as multiple route entries with the same destination.
 * Regarding YANG(RFC-8022) compatibility, we will create a translator
   when we adding YANG support.
 * For future source routing support, we could add top entry as
   'route-rules' or other name to be decided.
 * For future support of OSPF, BGP, we could add top entry as 'ospf'
   or 'bgp' to hold their configuration and extend the 'protocol' types
   in above schema.

Any comments or suggestions will be appreciated.

Thank you very much in advance.
Best regards.

[1]: The "auto" protocol in "ipv6-routes" means IPv6 Router
     Advertisement.

-- 
Gris Ge

Attachment: signature.asc
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]