BSCI - BGP

BGP: (Open standard protocol)

1. Connect between autonomous systems.
2. Autonomous system = A collection of networks under a single technical administration.
3. IGP = IS-IS, EIGRP, RIP, OSPF
4. BGP will not tell you how far the distance, they only tell you which path to go.
5. Between Jaring, Maxis, if you want to connect them together without using BGP, the routing table will be too long.
6. BGP is only used:
+ in a huge environment
7. Using BGP, you can track aircraft.
8. Have to memerize the 10 steps to choose the path.
9. Have to memerize the 4 message types for BGP.
- Opne
- Keepalive
- Update
- Notification
10. Internal BGP - You are only connected to one autonomous system.
External BGP - Connected between autonomous systems.
The router will detect your topology and decide whether you are internal or external.
11. BGP acts based on autonomous system.
12. COnfiguration steps.
1. Setup autonomous number to all routers. (Look for which Autonomous system your are in and set it to your router)
2. Establish internal adjacency. Determine your neighbours and make it up. (Specify internal neighbor)
This also includes loopback interfaces.
3. Establish external adjacency. Setup external BGP
4. Advertise directly connected neighbor --> To tell topology algorithm about your own network (refer to "sh ip int brief")


labD(config)#router bgp 4000 --> Create BGP routing
labD(config-router)#neighbor 50.0.0.2 remote-as 4000 --> Set internal BGP neighbor
labD(config-router)#neighbor 7.7.7.1 remote-as 1000 --> Set external BGP neighbor
labD(config-router)#network 50.0.0.0 mask 255.255.255.252
labD(config-router)#network 7.7.7.0 mask 255.255.255.252
labD(config-router)#no synchronization --> Enable external BGP to work

Verification that BGP is working, --> "sh ip route"

Gateway of last resort is not set

1.0.0.0/30 is subnetted, 1 subnets
B 1.1.1.0 [20/0] via 7.7.7.1, 00:02:24
50.0.0.0/30 is subnetted, 1 subnets
C 50.0.0.0 is directly connected, Serial1
2.0.0.0/30 is subnetted, 1 subnets
B 2.2.2.0 [20/0] via 7.7.7.1, 00:02:50
100.0.0.0/30 is subnetted, 1 subnets
B 100.0.0.0 [20/0] via 7.7.7.1, 00:01:55
200.0.0.0/30 is subnetted, 2 subnets
B 200.0.0.0 [20/0] via 7.7.7.1, 00:02:51
B 200.0.0.4 [20/0] via 7.7.7.1, 00:00:59
7.0.0.0/30 is subnetted, 1 subnets
C 7.7.7.0 is directly connected, Serial0

13. Instead of doing redistribution, you may want to use BGP.
14. Synchronization will only when you have a fully distributed network.
15. External BGP has lower Administrative Distance than internal BGP.
This is because there could be many routers within the autonomous system which defined by Internal BGP.
Also, if you have three routers A-B-C
A connect to C via external BGP while B to C via OSPF. Thus, when external BGP between A and C is established, OSPF between B and C can be removed and allowed to be corrupted.

16. Using loopback interface to connect to Internal bgp neighbor.

labD(config-router)#neighbor 27.0.0.1 remote-as 4000
labD(config-router)#neighbor 27.0.0.1 update-source loopback 0
labD(config-router)#neighbor 21.0.0.1 remote-as 1000
labD(config-router)#neighbor 21.0.0.1 update-source loopback 0
labD(config)#router bgp 4000
labD(config-router)#network 24.0.0.0 mask 255.255.255.0 --> Advertise loopback network into BGP

--> All using loopback interfaces


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

21.0.0.1 4 1000 0 0 0 0 0 never Idle
27.0.0.1 4 4000 6 5 31 0 0 00:01:40 1

-->Uptime for 27.0.0.1 is valid.
-->Uptime for 21.0.0.1 is "never" because it is an external bgp and 21.0.0.1 is a loopback address.
you cannot use loopback for external BGP, it can only be used for establishing neighborship with internal BGP.

17. Creating peer-group.

neighbor AS2222 peer-group --> create a peer-group called AS2222
neighbor AS2222 remote-as 2222 --> Apply remote AS to this group
neighbor AS2222 update-source loopback 0
neighbor 28.0.0.1 peer-group AS2222
neighbor 29.0.0.1 peer-group AS2222
neighbor 30.0.0.1 peer-group AS2222
neighbor 31.0.0.1 peer-group AS2222

Comments