Example for Configuring BGP-LS
Networking Requirements
In Figure 9-37, SwitchA is connected to the controller and reports topology information to the controller. SwitchA, SwitchB, SwitchC, and SwitchD use IS-IS to communicate with each other at the network layer. SwitchA, SwitchB, and SwitchC reside in area 10, whereas SwitchD resides in area 20. SwitchA and SwitchB are Level-1 devices, SwitchC is a Level-1-2 device, and SwitchD is a Level-2 device.
Configuration Roadmap
The configuration roadmap is as follows:
Configure an IP address for each interface on each Switch.
Configure basic IS-IS functions.
Deploy BGP-LS on SwitchA and the controller.
Procedure
- Assign an IP address to each interface. The detailed configuration is not provided here.
- Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis 1 [*SwitchA-isis-1] is-level level-1 Info: IS-IS level changed. The process 1 will be reset. [*SwitchA-isis-1] network-entity 10.0000.0000.0001.00 [*SwitchA-isis-1] quit [*SwitchA] interface 10ge 1/0/1 [*SwitchA-10GE1/0/1] isis enable 1 [*SwitchA-10GE1/0/1] quit [*SwitchA] commit
# Configure SwitchB.
[~SwitchB] isis 1 [*SwitchB-isis-1] is-level level-1 Info: IS-IS level changed. The process 1 will be reset. [*SwitchB-isis-1] network-entity 10.0000.0000.0002.00 [*SwitchB-isis-1] quit [*SwitchB] interface 10ge 1/0/1 [*SwitchB-10GE1/0/1] isis enable 1 [*SwitchB-10GE1/0/1] quit [*SwitchB] commit
# Configure SwitchC.
[~SwitchC] isis 1 [*SwitchC-isis-1] network-entity 10.0000.0000.0003.00 [*SwitchC-isis-1] quit [*SwitchC] interface 10ge 1/0/1 [*SwitchC-10GE1/0/1] isis enable 1 [*SwitchC-10GE1/0/1] quit [*SwitchC] interface 10ge 1/0/2 [*SwitchC-10GE1/0/2] isis enable 1 [*SwitchC-10GE1/0/2] quit [*SwitchC] interface 10ge 1/0/3 [*SwitchC-10GE1/0/3] isis enable 1 [*SwitchC-10GE1/0/3] quit [*SwitchC] commit
# Configure SwitchD.
[~SwitchD] isis 1 [*SwitchD-isis-1] is-level level-2 Info: IS-IS level changed. The process 1 will be reset. [*SwitchD-isis-1] network-entity 20.0000.0000.0004.00 [*SwitchD-isis-1] quit [*SwitchD] interface 10ge 1/0/1 [*SwitchD-10GE1/0/1] isis enable 1 [*SwitchD-10GE1/0/1] quit [*SwitchD] interface LoopBack 0 [*SwitchD-10GE1/0/1] isis enable 1 [*SwitchD-10GE1/0/1] quit [*SwitchD] commit
- Deploy BGP-LS on SwitchA.
# Enable IS-IS topology advertisement to BGP on SwitchA.
[~SwitchA] isis 1 [~SwitchA-isis-1] bgp-ls enable [*SwitchA-isis-1] bgp-ls identifier 20 [*SwitchA-isis-1] quit [*SwitchA] commit
# Enable BGP-LS on SwitchA and configure the controller as a BGP-LS peer of SwitchA.
[~SwitchA] bgp 100 [*SwitchA-bgp] peer 10.1.1.2 as-number 100 [*SwitchA-bgp] link-state-family unicast [*SwitchA-bgp-af-ls] peer 10.1.1.2 enable [*SwitchA-bgp-af-ls] quit [*SwitchA-bgp] quit [*SwitchA-bgp] commit
Enable BGP-LS on controller and configure SwitchA as a BGP-LS peer of the controller.
- Verify the configuration.
# Display BGP-LS peers and their status on SwitchA.
[~SwitchA] display bgp link-state unicast peer BGP local router ID : 192.168.100.100 Local AS number : 100 Total number of peers : 1 Peers in established state : 0 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.1.1.2 4 100 3 3 0 00:00:07 Established 17
# Display BGP-LS routes on SwitchA.
[~SwitchA] display bgp link-state unicast routing-table BGP Local router ID is 192.168.100.100 Status codes: * - valid, > - best, d - damped, x - best external, a - add path, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Node Routes: 3 *> Network : [NODE][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0001.00]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [NODE][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0003.00]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [NODE][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0003.01]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? Total Number of Link Routes: 4 *> Network : [LINK][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0001.00]][REMOTE[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router-id0000.0000.0003.01]][LINK[if -address0.0.0.0][peer-address0.0.0.0][if-address::][peer-address::][mt-id0]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [LINK][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0003.00]][REMOTE[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router-id0000.0000.0003.01]][LINK[if -address0.0.0.0][peer-address0.0.0.0][if-address::][peer-address::][mt-id0]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [LINK][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0003.01]][REMOTE[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router-id0000.0000.0001.00]][LINK[if -address0.0.0.0][peer-address0.0.0.0][if-address::][peer-address::][mt-id0]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [LINK][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router -id0000.0000.0003.01]][REMOTE[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp-router-id0000.0000.0003.00]][LINK[if -address0.0.0.0][peer-address0.0.0.0][if-address::][peer-address::][mt-id0]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? Total Number of IPv4 Prefix Routes: 3 *> Network : [IPV4-PREFIX][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp -router-id0000.0000.0001.00]][PREFIX[mt-id0][ospf-route-type0][prefix192.168.1.0/24]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [IPV4-PREFIX][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp -router-id0000.0000.0003.00]][PREFIX[mt-id0][ospf-route-type0][prefix192.168.1.0/24]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ? *> Network : [IPV4-PREFIX][ISIS-LEVEL-1][IDENTIFIER20][LOCAL[as100][bgp-ls-identifier192.168.100.100][ospf-area-id0.0.0.0][igp -router-id0000.0000.0003.00]][PREFIX[mt-id0][ospf-route-type0][prefix192.168.3.0/24]] NextHop : 0.0.0.0 LocPrf : MED : 0 PrefVal : 0 Path/Ogn : ?
Configuration Files
- Configuration file of SwitchA
# sysname SwitchA # isis 1 is-level level-1 network-entity 10.0000.0000.0001.00 bgp-ls enable level-1-2 bgp-ls identifier 20 # interface 10GE1/0/1 undo portswitch ip address 10.1.1.1 255.255.255.0 # interface 10GE1/0/2 undo portswitch ip address 192.168.1.1 255.255.255.0 isis enable 1 # bgp 100 peer 10.1.1.2 as-number 100 # ipv4-family unicast peer 10.1.1.2 enable # link-state-family unicast peer 10.1.1.2 enable # return
- Configuration file of SwitchB
# sysname SwitchB # isis 1 is-level level-1 network-entity 10.0000.0000.0002.00 # interface 10GE1/0/1 undo portswitch ip address 192.168.2.1 255.255.255.0 isis enable 1 # return
- Configuration file of SwitchC
# sysname SwitchC # isis 1 network-entity 10.0000.0000.0003.00 # interface 10GE1/0/1 undo portswitch ip address 192.168.1.2 255.255.255.0 isis enable 1 # interface 10GE1/0/2 undo portswitch ip address 192.168.2.2 255.255.255.0 isis enable 1 # interface 10GE1/0/3 undo portswitch ip address 192.168.3.2 255.255.255.0 isis enable 1 # return
- Configuration file of SwitchD
# sysname SwitchD # isis 1 is-level level-2 network-entity 20.0000.0000.0004.00 # interface 10GE1/0/1 undo portswitch ip address 192.168.3.1 255.255.255.0 isis enable 1 # interface LoopBack0 ip address 172.16.1.2 255.255.255.255 isis enable 1 # return