Product Documentation

nspbr

Sep 07, 2016

Configuration for Policy Based Routing(PBR) entry resource.

Properties (click to see Operations)

Name Data Type Permissions Description
name
<String>
Read-write
Name for the PBR. Must begin with an ASCII alphabetic or underscore \(_\) character, and must contain only ASCII alphanumeric, underscore, hash \(\#\), period \(.\), space, colon \(:\), at \(@\), equals \(=\), and hyphen \(-\) characters. Cannot be changed after the PBR is created.
Minimum length = 1
action
<String>
Read-write
Action to perform on the outgoing IPv4 packets that match the PBR.

Available settings function as follows:
* ALLOW - The NetScaler appliance sends the packet to the designated next-hop router.
* DENY - The NetScaler appliance applies the routing table for normal destination-based routing.
Possible values = ALLOW, DENY
td
<Double>
Read-write
Integer value that uniquely identifies the traffic domain in which you want to configure the entity. If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID of 0.
Minimum value = 0
Maximum value = 4094
srcip
<Boolean>
Read-write
IP address or range of IP addresses to match against the source IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [10.102.29.30-10.102.29.189].
srcipop
<String>
Read-write
Either the equals (=) or does not equal (!=) logical operator.
Possible values = =, !=, EQ, NEQ
srcipval
<String>
Read-write
IP address or range of IP addresses to match against the source IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [10.102.29.30-10.102.29.189].
srcport
<Boolean>
Read-write
Port number or range of port numbers to match against the source port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [40-90].

Note: The destination port can be specified only for TCP and UDP protocols.
srcportop
<String>
Read-write
Logical operator.
Possible values = =, !=, EQ, NEQ
srcportval
<String>
Read-write
Port number or range of port numbers to match against the source port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [40-90].

Note: The destination port can be specified only for TCP and UDP protocols.
Maximum length = 65535
destip
<Boolean>
Read-write
IP address or range of IP addresses to match against the destination IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [10.102.29.30-10.102.29.189].
destipop
<String>
Read-write
Logical operator.
Possible values = =, !=, EQ, NEQ
destipval
<String>
Read-write
IP address or range of IP addresses to match against the destination IP address of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [10.102.29.30-10.102.29.189].
destport
<Boolean>
Read-write
Port number or range of port numbers to match against the destination port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [40-90].

Note: The destination port can be specified only for TCP and UDP protocols.
destportop
<String>
Read-write
Logical operator.
Possible values = =, !=, EQ, NEQ
destportval
<String>
Read-write
Port number or range of port numbers to match against the destination port number of an outgoing IPv4 packet. In the command line interface, separate the range with a hyphen and enclose within brackets. For example: [40-90].

Note: The destination port can be specified only for TCP and UDP protocols.
Maximum length = 65535
nexthop
<Boolean>
Read-write
IP address of the next hop router or the name of the link load balancing virtual server to which to send matching packets if action is set to ALLOW.
If you specify a link load balancing (LLB) virtual server, which can provide a backup if a next hop link fails, first make sure that the next hops bound to the LLB virtual server are actually next hops that are directly connected to the NetScaler appliance. Otherwise, the NetScaler throws an error when you attempt to create the PBR. The next hop can be null to represent null routes.
nexthopval
<String>
Read-write
The Next Hop IP address or gateway name.
iptunnel
<Boolean>
Read-write
The Tunnel name.
iptunnelname
<String>
Read-write
The iptunnel name where packets need to be forwarded upon.
vxlanvlanmap
<String>
Read-write
The vlan to vxlan mapping to be applied for incoming packets over this pbr tunnel.
srcmac
<String>
Read-write
MAC address to match against the source MAC address of an outgoing IPv4 packet.
srcmacmask
<String>
Read-write
Used to define range of Source MAC address. It takes string of 0 and 1, 0s are for exact match and 1s for wildcard. For matching first 3 bytes of MAC address, srcMacMask value "000000111111". .
Default value: "000000000000"
protocol
<String>
Read-write
Protocol, identified by protocol name, to match against the protocol of an outgoing IPv4 packet.
Possible values = ICMP, IGMP, TCP, EGP, IGP, ARGUS, UDP, RDP, RSVP, EIGRP, L2TP, ISIS
protocolnumber
<Double>
Read-write
Protocol, identified by protocol number, to match against the protocol of an outgoing IPv4 packet.
Minimum value = 1
Maximum value = 255
vlan
<Double>
Read-write
ID of the VLAN. The NetScaler appliance compares the PBR only to the outgoing packets on the specified VLAN. If you do not specify any interface ID, the appliance compares the PBR to the outgoing packets on all VLANs.
Minimum value = 1
Maximum value = 4094
vxlan
<Double>
Read-write
ID of the VXLAN. The NetScaler appliance compares the PBR only to the outgoing packets on the specified VXLAN. If you do not specify any interface ID, the appliance compares the PBR to the outgoing packets on all VXLANs.
Minimum value = 1
Maximum value = 16777215
Interface
<String>
Read-write
ID of an interface. The NetScaler appliance compares the PBR only to the outgoing packets on the specified interface. If you do not specify any value, the appliance compares the PBR to the outgoing packets on all interfaces.
priority
<Double>
Read-write
Priority of the PBR, which determines the order in which it is evaluated relative to the other PBRs. If you do not specify priorities while creating PBRs, the PBRs are evaluated in the order in which they are created.
Minimum value = 1
Maximum value = 81920
msr
<String>
Read-write
Monitor the route specified byte Next Hop parameter. This parameter is not applicable if you specify a link load balancing (LLB) virtual server name with the Next Hop parameter.
Default value: DISABLED
Possible values = ENABLED, DISABLED
monitor
<String>
Read-write
The name of the monitor.(Can be only of type ping or ARP ).
Minimum length = 1
state
<String>
Read-write
Enable or disable the PBR. After you apply the PBRs, the NetScaler appliance compares outgoing packets to the enabled PBRs.
Default value: ENABLED
Possible values = ENABLED, DISABLED
ownergroup
<String>
Read-write
The owner node group in a Cluster for this pbr rule. If ownernode is not specified then the pbr rule is treated as Striped pbr rule.
Default value: DEFAULT_NG
Minimum length = 1
detail
<Boolean>
Read-write
To get a detailed view.
hits
<Double>
Read-only
The hits of this PBR.
kernelstate
<String>
Read-only
The commit status of the PBR.
Default value: NOTAPPLIED
Possible values = APPLIED, NOTAPPLIED, RE-APPLY, SFAPPLIED, SFNOTAPPLIED, SFAPPLIED61, SFNOTAPPLIED61
curstate
<Double>
Read-only
If this route is UP/DOWN.
totalprobes
<Double>
Read-only
The total number of probes sent.
totalfailedprobes
<Double>
Read-only
The total number of failed probes.
failedprobes
<Double>
Read-only
Number of the current failed monitoring probes.
monstatcode
<Integer>
Read-only
The code indicating the monitor response.
monstatparam1
<Integer>
Read-only
First parameter for use with message code.
monstatparam2
<Integer>
Read-only
Second parameter for use with message code.
monstatparam3
<Integer>
Read-only
Third parameter for use with message code.
data
<Boolean>
Read-only
Internal data of this route.
__count
<Double>
Read-only
count parameter

Operations (click to see Properties)

Some options that you can use for each operations:

  • Getting warnings in response: NITRO allows you to get warnings in an operation by specifying the "warning" query parameter as "yes". For example, to get warnings while connecting to the NetScaler appliance, the URL is as follows:

    http://<netscaler-ip-address>/nitro/v1/config/login?warning=yes

    If any, the warnings are displayed in the response payload with the HTTP code "209 X-NITRO-WARNING".

  • Authenticated access for individual NITRO operations: NITRO allows you to logon to the NetScaler appliance to perform individual operations. You can use this option instead of creating a NITRO session (using the login object) and then using that session to perform all operations,

    To do this, you must specify the username and password in the request header of the NITRO request as follows:

    X-NITRO-USER:<username>

    X-NITRO-PASS:<password>

    Note: In such cases, make sure that the request header DOES not include the following:

    Cookie:NITRO_AUTH_TOKEN=<tokenvalue>

메모

Mandatory parameters are marked in red and placeholder content is marked in <green>.

add

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Content-Type:application/json

Request Payload:

{"nspbr":{
      "name":<String_value>,
      "action":<String_value>,
      "td":<Double_value>,
      "srcip":<Boolean_value>,
      "srcipop":<String_value>,
      "srcipval":<String_value>,
      "srcport":<Boolean_value>,
      "srcportop":<String_value>,
      "srcportval":<String_value>,
      "destip":<Boolean_value>,
      "destipop":<String_value>,
      "destipval":<String_value>,
      "destport":<Boolean_value>,
      "destportop":<String_value>,
      "destportval":<String_value>,
      "nexthop":<Boolean_value>,
      "nexthopval":<String_value>,
      "iptunnel":<Boolean_value>,
      "iptunnelname":<String_value>,
      "vxlanvlanmap":<String_value>,
      "srcmac":<String_value>,
      "srcmacmask":<String_value>,
      "protocol":<String_value>,
      "protocolnumber":<Double_value>,
      "vlan":<Double_value>,
      "vxlan":<Double_value>,
      "Interface":<String_value>,
      "priority":<Double_value>,
      "msr":<String_value>,
      "monitor":<String_value>,
      "state":<String_value>,
      "ownergroup":<String_value>
}}

Response:

HTTP Status Code on Success: 201 Created
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

delete

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr/name_value<String>

HTTP Method: DELETE

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

update

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr

HTTP Method: PUT

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Content-Type:application/json

Request Payload:

{"nspbr":{
      "name":<String_value>,
      "action":<String_value>,
      "srcip":<Boolean_value>,
      "srcipop":<String_value>,
      "srcipval":<String_value>,
      "srcport":<Boolean_value>,
      "srcportop":<String_value>,
      "srcportval":<String_value>,
      "destip":<Boolean_value>,
      "destipop":<String_value>,
      "destipval":<String_value>,
      "destport":<Boolean_value>,
      "destportop":<String_value>,
      "destportval":<String_value>,
      "nexthop":<Boolean_value>,
      "nexthopval":<String_value>,
      "iptunnel":<Boolean_value>,
      "iptunnelname":<String_value>,
      "vxlanvlanmap":<String_value>,
      "srcmac":<String_value>,
      "srcmacmask":<String_value>,
      "protocol":<String_value>,
      "protocolnumber":<Double_value>,
      "vlan":<Double_value>,
      "vxlan":<Double_value>,
      "Interface":<String_value>,
      "priority":<Double_value>,
      "msr":<String_value>,
      "monitor":<String_value>
}}

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

unset

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr?action=unset

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Content-Type:application/json

Request Payload:

{"nspbr":{
      "name":<String_value>,
      "srcip":true,
      "srcport":true,
      "destip":true,
      "destport":true,
      "nexthop":true,
      "iptunnel":true,
      "vxlanvlanmap":true,
      "srcmac":true,
      "srcmacmask":true,
      "protocol":true,
      "vlan":true,
      "vxlan":true,
      "Interface":true,
      "msr":true,
      "monitor":true
}}

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

enable

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr?action=enable

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Content-Type:application/json

Request Payload:

{"nspbr":{
      "name":<String_value>
}}

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

disable

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr?action=disable

HTTP Method: POST

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Content-Type:application/json

Request Payload:

{"nspbr":{
      "name":<String_value>
}}

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

get (all)

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr

Query-parameters:

args

http://<netscaler-ip-address>/nitro/v1/config/nspbr?args=name:<String_value>,detail:<Boolean_value>

Use this query-parameter to get nspbr resources based on additional properties.

attrs

http://<netscaler-ip-address>/nitro/v1/config/nspbr?attrs=property-name1,property-name2

Use this query parameter to specify the resource details that you want to retrieve.

filter

http://<netscaler-ip-address>/nitro/v1/config/nspbr?filter=property-name1:property-val1,property-name2:property-val2

Use this query-parameter to get the filtered set of nspbr resources configured on NetScaler.Filtering can be done on any of the properties of the resource.

view

http://<netscaler-ip-address>/nitro/v1/config/nspbr?view=summary

Note: By default, the retrieved results are displayed in detail view (?view=detail).

pagination

http://<netscaler-ip-address>/nitro/v1/config/nspbr?pagesize=#no&pageno=#no

Use this query-parameter to get the nspbr resources in chunks.

HTTP Method: GET

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Accept:application/json

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

Response Headers:

Content-Type:application/json

Response Payload:

{ "nspbr": [ {
name:<String_value>,detail:<Boolean_value>      "action":<String_value>,
      "srcmac":<String_value>,
      "srcmacmask":<String_value>,
      "protocol":<String_value>,
      "protocolnumber":<Double_value>,
      "srcportval":<String_value>,
      "td":<Double_value>,
      "destportval":<String_value>,
      "srcipval":<String_value>,
      "destipval":<String_value>,
      "vlan":<Double_value>,
      "vxlan":<Double_value>,
      "state":<String_value>,
      "Interface":<String_value>,
      "hits":<Double_value>,
      "priority":<Double_value>,
      "srcipop":<String_value>,
      "destipop":<String_value>,
      "srcportop":<String_value>,
      "destportop":<String_value>,
      "kernelstate":<String_value>,
      "nexthopval":<String_value>,
      "iptunnelname":<String_value>,
      "vxlanvlanmap":<String_value>,
      "msr":<String_value>,
      "monitor":<String_value>,
      "curstate":<Double_value>,
      "totalprobes":<Double_value>,
      "totalfailedprobes":<Double_value>,
      "failedprobes":<Double_value>,
      "monstatcode":<Integer_value>,
      "monstatparam1":<Integer_value>,
      "monstatparam2":<Integer_value>,
      "monstatparam3":<Integer_value>,
      "data":<Boolean_value>,
      "ownergroup":<String_value>
}]}

get

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr/name_value<String>

Query-parameters:

attrs

http://<netscaler-ip-address>/nitro/v1/config/nspbr/name_value<String>?attrs=property-name1,property-name2

Use this query parameter to specify the resource details that you want to retrieve.

view

http://<netscaler-ip-address>/nitro/v1/config/nspbr/name_value<String>?view=summary

Note: By default, the retrieved results are displayed in detail view (?view=detail).

HTTP Method: GET

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Accept:application/json

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

Response Headers:

Content-Type:application/json

Response Payload:

{ "nspbr": [ {
name:<String_value>,detail:<Boolean_value>      "action":<String_value>,
      "srcmac":<String_value>,
      "srcmacmask":<String_value>,
      "protocol":<String_value>,
      "protocolnumber":<Double_value>,
      "srcportval":<String_value>,
      "td":<Double_value>,
      "destportval":<String_value>,
      "srcipval":<String_value>,
      "destipval":<String_value>,
      "vlan":<Double_value>,
      "vxlan":<Double_value>,
      "state":<String_value>,
      "Interface":<String_value>,
      "hits":<Double_value>,
      "priority":<Double_value>,
      "srcipop":<String_value>,
      "destipop":<String_value>,
      "srcportop":<String_value>,
      "destportop":<String_value>,
      "kernelstate":<String_value>,
      "nexthopval":<String_value>,
      "iptunnelname":<String_value>,
      "vxlanvlanmap":<String_value>,
      "msr":<String_value>,
      "monitor":<String_value>,
      "curstate":<Double_value>,
      "totalprobes":<Double_value>,
      "totalfailedprobes":<Double_value>,
      "failedprobes":<Double_value>,
      "monstatcode":<Integer_value>,
      "monstatparam1":<Integer_value>,
      "monstatparam2":<Integer_value>,
      "monstatparam3":<Integer_value>,
      "data":<Boolean_value>,
      "ownergroup":<String_value>
}]}

count

URL: http://<netscaler-ip-address>/nitro/v1/config/nspbr?count=yes

HTTP Method: GET

Request Headers:

Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
Accept:application/json

Response:

HTTP Status Code on Success: 200 OK
HTTP Status Code on Failure: 4xx <string> (for general HTTP errors) or 5xx <string> (for NetScaler-specific errors). The response payload provides details of the error

Response Headers:

Content-Type:application/json

Response Payload:

{ "nspbr": [ { "__count": "#no"} ] }