netgate-route-table API (24.06)

This YANG module provides a Netgate-defined data-model for Route Tables.

Copyright 2017-2020 Rubicon Communications, LLC.

route-table-config

returns netgate.route.table.RouteTableConfig

Route Table define a set of static IPv4 and IPv6 routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-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-route-table:route-table-config": {
    }
}

creates netgate.route.table.RouteTableConfig

Route Table define a set of static IPv4 and IPv6 routes.

Request Body schema: application/yang-data+json

netgate.route.table.RouteTableConfig to be added to list

object (netgate.route.table.routetableconfig.StaticRoutes)

Static routes.

Responses

Request samples

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

creates or updates netgate.route.table.RouteTableConfig

Route Table define a set of static IPv4 and IPv6 routes.

Request Body schema: application/yang-data+json

netgate.route.table.RouteTableConfig to be added or updated

object (netgate.route.table.RouteTableConfig)

Route Table define a set of static IPv4 and IPv6 routes.

Responses

Request samples

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

removes netgate.route.table.RouteTableConfig

Route Table define a set of static IPv4 and IPv6 routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-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.route.table.routetableconfig.StaticRoutes

Static routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/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-route-table:static-routes": {
    }
}

creates netgate.route.table.routetableconfig.StaticRoutes

Static routes.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.StaticRoutes to be added to list

Array of objects (netgate.route.table.routetableconfig.staticroutes.RouteTable)

Route table entries are indexed by their name. Table names are unique across all address families.

Responses

Request samples

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

creates or updates netgate.route.table.routetableconfig.StaticRoutes

Static routes.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.StaticRoutes to be added or updated

object (netgate.route.table.routetableconfig.StaticRoutes)

Static routes.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.StaticRoutes

Static routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/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))

}

creates netgate.route.table.routetableconfig.staticroutes.RouteTable

Route table entries are indexed by their name. Table names are unique across all address families.

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.RouteTable to be added to list

netgate-route-table:name
string

The name of a Route Table.

object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes)

List of IPv4 routes by destination prefix.

netgate-route-table:description
string

A description of the route table.

netgate-route-table:id
integer <int64>
Default: 0

Numeric VRF table ID. The value 0 is used by default tables

object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes)

List of IPv6 routes by destination prefix.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-route-table:name": "string",
  • "netgate-route-table:ipv4-routes": {
    },
  • "netgate-route-table:description": "string",
  • "netgate-route-table:id": 0,
  • "netgate-route-table:ipv6-routes": {
    }
}

returns netgate.route.table.routetableconfig.staticroutes.RouteTable

Route table entries are indexed by their name. Table names are unique across all address families.

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-route-table:route-table-config/static-routes/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-route-table:route-table": {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.RouteTable

Route table entries are indexed by their name. Table names are unique across all address families.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.RouteTable to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.RouteTable)

Route table entries are indexed by their name. Table names are unique across all address families.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.RouteTable

Route table entries are indexed by their name. Table names are unique across all address families.

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-route-table:route-table-config/static-routes/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.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

List of IPv4 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%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-route-table:ipv4-routes": {
    }
}

creates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes to be added to list

Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route)

Routes are index by their destination.

Responses

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

List of IPv4 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes)

List of IPv4 routes by destination prefix.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.Ipv4Routes

List of IPv4 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%7Bname%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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route to be added to list

netgate-route-table:description
string

A description of the route.

netgate-route-table:destination-prefix
string

IPv4 destination prefix

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop)

Next-hop configuration.

netgate-route-table:priority
integer <int32>

Administrative distance preference.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-route-table:description": "string",
  • "netgate-route-table:destination-prefix": "string",
  • "netgate-route-table:next-hop": {
    },
  • "netgate-route-table:priority": 0
}

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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-route-table:route": {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route)

Routes are index by their destination.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

	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-route-table:next-hop": {
    }
}

creates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop to be added to list

Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop)

A list of next-hops.

Responses

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop)

Next-hop configuration.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

	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.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop to be added to list

netgate-route-table:drop
boolean

Drop the packet.

netgate-route-table:if-name
string

The next hop interface name.

netgate-route-table:ipv4-address
string

The next hop IPv4 address.

netgate-route-table:resolve-attached
boolean

Resolve attached

netgate-route-table:null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

netgate-route-table:hop-id
integer <int64>

A unique identifier for each next-hop.

netgate-route-table:classify-table-name
string

Use the given Classify Table name as the next hop.

netgate-route-table:weight
integer <int32>

Multipath route weight.

netgate-route-table:resolve-host
boolean

Resolve host

netgate-route-table:null-send-prohibit
boolean

Drop packet with a 'prohibited' reply.

netgate-route-table:next-hop-table-name
string

The next hop route table name.

netgate-route-table:local
boolean

