How to Configure BGP on Cisco

 

BGP (Border Gateway Protocol) is a Routing Protocol . its use route between two as number. BGP provide Loop-Free Routing Information. BGP use 179 TCP Port. BGP are two type-EBGP and IBGP. EBGP AD value 20 and IBGP AD value 200. BGP Neighbor called peers.currently uses BGP V4 . in this tutorial we share how to configure BGP on CISCO.

ISP  Initial Configure

ISP#conf t

ISP(config)#int e0/0
ISP(config-if)#ip add
ISP(config-if)#ip address 172.16.1.2 255.255.255.252

ISP(config-if)# no sh

ISP(config)#int e0/1
ISP(config-if)#ip add
ISP(config-if)#ip address 10.10.10.2 255.255.255.252

ISP(config-if)# no sh

IIG 1 Initial Configure

IIG1#conf t

IIG1(config)#int e0/0

IIG1(config-if)#no sh

IIG1(config-if)#ip address 172.16.1.1 255.255.255.252

IIG 2 Initial Configure

IIG2#conf t

IIG1(config)#int e0/0

IIG2(config-if)#no sh

IIG2(config-if)#ip address 10.10.10.1 255.255.255.252

 

ISP end Prefix List and Rout Map Configure

ip prefix-list IIG1_OUT seq 10 permit 192.168.1.0/24

ip prefix-list IIG2_OUT seq 20 permit 192.168.2.0/24

route-map Route_Out_IIG1 10

match ip address prefix-list IIG1_OUT

route-map Route_Out_IIG2 20

match ip address prefix-list IIG2_OUT

 

 

ISP end  BGP Configure for IIG1

Router bgp 100

neighbor 172.16.1.1 remote-as 200

network 192.168.1.0 mask 255.255.255.0

network 192.168.2.0 mask 255.255.255.0

neighbor 172.16.1.1 route-map Route_Out_IIG1 out

IIG1 end Prefix List and Rout Map Configure for ISP

ip prefix-list ISP1_IN seq 10 permit 192.168.0.0/21

route-map Route_IN_ISP1 10

match ip address prefix-list ISP1_IN

 

IIG1 end BGP Configure For ISP

Router bgp 200

neighbor 172.16.1.2 remote-as 100

neighbor 172.16.1.2 route-map Route_IN_ISP1 IN

neighbor 172.16.1.2 default-originate

 

ISP end BGP Configure For IIG 2

Router bgp 100

neighbor 10.10.10.1 remote-as 300

neighbor 10.10.10.1 route-map Route_Out_IIG2 out

 

IIG2 end Prefix List and Rout Map Configure for ISP

ip prefix-list ISP1_IN seq 20 permit 192.168.0.0/21

route-map Route_IN_ISP1 20

match ip address prefix-list ISP1_IN

 

IIG2 BGP Configure for ISP

Router bgp 300

neighbor 10.10.10.2 remote-as 100

neighbor 10.10.10.2 route-map Route_IN_ISP1 IN

neighbor 10.10.10.2 default-originate

 

Verification:

IIG1#show ip route
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        172.16.1.0/30 is directly connected, Ethernet0/0
L        172.16.1.1/32 is directly connected, Ethernet0/0
B     192.168.1.0/24 [20/0] via 172.16.1.2, 01:16:38

IIG1#show ip bgp
BGP table version is 2, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.1.0      172.16.1.2               0             0 100 i

 

IIG2#show ip route
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.10.10.0/30 is directly connected, Ethernet0/0
L        10.10.10.1/32 is directly connected, Ethernet0/0
B     192.168.2.0/24 [20/0] via 10.10.10.2, 00:00:05

IIG2#sho ip bgp
BGP table version is 2, local router ID is 10.10.10.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete

Network Next Hop Metric LocPrf Weight Path
*> 192.168.2.0 10.10.10.2 0 0 100 i

 

 

 

 

 

 

 

Related posts

Leave a Comment