Resource Type: cisco_interface
- Defined in:
- lib/puppet/type/cisco_interface.rb
- Providers:
-
cisco
Overview
%(Manages a Cisco Network Interface.
Resource dependencies should process before the interface resource.
cisco_interface
..attributes..
<interface> is the complete name of the interface.
Examples:
cisco_interface {'ethernet1/15':
shutdown => false,
description => 'switched port',
switchport_mode => access,
access_vlan => 2,
switchport_autostate_exclude => true,
switchport_vtp => true,
}
cisco_interface { 'ethernet1/16' :
shutdown => true,
description => 'routed port',
ipv4_address => '192.168.1.1',
ipv4_netmask_length => 24,
ipv4_address_secondary => '192.168.2.1',
ipv4_netmask_length_secondary => 24,
ipv4_forwarding => true,
ipv4_redirects => true,
ipv4_proxy_arp => true,
ipv4_pim_sparse_mode => true,
negotiate_auto => true,
ipv4_dhcp_relay_addr => ['1.1.1.1', '2.2.2.2'],
ipv4_dhcp_relay_info_trust => true,
ipv4_dhcp_relay_src_addr_hsrp => true,
ipv4_dhcp_relay_src_intf => 'port-channel 100',
ipv4_dhcp_relay_subnet_broadcast => true,
ipv4_dhcp_smart_relay => true,
ipv6_dhcp_relay_addr => ['2000::11', '2001::22'],
ipv6_dhcp_relay_src_intf => 'ethernet 2/2',
pim_bfd => true,
}
cisco_interface { 'ethernet1/17' :
stp_bpdufilter => 'enable',
stp_bpduguard => 'enable',
stp_cost => 2000,
stp_guard => 'loop',
stp_link_type => 'shared',
stp_port_priority => 32,
stp_port_type => 'network',
stp_mst_cost => [[0,2-4,6,8-12, 1000], [1000, 2568]],
stp_mst_port_priority => [[0,2-11,20-33, 64], [1111, 160],
stp_vlan_cost => [[1-4,6,8-12, 1000], [1000, 2568]],
stp_vlan_port_priority => [[1-11,20-33, 64], [1111, 160],
}
cisco_interface { 'ethernet1/18' :
hsrp_bfd => true,
hsrp_delay_minimum => 222,
hsrp_delay_reload => 10,
hsrp_mac_refresh => 555,
hsrp_use_bia => 'use_bia',
hsrp_version => 2,
}
cisco_interface { 'ethernet9/1' :
switchport_mode => 'trunk',
storm_control_broadcast => '77.77',
storm_control_multicast => '22.22',
storm_control_unicast => '33.33',
vlan_mapping_enable => 'false',
vlan_mapping => [[20, 21], [30, 31]],
}
cisco_interface { 'loopback42' :
description => 'logical interface',
shutdown => true,
}
cisco_interface { 'loopback43' :
ensure => absent,
# ensure will create or destroy a logical interface. If not specified
# then the default behavior is to attempt to create the interface.
}
cisco_interface {'Vlan98':
shutdown => true,
description => 'svi interface',
ipv4_arp_timeout => 300,
svi_autostate => true,
svi_management => true,
load_interval_counter_1_delay => 150,
load_interval_counter_2_delay => 250,
load_interval_counter_3_delay => 90,
}
cisco_interface { 'ethernet8/1' :
description => 'Private-vlan host',
switchport_pvlan_host => 'host',
switchport_pvlan_host_association => ['10', '11'],
}
cisco_interface { 'ethernet8/1' :
description => 'Private-vlan trunk',
switchport_pvlan_trunk_promiscuous => true,
switchport_pvlan_trunk_association => [['14', '114'], ['15', '115']],
switchport_pvlan_trunk_allowed_vlan => '88-91,94',
switchport_pvlan_trunk_native_vlan => 12,
}
cisco_interface { 'ethernet8/2' :
purge_config => true,
}
cisco_interface {'Vlan98':
pvlan_mapping => '10-11,13',
}
)