netgate-tunnel API (24.10)

This YANG module provides a Netgate-defined data model for tunnel management.

Copyright 2022 Rubicon Communications, LLC.

tunnels-config

returns netgate.tunnel.TunnelsConfig

Tunnel-related configurations.

Responses

Request samples

package main

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

func main() {

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

creates netgate.tunnel.TunnelsConfig

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added to list

object (netgate.ipip.tunnelsconfig.Ipip)

IPIP tunnel configurations

object (netgate.tunnel.tunnelsconfig.NextHops)

Next hop configurations for multipoint tunnels.

Responses

Request samples

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

creates or updates netgate.tunnel.TunnelsConfig

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added or updated

object (netgate.tunnel.TunnelsConfig)

Tunnel-related configurations.

Responses

Request samples

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

removes netgate.tunnel.TunnelsConfig

Tunnel-related configurations.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-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.tunnel.tunnelsconfig.NextHops

Next hop configurations for multipoint tunnels.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/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-tunnel:next-hops": {
    }
}

creates netgate.tunnel.tunnelsconfig.NextHops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added to list

Array of objects (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface)

Next-hop configuration for a tunnel interface.

Responses

Request samples

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

creates or updates netgate.tunnel.tunnelsconfig.NextHops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added or updated

object (netgate.tunnel.tunnelsconfig.NextHops)

Next hop configurations for multipoint tunnels.

Responses

Request samples

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

removes netgate.tunnel.tunnelsconfig.NextHops

Next hop configurations for multipoint tunnels.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops"

	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.tunnel.tunnelsconfig.nexthops.TunnelInterface

Next-hop configuration for a tunnel interface.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added to list

netgate-tunnel:name
string

Tunnel interface

Array of objects (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination)
Array of objects (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination)

IPv4 address reachable over a multipoint tunnel.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-tunnel:name": "string",
  • "netgate-tunnel:ipv6-tunnel-destination": [
    ],
  • "netgate-tunnel:ipv4-tunnel-destination": [
    ]
}

returns netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-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-tunnel:tunnel-interface": {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added or updated

object (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface)

Next-hop configuration for a tunnel interface.

Responses

Request samples

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

removes netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%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))

}

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination to be added to list

netgate-tunnel:ipv6-next-hop-address
string

The tunnel peer IPv6 address (outside address)

netgate-tunnel:address
string

IPv4 address reachable via tunnel interface (inside address)

netgate-tunnel:ipv4-next-hop-address
string

The tunnel peer IPv4 address (outside address)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-tunnel:ipv6-next-hop-address": "string",
  • "netgate-tunnel:address": "string",
  • "netgate-tunnel:ipv4-next-hop-address": "string"
}

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%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-tunnel:ipv4-tunnel-destination": {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination to be added or updated

object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination)

IPv4 address reachable over a multipoint tunnel.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-tunnel:ipv4-tunnel-destination": {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv4TunnelDestination

IPv4 address reachable over a multipoint tunnel.

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%7Baddress%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))

}

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

creates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination to be added to list

netgate-tunnel:ipv6-next-hop-address
string

The tunnel peer IPv6 address (outside address)

netgate-tunnel:address
string

IPv4 address reachable via tunnel interface

netgate-tunnel:ipv4-next-hop-address
string

The tunnel peer IPv4 address (outside address)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-tunnel:ipv6-next-hop-address": "string",
  • "netgate-tunnel:address": "string",
  • "netgate-tunnel:ipv4-next-hop-address": "string"
}

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

returns netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%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-tunnel:ipv6-tunnel-destination": {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

creates or updates netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination to be added or updated

object (netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination)

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-tunnel:ipv6-tunnel-destination": {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

removes netgate.tunnel.tunnelsconfig.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%7Baddress%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))

}

tunnels-state

returns netgate.tunnel.TunnelsState

Tunnel-related state.

Responses

Request samples

package main

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

func main() {

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

returns netgate.tunnel.tunnelsstate.NextHops

Next hop state for multipoint tunnels.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/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-tunnel:next-hops": {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.TunnelInterface

returns netgate.tunnel.tunnelsstate.nexthops.TunnelInterface

path Parameters
name
required
string

Id of tunnel-interface

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-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-tunnel:tunnel-interface": {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv4TunnelDestination

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv4TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv4-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface=%7Bname%7D/ipv4-tunnel-destination=%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-tunnel:ipv4-tunnel-destination": {
    }
}

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv6TunnelDestination

returns netgate.tunnel.tunnelsstate.nexthops.tunnelinterface.Ipv6TunnelDestination

path Parameters
name
required
string

Id of tunnel-interface

address
required
string

Id of ipv6-tunnel-destination

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-state/next-hops/tunnel-interface=%7Bname%7D/ipv6-tunnel-destination=%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-tunnel:ipv6-tunnel-destination": {
    }
}