How can I override CDRouter configuration file settings on the command-line?

It is possible to override or add additional testvar settings directly from the command-line. This can be done using the -testvar option. The format for the -testvar option is testvarName=value.


Here’s a simple example using a single testvar:

# cdrouter-cli -testvar eapType=eap-sim -module eapol.tcl -trace

Here’s another example using a two testvars:

# cdrouter-cli -testvar wanIspIp= -testvar wanIspAssignIp= -module basic.tcl

If the testvar is part of a testvar_group, the -testvar_group option should be used instead. The format for the -testvar_group option is group:testvarName=value:

# cdrouter-cli -testvar_group lan2:lanSSID=testnet

If the value contains any whitespace then it must be enclosed in quotes:

# cdrouter-cli -testvar firewallTcpOpenPorts="22 443"