Cisco Labs – Redundant and Resilient networks (2) – BGP route reflectors

Introduction

During my university studies I was doing a diploma thesis in field of Redundant and reliable networking. The purpose of itwas to create LAB examples for students, so they can test First Hop Redundancy Protocols (FHRP) , Any Transport over MPLS (AToM) and Border Gateway Protocol (BGP) on Cisco platform. These tasks are created to Virtlab (Virtual lab with physical Cisco routers) however configuration is valid and tested on physical Cisco routers as well.

Each task in the series will have its separate post with brief description of the task and schema. Complete task can be downloaded on My Skydrive

ZIP file contains:

  • *.HTML file – complete step by step guide how to perform the task
  • *.PNG – pictures with topology and others
  • *_preconf.txt – file with basic configuration of topology to be able to focus on task goal (IP addresses, interfaces and so on)
  • *_end.txt – file with complete configuration. Once put to the routers, you will get working task
  • *.dia – Topology in free DIA editor
  • *.XML – topology in XML format

To complete the task:

  • Connect your environment accorrding the topology
  • open the file *_preconf.txt from ZIP file with complete task and configure your environment with basic settings so you can start with the task.



BGP – route reflectors

Title: BGP – route reflectors

Goal:

1) Configure peering center with two route reflectors on routers RR1, RR2 and 4 route reflectors clients C11, C12, C21, C22. Test functionality.

2) Change C11, C22 as non-client routers and compare routing tables.

3) Change C11 to be part of another autonomous system. Compare routing tables with the ones from step 1. and 2.

4) Turn off RR1 and test if all networks are accessible.

Required time: 120 minutes

Theoretical background:

Theoretical introduction into BGP:

Topology:

BGP-RouteReflectors

Configuration:

 

Basic network configuration

Loopback networks should be configured on client routers C11, C12, C21, C22

Router C11:

      router(config)#hostname C11; configure hostname
      C11(config)#interface #C11:C11-SW#
      C11(config-if)#ip address 10.0.0.3 255.255.255.0; configure ip address of physical interface
      C11(config-if)#no shutdown
      C11(config-if)#exit
      C11(config)#interface loopback 0
      C11(config-if)#ip address 192.168.1.1 255.255.255.0; configure ip address
      C11(config-if)#no shutdown
      C11(config-if)#exit

 

Similar configuration should be used for other routers.

Router C12:

      router(config)#hostname C12
      C12(config)#interface #C12:C12-SW#
      C12(config-if)#ip address 10.0.0.4 255.255.255.0
      C12(config-if)#no shutdown
      C12(config-if)#exit
      C12(config)#interface loopback 0
      C12(config-if)#ip address 192.168.2.1 255.255.255.0
      C12(config-if)#no shutdown
      C12(config-if)#exit

 

Similar configuration should be used for other routers.

Router C21:

      router(config)#hostname C21
      C21(config)#interface #C21:C21-SW#
      C21(config-if)#ip address 10.0.0.5 255.255.255.0
      C21(config-if)#no shutdown
      C21(config-if)#exit
      C21(config-if)#interface loopback 0
      C21(config-if)#ip address 192.168.3.1 255.255.255.0
      C21(config-if)#no shutdown
      C21(config-if)#exit

 

Router C22:

      router(config)#hostname C22
      C22(config)#interface #C22:C22-SW#
      C22(config-if)#ip address 10.0.0.6 255.255.255.0
      C22(config-if)#no shutdown
      C22(config-if)#exit
      C22(config)#interface loopback 0
      C22(config-if)#ip address 192.168.4.1 255.255.255.0
      C22(config-if)#no shutdown
      C22(config-if)#exit

 

Now configure basic IP settings for RR1 and RR2 routers.

Router RR1:

      router(config)#hostname RR1
      RR1(config)#interface #RR1:RR1-SW#
      RR1(config-if)#ip address 10.0.0.1 255.255.255.0
      RR1(config-if)#no shutdown

 

Router RR2:

      router(config)#hostname RR2
      RR2(config)#interface #RR2:RR2-SW#
      RR2(config-if)#ip address 10.0.0.2 255.255.255.0
      RR2(config-if)#no shutdown

 

1) BGP and route reflectors configuration

