This YANG module provides a data model for host IP routes.
Copyright 2024 Rubicon Communications, LLC.
Example URL
Host system IP route configuration.
netgate.host.route.HostRouteConfig
Internal error
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)) }
Example URL
Host system IP route configuration.
netgate.host.route.HostRouteConfig to be added to list
netgate-host-route:host-route-config | object (netgate.host.route.HostRouteConfig) |
Object created
Internal error
Object already exists
Example URL
Host system IP route configuration.
netgate.host.route.HostRouteConfig to be added or updated
netgate-host-route:host-route-config-wrapper | object (netgate.host.route.HostRouteConfigWrapper) |
Object created
Object modified
Internal error
Example URL
Host system IP route configuration.
Object deleted
Internal error
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)) }
Example URL
Host system static routes.
netgate.host.route.hostrouteconfig.RouteTables
Internal error
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)) }
Example URL
Host system static routes.
netgate.host.route.hostrouteconfig.RouteTables to be added to list
route-tables | object (netgate.host.route.hostrouteconfig.RouteTables) |
Object created
Internal error
Object already exists
Example URL
Host system static routes.
netgate.host.route.hostrouteconfig.RouteTables to be added or updated
netgate-host-route:route-tables-wrapper | object (netgate.host.route.hostrouteconfig.RouteTablesWrapper) |
Object created
Object modified
Internal error
Example URL
Host system static routes.
Object deleted
Internal error
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)) }
Example URL
Currently, one host route table named 'default' is supported.
netgate.host.route.hostrouteconfig.routetables.RouteTable to be added to list
route-table | object (netgate.host.route.hostrouteconfig.routetables.RouteTable) |
Object created
Internal error
Object already exists
Example URL
Currently, one host route table named 'default' is supported.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.RouteTable
Internal error
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)) }
Example URL
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
netgate-host-route:route-table-wrapper | object (netgate.host.route.hostrouteconfig.routetables.RouteTableWrapper) |
Object created
Object modified
Internal error
Example URL
Currently, one host route table named 'default' is supported.
name required | string Id of route-table |
Object deleted
Internal error
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)) }
Example URL
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes
Internal error
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)) }
Example URL
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
static-routes | object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes) |
Object created
Internal error
Object already exists
Example URL
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
netgate-host-route:static-routes-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutesWrapper) |
Object created
Object modified
Internal error
Example URL
Host system IPv4 and IPv6 static routes.
name required | string Id of route-table |
Object deleted
Internal error
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)) }
Example URL
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces
Internal error
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)) }
Example URL
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
interfaces | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces) |
Object created
Internal error
Object already exists
Example URL
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
netgate-host-route:interfaces-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.InterfacesWrapper) |
Object created
Object modified
Internal error
Example URL
Static routes are associated with a specific, required interface.
name required | string Id of route-table |
Object deleted
Internal error
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)) }
Example URL
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
interface | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface) |
Object created
Internal error
Object already exists
Example URL
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
Internal error
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)) }
Example URL
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
netgate-host-route:interface-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.InterfaceWrapper) |
Object created
Object modified
Internal error
Example URL
An interface with static routes.
name required | string Id of route-table |
if-name required | string Id of interface |
Object deleted
Internal error
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)) }
Example URL
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
Internal error
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)) }
Example URL
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
ipv4-routes | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4Routes) |
Object created
Internal error
Object already exists
Example URL
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
netgate-host-route:ipv4-routes-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv4RoutesWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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)) }
Example URL
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
route | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route) |
Object created
Internal error
Object already exists
Example URL
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
Internal error
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)) }
Example URL
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
netgate-host-route:route-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.RouteWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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)) }
Example URL
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
Internal error
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)) }
Example URL
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
ipv6-routes | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6Routes) |
Object created
Internal error
Object already exists
Example URL
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
netgate-host-route:ipv6-routes-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.Ipv6RoutesWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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)) }
Example URL
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
route | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route) |
Object created
Internal error
Object already exists
Example URL
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
Internal error
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)) }
Example URL
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
netgate-host-route:route-wrapper | object (netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.RouteWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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)) }
Example URL
Host system IP route state information.
netgate.host.route.HostRouteState
Internal error
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)) }
Example URL
The list of host interfaces with static routes.
netgate.host.route.hostroutestate.Interfaces
Internal error
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)) }
Example URL
A host interface with static routes.
name required | string Id of interface |
netgate.host.route.hostroutestate.interfaces.Interface
Internal error
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)) }
Example URL
List of IPv4 routes by destination prefix for a given interface.
name required | string Id of interface |
netgate.host.route.hostroutestate.interfaces.interface.Ipv4Routes
Internal error
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)) }
Example URL
Routes are index by their destination prefix.
name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.Route
Internal error
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)) }
Example URL
returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops
name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops
Internal error
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)) }
Example URL
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 |
netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.nexthops.Hop
Internal error
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)) }
Example URL
List of IPv6 routes by destination prefix for a given interface.
name required | string Id of interface |
netgate.host.route.hostroutestate.interfaces.interface.Ipv6Routes
Internal error
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)) }
Example URL
Routes are index by their destination prefix.
name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.Route
Internal error
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)) }
Example URL
returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops
name required | string Id of interface |
to required | string Id of route |
netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops
Internal error
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)) }
Example URL
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 |
netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.nexthops.Hop
Internal error
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)) }