Advance BGP in Juniper | Ai Study

 Here is an example of an advanced BGP configuration for a Juniper router that includes the use of various BGP attributes and inbound and outbound policies:


routing-options { router-id 10.1.1.1; autonomous-system 100; } protocols { bgp { group external { type external; peer-as 200; neighbor 10.1.1.2 { local-address 10.1.1.1; import bgp-in; export bgp-out; local-preference 200; multi-exit-discriminator 100; prefix-list p2p-filter { import-only; rule 10 { match { ipv4-prefix 10.1.1.0/24; } then { accept; } } } } } } } policy-options { policy-statement bgp-in { term as-path-100 { from as-path 100; then { next term; } } term set-local-pref { then { local-preference 200; } } } policy-statement bgp-out { term p2p-filter { from prefix-list p2p-filter; then { next term; } } term set-as-path { then { as-path-prepend "100 100"; metric 100; } } } }



This configuration sets up a BGP router with an autonomous system number of 100 and a router ID of 10.1.1.1.

The "group external" command is used to configure a BGP group for external peers with an autonomous system number of 200. The "peer-as" command is used to specify the autonomous system number of the peer. The "neighbor" command is used to configure a BGP neighbor with IP address 10.1.1.2, the "local-address" command is used to specify the source IP address for BGP updates, in this case, the 10.1.1.1. The "import" and "export" command is used to apply the inbound and outbound policies.

The "local-preference" command is used to set the local preference value to 200 and the "multi-exit-discriminator" command is used to set the multi-exit discriminator value to 100. 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 "policy-statement bgp-in" command is used to apply a policy to inbound BGP updates. The "term as-path-100" command is used to match the AS_PATH, in this case, 100. The "term set-local-pref" command is used to set the local preference value to 200.

The "policy-statement bgp-out" command is used to apply a policy to outbound BGP updates. The "term p2p-filter" command is used to match the prefix-list that was defined, then the "term set-as-path

Comments

Popular posts from this blog

Advance BGP Configure | Cisco Router | AI Study

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

AI tips and tricks for a support engineer