INfinity 510 Protocol Reference Guide - Sirit
INfinity 510 Protocol Reference Guide - Sirit
INfinity 510 Protocol Reference Guide - Sirit
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 11 - Com Namespace<br />
com.network.1.set<br />
This function specifies the IP acquisition method, IP address, subnet mask,<br />
and default gateway for the first network interface on the reader. The IP<br />
acquisition method can be either static or dhcp for IPV4 and static,<br />
radv_only, or dhcpv6 for IPV6. If static or dhcpv6 are chosen for IPV6, it<br />
does not disable router advertisements from being accepted. Router<br />
advertisement acceptance are only disabled when IPV6 is disabled.<br />
For IPV4, if the method is static, the IP address, subnet mask, and default<br />
gateway must also be specified in the function call. For IPV6, if the method<br />
is static, the IPV6 address/netmask and default gateway must be specified.<br />
If the method is static, setting the default gateway to either none or 0.0.0.0<br />
(IPV4 only) will report a default gateway of none.<br />
If the IP acquisition method is dhcp (or radv_only/dhcpv6 for IPV6), no ip<br />
address, subnet mask, or default gateway should be specified in the<br />
function call.<br />
Note, if "method" or "ipv6_method" are not specified, IPV4 or IPV6,<br />
respectively, will be disabled. However, an IPV4 method or IPV6 (or both)<br />
method must be specified or this function will fail. If the user wants no<br />
network communications, disconnect the ethernet cable from the reader.<br />
The following example sets the reader to obtain its IP address via dhcp for<br />
IPV4 and IPV6 will be disabled. The second example sets a static ipv4<br />
address, subnet mask and default gateway and IPV6 will be disabled.<br />
>>> com.network.1.set(method=dhcp)<br />
ok<br />
>>> com.network.1.set(method=static,<br />
ip_address=10.1.1.243, subnet_mask=255.255.255.0,<br />
default_gateway=10.1.1.1)<br />
ok<br />
The following example sets the reader to obtain its IPV6 address via<br />
radv_only for IPV6 and IPV4 will be disabled. The second example sets a<br />
static IPV6 address/netmask and default gateway and IPV4 will be<br />
disabled.<br />
>>> com.network.1.set(ipv6_method=radv_only)<br />
ok<br />
>>> com.network.1.set(ipv6_method=static,<br />
ipv6_address=2001::2/64, default_gateway=2001::1)<br />
ok<br />
The following example sets the reader to obtain its IPV6 address via<br />
radv_only and the IPV4 address via dhcp. The second example sets a static<br />
94 <strong>INfinity</strong> <strong>510</strong> <strong>Protocol</strong> <strong>Reference</strong> <strong>Guide</strong>