Router C11, C12, C21, C22:

      Cxx(config)#router bgp 1; go to router configuration mode
      Cxx(config-router)#neighbor 10.0.0.1 remote-as 1; configure BGP neighbor into RR1 within same AS
      Cxx(config-router)#neighbor 10.0.0.2 remote-as 1; configure BGP neighbor into RR2 within same AS
      Cxx(config-router)#redistribute connected; redistribute connected networks into BGP

 

Now configure RR1 and RR2 routers as BGP route reflectors.

Router RR1:

      RR1(config)#router bgp 1; enable BGP AS 1 on router
  
      RR1(config-router)#neighbor 10.0.0.2 remote-as 1; configure second RR router as non reflector client
 
      RR1(config-router)#neighbor 10.0.0.3 remote-as 1; enable BGP session between RR1 and C11
 
      RR1(config-router)#neighbor 10.0.0.3 route-reflector-client;  configure C11 as route reflector client
 
      RR1(config-router)#neighbor 10.0.0.4 remote-as 1; enable BGP session between RR1 and C12 
 
      RR1(config-router)#neighbor 10.0.0.4 route-reflector-client;  configure C12 as route reflector client
 
      RR1(config-router)#neighbor 10.0.0.5 remote-as 1; enable BGP session between RR1 and C21 
 
      RR1(config-router)#neighbor 10.0.0.5 route-reflector-client;  configure C21 as route reflector client
 
      RR1(config-router)#neighbor 10.0.0.6 remote-as 1; enable BGP session between RR1 and C22 
 
      RR1(config-router)#neighbor 10.0.0.6 route-reflector-client;  configure C22 as route reflector client

 

Router RR2:

      RR2(config)#router bgp 1
      RR2(config-router)#neighbor 10.0.0.1 remote-as 1
      RR2(config-router)#neighbor 10.0.0.3 remote-as 1
      RR2(config-router)#neighbor 10.0.0.3 route-reflector-client
      RR2(config-router)#neighbor 10.0.0.4 remote-as 1
      RR2(config-router)#neighbor 10.0.0.4 route-reflector-client
      RR2(config-router)#neighbor 10.0.0.5 remote-as 1
      RR2(config-router)#neighbor 10.0.0.5 route-reflector-client
      RR2(config-router)#neighbor 10.0.0.6 remote-as 1
      RR2(config-router)#neighbor 10.0.0.6 route-reflector-client

 

Perform function test steps.

Mention that routing tables provide routes to all networks, even there is no direct BGP session between Cxx routers.

 

2) Configure BGP non-client routers

This configuration is performed on route reflectors – RR1 and RR2 routers. We need to disable BGP sessions first and then reconfigure it using new settings.

Router RR1:

      RR1(config-router)#no router bgp 1; Disable BGP sessions on RR1
      RR1(config)#router bgp 1; Enable BGP sessions on RR1
      RR1(config-router)#neighbor 10.0.0.2 remote-as 1
      RR1(config-router)#neighbor 10.0.0.3 remote-as 1; C11 is configured as normal BGP speaker
      RR1(config-router)#neighbor 10.0.0.4 remote-as 1
      RR1(config-router)#neighbor 10.0.0.4 route-reflector-client
      RR1(config-router)#neighbor 10.0.0.5 remote-as 1
      RR1(config-router)#neighbor 10.0.0.5 route-reflector-client
      RR1(config-router)#neighbor 10.0.0.6 remote-as 1; C22 is configured as normal BGP speaker

 

Router RR2:

      RR2(config-router)#no router bgp 1; Disable BGP sessions on RR2
      RR2(config)#router bgp 1; Enable BGP sessions on RR2
      RR2(config-router)#neighbor 10.0.0.1 remote-as 1
      RR2(config-router)#neighbor 10.0.0.3 remote-as 1; C11 is configured as normal BGP speaker
      RR2(config-router)#neighbor 10.0.0.4 remote-as 1
      RR2(config-router)#neighbor 10.0.0.4 route-reflector-client
      RR2(config-router)#neighbor 10.0.0.5 remote-as 1
      RR2(config-router)#neighbor 10.0.0.5 route-reflector-client
      RR2(config-router)#neighbor 10.0.0.6 remote-as 1; C22 is configured as normal BGP speaker

 

Perform function test steps.

Mention that routing tables provide routes to all networks, even there is no direct BGP session between Cxx routers.

 

3) Configure router C11 as a part of another AS

