Search

vcli cidrroutes

Handle CIDR routing targets

Synopsis

Handle CIDR routing targets, such as listing, add, delete or update.

Examples:

 cidrroutes list
 cidrroutes ls -f id=1
 cidrroutes ls -f name="MyCIDRRoute*"
 cidrroutes add myCIDRRoute --reject --cidr=216.86.96.0/19,176.82.0.0/16
 cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1,176.82.0.0/16:2
 cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1~2,216.86.96.0/19:1~3 --subdecision=weight (~<number represents weight(optional))
 cidrroutes add myCIDRRoute --cidr=12:3456:78:90ab:cd:ef01:23:30/125:1
 cidrroutes add myCIDRRoute --cidr-csv=my_cidrs.csv
 cidrroutes update 1 --name newname
 cidrroutes delete 1
 cidrroutes inspect 1

CSV:
	Note: For reject, only CIDR is required.

	Fields(csv line):
	  CIDR,Tag ID,weight(optional)

	Example:
	  216.86.96.0/19,1,1
	  216.86.96.0/19,2,2
	  176.82.0.0/16,1,3
	  12:3456:78:90ab:cd:ef01:23:30/125,1,3

Weights:
	Represented by <Tag ID>~<weight>. Can be used to set priority between tags on the same CIDR-range.
	For example: --cidr=216.86.96.0/19:1~1,216.86.96.0/19:2~2 - Will give nodes with tag ID: 2
	higher priority than tag ID: 1 for clients within CIDR-range: 216.86.96.0/19 because the weight: 2 is higher.
	

Options

  -h, --help   help for cidrroutes

Options inherited from parent commands

  -c, --config string   configuration file for the CLI (default ~/.vcli.yml)
                        Could also be set via VARNISH_CONTROLLER_CLI_CONFIG=/path/to/config.yml
      --csv             Output the response table as CSV format.
  -j, --json            Output the response table as JSON format.

SEE ALSO


®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203