DCN configuration examples
Network requirements
As shown in Figure 122, the GNE, Device A, and Device B run DCN in the same VPN instance. The NMS uses SNMP to manage the GNE, and the GNE automatically sends notifications to the NMS to report online or offline events of NEs.
Figure 122: Network diagram
Configuration procedure
Configure the GNE:
# Enable SNMP on the GNE. (Details not shown. For more information, see Network Management and Monitoring Configuration Guide.)
# Enable DCN, configure the NE ID as 100001 and NE IP as 11.1.1.1/32, and enable the automatic report feature.
<GNE> system-view [GNE] dcn [GNE-dcn] ne-id 100001 [GNE-dcn] ne-ip 11.1.1.1 32 [GNE-dcn] auto-report [GNE-dcn] quit
# Create a VPN instance named dcn_vpn.
[GNE] ip vpn-instance dcn_vpn [GNE-vpn-instance-dcn_vpn] quit
# Create interface Loopback 1023, and associate it with VPN instance dcn_vpn.
[GNE] interface loopback 1023 [GNE-LoopBack1023] ip binding vpn-instance dcn_vpn [GNE-LoopBack1023] quit
# Enable LLDP globally.
[GNE] lldp global enable
# Enable the nearest bridge agents on GigabitEthernet 1/0/1 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[GNE] interface gigabitethernet 1/0/1 [GNE-GigabitEthernet1/0/1] port link-mode route [GNE-GigabitEthernet1/0/1] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/1 receives an LLDP frame.
[GNE-GigabitEthernet1/0/1] lldp management-address arp-learning vlan 4094 [GNE-GigabitEthernet1/0/1] quit
# Enable the nearest bridge agents on GigabitEthernet 1/0/2 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[GNE] interface gigabitethernet 1/0/2 [GNE-GigabitEthernet1/0/2] port link-mode route [GNE-GigabitEthernet1/0/2] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/2 receives an LLDP frame.
[GNE-GigabitEthernet1/0/2] lldp management-address arp-learning vlan 4094 [GNE-GigabitEthernet1/0/2] quit
# Create GigabitEthernet 1/0/1 that borrows the IP address of Loopback 1023.
[GNE] interface gigabitethernet 1/0/1 [GNE-GigabitEthernet1/0/1] ip binding vpn-instance dcn_vpn [GNE-GigabitEthernet1/0/1] ip address unnumbered interface loopback 1023 [GNE-GigabitEthernet1/0/1] quit
# Create GigabitEthernet 1/0/2 that borrows the IP address of Loopback 1023.
[GNE] interface gigabitethernet 1/0/2 [GNE-GigabitEthernet1/0/2] ip binding vpn-instance dcn_vpn [GNE-GigabitEthernet1/0/2] ip address unnumbered interface loopback 1023 [GNE-GigabitEthernet1/0/2] quit
# Enable OSPF process 65535 to run in VPN instance dcn_vpn, and create area 0.
[GNE] ospf 65535 vpn-instance dcn_vpn [GNE-ospf-65535] area 0 [GNE-ospf-65535-area-0.0.0.0] network 0.0.0.0 255.255.255.255 [GNE-ospf-65535-area-0.0.0.0] quit [GNE-ospf-65535] quit
# Set the OSPF network type for GigabitEthernet 1/0/1 to P2P.
[GNE] interface gigabitethernet 1/0/1 [GNE-GigabitEthernet1/0/1] ospf network-type p2p [GNE-GigabitEthernet1/0/1] quit
# Set the OSPF network type for GigabitEthernet 1/0/2 to P2P.
[GNE] interface gigabitethernet 1/0/2 [GNE-GigabitEthernet1/0/2] ospf network-type p2p [GNE-GigabitEthernet1/0/2] quit
Configure Device A:
# Enable DCN, configure the NE ID as 200002 and NE IP as 22.2.2.2/32.
<DeviceA> system-view [DeviceA] dcn [DeviceA-dcn] ne-id 200002 [DeviceA-dcn] ne-ip 22.2.2.2 32 [DeviceA-dcn] quit
# Create a VPN instance named dcn_vpn.
[DeviceA] ip vpn-instance dcn_vpn [DeviceA-vpn-instance-dcn_vpn] quit
# Create interface Loopback 1023, and associate it with VPN instance dcn_vpn.
[DeviceA] interface loopback 1023 [DeviceA-LoopBack1023] ip binding vpn-instance dcn_vpn [DeviceA-LoopBack1023] quit
# Enable LLDP globally.
[DeviceA] lldp global enable
# Enable the nearest bridge agents on GigabitEthernet 1/0/1 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] port link-mode route [DeviceA-GigabitEthernet1/0/1] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/1 receives an LLDP frame.
[DeviceA-GigabitEthernet1/0/1] lldp management-address arp-learning vlan 4094 [DeviceA-GigabitEthernet1/0/1] quit
# Enable the nearest bridge agents on GigabitEthernet 1/0/2 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[DeviceA] interface gigabitethernet 1/0/2 [DeviceA-GigabitEthernet1/0/2] port link-mode route [DeviceA-GigabitEthernet1/0/2] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/2 receives an LLDP frame.
[DeviceA-GigabitEthernet1/0/2] lldp management-address arp-learning vlan 4094 [DeviceA-GigabitEthernet1/0/2] quit
# Create GigabitEthernet 1/0/1 that borrows the IP address of Loopback 1023.
[DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] ip binding vpn-instance dcn_vpn [DeviceA-GigabitEthernet1/0/1] ip address unnumbered interface loopback 1023 [DeviceA-GigabitEthernet1/0/1] quit
# Create GigabitEthernet 1/0/2 that borrows the IP address of Loopback 1023.
[DeviceA] interface gigabitethernet 1/0/2 [DeviceA-GigabitEthernet1/0/2] ip binding vpn-instance dcn_vpn [DeviceA-GigabitEthernet1/0/2] ip address unnumbered interface loopback 1023 [DeviceA-GigabitEthernet1/0/2] quit
# Enable OSPF process 65535 to run in VPN instance dcn_vpn, and create area 0.
[DeviceA] ospf 65535 vpn-instance dcn_vpn [DeviceA-ospf-65535] area 0 [DeviceA-ospf-65535-area-0.0.0.0] network 0.0.0.0 255.255.255.255 [DeviceA-ospf-65535-area-0.0.0.0] quit [DeviceA-ospf-65535] quit
# Set the OSPF network type for GigabitEthernet 1/0/1 to P2P.
[DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] ospf network-type p2p [DeviceA-GigabitEthernet1/0/1] quit
# Set the OSPF network type for GigabitEthernet 1/0/2 to P2P.
[DeviceA] interface gigabitethernet 1/0/2 [DeviceA-GigabitEthernet1/0/2] ospf network-type p2p [DeviceA-GigabitEthernet1/0/2] quit
Configure Device B:
# Enable DCN, configure the NE ID as 300003 and NE IP as 33.3.3.3/32.
<DeviceB> system-view [DeviceB] dcn [DeviceB-dcn] ne-id 300003 [DeviceB-dcn] ne-ip 33.3.3.3 32 [DeviceB-dcn] quit
# Create a VPN instance named dcn_vpn.
[DeviceB] ip vpn-instance dcn_vpn [DeviceB-vpn-instance-dcn_vpn] quit
# Create interface Loopback 1023, and associate it with VPN instance dcn_vpn.
[DeviceB] interface loopback 1023 [DeviceB-LoopBack1023] ip binding vpn-instance dcn_vpn [DeviceB-LoopBack1023] quit
# Enable LLDP globally.
[DeviceB] lldp global enable
# Enable the nearest bridge agents on GigabitEthernet 1/0/1 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[DeviceB] interface gigabitethernet 1/0/1 [DeviceB-GigabitEthernet1/0/1] port link-mode route [DeviceB-GigabitEthernet1/0/1] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/1 receives an LLDP frame.
[DeviceB-GigabitEthernet1/0/1] lldp management-address arp-learning vlan 4094 [DeviceB-GigabitEthernet1/0/1] quit
# Enable the nearest bridge agents on GigabitEthernet 1/0/2 to advertise basic LLDP TLVs and management address TLVs. The IP address of interface Loopback 1023 is specified as the management address.
[DeviceB] interface gigabitethernet 1/0/2 [DeviceB-GigabitEthernet1/0/2] port link-mode route [DeviceB-GigabitEthernet1/0/2] lldp tlv-enable basic-tlv management-address-tlv interface loopback 1023
# Configure the system to issue the generated ARP entry to the Layer 3 Ethernet subinterface associated with VLAN 4094 in Dot1q termination after GigabitEthernet 1/0/2 receives an LLDP frame.
[DeviceB-GigabitEthernet1/0/2] lldp management-address arp-learning vlan 4094 [DeviceB-GigabitEthernet1/0/2] quit
# Create GigabitEthernet 1/0/1 that borrows the IP address of Loopback 1023.
[DeviceB] interface gigabitethernet 1/0/1 [DeviceB-GigabitEthernet1/0/1] ip binding vpn-instance dcn_vpn [DeviceB-GigabitEthernet1/0/1] ip address unnumbered interface loopback 1023 [DeviceB-GigabitEthernet1/0/1] quit
# Create GigabitEthernet 1/0/2 that borrows the IP address of Loopback 1023.
[DeviceB] interface gigabitethernet 1/0/2 [DeviceB-GigabitEthernet1/0/2] ip binding vpn-instance dcn_vpn [DeviceB-GigabitEthernet1/0/2] ip address unnumbered interface loopback 1023 [DeviceB-GigabitEthernet1/0/2] quit
# Enable OSPF process 65535 to run in VPN instance dcn_vpn, and create area 0.
[DeviceB] ospf 65535 vpn-instance dcn_vpn [DeviceB-ospf-65535] area 0 [DeviceB-ospf-65535-area-0.0.0.0] network 0.0.0.0 255.255.255.255 [DeviceB-ospf-65535-area-0.0.0.0] quit [DeviceB-ospf-65535] quit
# Set the OSPF network type for GigabitEthernet 1/0/1 to P2P.
[DeviceB] interface gigabitethernet 1/0/1 [DeviceB-GigabitEthernet1/0/1] ospf network-type p2p [DeviceB-GigabitEthernet1/0/1] quit
# Set the OSPF network type for GigabitEthernet 1/0/2 to P2P.
[DeviceB] interface gigabitethernet 1/0/2 [DeviceB-GigabitEthernet1/0/2] ospf network-type p2p [DeviceB-GigabitEthernet1/0/2] quit
Verifying the configuration
# Display brief DCN information on the GNE.
[GNE] display dcn DCN Brief Information NE ID : 0x100001 NE IP : 11.1.1.1 Mask : 255.255.255.255 DCN interface: LoopBack1023 Auto report : Enabled
# Display all DCN NE information on the GNE.
[GNE] display dcn ne-info DCN Network Elements Information NE ID NE IP Metric Device Type 0x100001 11.1.1.1 0 HPE 10504 0x200002 22.2.2.2 1 HPE 10506 0x300003 33.3.3.3 1 HPE 10510 Total number: 3
The output shows that GNE, Device A, and Device B are online. The GNE notifies the NMS of the online event. You can successfully ping the NE IP addresses of Device A and Device B from the GNE.
# Remove Device B from the DCN network and display all DCN NE information for the GNE.
[GNE] display dcn ne-info DCN Network Elements Information NE ID NE IP Metric Device Type 0x100001 11.1.1.1 0 HPE 10504 0x200002 22.2.2.2 1 HPE 10506 Total number: 2
The output shows that GNE and Device A are online. The GNE notifies the NMS of the offline event of Device B. You can still successfully ping the NE IP address of Device A from the GNE.