+ All Categories
Home > Documents > BGP-LS Configuration Lab - wiki.apnictraining.net

BGP-LS Configuration Lab - wiki.apnictraining.net

Date post: 27-Mar-2022
Category:
Upload: others
View: 12 times
Download: 1 times
Share this document with a friend
15
APNIC SDN Workshop Lab 1 ©APNIC Created: 24 June 2014 Updated: 24 June 2014 Module 4 BGP-LS Configuration Lab Objective: All the routers are pre-configured with basic interface, OSPF and BGP configuration according to the following topology diagram. As part of the exercise, you will need to enable link-state distribution under OSPF, enable the BGP link-state address family and observe advertisements of link-state information. In addition, you will need to configure BGP egress peer engineering and observe its impact on BGP-LS. Prerequisites: Knowledge of IGP, EGP, MPLS and Segment Routing is required. The following will be the base topology and IP address plan used for this lab. lo 0: 172.16.1.2 lo 0: 192.168.6.6 lo 0: 172.16.1.3 lo 0: 172.16.1.4 Gi0/0/0/1 Gi0/0/0/1 Gi0/0/0/0 Gi0/0/0/2 Gi0/0/0/1 192.168.1.0/24 R1 R2 R5 R4 R3 R6 10.2.4.0/24 .2 .2 .4 .4 .4 .3 .3 .3 10.3.4.0/24 OSPF Instance 1 Area 0.0.0.0 Gi0/0/0/0 Gi0/0/0/0 .2 Gi0/0/0/0 .3 Gi0/0/0/0 Gi0/0/0/3 Gi0/0/0/1 192.168.3.0/24 Gi0/0/0/0 192.168.2.0/24 192.168.4.0/24 .1 AS65000 AS65001 AS65002 AS65003 eBGP eBGP (IPv4) .5 eBGP (IPv4) .6 .6 .6 .4 Figure 1 BGP-LS Lab Base Configuration Lab Notes The BGP-LS lab topology comprises of 6 routers: R1, R2, R3, R4, R5 and R6. The routers perform the following functions: R1 => functions as a BGP-LS “consumer”, emulating an SDN controller R2, R3, R4 => part of AS65001, the main AS of interest. R5 => peer in AS65002 R6 => peer in AS65003 All routers are running Cisco IOS-XRv 6.1.2 within GNS3. Login credentials are: Username: cisco Password: cisco
Transcript
Page 1: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

1

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

Module 4 – BGP-LS Configuration Lab

Objective: All the routers are pre-configured with basic interface, OSPF and BGP configuration

according to the following topology diagram. As part of the exercise, you will need to enable

link-state distribution under OSPF, enable the BGP link-state address family and observe

advertisements of link-state information. In addition, you will need to configure BGP egress

peer engineering and observe its impact on BGP-LS.

Prerequisites: Knowledge of IGP, EGP, MPLS and Segment Routing is required.

The following will be the base topology and IP address plan used for this lab.

lo0:172.16.1.2

lo0:192.168.6.6

lo0:172.16.1.3

lo0:172.16.1.4

Gi0/0/0/1 Gi0/0/0/1

Gi0/0/0/0

Gi0/0/0/2

Gi0/0/0/1

192.168.1.0/24

R1 R2 R5R4

R3 R6

10.2.4.0/24

.2

.2 .4 .4

.4

.3

.3

.3

10.3.4.0/24

OSPFInstance1Area0.0.0.0

Gi0/0/0/0 Gi0/0/0/0.2

Gi0/0/0/0

.3Gi0/0/0/0

Gi0/0/0/3 Gi0/0/0/1

192.168.3.0/24

Gi0/0/0/0192.168.2.0/24

192.168.4.0/24

.1

AS65000

AS65001

AS65002

AS65003

eBGP

eBGP(IPv4)

.5

eBGP(IPv4)

.6.6

.6

.4

Figure 1 – BGP-LS Lab Base Configuration

Lab Notes

The BGP-LS lab topology comprises of 6 routers: R1, R2, R3, R4, R5 and R6. The routers perform the

following functions:

R1 => functions as a BGP-LS “consumer”, emulating an SDN controller

R2, R3, R4 => part of AS65001, the main AS of interest.

R5 => peer in AS65002

R6 => peer in AS65003

All routers are running Cisco IOS-XRv 6.1.2 within GNS3. Login credentials are:

Username: cisco

Password: cisco

Page 2: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

2

Multiple sets of identical topologies will be used. Workshop attendees will be split up into groups of 6

where each group member will be responsible for the configuration of a specific router. Note that

