salt.modules.debian_ip

The networking module for Debian based distros

References:

salt.modules.debian_ip.apply_network_settings(**settings)

Apply global network configuration.

CLI 范例:

salt '*' ip.apply_network_settings
salt.modules.debian_ip.build_bond(iface, **settings)

Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module.

CLI 范例:

salt '*' ip.build_bond bond0 mode=balance-alb
salt.modules.debian_ip.build_interface(iface, iface_type, enabled, **settings)

Build an interface script for a network interface.

CLI 范例:

salt '*' ip.build_interface eth0 eth <settings>
salt.modules.debian_ip.build_network_settings(**settings)

Build the global network script.

CLI 范例:

salt '*' ip.build_network_settings <settings>
salt.modules.debian_ip.build_routes(iface, **settings)

Add route scripts for a network interface using up commands.

CLI 范例:

salt '*' ip.build_routes eth0 <settings>
salt.modules.debian_ip.down(iface, iface_type)

Shutdown a network interface

CLI 范例:

salt '*' ip.down eth0 eth
salt.modules.debian_ip.get_bond(iface)

Return the content of a bond script

CLI 范例:

salt '*' ip.get_bond bond0
salt.modules.debian_ip.get_interface(iface)

Return the contents of an interface script

CLI 范例:

salt '*' ip.get_interface eth0
salt.modules.debian_ip.get_network_settings()

Return the contents of the global network script.

CLI 范例:

salt '*' ip.get_network_settings
salt.modules.debian_ip.get_routes(iface)

Return the routes for the interface

CLI 范例:

salt '*' ip.get_routes eth0
salt.modules.debian_ip.up(iface, iface_type)

Start up a network interface

CLI 范例:

salt '*' ip.up eth0 eth