344
[PE1] route-policy soo permit node 10
[PE1-route-policy] apply extcommunity soo 1:100 additive
[PE1-route-policy] quit
# On PE 1, apply the routing policy soo to routes received from CE 1.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] peer 10.1.1.1 route-policy soo import
[PE1-bgp-vpn1] quit
[PE1-bgp] quit
# On PE 2, configure a routing policy named soo to add the specified SoO attribute.
<PE2> system-view
[PE2] route-policy soo permit node 10
[PE2-route-policy] apply extcommunity soo 1:100 additive
[PE2-route-policy] quit
# On PE 2, apply the routing policy soo to routes received from CE 2.
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1] peer 10.2.1.1 route-policy soo import
[PE2-bgp-vpn1] quit
[PE2-bgp] quit
# PE 2 will not advertise routes received from CE 1 to CE 2 because the same SoO attribute has
been configured. Display the routing table of CE 2. You can see that the route 100.1.1.1/32 has
been removed.
<CE2> display ip routing-table
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost NextHop Interface
10.1.1.0/24 BGP 255 0 10.2.1.2 Vlan2
10.1.1.1/32 BGP 255 0 10.2.1.2 Vlan2
10.2.1.0/24 Direct 0 0 10.2.1.1 Vlan2
10.2.1.1/32 Direct 0 0 127.0.0.1 InLoop0
10.3.1.0/24 BGP 255 0 10.2.1.2 Vlan2
10.3.1.1/32 BGP 255 0 10.2.1.2 Vlan2
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
200.1.1.1/32 BGP 255 0 10.2.1.2 Vlan2