routers R5 and R6 do not require configuration and it is expected that certain members of the group will

share a router. A suggested split of responsibilities is as follows:

R1 => one group member

R2 => one group member

R3 => two group members

R4 => two group members

Please spend some time to be familiar with the network topology and addressing plan before you start

building the configuration on the routers.

In this module, all required configurations are done in 2 parts.

Part 1. Base BGP-LS configuration.

The following figure reflects the network after the tasks in this part are completed.

eBGP

eBGP(BGP-LS)

lo0:172.16.1.2

lo0:192.168.6.6

lo0:172.16.1.3

lo0:172.16.1.4

Gi0/0/0/1 Gi0/0/0/1

Gi0/0/0/0

Gi0/0/0/2

Gi0/0/0/1

192.168.1.0/24

R1 R2 R5R4

R3 R6

10.2.4.0/24

.2

.2 .4 .4

.4

.3

.3

.3

10.3.4.0/24

OSPFInstance1Area0.0.0.0

Gi0/0/0/0 Gi0/0/0/0.2

Gi0/0/0/0

.3Gi0/0/0/0

Gi0/0/0/3 Gi0/0/0/1

192.168.3.0/24

Gi0/0/0/0192.168.2.0/24

192.168.4.0/24

.1

AS65000

AS65001

AS65002

AS65003

eBGP

eBGP(IPv4)

.5

eBGP(IPv4)

.6.6

.6

.4

eBGP

iBGP(BGP-LS)

iBGP(BGP-LS)

iBGP(BGP-LS)

Figure 2 BGP-LS peering sessions

The intent of the first part is to do the following:

1. Configure R2 to distribute OSPF topology information into BGP.

2. Establish an eBGP session between R1 and R2 for the purpose of exchanging BGP link-state

information.

3. Establish the following iBGP sessions to exchange link-state information between the members

of AS 65001:

• R2 <-> R4

• R2 <-> R3

• R3 <-> R4

4. Verify the link-state information in BGP

Page 3: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

3

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

Part 2. Enabling BGP Egress Peer Engineering on routers R3 and R4

In this part, we will simply enable BGP egress peer engineering (EPE) on R3 and R4 and observe the

impact on the link-state information carried over BGP.

Page 4: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

4

Lab Exercise

1. Base BGP-LS configuration:

The following figure reflects the base BGP-LS configuration.

eBGP

eBGP(BGP-LS)

lo0:172.16.1.2

lo0:192.168.6.6

lo0:172.16.1.3

lo0:172.16.1.4

Gi0/0/0/1 Gi0/0/0/1

Gi0/0/0/0

Gi0/0/0/2

Gi0/0/0/1

192.168.1.0/24

R1 R2 R5R4

R3 R6

10.2.4.0/24

.2

.2 .4 .4

.4

.3

.3

.3

10.3.4.0/24

OSPFInstance1Area0.0.0.0

Gi0/0/0/0 Gi0/0/0/0.2

Gi0/0/0/0

.3Gi0/0/0/0

Gi0/0/0/3 Gi0/0/0/1

192.168.3.0/24

Gi0/0/0/0192.168.2.0/24

192.168.4.0/24

.1

AS65000

AS65001

AS65002

AS65003

eBGP

eBGP(IPv4)

.5

eBGP(IPv4)

.6.6

.6

.4

eBGP

iBGP(BGP-LS)

iBGP(BGP-LS)

iBGP(BGP-LS)

Note that different routers will require different configurations as described below.

Configuration for R1:

conf

route-policy PASS-ALL

pass

end-policy

! creates a route policy that allows all routes to pass through

router bgp 65000

bgp router-id 192.168.1.1

address-family ipv4 unicast

!

address-family link-state link-state

!

! enable the ipv4 unicast and link-state address families

neighbor 192.168.1.2

remote-as 65001

!

address-family link-state link-state

route-policy PASS-ALL in

route-policy PASS-ALL out

!

! create an eBGP session with R2 and enable BGP link-state address family

Page 5: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

5

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

Configuration for R2:

conf

!

router ospf 1

distribute bgp-ls

!

! configure OSPF to distribute topology information to BGP-LS

route-policy PASS-ALL

pass

end-policy

! creates a route policy that allows all routes to pass through !

router bgp 65001

bgp router-id 192.168.1.2

address-family ipv4 unicast

!

address-family link-state link-state

!

! enable the ipv4 unicast and link-state address families !

neighbor 172.16.1.3

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

! create an iBGP session with R3 and enable BGP link-state address family !

neighbor 172.16.1.4

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

! create an iBGP session with R4 and enable BGP link-state address family !

neighbor 192.168.1.1

