You are on page 1of 4

H O AM BE O

A U
C TH I E V EB MO EO NKC TSI SH CE FO
L RF EI O
E UV C I CD NE AO S
U N L O C K E D F A Q L A B S

Configuring Basic BGP Evil Routers


by J E R E M Y on N
L .O V GE AM D B D EI1 RS0 2 C 9 O, M 2M 0E 0 N 8 T S Like 874
in N E T W O R K I N G

UPDATE: Added a video demo at the bottom of the post (22-Mar-2008).

Heres a quick demonstration on how to configure two routers to be BGP neighbors. Im using To search, type and hit enter
dynamips and the same topology from yesterdays multilink PPP lab (for simplicity):

Autonomous Systems

R1 : 42
R2 : 69

Networks Advertised
Well configure a loopback 0 interface on each of the two routers and then advertise those
networks to our BGP neighbors.

R1 Loopback0 : 42.42.42.1/24 P O P U L A R A R T
R2 Loopback0 : 69.69.69.1/24 Achievement Unlocked
Cisco IOU FAQ
Loopback Configuration Why You Should Be Blogging
Lets configure our loopback 0 interfaces first:
Using BGPs local preference to influence outbound
routing
R1# configure terminal
R1(config)# interface loopback 0 Hidden ProCurve commands
R1(config-if)# ip address 42.42.42.1 255.255.255.0 10 Things Your IT Guy Wants You To Know
R1(config-if)# end
R1# Port forwarding a range of ports on Cisco IOS
How to Upgrade the License on a Cisco ASA

R2# configure terminal Configuring FreeRADIUS to support Cisco AAA


R2(config)# interface loopback 0 Clients
R2(config-if)# ip address 69.69.69.1 255.255.255.0 You know youre a computer security guy when
R2(config-if)# end
R2#
L A T E S T C O M M

R1 BGP Configuration bc on Cisco IOU FAQ


Now well configure BGP on R1 and advertise only the 42.42.42.0/24 network into BGP: The_TB_Kid on Achievement Unlocked!
NorthVandea on 10 Things Your IT Guy Wants You to
Know
Crimildo on RIP Authentication
blindhog.net Cisco IOU install on Ubuntu 14.04 64-
bit on Cisco IOU FAQ

converted by W eb2PDFConvert.com
BadOPCode on Achievement Unlocked!
R1# configure terminal
R1(config)# router bgp 42 Charit Rastogi on Free Two-Factor Auth for your
R1(config-router)# network 42.42.42.0 mask 255.255.255.0 Servers and VPNs
R1(config-router)# neighbor 192.168.42.2 remote-as 69
R1(config-router)# end
R1#

R2 BGP Configuration
Likewise, well configure BGP on R2 and advertise only the 69.69.69.0/24 network:

R2# configure terminal


R2(config)# router bgp 69
R2(config-router)# network 69.69.69.0 mask 255.255.255.0
R2(config-router)# neighbor 192.168.42.1 remote-as 42
R2(config-router)# end
R2#

Verification
After a moment we should see a syslog message (on each router) similar to the following,
letting us know that an adjacency has formed:

*Mar 1 00:07:28.667: %BGP-5-ADJCHANGE: neighbor 192.168.42.2 Up

BGP is not the fastest protocol when it comes to convergence, but after a moment we should
see the neighbors are exchanging routes:

R1# show ip bgp summary


BGP router identifier 42.42.42.1, local AS number 42
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


192.168.42.2 4 69 5 5 3 0 0 00:01:18 1
R1#

R2# show ip bgp summary


BGP router identifier 69.69.69.1, local AS number 69
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


192.168.42.1 4 42 6 6 3 0 0 00:02:03 1
R2#

And if we take a look at our routing tables on each router, we should see that the networks we
advertised into BGP do, indeed, show up on the other side:

R1# show ip route bgp


69.0.0.0/24 is subnetted, 1 subnets
B 69.69.69.0 [20/0] via 192.168.42.2, 00:05:00
R1#

converted by W eb2PDFConvert.com
R2# show ip route bgp
42.0.0.0/24 is subnetted, 1 subnets
B 42.42.42.0 [20/0] via 192.168.42.1, 00:04:52
R2#

Success! Later well cover multihoming and the use of weights, local preferences, and MEDs
to influence routing decisions.

Related posts:

1. Configuring Basic NAT with overloading


2. Configuring Basic OSPF (Dynamips)
3. Configuring Basic HSRP (Video)
4. Configuring a Cisco Terminal Server
5. Configuring MD5 Authentication for BGP Peers

Tagged as: bgp, cisco, how-to, video

{ 6 comments read them below or add one }

Lenny November 29, 2008 at 11:22 am

Great continuation and follow up lab!

R E P L Y

Punched_rock August 16, 2012 at 3:56 pm


20
automatic Verification no successful
Like

R E P L Y
0
jdimstrnate February 19, 2013 at 10:45 pm
you need to create ip addesses (192.168.42.0/30) on the s0/0 interfaces. Once you
1
have basic ping conectivity thsi will work. The assumption is that you dont need
guidance on this.

R E P L Y

Footman July 17, 2013 at 8:42 am

Jeremy your gf looks like a porn star, lucky you.

converted by W eb2PDFConvert.com
R E P L Y

Jeremy L. Gaddis July 18, 2013 at 7:45 pm


@Footman: She is, but the videos are private. Sorry! =)

R E P L Y

sandeep April 17, 2014 at 6:48 pm

Thanks for the simple explanation :)

R E P L Y

Leave a Comment

Name *

E-mail *

Website

Notify me of followup comments via e-mail

Submit
Notify me of new posts by email.

{ 4 trackbacks }
evilrouters.net Blog Archive Using weights to influence BGP routing
GNS3-Topology: EvilRouters- BGP Over Multilink PPP Lab | GNS3 Labs :: Cisco Router
Simulator Network Topologies
GNS3-Topology: EvilRouters-Weighting To Influence BGP Routing | GNS3 Labs :: Cisco
Router Simulator Network Topologies
evilrouters.net Blog Archive Configuring MD5 Authentication for BGP Peers

P R E V Installing
I O the
U Vista
S TelnetPClient
O S T :

N E X Using
T weights
P toOinfluence
S TBGP: routing

Monitor BGP Route Changes


Find and Fix Routing Problems Fast. Get Started With Your Free Trial!

Copyright 20082014 Null Ventures LLC. All rights reserved. Disclosures Terms of Use

converted by W eb2PDFConvert.com

You might also like