Open edoput opened 7 years ago
after talking with @gabri94 I got all the information that I needed
// route object
{
"destination": "192.168.1.0/24",
"next": "192.168.1.1"
}
produces
# this could be the interface that has the ip
route.1.devname=
route.1.gateway=192.168.1.1
route.1.ip=192.168.1.0
route.1.netmask=255.255.255.0
route.1.status=enabled
route.status=enabled
The only important part to remember is that the management interface produces a route like this.
Edit: It's not the management interface but the interface with a gateway defined
{
"interfaces": [
{
"name": "ifname",
...,
"addresses": [
{
"address": "192.168.1.20",
"family": "ipv4",
"gateway": "192.168.1.1",
"management": true,
"proto": "static"
}
]
}
]
}
produces
route.1.devname=ifname
route.1.gateway=192.168.1.1
route.1.ip=192.168.1.0
route.1.netmask=255.255.255.0
route.1.status=enabled
route.status=enabled
Available keys
As a static route in netjson has only
destination
andnext
I'm a little confused about what is what?