Receive the packet locally.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-route-table:drop": true,
  • "netgate-route-table:if-name": "string",
  • "netgate-route-table:ipv4-address": "string",
  • "netgate-route-table:resolve-attached": true,
  • "netgate-route-table:null-send-unreach": true,
  • "netgate-route-table:hop-id": 0,
  • "netgate-route-table:classify-table-name": "string",
  • "netgate-route-table:weight": 0,
  • "netgate-route-table:resolve-host": true,
  • "netgate-route-table:null-send-prohibit": true,
  • "netgate-route-table:next-hop-table-name": "string",
  • "netgate-route-table:local": true
}

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop": {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop)

A list of next-hops.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv4routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

List of IPv6 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%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-route-table:ipv6-routes": {
    }
}

creates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes to be added to list

Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route)

Routes are index by their destination.

Responses

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

List of IPv6 routes by destination prefix.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes)

List of IPv6 routes by destination prefix.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.Ipv6Routes

List of IPv6 routes by destination prefix.

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-route-table:route-table-config/static-routes/route-table=%7Bname%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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route to be added to list

netgate-route-table:description
string

A description of the route.

netgate-route-table:destination-prefix
string

IPv6 destination prefix

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop)

Next-hop configuration.

netgate-route-table:priority
integer <int32>

Administrative distance preference.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-route-table:description": "string",
  • "netgate-route-table:destination-prefix": "string",
  • "netgate-route-table:next-hop": {
    },
  • "netgate-route-table:priority": 0
}

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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-route-table:route": {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route)

Routes are index by their destination.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

	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-route-table:next-hop": {
    }
}

creates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop to be added to list

Array of objects (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop)

A list of next-hops.

Responses

Request samples

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

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop)

Next-hop configuration.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

	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.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop to be added to list

netgate-route-table:drop
boolean

Drop the packet.

netgate-route-table:if-name
string

The next hop interface name.

netgate-route-table:resolve-attached
boolean

Resolve attached

netgate-route-table:null-send-unreach
boolean

Drop packet with an 'unreachable' reply.

netgate-route-table:hop-id
integer <int64>

A unique identifier for each next-hop.

netgate-route-table:classify-table-name
string

Use the given Classify Table name as the next hop.

netgate-route-table:weight
integer <int32>

Multipath route weight.

netgate-route-table:resolve-host
boolean

Resolve host

netgate-route-table:null-send-prohibit
boolean

Drop packet with a 'prohibited' reply.

netgate-route-table:next-hop-table-name
string

The next hop route table name.

netgate-route-table:local
boolean

Receive the packet locally.

netgate-route-table:ipv6-address
string

The next hop IPv6 address.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-route-table:drop": true,
  • "netgate-route-table:if-name": "string",
  • "netgate-route-table:resolve-attached": true,
  • "netgate-route-table:null-send-unreach": true,
  • "netgate-route-table:hop-id": 0,
  • "netgate-route-table:classify-table-name": "string",
  • "netgate-route-table:weight": 0,
  • "netgate-route-table:resolve-host": true,
  • "netgate-route-table:null-send-prohibit": true,
  • "netgate-route-table:next-hop-table-name": "string",
  • "netgate-route-table:local": true,
  • "netgate-route-table:ipv6-address": "string"
}

returns netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop": {
    }
}

creates or updates netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Request Body schema: application/yang-data+json

netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop to be added or updated

object (netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop)

A list of next-hops.

Responses

Request samples

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

removes netgate.route.table.routetableconfig.staticroutes.routetable.ipv6routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-config/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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))

}

route-table-state

returns netgate.route.table.RouteTableState

Route Table define a set of static IPv4 and IPv6 routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-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-route-table:route-table-state": {
    }
}

returns netgate.route.table.routetablestate.StaticRoutes

Static routes.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/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-route-table:static-routes": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.RouteTable

Route table entries are indexed by their name. Table names are unique across all address families.

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-route-table:route-table-state/static-routes/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-route-table:route-table": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.Ipv4Routes

List of IPv4 routes by destination prefix.

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-route-table:route-table-state/static-routes/route-table=%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-route-table:ipv4-routes": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%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-route-table:route": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop"

	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-route-table:next-hop": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv4routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv4-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.Ipv6Routes

List of IPv6 routes by destination prefix.

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-route-table:route-table-state/static-routes/route-table=%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-route-table:ipv6-routes": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.Route

Routes are index by their destination.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%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-route-table:route": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.NextHop

Next-hop configuration.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop"

	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-route-table:next-hop": {
    }
}

returns netgate.route.table.routetablestate.staticroutes.routetable.ipv6routes.route.nexthop.Hop

A list of next-hops.

path Parameters
name
required
string

Id of route-table

destination-prefix
required
string

Id of route

hop-id
required
integer <int64>

Id of hop

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-route-table:route-table-state/static-routes/route-table=%7Bname%7D/ipv6-routes/route=%7Bdestination-prefix%7D/next-hop/hop=%7Bhop-id%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-route-table:hop": {
    }
}

route-lookup

operates on netgate.route.table.RouteLookup

operates on netgate.route.table.RouteLookup

Request Body schema: application/yang-data+json
object (netgate.route.table.routelookup.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}