You are on page 1of 13

CCIE Practice Lab: BGP

WRITTEN

BY:

ASHWIN KOHLI
CCIE

# 8877

CCIE Practice Lab: BGP


Ashwin Kohli, CCIE #8877
Copyright 2004 Netcg, Inc.
Published by:
Network Learning Inc.
1997 Whitney Mesa Dr.
Henderson, LV 89014 USA
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage and retrieval
system, without written permission from the publisher, except for the inclusion of brief quotations in a
review.
Printed in the United States of America

Warning and Disclaimer


This book contains a practice lab and step-by-step instructions on how to complete the practice lab. Every
effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness
is implied.
The information is provided on an as is basis. The author, Netcg, Inc. shall have neither liability nor
responsibility to any person or entity with respect to any loss or damages arising from the information
contained in this book.
The opinions expressed in this book belong to the authors and are not necessarily those of Network
Learning Inc.

Trademark Acknowledgments
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately
capitalized. Netcg, Inc. or Network Learning, Inc. cannot attest to the accuracy of this information. Use of
a team in this book should not be regarded as affecting the validity of any trademark or service mark.

Feedback Information
At Network Learning Inc., our goal is to create in-depth technical books of the highest quality and value.
Each book is crafted with care and precision, undergoing rigorous development that involves the unique
expertise of members from the professional technical community.
Readers feedback is a natural continuation of this process. If you have any comments regarding how we
could improve the quality of this book, or otherwise alter it to better suit your needs, you can contact us
through email at sales@ccbootcamp.com. Please make sure to include the book title in your message.
We greatly appreciate the assistance.

ABOUT THE AUTHOR

ASHWIN KOHLI, Ashwin Kohli is a dual CCIE #8877 (Routing/Switching and


Security). He is currently a Global Architect for one of the top three financial
companies, and is responsible for architecting enterprise solutions. He has
worked at many of the top financial companies over the last 10 years. Ashwin
also holds the CCNP, CCDP and a BSc in Computer Science & Accounting
form Manchester University, United Kingdom. He has more than 10 years
experience in Cisco networking and security including planning, designing,
implementing, and troubleshooting enterprise multi-protocol networks. Ashwin
also writes Cisco training material for Network Learning, Inc.
.

BGP

TABLE OF CONTENTS

1.0

BGP - EBGP: Establishing an Relationship ...................................................................... 9


ANSWER ......................................................................................................................... 10

2.0

BGP - EBGP: Loopback Addresses ................................................................................ 26


ANSWER ......................................................................................................................... 27

3.0

BGP - IBGP: Establishing an Relationship...................................................................... 29


ANSWER ......................................................................................................................... 30

4.0

BGP - IBGP: Loopback Addresses .................................................................................. 31


ANSWER .......................................................................................................................... 32

5.0

BGP Attribute - Weight ..................................................................................................... 34


ANSWER .......................................................................................................................... 35

6.0

BGP Attribute Local Preference .................................................................................... 39


ANSWER .......................................................................................................................... 40

7.0

BGP Attribute AS-Path .................................................................................................. 46


ANSWER .......................................................................................................................... 47

8.0

BGP Attribute Next-Hop-Self......................................................................................... 51


ANSWER .......................................................................................................................... 52

9.0

BGP Attribute MED........................................................................................................ 57


ANSWER .......................................................................................................................... 58

10.0

BGP Attribute Origin Attribute ....................................................................................... 63


ANSWER .......................................................................................................................... 64

64
11.0

BGP - Synchronization .................................................................................................... 69


ANSWER ......................................................................................................................... 70

12.0

BGP - EBGP: Advertising a Network Using Network Command ................................. 76


ANSWER ......................................................................................................................... 77

13.0

BGP - EBGP: Advertising a Network Using Redistribute Static ................................... 81


ANSWER ......................................................................................................................... 82

14.0

BGP - EBGP: Advertising a Network Using Redistribute Connected .......................... 84


ANSWER ......................................................................................................................... 85

15.0

BGP Remove-Private-AS ............................................................................................ 87


ANSWER ........................................................................................................................ 88

16.0

BGP Route Filtering Distribute-lists............................................................................. 90


ANSWER ........................................................................................................................ 91

SAMPLE DOCUMENT

17.0

BGP Route Filtering Prefix-lists.................................................................................... 95


ANSWER ......................................................................................................................... 96

18.0

BGP Route Filtering AS_path Filter........................................................................... 105


ANSWER ...................................................................................................................... 106

19.0

BGP Route Filtering AS_path Prepend ..................................................................... 112


ANSWER ...................................................................................................................... 113

20.0

BGP Peer Groups.......................................................................................................... 118


ANSWER ....................................................................................................................... 119

21.0

BGP Route-reflectors .................................................................................................... 125


ANSWER ....................................................................................................................... 126

