Search

vcli cidrroutes

Handle CIDR routing targets

Synopsis

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

Examples:

vcli cidrroutes list
vcli cidrroutes ls -f id=1
vcli cidrroutes ls -f name="MyCIDRRoute*"
vcli cidrroutes add myCIDRRoute --reject --cidr=216.86.96.0/19,176.82.0.0/16
vcli cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1,176.82.0.0/16:2
vcli cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1~2,216.86.96.0/19:1~3 --subdecision=weight (~<number represents weight(optional))
vcli cidrroutes add myCIDRRoute --cidr=12:3456:78:90ab:cd:ef01:23:30/125:1
vcli cidrroutes add myCIDRRoute --cidr-csv=my_cidrs.csv --domain-map-csv=domain_maps.csv
vcli cidrroutes add myCIDRRoute --cidr=216.86.96.0/19:1,176.82.0.0/16:2 --domain-map example.com,192.168.1.0/24 --domain-map example2.com,192.168.2.0/24 --domain-maps *,192.168.1.0/24
vcli cidrroutes update 1 --name newname
vcli cidrroutes delete 1
vcli 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 ~. 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.

Domain Maps: Domain maps are used to return a matching IP of an endpoint depending on the requested domain. These are only used for DNS routing where IP addresses for the endpoints are returned. Note: This is a separate CSV used to map the domains to CIDRs for the specific CIDR Route.

Fields(csv line):
	   FQDN,CIDR_1,CIDR_2,...,CIDR_N
Example:
	example.com,216.86.96.0/19,217.86.96.0/24
  	example.com,fe10::225e:1aff:fe32:22e1/64

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