Router C11:

      C11(config-router)#no router bgp 1; disable BGP on router C11
      C11(config)#router bgp 2; go to router configuration mode
      C11(config-router)#neighbor 10.0.0.1 remote-as 1; configure BGP neighbor to RR1 within same AS
      C11(config-router)#neighbor 10.0.0.2 remote-as 1; configure BGP neighbor to RR2 within same AS
      C11(config-router)#redistribute connected; redistribute connected networks within BGP

Perform function test steps.

Route tables provide routes to all networks, even there is no direct BGP session between Cxx routers.

 

4) Turn off RR2

Perform function test steps.

Mention that routing tables provide routes to all networks, even there is no direct BGP session between Cxx routers.

 

Function test:

1) Display routing information with BGP configured

Verify routing tables on all routers of the network using “sh ip route” command.
Verify BGP using sh ip bgp neighbor and sh ip bgp on RA and RD.

      xx# sh ip route; x represents every router in topology
      xx# sh ip bgp summary
      xx# sh ip bgp neighbor
      xx# sh ip bgp

      Rx# debug ip routing

2) Test connectivity

Test connectivity between 192.168.x.x networks. For example use “ping” command.

      C12# ping 192.168.1.1

3) Compare routing tables from steps 1), 2), 3), 4) together.

 

Cisco Labs – Redundant and Resilient networks (1) – BGP confederations

Introduction

During my university studies I was doing a diploma thesis in field of Redundant and reliable networking. The purpose of itwas to create LAB examples for students, so they can test First Hop Redundancy Protocols (FHRP) , Any Transport over MPLS (AToM) and Border Gateway Protocol (BGP) on Cisco platform. These tasks are created to Virtlab (Virtual lab with physical Cisco routers) however configuration is valid and tested on physical Cisco routers as well.

Each task in the series will have its separate post with brief description of the task and schema. Complete task can be downloaded on My Skydrive

ZIP file contains:

  • *.HTML file – complete step by step guide how to perform the task
  • *.PNG – pictures with topology and others
  • *_preconf.txt – file with basic configuration of topology to be able to focus on task goal (IP addresses, interfaces and so on)
  • *_end.txt – file with complete configuration. Once put to the routers, you will get working task
  • *.dia – Topology in free DIA editor
  • *.XML – topology in XML format

To complete the task:

  • Connect your environment accorrding the topology
  • open the file *_preconf.txt from ZIP file with complete task and configure your environment with basic settings so you can start with the task.

BGP – confederations 

Title: BGP – confederations

Goal:

  • Configure BGP confederations on topology with preconfigured OSPF,RIP routing inside sub-ASes of the confederation AS.

Required time: 120 minutes

Theoretical background:

Theoretical introduction into BGP:

Configuration and command reference for BGP,OSPF and EIGRP:

Topology:

BGP-Confederations

Configuration:

1) Check pre-configured settings

Before starting the configuration of BGP, make sure that routers configuration and network operation are correct. Topology is pre-configured so that every sub-AS has its own interior routing protocol configured
(OSPF, RIP) with passive interface between sub-ASes to prevent IGP connection. Use pingcommand to test connectivity. You should be able to ping all networks inside particular BGP sub-AS.

2) Perform step 1 of function test

3) Configure BGP

Router RA:

Pay attention! BGP sessions must be full-meshed inside sub-AS, as shown in sub-AS 65101 configuration.

      RA(config)#router bgp 65101; set confederation sub-AS number and start BGP process
      RA(config-router)#no synchronization ; disable synchronization between BGP and IGP
      RA(config-router)#bgp router-id 2.0.0.3; set unique BGP router ID
      RA(config-router)#bgp log-neighbor-changes; log neighbor changes
      RA(config-router)#redistribute connected; redistribute interior networks via BGP to other ASes
      RA(config-router)#bgp confederation identifier 100; set sub-AS 65101 as part of confederation 100
      RA(config-router)#bgp confederation peers 65102; set another sub AS 65102 to be a peer in confederation 100
      RA(config-router)#neighbor 10.1.0.2 remote-as 65101; set BGP neighbor to be part of the same sub AS to fulfill full mesh requirement
      RA(config-router)#neighbor 10.2.0.1 remote-as 65101; set BGP neighbor to be part of the same sub AS to fulfill full mesh requirement
      RA(config-router)#no auto-summary; do not summarize networks