22.0

BGP Confederation .................................................................................................... 131


ANSWER ....................................................................................................................... 132

23.0

BGP Soft-Reconfiguration .............................................................................................. 1


ANSWER ........................................................................................................................... 8

24.0

BGP - route summarization Aggregate Address ........................................................ 139


ANSWER ....................................................................................................................... 140

25.0

BGP - route summarization Aggregate Address Summary Only ............................ 146


ANSWER ....................................................................................................................... 147

26.0

BGP - route summarization Aggregate Address Suppress-Map ............................. 149


ANSWER ........................................................................................................................ 150

27.0

BGP Route Flap Dampening...................................................................................... 153


ANSWER ....................................................................................................................... 154

28.0

BGP route authentication ......................................................................................... 156


ANSWER ..................................................................................................................... 157

29.0

BGP Peer relationship through PIX........................................................................... 159


ANSWER .................................................................................................................... 160

30.0

BGP Peer relationship through PIX using GRE ....................................................... 162


Lab Setup .................................................................................................................... 166
ANSWER ..................................................................................................................... 167

31.0

BGP Default Route ..................................................................................................... 170


ANSWER.................................................................................................................... 171

32.0

BGP Timers ............................................................................................................. 174


ANSWER.................................................................................................................... 175

33.0

BGP Community Attribute No_Export .................................................................. 177


ANSWER.................................................................................................................... 178

BGP

34.0

BGP Community Attribute No_Advertise.............................................................. 182


ANSWER.................................................................................................................... 183

35.0

BGP Community Attribute Local_AS..................................................................... 187


ANSWER ..................................................................................................................... 188

36.0

BGP Community Attribute Community-lists .......................................................... 192


ANSWER ..................................................................................................................... 193

SAMPLE DOCUMENT

23.0

BGP Soft-Reconfiguration

VLAN 11
137.1.1 .0 /0

AS 21994

AS 714
Frame-relay
137.1.200.1

Router1

137.1.200.2

Router2

1. Configure the frame-relay using only physical interfaces on all routers. Create a DLCI from
Router1 to reach Router2.
2. Configure an EBGP peer relationship between Router1 to Router2.
3. Advertise the following networks from Router1 into BGP
a. Fe0/0 - 137.1.1.0 /24
b. Loopback 0 - 11.11.11.0 /24
c. Loopback 1 33.33.33.0 /24
4. Configure a prefix-list in Router1 to initially disallow both the loopbacks from being
advertised only to Router2 and to allow all other networks to be advertised.
5. Test your configuration in Router2 that you are only receiving 137.1.1.0 subnet.
6. Now, change the prefix-list to advertise 137.1.1.0 and loopback 1 subnet, but continue to still
disallow loopback 0 subnet from being advertised.
7. Test your configuration in Router2. Which routes are you receiving?
8. Clear the bgp peer relationship on Router1.
9. Test you configuration in Router2. Which routes are you receiving?
10. Now configure soft-reconfiguration on both routers
11. Redo Step 4, 5, 6 and 7 above.
12. Now only do a soft clear for the bgp relationship?
13. Test your configuration in Router2. Are you receiving both the routes?

BGP

ANSWER

Whenever there is a change in the routing policy (e.g. new routes being added or old
routes deleted being or changes to route attributes being advertised via BGP), the BGP
session must be reset (cleared) for the new policy to take effect and the routing table to be
reconfigured. Using a hard reset to clear a BGP session can have a negative impact on
network operation as whole BGP database has to be re-learnt from the BGP neighbors.
Soft reset is recommended because it allows routing table policies to be reconfigured and
activated without clearing the BGP session. Soft reset is done on a per-neighbor basis.
Soft resets can be inbound or outbound:

When soft reset is used to generate inbound updates from a neighbor, it is called
dynamic inbound soft reset.

When soft reset is used to send a new set of updates to a neighbor, it is called
outbound soft reset.

Router1
Interface loopback 0
Ip address 11.11.11.11 255.255.255.0
Interface loopback 1
Ip address 33.33.33.33 255.255.255.0
Interface f0/0
Ip address 137.1.1.1 255.255.255.0
Interface s0/0
Ip address 137.1.200.1 255.255.255.0
Encapsulation frame-relay
No frame-relay inverse-arp
Frame-relay map ip 137.1.200.2 101 broadcast
Router bgp 21994
No synchronization
No auto-summary
Bgp log-neighbor-changes
Network 137.1.1.0 mask 255.255.255.0
Neighbor 137.1.200.2 remote-as 714
Neighbor 137.1.200.2 description <<< EBGP peer with Router2 >>>
Neighbor 137.1.200.2 next-hop-self
Neighbor 137.1.200.2 soft-reconfiguration inbound
Neighbor 137.1.200.2 prefix-list 1 out
ip prefix-list 1 seq 1 deny 11.11.11.0/24
ip prefix-list 1 seq 2 deny 33.33.33.0/24
ip prefix-list 1 seq 3 permit 0.0.0.0/0 le 32

