6Wind BGP 一些基本操作..

By hack520 on

建BGP之前先需要建立過濾器..

前綴過濾器~

/ routing ipv4-prefix-list Blackhole_Prefix
/ routing ipv4-prefix-list Blackhole_Prefix seq 100 address 0.0.0.0/0 policy permit ge 32 le 32
/ routing ipv4-prefix-list AS32708-Prefix
/ routing ipv4-prefix-list AS32708-Prefix seq 100 address 123.253.104.0/22 policy permit le 24
/ routing ipv4-prefix-list AS32708-Prefix seq 101 address 45.65.45.0/24 policy permit le 24
/ routing ipv4-prefix-list AS32708-Prefix seq 102 address 85.92.102.0/24 policy permit le 24
/ routing ipv4-prefix-list AS32708-Prefix seq 103 address 85.92.103.0/24 policy permit le 24
/ routing ipv4-prefix-list AS32708-Prefix seq 104 address 103.108.189.0/24 policy permit le 24
/ routing ipv4-prefix-list AS32708-Prefix seq 105 address 103.211.0.0/24 policy permit le 24

然後就是Route-map~IN OUT

IN:

/ routing route-map BGP-RootNetworks-IN
/ routing route-map BGP-RootNetworks-IN seq 100
/ routing route-map BGP-RootNetworks-IN seq 100 policy permit
/ routing route-map BGP-RootNetworks-IN seq 100 match
/ routing route-map BGP-RootNetworks-IN seq 100 match ip
/ routing route-map BGP-RootNetworks-IN seq 100 match ip address
/ routing route-map BGP-RootNetworks-IN seq 100 match ip address prefix-list AS32708-Prefix

OUT:

/ routing route-map BGP-RootNetworks-OUT
/ routing route-map BGP-RootNetworks-OUT seq 100
/ routing route-map BGP-RootNetworks-OUT seq 100 policy permit
/ routing route-map BGP-RootNetworks-OUT seq 100 match
/ routing route-map BGP-RootNetworks-OUT seq 100 match community id CHN-Router-CN2 exact-match true

 

CHN-Router-CN2 從電信收取的CN路由表

/ routing bgp community-list CHN-Router-CN2
/ routing bgp community-list CHN-Router-CN2 policy 100 permit 4134:20152
/ routing bgp community-list CHN-Router-CN2 policy 101 permit 4134:20252
/ routing bgp community-list CHN-Router-CN2 policy 102 permit 4134:20052
/ routing bgp community-list CHN-Router-CN2 policy 103 permit 4134:12150
/ routing bgp community-list CHN-Router-CN2 policy 104 permit 4134:13150
/ routing bgp community-list CHN-Router-CN2 policy 105 permit 4134:4809
/ routing bgp community-list CHN-Router-CN2 policy 106 permit 4837:11150

建立BGP Seesion

/ vrf main routing bgp neighbor 100.64.22.2
/ vrf main routing bgp neighbor 100.64.22.2 remote-as 32708
/ vrf main routing bgp neighbor 100.64.22.2 address-family ipv4-unicast soft-reconfiguration-inbound true
/ vrf main routing bgp neighbor 100.64.22.2 address-family ipv4-unicast route-map in route-map-name BGP-RootNetworks-IN
/ vrf main routing bgp neighbor 100.64.22.2 address-family ipv4-unicast route-map out route-map-name BGP-RootNetworks-OUT

然後就完事了…非常簡單.

作者:hack520

文章链接:6Wind BGP 一些基本操作..

短连接:https://zhu.vn/?p=2026

发表评论