Sketches of IP, Routing, Internet, Security and Life!
BGP Routing using Policy Controls
Service Provider should filter some IP prefixes in incoming updates, such as RFC1918. Because a customer should only advertise its global networks to the Service Provider.
Multihomed Customers should avoid becoming a Transit-AS. As by default in most of the cases the tie breaker for BGP is the Shortest AS-Path, so the providers connected to the to customer will use the customer link as a Transit-AS to reach each other.
Service Providers should filter Private addresses in incoming updates of Customers.
In a scenario where a customer has two border routers without IBGP, and IGP inside the AS, there will be no loops, but if running IBGP between the border routers, special care should be taken or a direct link between the two border routers is required.
Policy Routing only affects the Next-Hop. The destination is unchanged!
Policy Routing is CPU intensive, because it is based on the source unlike Dynamic and static routing. So, when routing based on the destination there is no need of Policy Routing.
Customers can only affect their outgoing traffic, and can’t directly affect incoming traffic.
(config)# ip as-path access-list# [permit/deny] regexp
(config-router)# neighborip-addressfilter-listas-path-filter# [in/out]
#show ip bgp regexp expression
#show ip as-path-access-listfilter-list#
#show ip bgpfilter-list# access-list#
(config-router)# neighbor [IP-address/peer-group] prefix-listlist [in/out
(config-router)# distribute-list prefix-listlistoutrouting-process
Router(config)# ip prefix-list Example seq 10 permit 192.168.1.0/24 ge 25 This statement is like saying, “match any address that starts with 192.168.1.0, but has a subnet mask of 25 bits or greater.” This would effectively match any subnet of the classful address 192.168.1.0/24.
”refcount” in the output of “show ip prefix-list detail” means how many routes matched that entry.
(config-router)# neighborIP-addresscapibility orf prefix-list [both/send/receive]
# show ip bgp neighborIP-address
# clear ip bgpneighborin prefix-list
”ORF Send” on one router, needs “Receive” on the neighboring router.
# debug ip bgp update
(config-router)# neighbor IP-address soft-reconfiguration inbound //stores a copy of neighbor routing-table in the memory, and processes the new policies on it.
# clear ip bgp IP-addresssoft in
# clear ip bgp IP-addresssoft out // Applying the new policies and sends the new routes to the neighbor
# show ip bgp neighbor IP-addressreceived/advertised
# clear ip bgp neighbor IP-addressin // It’s called route-refresh and is better and soft-reconfig. This features is depended on the capability of Route-Refresh. This capability is mentioned in the “show ip bgp neighborip-address“
Yet another full-time traveler, casually [angel] investing in hopes and ideas solving problems or making life easier, landscape photographing as a hobby, and enthusiastic about Blockchain/Cryptocurrency.
Internet citizen, building and breaking Network Architectures by day, and passionate about what may happen #in_future :-)
View all posts by Mo Moghaddas