This YANG module provides a data model for host IP routes.
Copyright 2024 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:host-route-config": {
- "netgate-host-route:route-tables": {
- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [ ]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [ ]
}
}
]
}
}
}
]
}
}
}
Host system IP route configuration.
netgate.host.route.HostRouteConfig to be added to list
object (netgate.host.route.hostrouteconfig.RouteTables) Host system static routes. |
{- "netgate-host-route:route-tables": {
- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- null
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- null
]
}
}
]
}
}
}
]
}
}
Host system IP route configuration.
netgate.host.route.HostRouteConfig to be added or updated
object (netgate.host.route.HostRouteConfig) Host system IP route configuration. |
{- "netgate-host-route:host-route-config": {
- "netgate-host-route:route-tables": {
- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [ ]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [ ]
}
}
]
}
}
}
]
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route-tables": {
- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- null
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- null
]
}
}
]
}
}
}
]
}
}
Host system static routes.
netgate.host.route.hostrouteconfig.RouteTables to be added to list
Array of objects (netgate.host.route.hostrouteconfig.routetables.RouteTable) Currently, one host route table named 'default' is supported. |
{- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": null,
- "netgate-host-route:advertised-receive-window": null,
- "netgate-host-route:metric": null,
- "netgate-host-route:scope": null,
- "netgate-host-route:description": null,
- "netgate-host-route:from": null,
- "netgate-host-route:to": null,
- "netgate-host-route:type": null,
- "netgate-host-route:on-link": null,
- "netgate-host-route:table": null,
- "netgate-host-route:via": null,
- "netgate-host-route:mtu": null
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": null,
- "netgate-host-route:advertised-receive-window": null,
- "netgate-host-route:metric": null,
- "netgate-host-route:scope": null,
- "netgate-host-route:description": null,
- "netgate-host-route:from": null,
- "netgate-host-route:to": null,
- "netgate-host-route:type": null,
- "netgate-host-route:on-link": null,
- "netgate-host-route:table": null,
- "netgate-host-route:via": null,
- "netgate-host-route:mtu": null
}
]
}
}
]
}
}
}
]
}
Host system static routes.
netgate.host.route.hostrouteconfig.RouteTables to be added or updated
object (netgate.host.route.hostrouteconfig.RouteTables) Host system static routes. |
{- "netgate-host-route:route-tables": {
- "netgate-host-route:route-table": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- null
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- null
]
}
}
]
}
}
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Currently, one host route table named 'default' is supported.
netgate.host.route.hostrouteconfig.routetables.RouteTable to be added to list
netgate-host-route:name | string The name of a Route Table. Use 'default'. |
netgate-host-route:description | string A user description of the route table. |
object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes) Host system IPv4 and IPv6 static routes. |
{- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
}
Currently, one host route table named 'default' is supported.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route-table": {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
}
}
Currently, one host route table named 'default' is supported.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.RouteTable to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.RouteTable) Currently, one host route table named 'default' is supported. |
{- "netgate-host-route:route-table": {
- "netgate-host-route:name": "string",
- "netgate-host-route:description": "string",
- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
}
}
Currently, one host route table named 'default' is supported.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
}
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes to be added to list
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces) Static routes are associated with a specific, required interface. |
{- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes) Host system IPv4 and IPv6 static routes. |
{- "netgate-host-route:static-routes": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
}
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces to be added to list
Array of objects (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface) An interface with static routes. |
{- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces) Static routes are associated with a specific, required interface. |
{- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
]
}
}
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
An interface with static routes.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface to be added to list
netgate-host-route:if-name | string The interface on which the route is made. |
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes) List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting. | |
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes) List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting. |
{- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
An interface with static routes.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:interface": {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
}
An interface with static routes.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface) An interface with static routes. |
{- "netgate-host-route:interface": {
- "netgate-host-route:if-name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
}
An interface with static routes.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes to be added to list
Array of objects (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route) Routes are index by their destination prefix. |
{- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes) List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting. |
{- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
List of IPv4 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route to be added to list
netgate-host-route:congestion-window | integer <int64> The congestion window to be used for the route. Represented by the number of segments. (1..4294967295) |
netgate-host-route:advertised-receive-window | integer <int64> The receive window to be advertised for the route. Represented by the number of segments. (1..4294967295) |
netgate-host-route:metric | integer <int64> The route's relative priority metric. (1..4294967295) |
netgate-host-route:scope | string (netgate.host.route.HostRouteScope) Enum: "global" "link" "host" |
netgate-host-route:description | string A description of the route. |
netgate-host-route:from | string Set a source IP address for traffic going through the route. |
netgate-host-route:to | string IPv4 destination prefix. |
netgate-host-route:type | string (netgate.host.route.HostRouteType) Enum: "unicast" "blackhole" "local" "prohibit" "unreachable" |
netgate-host-route:on-link | boolean If 'true', the route is directly connected to the interface. |
netgate-host-route:table | integer <int64> The table number to use for the route. In some scenarios, it may be useful to set routes in a separate routing table. It may also be used to refer to routing policy rules which also accept a table parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables. |
netgate-host-route:via | string IPv4 address to the gateway to use for this route. |
netgate-host-route:mtu | integer <int64> The MTU to be used for the route, in bytes. (1 .. 4294967295). |
{- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes/route=%7Bto%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route": {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route) Routes are index by their destination prefix. |
{- "netgate-host-route:route": {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv4-routes/route=%7Bto%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes to be added to list
Array of objects (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route) Routes are index by their destination prefix. |
{- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes) List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting. |
{- "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
]
}
}
List of IPv6 routes by destination prefix for a given interface. The destination 'to' prefix is required and used as the unique key for the route. If type is local a default scope of host is assumed. If type is unicast and no gateway (via) is given a default scope of link is assumed. Otherwise, a global scope is the default setting.
name required | string Id of route-table |
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route to be added to list
netgate-host-route:congestion-window | integer <int64> The congestion window to be used for the route. Represented by the number of segments. (1..4294967295) |
netgate-host-route:advertised-receive-window | integer <int64> The receive window to be advertised for the route. Represented by the number of segments. (1..4294967295) |
netgate-host-route:metric | integer <int64> The route's relative priority metric. (1..4294967295) |
netgate-host-route:scope | string (netgate.host.route.HostRouteScope) Enum: "global" "link" "host" |
netgate-host-route:description | string A description of the route. |
netgate-host-route:from | string Set a source IP address for traffic going through the route. |
netgate-host-route:to | string IPv6 destination prefix. |
netgate-host-route:type | string (netgate.host.route.HostRouteType) Enum: "unicast" "blackhole" "local" "prohibit" "unreachable" |
netgate-host-route:on-link | boolean If 'true', the route is directly connected to the interface. |
netgate-host-route:table | integer <int64> The table number to use for the route. In some scenarios, it may be useful to set routes in a separate routing table. It may also be used to refer to routing policy rules which also accept a table parameter. Allowed values are positive integers starting from 1. Some values are already in use to refer to specific routing tables. |
netgate-host-route:via | string IPv6 address to the gateway to use for this route. |
netgate-host-route:mtu | integer <int64> The MTU to be used for the route, in bytes. (1 .. 4294967295). |
{- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes/route=%7Bto%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route": {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route to be added or updated
object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route) Routes are index by their destination prefix. |
{- "netgate-host-route:route": {
- "netgate-host-route:congestion-window": 0,
- "netgate-host-route:advertised-receive-window": 0,
- "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "global",
- "netgate-host-route:description": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "unicast",
- "netgate-host-route:on-link": true,
- "netgate-host-route:table": 0,
- "netgate-host-route:via": "string",
- "netgate-host-route:mtu": 0
}
}
Routes are index by their destination prefix.
name required | string Id of route-table |
if-name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-config/route-tables/route-table=%7Bname%7D/static-routes/interfaces/interface=%7Bif-name%7D/ipv6-routes/route=%7Bto%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:host-route-state": {
- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- null
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- null
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}
}
]
}
}
}
The list of host interfaces with static routes.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:interfaces": {
- "netgate-host-route:interface": [
- {
- "netgate-host-route:name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": null,
- "netgate-host-route:address": null
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": null,
- "netgate-host-route:address": null
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}
}
]
}
}
A host interface with static routes.
name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:interface": {
- "netgate-host-route:name": "string",
- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}, - "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}
}
}
List of IPv4 routes by destination prefix for a given interface.
name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:ipv4-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}
}
Routes are index by their destination prefix.
name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route": {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
}
returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops
name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%7D/next-hops" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}
}
A list of hops in a multi-hop route.
name required | string Id of interface |
to required | string Id of route |
address required | string Id of hop |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv4-routes/route=%7Bto%7D/next-hops/hop=%7Baddress%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:hop": {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
}
List of IPv6 routes by destination prefix for a given interface.
name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:ipv6-routes": {
- "netgate-host-route:route": [
- {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
]
}
}
Routes are index by their destination prefix.
name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:route": {
- "netgate-host-route:protocol": "string",
- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}, - "netgate-host-route:metric": 0,
- "netgate-host-route:scope": "string",
- "netgate-host-route:from": "string",
- "netgate-host-route:to": "string",
- "netgate-host-route:type": "string",
- "netgate-host-route:table": 0
}
}
returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops
name required | string Id of interface |
to required | string Id of route |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%7D/next-hops" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:next-hops": {
- "netgate-host-route:hop": [
- {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
]
}
}
A list of hops in a multi-hop route.
name required | string Id of interface |
to required | string Id of route |
address required | string Id of hop |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-host-route:host-route-state/interfaces/interface=%7Bname%7D/ipv6-routes/route=%7Bto%7D/next-hops/hop=%7Baddress%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-host-route:hop": {
- "netgate-host-route:weight": 0,
- "netgate-host-route:address": "string"
}
}