remote-as 65000

address-family link-state link-state

route-policy PASS-ALL in

route-policy PASS-ALL out

!

! create an eBGP session with R1 and enable BGP link-state address family

Configuration for R3:

conf

!

router bgp 65001

address-family link-state link-state

!

! enable the ipv4 unicast and link-state address families !

neighbor 172.16.1.2

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

Page 6: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

6

! create an iBGP session with R2 and enable BGP link-state address family !

neighbor 172.16.1.4

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

! create an iBGP session with R4 and enable BGP link-state address family !

Configuration for R4:

conf

!

router bgp 65001

address-family link-state link-state

!

! enable the ipv4 unicast and link-state address families !

neighbor 172.16.1.2

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

! create an iBGP session with R2 and enable BGP link-state address family !

neighbor 172.16.1.3

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

! create an iBGP session with R3 and enable BGP link-state address family !

Configuration for R5, R6:

No configuration required.

Please wait for all routers in your group to be configured before you issue the following

verification commands. Please also do not move to the next part until advised to do so by

your instructors.

Verify your configuration (on R1,R2,R3,R4):

The key objective of this lab is to get a detailed understanding of how link-state information is

carried in BGP. The following verification commands will help you to do so.

show ospf neighbor

! only for routers in AS650001; ensure neighbors are up

show ospf database router

! only for routers in AS650001; ensure you understand in detail the contents of the OSPF database

show bgp summary

! summary of BGP operation

show bgp neighbors detail

Page 7: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

7

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

! note the output describing the link-state address family

show bgp link-state link-state

! view the actual BGP link-state information

2. Enabling BGP Egress Peer Engineering (EPE)

In this part, we will simply enable BGP egress peer engineering (EPE) on R3 and R4 and observe

the impact on the link-state information carried over BGP.

Configuration for R3:

conf

!

router bgp 65001

!

neighbor 192.168.6.6

egress-engineering

exit

! Enables EPE for the eBGP session to R6

Configuration for R4:

conf

!

router bgp 65001

!

neighbor 192.168.2.5

egress-engineering

exit

! Enables EPE for the eBGP session to R5 !

neighbor 192.168.5.6

egress-engineering

exit

! Enables EPE for the eBGP session to R6

Please wait for all routers in your group to be configured before you issue the following

verification commands.

Verify your configuration (on R1,R2,R3,R4):

show bgp summary

! summary of BGP operation

show bgp egress-engineering

! view BGP EPE details

show bgp link-state link-state

! view the actual BGP link-state information

Page 8: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

8

Page 9: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

9

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

Workshop templates for reference purpose only:

R1

Complete configuration

hostname R1

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.1.1 255.255.255.0

!

interface GigabitEthernet0/0/0/1

shutdown

!

interface GigabitEthernet0/0/0/2

shutdown

!

interface GigabitEthernet0/0/0/3

shutdown

!

route-policy PASS-ALL

pass

end-policy

!

router bgp 65000

bgp router-id 192.168.1.1

address-family ipv4 unicast

!

address-family link-state link-state

!

neighbor 192.168.1.2

remote-as 65001

address-family ipv4 unicast

!

address-family link-state link-state

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

!

end

R2

Complete configuration

hostname R2

interface Loopback0

ipv4 address 172.16.1.2 255.255.255.255

!

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.1.2 255.255.255.0

!

Page 10: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

10

interface GigabitEthernet0/0/0/1

ipv4 address 10.2.4.2 255.255.255.0

!

interface GigabitEthernet0/0/0/2

ipv4 address 10.2.3.2 255.255.255.0

!

interface GigabitEthernet0/0/0/3

shutdown

!

route-policy PASS-ALL

pass

end-policy

!

router ospf 1

distribute bgp-ls

router-id 172.16.1.2

network point-to-point

area 0.0.0.0

interface Loopback0

!

interface GigabitEthernet0/0/0/1

!

interface GigabitEthernet0/0/0/2

!

!

!

router bgp 65001

bgp router-id 192.168.1.2

address-family ipv4 unicast

!

address-family link-state link-state

!

neighbor 172.16.1.3

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

!

neighbor 172.16.1.4

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

!

neighbor 192.168.1.1

remote-as 65000

address-family ipv4 unicast

!

address-family link-state link-state

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

!

end

R3

Complete configuration

Page 11: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

11

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

hostname R3

interface Loopback0

ipv4 address 172.16.1.3 255.255.255.255

!

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.3.3 255.255.255.0

!

interface GigabitEthernet0/0/0/1

ipv4 address 10.3.4.3 255.255.255.0

!

