User Manual
445
Users Manual of XGS-6350-24X4C
45.4.4.3 Example for neighbor-based BGP path filtration
The following is an example for neighbor-based BGP path filtration. The route that gets through the access list
test1of as-path obtains a weight value 100. Only the route that gets through the access list test2 of as-path
can be sent to neighbor 193.1.12.10. Similarly, the route that gets through the access list test3 can be
accepted by neighbor 193.1.12.10:
router bgp 200
neighbor 193.1.12.10 remote-as 100
neighbor 193.1.12.10 filter-list test1 weight 100
neighbor 193.1.12.10 filter-list test2 out
neighbor 193.1.12.10 filter-list test3 in
ip aspath-list test1 permit _109_
ip aspath-list test2 permit _200$
ip aspath-list test2 permit ^100$
ip aspath-list test3 deny _690$
ip aspath-list test3 permit .*
45.4.4.4 Example for port-based BGP route filtration
The following example shows that the routes from port e1/0 are filtered through access list acl:
router bgp 122
filter vlan10 in access-list acl
The following example shows how to filter the routes from port e1/0 simultaneously using the access list
filter-network and the access list filter-gateway to respectively filter the network number and the gateway
address.
router bgp 100
filter vlan100 in access-list filter-network gateway filter-gateway
The following example shows how to filter routes from all ports simultaneously using the prefix list filter-prefix
and the prefix list filter-gateway to respectively filter the network number and the gateway address.
router bgp 100
filter * in prefix-list filter-prefix gateway filter-gateway
45.4.4.5 Example for prefix-list-based route filtration configuration
The following example shows that the default route 0.0.0.0/0 is declined:
ip prefix-list abc deny 0.0.0.0/0
The following example shows that the route which matches the prefix 35.0.0.0/8 is allowed:
ip prefix-list abc permit 35.0.0.0/8
In the following example, only the prefixes with the length from /8 to /24 are accepted in the BGP process:
router bgp
network 101.20.20.0