SAMPLE DOCUMENT

Router2
Interface s0/0
Ip address 137.1.200.2 255.255.255.0
Encapsulation frame-relay
No frame-relay inverse-arp
Frame-relay map ip 137.1.200.1 110 broadcast
Router bgp 714
No synchronization
No auto-summary
Bgp log-neighbor-changes
Neighbor 137.1.200.1 remote-as 21994
Neighbor 137.1.200.1 description <<< EBGP peer with Router1>>>
Neighbor 137.1.200.1 soft-reconfiguration inbound

The following shows the output BEFORE the soft-reconfiguration configuration and the
prefix-list is blocking both the loopback addresses from being advertised.
Router1 has established an EBGP relationship with Router2

!Router1 is advertising all three subnets via its BGP database

!Because of the Pre-fix list in Router1, Router2 only receives the subnet 137.1.1.0

!Now change the prefix-list in Router1 to allow subnet 33.33.33.0 to be advertised


router1#show run

10

BGP

<output truncated>
!The original configuration blocking the two loopback addresses
ip prefix-list 1 seq 1 deny 11.11.11.0/24
ip prefix-list 1 seq 2 deny 33.33.33.0/24
ip prefix-list 1 seq 3 permit 0.0.0.0/0 le 32
!
!
<output truncated.>
router1#config t
Enter configuration commands, one per line. End with CNTL/Z.
router1(config)#no ip prefix-list 1 seq 2 deny 33.33.33.0/24
!There has been a change in the BGP routing policy, but Router2 still does not show the updated
policy being advertised from Router1.

!The BGP relationship was cleared in Router1


router1#clear ip bgp *
router1#
*Mar 1 21:45:39.186 UTC: %BGP-5-ADJCHANGE: neighbor 137.1.200.2 Down User reset
router1#
*Mar 1 21:46:16.606 UTC: %BGP-5-ADJCHANGE: neighbor 137.1.200.2 Up
!Router2 now receives the subnet

The following shows the output AFTER the soft-reconfiguration configuration and the
prefix-list is blocking both the loopback addresses from being advertised.
Router1 has established an EBGP relationship with Router2

SAMPLE DOCUMENT

11

!Router1 is advertising all three subnets via its BGP database

!Because of the Pre-fix list in Router1, Router2 only receives the subnet 137.1.1.0

!Now change the prefix-list in Router1 to allow subnet 33.33.33.0 to be advertised


router1#show run
<output truncated>
!The original configuration blocking the two loopback addresses
ip prefix-list 1 seq 1 deny 11.11.11.0/24
ip prefix-list 1 seq 2 deny 33.33.33.0/24
ip prefix-list 1 seq 3 permit 0.0.0.0/0 le 32
!
!
<output truncated.>
router1#config t
Enter configuration commands, one per line. End with CNTL/Z.
router1(config)#no ip prefix-list 1 seq 2 deny 33.33.33.0/24
!There has been a change in the BGP routing policy, but Router2 still does not show the updated
policy being advertised from Router1.

!The a soft clear is done to the BGP relationship was cleared in Router1. You can either
clear it on Router2 inwards or on Router1 outwards.
router1#clear ip bgp * soft out

12

router1#
or
router2#clear ip bgp * soft in
router2#
!Router2 now receives the subnet

!The following shows that the new configuration


router2#sh ip bgp neighbors
BGP neighbor is 137.1.200.1, remote AS 21994, external link
Description: <<< EBGP peer with Router1>>>
BGP version 4, remote router ID 33.33.33.33
BGP state = Established, up for 00:06:23
Last read 00:00:22, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent
Rcvd
Opens:
6
6
Notifications:
0
0
Updates:
0
12
Keepalives:
1323
1322
Route Refresh:
1
2
Total:
1330
1341
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 7, neighbor version 7
Index 1, Offset 0, Mask 0x2
Inbound soft reconfiguration allowed
Sent
Rcvd
Prefix activity:
------Prefixes Current:
0
2 (Consumes 96 bytes)
Prefixes Total:
0
7
Implicit Withdraw:
0
2
Explicit Withdraw:
0
1
Used as bestpath:
n/a
2
Used as multipath:
n/a
0
Outbound Inbound
Local Policy Denied Prefixes: -------- ------Bestpath from this peer:
5
n/a
Total:
5
0

BGP

SAMPLE DOCUMENT

Number of NLRIs in the update sent: max 0, min 0


Connections established 6; dropped 5
Last reset 00:07:01, due to User reset
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 137.1.200.2, Local port: 11002
Foreign host: 137.1.200.1, Foreign port: 179
<output truncated>

13

You might also like