interface GigabitEthernet0/0/0/2

ipv4 address 10.2.3.3 255.255.255.0

!

interface GigabitEthernet0/0/0/3

ipv4 address 192.168.4.3 255.255.255.0

!

route-policy PASS-ALL

pass

end-policy

!

router static

address-family ipv4 unicast

192.168.6.6/32 GigabitEthernet0/0/0/0 192.168.3.6

192.168.6.6/32 GigabitEthernet0/0/0/3 192.168.4.6

!

!

router ospf 1

router-id 172.16.1.3

network point-to-point

area 0.0.0.0

interface Loopback0

!

interface GigabitEthernet0/0/0/1

!

interface GigabitEthernet0/0/0/2

!

!

!

router bgp 65001

bgp router-id 172.16.1.3

address-family ipv4 unicast

!

address-family link-state link-state

!

neighbor 172.16.1.2

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

!

neighbor 172.16.1.4

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

!

neighbor 192.168.6.6

remote-as 65003

ebgp-multihop 255

Page 12: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

12

egress-engineering

update-source Loopback0

address-family ipv4 unicast

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

!

end

R4

Complete configuration

hostname R4

interface Loopback0

ipv4 address 172.16.1.4 255.255.255.255

!

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.2.4 255.255.255.0

!

interface GigabitEthernet0/0/0/1

ipv4 address 10.2.4.4 255.255.255.0

!

interface GigabitEthernet0/0/0/2

ipv4 address 10.3.4.4 255.255.255.0

!

interface GigabitEthernet0/0/0/3

ipv4 address 192.168.5.4 255.255.255.0

!

route-policy PASS-ALL

pass

end-policy

!

router ospf 1

router-id 172.16.1.4

network point-to-point

area 0.0.0.0

interface Loopback0

!

interface GigabitEthernet0/0/0/1

!

interface GigabitEthernet0/0/0/2

!

!

!

router bgp 65001

bgp router-id 192.168.2.4

address-family ipv4 unicast

!

address-family link-state link-state

!

neighbor 172.16.1.2

remote-as 65001

update-source Loopback0

address-family ipv4 unicast

Page 13: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

13

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

!

address-family link-state link-state

!

!

neighbor 172.16.1.3

remote-as 65001

update-source Loopback0

address-family link-state link-state

!

!

neighbor 192.168.2.5

remote-as 65002

egress-engineering

address-family ipv4 unicast

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

neighbor 192.168.5.6

remote-as 65003

egress-engineering

address-family ipv4 unicast

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

!

end

R5

Complete configuration

hostname R5

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.2.5 255.255.255.0

!

interface GigabitEthernet0/0/0/1

shutdown

!

interface GigabitEthernet0/0/0/2

shutdown

!

interface GigabitEthernet0/0/0/3

shutdown

!

route-policy PASS-ALL

pass

end-policy

!

router bgp 65002

bgp router-id 192.168.2.5

address-family ipv4 unicast

!

neighbor 192.168.2.4

remote-as 65001

address-family ipv4 unicast

Page 14: BGP-LS Configuration Lab - wiki.apnictraining.net

Monday, September 04, 2017

14

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

!

end

R6

Complete configuration

hostname R6

interface Loopback0

ipv4 address 192.168.6.6 255.255.255.255

!

interface MgmtEth0/0/CPU0/0

shutdown

!

interface GigabitEthernet0/0/0/0

ipv4 address 192.168.3.6 255.255.255.0

!

interface GigabitEthernet0/0/0/1

ipv4 address 192.168.4.6 255.255.255.0

!

interface GigabitEthernet0/0/0/2

ipv4 address 192.168.5.6 255.255.255.0

!

interface GigabitEthernet0/0/0/3

shutdown

!

route-policy PASS-ALL

pass

end-policy

!

router static

address-family ipv4 unicast

172.16.1.3/32 GigabitEthernet0/0/0/0 192.168.3.3

172.16.1.3/32 GigabitEthernet0/0/0/1 192.168.4.3

!

!

router bgp 65003

bgp router-id 192.168.6.6

address-family ipv4 unicast

!

neighbor 172.16.1.3

remote-as 65001

ebgp-multihop 255

update-source Loopback0

address-family ipv4 unicast

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

neighbor 192.168.5.4

remote-as 65001

address-family ipv4 unicast

route-policy PASS-ALL in

route-policy PASS-ALL out

!

!

Page 15: BGP-LS Configuration Lab - wiki.apnictraining.net

APNIC SDN Workshop Lab

15

©APNIC

Created: 24 June 2014 Updated: 24 June 2014

!

end


Recommended