eBGP Basic Configuration |
Interface Configuration
R1#conifg
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int s0
R1(config-if)#ip address 12.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#^Z
R2#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#
R2(config)#int s1
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#^Z
R2#ping 12.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:
!!!!!
R1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
!!!!!
Basic Configuration of BGP
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp ?
<1-65535> Autonomous system number -----------------------> SEE THE RANGE OF AS
R1(config)#router bgp 100 -----------------------------------------------> R1 is now member of AS 100
R1(config-router)#^Z
Dec 9 02:03:51.511: %SYS-5-CONFIG_I: Configured from console by console
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp 200
BGP is already running; AS is 100------------------------------------------>Only one BGP AS can be configured on the device.
R1(config)#router bgp 100
R1(config-router)#neighbor 12.1.1.2 remote-as 200 ----------------------> Need to configure Neighbors manually using neighbor command.
R1(config-router)#^Z
R2(config)#router bgp 200
R2(config-router)#neighbor 12.1.1.1 remote-as 100
R2(config-router)#^Z
R2#
Dec 9 02:05:43.391: %SYS-5-CONFIG_I: Configured from console by console
R2#
Dec 9 02:06:12.163: %BGP-5-ADJCHANGE: neighbor 12.1.1.1 Up
R1#sh ip bgp summary
BGP router identifier 12.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.1.1.2 4 200 2 2 0 0 0 00:00:02 0
Configuration of loopback 0 on R2
R2(config)#int loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#no sh
R2(config-if)#^Z
!!Advertise the network 2.2.2.2 /32
R2(config)#router bgp 200
R2(config-router)#netw
R2(config-router)#network 2.2.2.2 mask 255.255.255.255
R2(config-router)#^Z
!!Verifying route received at R1
R1#sh ip bgp summary
BGP router identifier 12.1.1.1, local AS number 100
BGP table version is 2, main routing table version 2
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 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 441 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.1.1.2 4 200 7 6 2 0 0 00:03:24 1
R1#sh ip bgp
BGP table version is 2, local router ID is 12.1.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
*> 2.2.2.2/32 12.1.1.2 0 0 200 i
R1#sh ip route
Codes: 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
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 12.1.1.2, 00:01:08
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0
R1#sh ip bgp neighbors 12.1.12.2
BGP neighbor is 12.1.1.2, remote AS 200, external link
BGP version 4, remote router ID 12.1.1.2
BGP state = Established, up for 00:05:13
Last read 00:00:13, last write 00:00:13, 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: 1 1
Notifications: 0 0
Updates: 0 1
Keepalives: 7 7
Route Refresh: 0 0
Total: 8 9
Default minimum time between advertisement runs is 30 seconds
<output omitted>
Points to Remember
- Only one BGP AS can be configured on the device.
- Need to configure Neighbors manually using neighbor command.
- We need to advertise the networks .
- Ebgp neighbors should be directly connected.
Basic Commands
- sh ip protocol
- sh ip bgp summary –shows the neighbors and the prefixes learned BGP Identifier Local ASN BGP table version
- sh ip route
- sh ip bgp
- sh ip bgp neigbhor x.x.x.x received-routes
- sh ip bgp neighbor x.x.x.x adverstied routes
thank you sir
ReplyDeleteHow to configure BGP in two MPLS network from different ISPs ?? I am talking about not Internet ISP but MPLS provider ISPs.
ReplyDeleteSuperb video Dear
ReplyDeleteVery well explained!!
ReplyDelete