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',
}

)

Properties

  • access_vlan

    The VLAN ID assigned to the interface. Valid values are integer, keyword ‘default’.

  • bfd_echo

    Enables bfd echo function for all address families.

    Supported values:
    • true
    • false
    • default
  • description

    Description of the interface. Valid values are string, keyword ‘default’.

  • duplex

    Configure duplex between interfaces. Default value is ‘auto’.

    Supported values:
    • auto
    • full
    • default
  • encapsulation_dot1q

    Enable IEEE 802.1Q encapsulation of traffic on a specified subinterface. Valid values are integer, keyword ‘default’.

  • ensure (defaults to: present)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
  • fabric_forwarding_anycast_gateway
    Supported values:
    • true
    • false
    • default
  • hsrp_bfd

    Enable HSRP BFD on this interface.

    Supported values:
    • true
    • false
    • default
  • hsrp_delay_minimum

    Hsrp intialization minimim delay in sec. Valid values are integer, keyword ‘default’.

  • hsrp_delay_reload

    Hsrp intialization delay after reload in sec. Valid values are integer, keyword ‘default’.

  • hsrp_mac_refresh

    Hsrp mac refresh time in sec. Valid values are integer, keyword ‘default’.

  • hsrp_use_bia

    Hsrp uses interface burned in address

    Supported values:
    • use_bia
    • use_bia_intf
    • default
  • hsrp_version

    Hsrp version. Valid values are integer, keyword ‘default’.

  • ipv4_acl_in

    <L3 attribute> ipv4 ingress access list on the interface. Valid values are string, keyword ‘default’.

  • ipv4_acl_out

    <L3 attribute> ipv4 egress access list on the interface. Valid values are string, keyword ‘default’.

  • ipv4_address

    <L3 attribute> IP address of the interface. Valid values are string, keyword ‘default’.

  • ipv4_address_secondary

    <L3 attribute> Secondary IP address of the interface. Valid values are string, keyword ‘default’.

  • ipv4_arp_timeout

    Configure Address Resolution Protocol (ARP) timeout. Valid values are integer, keyword ‘default’.

  • ipv4_dhcp_relay_addr
  • ipv4_dhcp_relay_info_trust

    Enables relay trust on this interface.

    Supported values:
    • true
    • false
    • default
  • ipv4_dhcp_relay_src_addr_hsrp

    Enables Virtual IP instead of SVI address

    Supported values:
    • true
    • false
    • default
  • ipv4_dhcp_relay_src_intf

    Source interface for the DHCPV4 relay. Valid values are string, keyword ‘default’.

  • ipv4_dhcp_relay_subnet_broadcast

    Enables DHCP relay subnet-broadcast on this interface.

    Supported values:
    • true
    • false
    • default
  • ipv4_dhcp_smart_relay

    Enables DHCP smart relay on this interface.

    Supported values:
    • true
    • false
    • default
  • ipv4_forwarding
    Supported values:
    • true
    • false
    • default
  • ipv4_netmask_length

    <L3 attribute> Network mask length of the IP address on the interface. Valid values are integer, keyword ‘default’.

  • ipv4_netmask_length_secondary

    <L3 attribute> Network mask length of the secondary IP address on the interface. Valid values are integer, keyword ‘default’.

  • ipv4_pim_sparse_mode
    Supported values:
    • true
    • false
    • default
  • ipv4_proxy_arp

    <L3 attribute> Enables or disables proxy arp on the interface.

    Supported values:
    • true
    • false
    • default
  • ipv4_redirects

    <L3 attribute> Enables or disables sending of IP redirect messages.

    Supported values:
    • true
    • false
    • default
  • ipv6_acl_in

    <L3 attribute> ipv6 ingress access list on the interface. Valid values are string, keyword ‘default’.

  • ipv6_acl_out

    <L3 attribute> ipv6 egress access list on the interface. Valid values are string, keyword ‘default’.

  • ipv6_dhcp_relay_addr
  • ipv6_dhcp_relay_src_intf

    Source interface for the DHCPV6 relay. Valid values are string, keyword ‘default’.

  • load_interval_counter_1_delay

    Load interval delay for counter 1 in seconds. Valid values are integer, keyword ‘default’.

  • load_interval_counter_2_delay

    Load interval delay for counter 2 in seconds. Valid values are integer, keyword ‘default’.

  • load_interval_counter_3_delay

    Load interval delay for counter 3 in seconds. Valid values are integer, keyword ‘default’.

  • mtu

    Maximum Trasnmission Unit size for frames received and sent on the specified interface. Valid values are integer, keyword ‘default’.

  • negotiate_auto

    Enable/Disable negotiate auto on the interface.

    Supported values:
    • true
    • false
    • default
  • pim_bfd

    Enables pim BFD on this interface.

    Supported values:
    • true
    • false
    • default
  • private_vlan_mapping
  • purge_config

    Puts the ethernet interface in default state.

    Supported values:
    • true
  • pvlan_mapping
  • shutdown

    Shutdown state of the interface.

    Supported values:
    • true
    • false
    • default
  • speed

    Configure the speed between interfaces. Default value is ‘auto’.

    Supported values:
    • auto
    • 10
    • 100
    • 1000
    • 10_000
    • 1_000_000
    • 40_000
    • default
  • storm_control_broadcast

    Allowed broadcast traffic level. Valid values are string, keyword ‘default’.

  • storm_control_multicast

    Allowed multicast traffic level. Valid values are string, keyword ‘default’.

  • storm_control_unicast

    Allowed unicast traffic level. Valid values are string, keyword ‘default’.

  • stp_bpdufilter

    Enable/Disable BPDU filtering for this interface.

    Supported values:
    • enable
    • disable
    • default
  • stp_bpduguard

    Enable/Disable BPDU guard for this interface.

    Supported values:
    • enable
    • disable
    • default
  • stp_cost

    Spanning tree port path cost for this interface. Valid values are integer, keyword ‘auto’ or ‘default’.

  • stp_guard

    Spanning-tree guard mode for this interface.

    Supported values:
    • loop
    • none
    • root
    • default
  • stp_link_type

    Link type for spanning tree tree protocol use.

    Supported values:
    • auto
    • shared
    • point-to-point
    • default
  • stp_mst_cost
  • stp_mst_port_priority
  • stp_port_priority

    Spanning tree port priority for this interface. Valid values are integer, keyword ‘default’.

  • stp_port_type

    Spanning tree port type for this interface.

    Supported values:
    • edge
    • network
    • normal
    • edge trunk
    • default
  • stp_vlan_cost
  • stp_vlan_port_priority
  • svi_autostate

    Enable/Disable autostate on the SVI interface.

    Supported values:
    • true
    • false
    • default
  • svi_management

    Enable/Disable management on the SVI interface.

    Supported values:
    • true
    • false
    • default
  • switchport_autostate_exclude

    Exclude this port for the SVI link calculation.

    Supported values:
    • true
    • false
    • default
  • switchport_mode

    Switchport mode of the interface. To make an interface L3, set switchport_mode to ‘disabled’.

    Supported values:
    • disabled
    • access
    • tunnel
    • fex_fabric
    • trunk
    • fabricpath
    • default
  • switchport_mode_private_vlan_host

    %(## -DEPRECATED- ## Property. Replace with: ‘switchport_pvlan_host’ and ‘switchport_pvlan_promiscuous’)

    Supported values:
    • host
    • promiscuous
    • disabled
  • switchport_mode_private_vlan_host_association
  • switchport_mode_private_vlan_host_promisc
  • switchport_mode_private_vlan_trunk_promiscuous
    Supported values:
    • true
    • false
    • default
  • switchport_mode_private_vlan_trunk_secondary
    Supported values:
    • true
    • false
    • default
  • switchport_private_vlan_association_trunk
  • switchport_private_vlan_mapping_trunk
  • switchport_private_vlan_trunk_allowed_vlan
  • switchport_private_vlan_trunk_native_vlan
  • switchport_pvlan_host
    Supported values:
    • true
    • false
    • default
  • switchport_pvlan_host_association
  • switchport_pvlan_mapping
  • switchport_pvlan_mapping_trunk
  • switchport_pvlan_promiscuous
    Supported values:
    • true
    • false
    • default
  • switchport_pvlan_trunk_allowed_vlan
  • switchport_pvlan_trunk_association
  • switchport_pvlan_trunk_native_vlan
  • switchport_pvlan_trunk_promiscuous
    Supported values:
    • true
    • false
    • default
  • switchport_pvlan_trunk_secondary
    Supported values:
    • true
    • false
    • default
  • switchport_trunk_allowed_vlan

    The allowed VLANs for the specified Ethernet interface. Valid values are string, keyword ‘default’.

  • switchport_trunk_native_vlan

    The Native VLAN assigned to the switch port. Valid values are integer, keyword ‘default’.

  • switchport_vtp

    Enable or disable VTP on the interface.

    Supported values:
    • true
    • false
    • default
  • vlan_mapping
  • vlan_mapping_enable
    Supported values:
    • true
    • false
    • default
  • vpc_id

    Configure vPC id on this interface to make it a vPC link to a downstream device. The vPC Peer switch must have an indentical configuration to the same downstream device. Valid values are in the range 1..4096

  • vpc_peer_link

    Enable/Disable this interface as a VPC Peer-link. This is valid only for port-channel interfaces. Valid values true or false

    Supported values:
    • true
    • false
  • vrf

    <L3 attribute> VRF member of the interface. Valid values are string, keyword ‘default’.

Parameters

  • interface

    Name of the interface on the network element. Valid values are string.

  • provider

    The specific backend to use for this ‘cisco_interface` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.