netgate-host-route API (24.10)

This YANG module provides a data model for host IP routes.

Copyright 2024 Rubicon Communications, LLC.

host-route-config

returns netgate.host.route.HostRouteConfig

Host system IP route configuration.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:host-route-config": {
    }
}

creates netgate.host.route.HostRouteConfig

Host system IP route configuration.

Request Body schema: application/yang-data+json

netgate.host.route.HostRouteConfig to be added to list

object (netgate.host.route.hostrouteconfig.RouteTables)

Host system static routes.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-tables": {
    }
}

creates or updates netgate.host.route.HostRouteConfig

Host system IP route configuration.

Request Body schema: application/yang-data+json

netgate.host.route.HostRouteConfig to be added or updated

object (netgate.host.route.HostRouteConfig)

Host system IP route configuration.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:host-route-config": {
    }
}

removes netgate.host.route.HostRouteConfig

Host system IP route configuration.

Responses

Request samples

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))

}

returns netgate.host.route.hostrouteconfig.RouteTables

Host system static routes.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-tables": {
    }
}

creates netgate.host.route.hostrouteconfig.RouteTables

Host system static routes.

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-table": [
    ]
}

creates or updates netgate.host.route.hostrouteconfig.RouteTables

Host system static routes.

Request Body schema: application/yang-data+json

netgate.host.route.hostrouteconfig.RouteTables to be added or updated

object (netgate.host.route.hostrouteconfig.RouteTables)

Host system static routes.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-tables": {
    }
}

removes netgate.host.route.hostrouteconfig.RouteTables

Host system static routes.

Responses

Request samples

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))

}

creates netgate.host.route.hostrouteconfig.routetables.RouteTable

Currently, one host route table named 'default' is supported.

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:name": "string",
  • "netgate-host-route:description": "string",
  • "netgate-host-route:static-routes": {
    }
}

returns netgate.host.route.hostrouteconfig.routetables.RouteTable

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-table": {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.RouteTable

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route-table": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.RouteTable

Currently, one host route table named 'default' is supported.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

returns netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:static-routes": {
    }
}

creates netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interfaces": {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:static-routes": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.StaticRoutes

Host system IPv4 and IPv6 static routes.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interfaces": {
    }
}

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interface": [
    ]
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interfaces": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.Interfaces

Static routes are associated with a specific, required interface.

path Parameters
name
required
string

Id of route-table

Responses

Request samples

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))

}

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

An interface with static routes.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:if-name": "string",
  • "netgate-host-route:ipv4-routes": {
    },
  • "netgate-host-route:ipv6-routes": {
    }
}

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interface": {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interface": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.Interface

An interface with static routes.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

returns 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv4-routes": {
    }
}

creates 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": [
    ]
}

creates or updates 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv4-routes": {
    }
}

removes 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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).

Responses

Request samples

Content type
application/yang-data+json
{
  • "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
}

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv4routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

returns 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv6-routes": {
    }
}

creates 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": [
    ]
}

creates or updates 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv6-routes": {
    }
}

removes 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.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Responses

Request samples

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))

}

creates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

Request Body schema: application/yang-data+json

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).

Responses

Request samples

Content type
application/yang-data+json
{
  • "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
}

returns netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

creates or updates netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

removes netgate.host.route.hostrouteconfig.routetables.routetable.staticroutes.interfaces.interface.ipv6routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of route-table

if-name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

host-route-state

returns netgate.host.route.HostRouteState

Host system IP route state information.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:host-route-state": {
    }
}

returns netgate.host.route.hostroutestate.Interfaces

The list of host interfaces with static routes.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interfaces": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.Interface

A host interface with static routes.

path Parameters
name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:interface": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.Ipv4Routes

List of IPv4 routes by destination prefix for a given interface.

path Parameters
name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv4-routes": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.NextHops

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:next-hops": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv4routes.route.nexthops.Hop

A list of hops in a multi-hop route.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

address
required
string

Id of hop

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:hop": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.Ipv6Routes

List of IPv6 routes by destination prefix for a given interface.

path Parameters
name
required
string

Id of interface

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:ipv6-routes": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.Route

Routes are index by their destination prefix.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:route": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.NextHops

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:next-hops": {
    }
}

returns netgate.host.route.hostroutestate.interfaces.interface.ipv6routes.route.nexthops.Hop

A list of hops in a multi-hop route.

path Parameters
name
required
string

Id of interface

to
required
string

Id of route

address
required
string

Id of hop

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-host-route:hop": {
    }
}