mirror of https://github.com/status-im/consul.git
1fbe44d2c5
Reference: https://github.com/hashicorp/consul/issues/4090 Examples covering a variety of potential use cases. Verified via `sockaddr eval` and `console agent -bind` on a test machine: ```console # Baseline $ sockaddr eval 'GetAllInterfaces' [127.0.0.1/8 {1 65536 lo up|loopback} ::1 {1 65536 lo up|loopback} 10.0.0.10/8 {2 1500 eth0 b8:27:eb:7b:36:95 up|broadcast|multicast} fe80::12dc:5e4d:8ff8:2d96/64 {2 1500 eth0 b8:27:eb:7b:36:95 up|broadcast|multicast} 192.168.1.10/24 {3 1500 wlan0 b8:27:eb:2e:63:c0 up|broadcast|multicast} fe80::b6dc:5758:c306:b15b/64 {3 1500 wlan0 b8:27:eb:2e:63:c0 up|broadcast|multicast}] # Using address within a specific CIDR $ sockaddr eval 'GetPrivateInterfaces | include "network" "10.0.0.0/8" | attr "address"' 10.0.0.10 # Using a static network interface name $ sockaddr eval 'GetInterfaceIP "eth0"' 10.0.0.10 # Using regular expression matching for network interface name that is forwardable and up $ sockaddr eval 'GetAllInterfaces | include "name" "^eth" | include "flags" "forwardable|up" | attr "address"' 10.0.0.10 ``` |
||
---|---|---|
.. | ||
api | ||
assets | ||
docs | ||
intro | ||
layouts | ||
.gitignore | ||
404.html.md | ||
android-manifest.json.erb | ||
community.html.erb | ||
configuration.html.erb | ||
discovery.html.erb | ||
downloads.html.erb | ||
downloads_tools.html.erb | ||
favicon.ico | ||
index.html.erb | ||
microsoft-tile.xml.builder | ||
redirects.txt | ||
robots.txt | ||
security.html.erb | ||
segmentation.html.erb | ||
sitemap.xml.builder |