Cisco Discovery Protocol over GRE Tunnels

This document describes how Cisco Discovery Protocol (CDP) delivers packets from other protocols through a network and allows the routing of packets between private networks across public networks with globally routed addresses. CDP is supported over Generic Routing Encapsulation (GRE) Point-to-Point tunnel interface and GRE Multipoint Tunnel interface.

Generic routing encapsulation (GRE) is a unicast protocol that offers the advantages of encapsulating broadcast and multicast traffic (multicast streaming or routing protocols) or other non-IP protocols and of being protected by IPsec. CDP is a Layer 2, media-independent, and network-independent protocol. Networking applications use CDP to know about devices that are connected directly to applications.

CDP is disabled by default on the interfaces. To enable CDP, use the cdp enable command in interface configuration mode.

Feature Information for CDP Over GRE Tunnels

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1. Feature Information for CDP Over GRE Tunnels

Feature Name

Releases

Feature Information

CDP Over GRE Tunnels

Cisco IOS XE Release 16.12.1

The CDP over GRE Tunnels feature enables the delivery of packets from other protocols through a network and allows the routing of packets between private networks across public networks with globally routed addresses.

Overview of CDP Over GRE Tunnels

Networking applications use CDP over GRE tunnel to identify tunnel endpoints which may not be directly connected. With this enhancement, CDP can exchange exchange neighbour addressing information over the GRE tunnel.

For point-to-point GRE tunnels, each tunnel interface requires a tunnel source address and a tunnel destination address when being configured. All packets are encapsulated with an outer header and a GRE header.

CDP provides the following benefits:

  • Allows systems using different network layer protocols to learn about one another.

  • Facilitates management of Cisco devices by discovering them and discovering how they are configured.

  • Assists with troubleshooting Type-Length-Value Fields (TLV) fields.

  • Helps to learn SNMP agent addresses and sends the SNMP queries.


Note


When CDP feature is enabled on GRE Multipoint Tunnel interface, an additional command (llp nhrp map multicast ) is required for Cisco IOS XE releases 16.12.1 or later.


Configuring CDP Over GRE Tunnels

Perform this task to configure a GRE tunnel on an IPv6 network. GRE tunnels can be configured to run over an IPv6 network layer and transport IPv6 and IPv4 packets through IPv6 tunnels.


Note


You must enable IPv6 or configure IPv6 MTU size more than 1500 on a tunnel's exit interface to avoid receiving warning messages.


Before you begin

When GRE tunnels are configured, IP addresses are assigned to the tunnel source and the tunnel destination. The tunnel interface can have either IPv4 or IPv6 addresses. The host or device at each end of the configured tunnel must support both IPv4 and IPv6 protocol stacks.

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode. Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

interface tunnel tunnel-number

Example:

Device(config)# interface tunnel 0

Specifies a tunnel interface and number and enters interface configuration mode.

Step 4

CDP enable

Example:

Device(config)# CDP enable

Enables Cisco Discovery Protocol on the interface.

Step 5

tunnel source {ipv6-address | interface-type |interface-number }

Example:

Device(config-if)# tunnel source ethernet 0

Specifies the source IPv6 address or the source interface type and number for the tunnel interface.

  • If an interface type and number are specified, the interface must be configured with an IPv6 address.

Note

 
For more information on the tunnel source command, refer to the IPv6 command reference guide.

Step 6

tunnel destination ipv6-address

Example:

Device(config-if)# tunnel destination 2001:0DB8:0C18:2::300

Specifies the destination IPv6 address for the tunnel interface.

Note

 

For more information on the tunnel destination command, refer to the IPv6 command reference guide.

Step 7

tunnel mode gre ipv6

Example:

Device(config-if)# tunnel mode gre ipv6

Specifies a GRE IPv6 tunnel.

Note

 

The tunnel mode gre ipv6 command specifies GRE as the encapsulation protocol for the tunnel interface. Only the syntax used in this context is displayed. For more details, see the IPv6 Command Reference.

Step 8

end

Example:

Device(config-if)# end

Exits interface configuration mode and returns to privileged EXEC mode.

Example: Configuring CDP Over GRE IPv6 and IPv4 Tunnels

The following example shows how to configure a GRE tunnel over an IPv6 transport. In this example, Ethernet0/0 has an IPv6 address, and this is the source address used by the tunnel interface. The destination IPv6 address of the tunnel is specified directly. In this example, the tunnel carries both IPv4 and IS-IS traffic.

interface Tunnel0
 ip address 10.1.1.1 255.255.255.0
 ip router isis 
 tunnel source Ethernet0/0
 tunnel destination 2001:DB8:1111:2222::1
 tunnel mode gre ipv6
!
interface Ethernet0/0
 no ip address
 ipv6 address 2001:DB8:1111:1111::1/64
!
router isis 
 net 49.0001.0000.0000.000a.00

The following examples show how to configure CDP on GRE IPv6 and IPv4 P2P Tunnel Interfaces.

interface Tunnel1
  cdp enable
  ipv6 address 2001:DB8::1/32 
tunnel source Ethernet0/0 
tunnel mode gre ipv6 
tunnel destination 2001:DB8::2:1
end
interface Tunnel300
cdp enable
ip address 192.0.2.1
 tunnel source GigabitEthernet1
 tunnel mode gre ip 
tunnel destination 198.51.100.1
end

The following examples show how to configure CDP on GRE IPv6 and IPv4 Multipoint Tunnel Interfaces.

interface Tunnel1
   ipv6 address 2001:DB8::2/32
   ipv6 nhrp map 2001:DB8::1/32 192::1 
   ipv6 nhrp map multicast 192::1
    ipv6 nhrp network-id 1
   ipv6 nhrp nhs 2001:DB8::1
     cdp enable
  llp nhrp map multicast 192::1
   tunnel source 2001:DB8::1   
tunnel mode gre multipoint ipv6
end
interface Tunnel20
    ip address
    no ip redirects
    ip nhrp authentication cisco1
  ip nhrp network-id 20
  ip nhrp nhs 172.x.x.1 nbma 198.51.x.x multicast
    cdp enable
  llp nhrp map multicast 198.51.x.x
  tunnel source GigabitEthernet1
  tunnel mode gre multipoint
end

The following show example displays the CDP neighbor tunnels that are configured in a device.

Router#show cdp neighbors 
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
Router           Tunnel1           179               R    Linux Uni Tunnel1

Additional References

Related Documents

Related Topic

Document Title

Cisco IOS commands

Master Commands List, All Releases

Tunnel commands: complete command syntax, command mode, defaults, command history, usage guidelines, and examples

Interface and Hardware Component Command Reference

IPv6 commands: complete command syntax, command mode, defaults, command history, usage guidelines, and examples

IPv6 Command Reference

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html