Advance BGP Configure | Cisco Router | AI Study

 Here is an example of a more advanced BGP configuration for a Cisco router that includes the use of path prepend, multi-exit discriminator (MED) weight attribute, and inbound and outbound policies:

router bgp 100 bgp log-neighbor-changes no synchronization network 10.0.0.0 mask 255.0.0.0 network 10.1.1.0 mask 255.255.255.0 neighbor 10.1.1.2 remote-as 200 neighbor 10.1.1.2 update-source Vlan1 neighbor 10.1.1.2 next-hop-self neighbor 10.1.1.2 soft-reconfiguration inbound neighbor 10.1.1.2 route-map bgp-in in neighbor 10.1.1.2 route-map bgp-out out neighbor 10.1.1.2 weight 100 neighbor 10.1.1.2 prefix-list p2p-filter in route-map bgp-in permit 10 match as-path 100 set local-preference 200 route-map bgp-out permit 10 match ip address prefix-list p2p-filter set as-path prepend 100 100 set med 100 prefix-list p2p-filter seq 5 permit 10.1.1.0/24


This configuration sets up a BGP router with an autonomous system number of 100. The "bgp log-neighbor-changes" command is used to log BGP neighbor changes. The "no synchronization" command disables the requirement for BGP routers to have the same routing information before forming a neighbor relationship.

The "network" command is used to advertise the 10.0.0.0/8 and 10.1.1.0/24 networks to BGP neighbors. The "neighbor" command is used to configure a BGP neighbor with IP address 10.1.1.2 and autonomous system number 200. The "update-source" command is used to specify the source IP address for BGP updates, in this case, the Vlan1 interface. The "next-hop-self" command is used to make the next hop for the routes learned from this neighbor be the IP address of the local router.

The "soft-reconfiguration inbound" command allows the router to save the routing information from BGP neighbors in memory, so that it can be used for fast inbound soft reconfiguration. The "route-map" command is used to apply a route map to inbound and outbound BGP updates. The "weight" command is used to assign a weight value to the BGP routes learned from this neighbor.

The "prefix-list" command is used to filter the routes that will be sent to the neighbor, in this case, only the 10.1.1.0/24 network is allowed.

The "route-map bgp-in" command is used to apply a route map to inbound BGP updates. The "match as-path" command is used to match the AS_PATH, in this case, 100. The "set local-preference" command is used to set the local preference value to 200.

The "route-map bgp-out" command is used to apply a route map to outbound BGP updates. The "match ip address prefix-list" command is used to match the prefix-list that was defined

Comments

Popular posts from this blog

Arista Switch Configure |VLANs, LACP, management IP, trunk port, and RSTP| AI Study

AI tips and tricks for a support engineer