Router RB:

      RB(config)#router bgp 65101
      RB(config-router)#no synchronization
      RB(config-router)#bgp router-id 2.0.0.1
      RB(config-router)#bgp log-neighbor-changes
      RB(config-router)#redistribute connected
      RB(config-router)#bgp confederation identifier 100
      RB(config-router)#bgp confederation peers 65102
      RB(config-router)#neighbor 11.0.0.2 remote-as 200; set BGP neighbor in external AS 200
      RB(config-router)#neighbor 10.1.0.1 remote-as 65101; set BGP neighbor to be part of the same sub AS to fulfill full mesh requirement
      RB(config-router)#neighbor 10.2.0.1 remote-as 65101; set BGP neighbor to be part of the same sub AS to fulfill full mesh requirement
      RB(config-router)#no auto-summary

Similarly RC:

      RC(config)#router bgp 65101
      RC(config-router)#no synchronization
      RC(config-router)#bgp router-id 2.0.0.2
      RC(config-router)#bgp log-neighbor-changes
      RC(config-router)#redistribute connected
      RC(config-router)#bgp confederation identifier 100
      RC(config-router)#bgp confederation peers 65102
      RC(config-router)#neighbor 10.3.0.1 remote-as 65102
      RC(config-router)#neighbor 10.1.0.2 remote-as 65101
      RC(config-router)#neighbor 10.2.0.2 remote-as 65101
      RC(config-router)#no auto-summary

Similarly for AS65201

Router RD:

      RD(config)#router bgp 65201
      RD(config-router)#no synchronization 
      RD(config-router)#bgp router-id 5.0.0.2
      RD(config-router)#bgp log-neighbor-changes
      RD(config-router)#redistribute connected
      RD(config-router)#bgp confederation identifier 200
      RD(config-router)#bgp confederation peers 65202
      RD(config-router)#neighbor 11.0.0.1 remote-as 100
      RD(config-router)#neighbor 100.23.0.2 remote-as 65202
      RD(config-router)#no auto-summary

Similarly for AS65202

Router RE:

      RE(config)#router bgp 65202
      RE(config-router)#no synchronization
      RE(config-router)#bgp router-id 6.0.0.2
      RE(config-router)#bgp log-neighbor-changes
      RE(config-router)#redistribute connected
      RE(config-router)#bgp confederation identifier 200
      RE(config-router)#bgp confederation peers 65201
      RE(config-router)#neighbor 12.0.0.2 remote-as 100
      RE(config-router)#neighbor 100.23.0.1 remote-as 65201
      RE(config-router)#no auto-summary

Similarly for AS65102

Router RF:

      RF(config)#router bgp 65102
      RF(config-router)#no synchronization
      RF(config-router)#bgp router-id 4.0.0.1
      RF(config-router)#bgp log-neighbor-changes
      RF(config-router)#redistribute connected
      RF(config-router)#bgp confederation identifier 100
      RF(config-router)#bgp confederation peers 65101
      RF(config-router)#neighbor 12.0.0.1 remote-as 200
      RF(config-router)#neighbor 10.4.0.2 remote-as 65102
      RF(config-router)#no auto-summary

Router RG:

      RG(config)#router bgp 65102
      RG(config-router)#no synchronization
      RG(config-router)#bgp router-id 4.0.0.2
      RG(config-router)#bgp log-neighbor-changes
      RG(config-router)#bgp confederation identifier 100
      RG(config-router)#bgp confederation peers 65101
      RG(config-router)#redistribute connected
      RG(config-router)#neighbor 10.3.0.2 remote-as 65101
      RG(config-router)#neighbor 10.4.0.1 remote-as 65102
      RG(config-router)# auto-summary

Function test:

1) Display routing information before you configure BGP

Verify routing tables on all routers of the network using sh ip route command.
Verify BGP using sh ip bgp neighbor and sh ip bgp on RA and RD.

      Rx# sh ip route

2) Display routing information with BGP configured

Verify routing tables on all routers of the network using sh ip route command.
Verify BGP using sh ip bgp neighbor and sh ip bgp on RA and RD.

      Rx# sh ip route; x represents every router in topology
      Rx# sh ip bgp summary
      Rx# sh ip bgp neighbor
      Rx# sh ip bgp
      Rx# sh ip ospf neighbors

3) Test connectivity

Test connectivity between AS100 and AS200. For example use ping command from RA to one of the interfaces on router RG. Also test connectivity to other routers.

      RA# ping 100.23.0.2
      RA# traceroute 100.23.0.2

4) Compare routing tables in AS100 and AS200

BGP path in routing table will show confederation AS number instead of sub-AS numbers.