Module for gathering and managing network information
Members
Performs a DNS lookup with dig
CLI Example:
salt '*' network.dig archlinux.org
Returns the IP address of a given hostname
CLI Example:
salt '*' network.host_to_ip example.com
Returns the hwaddr for a given interface
CLI Example:
salt '*' network.hwaddr eth0
Returns a dictionary of interfaces with various information about each (up/down state, ip address, netmask, and hwaddr)
CLI Example:
salt '*' network.interfaces
Returns the hostname of a given IP
CLI Example:
salt '*' network.ip_to_host 8.8.8.8
Returns the IP address for a given interface
CLI Example:
salt '*' network.ipaddr eth0
Return status of a port
CLI Example:
salt '*' network.isportopen 127.0.0.1 22
Returns the netmask for a given interface
CLI Example:
salt '*' network.netmask eth0
Return information on open ports and states
CLI Example:
salt '*' network.netstat
Performs a ping to a host
CLI Example:
salt '*' network.ping archlinux.org