Deprecated

Removed in None

i

Reason:Updated module released with more functionality. | Alternative:nxos_bgp_global

cisco.nxos.nxos_bgp_neighbor (4.4.0) — module

(deprecated, removed after 2023-01-27) Manages BGP neighbors configurations.

| "added in version" 1.0.0 of cisco.nxos"

Authors: Gabriele Gerbino (@GGabriele)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install cisco.nxos:==4.4.0


Add to requirements.yml

  collections:
    - name: cisco.nxos
      version: 4.4.0

Description

Manages BGP neighbors configurations on NX-OS switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# create a new neighbor
- cisco.nxos.nxos_bgp_neighbor:
    asn: 65535
    neighbor: 192.0.2.3
    local_as: 20
    remote_as: 30
    bfd: enable
    description: just a description
    update_source: Ethernet1/3
    state: present
    peer_type: fabric_external

Inputs

    
asn:
    description:
    - BGP autonomous system number. Valid values are string, Integer in ASPLAIN or ASDOT
      notation.
    required: true
    type: str

bfd:
    choices:
    - enable
    - disable
    description:
    - Enables/Disables BFD for a given neighbor.
    - 'Dependency: ''''feature bfd'''''
    type: str

pwd:
    description:
    - Specify the password for neighbor. Valid value is string.
    type: str

vrf:
    default: default
    description:
    - Name of the VRF. The name 'default' is a valid VRF representing the global bgp.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Determines whether the config should be present or not on the device.
    type: str

local_as:
    description:
    - Specify the local-as number for the eBGP neighbor. Valid values are String or Integer
      in ASPLAIN or ASDOT notation, or 'default', which means not to configure it.
    type: str

neighbor:
    description:
    - Neighbor Identifier. Valid values are string. Neighbors may use IPv4 or IPv6 notation,
      with or without prefix length.
    required: true
    type: str

pwd_type:
    choices:
    - 3des
    - cisco_type_7
    - default
    description:
    - Specify the encryption type the password will use. Valid values are '3des' or 'cisco_type_7'
      encryption or keyword 'default'.
    type: str

shutdown:
    description:
    - Configure to administratively shutdown this neighbor.
    type: bool

peer_type:
    choices:
    - fabric_border_leaf
    - fabric_external
    - disable
    description:
    - Specify the peer type for BGP session.
    type: str
    version_added: 1.1.0
    version_added_collection: cisco.nxos

remote_as:
    description:
    - Specify Autonomous System Number of the neighbor. Valid values are String or Integer
      in ASPLAIN or ASDOT notation, or 'default', which means not to configure it.
    type: str

description:
    description:
    - Description of the neighbor.
    type: str

ebgp_multihop:
    description:
    - Specify multihop TTL for a remote peer. Valid values are integers between 2 and
      255, or keyword 'default' to disable this property.
    type: str

maximum_peers:
    description:
    - Specify Maximum number of peers for this neighbor prefix Valid values are between
      1 and 1000, or 'default', which does not impose the limit. Note that this parameter
      is accepted only on neighbors with address/prefix.
    type: str

update_source:
    description:
    - Specify source interface of BGP session and updates.
    type: str

connected_check:
    description:
    - Configure whether or not to check for directly connected peer.
    type: bool

timers_holdtime:
    description:
    - Specify holdtime timer value. Valid values are integers between 0 and 3600 in terms
      of seconds, or 'default', which is 180.
    type: str

timers_keepalive:
    description:
    - Specify keepalive timer value. Valid values are integers between 0 and 3600 in terms
      of seconds, or 'default', which is 60.
    type: str

low_memory_exempt:
    description:
    - Specify whether or not to shut down this neighbor under memory pressure.
    type: bool

remove_private_as:
    choices:
    - enable
    - disable
    - all
    - replace-as
    description:
    - Specify the config to remove private AS number from outbound updates. Valid values
      are 'enable' to enable this config, 'disable' to disable this config, 'all' to remove
      all private AS number, or 'replace-as', to replace the private AS number.
    type: str

dynamic_capability:
    description:
    - Configure whether or not to enable dynamic capability.
    type: bool

suppress_4_byte_as:
    description:
    - Configure to suppress 4-byte AS Capability.
    type: bool

log_neighbor_changes:
    choices:
    - enable
    - disable
    - inherit
    description:
    - Specify whether or not to enable log messages for neighbor up/down event.
    type: str

capability_negotiation:
    description:
    - Configure whether or not to negotiate capability with this neighbor.
    type: bool

transport_passive_only:
    description:
    - Specify whether or not to only allow passive connection setup. Valid values are
      'true', 'false', and 'default', which defaults to 'false'. This property can only
      be configured when the neighbor is in 'ip' address format without prefix length.
    type: bool

Outputs

commands:
  description: commands sent to the device
  returned: always
  sample:
  - router bgp 65535
  - neighbor 192.0.2.3
  - remote-as 30
  - update-source Ethernet1/3
  - description just a description
  - local-as 20
  - peer-type fabric-external
  type: list