路由策略和策略路由 配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
拓扑:
R1:
R1:
#
interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0 #
interface LoopBack0
ip address 10.1.1.1 255.255.255.255 #
interface LoopBack1
ip address 11.1.1.1 255.255.255.255 #
bgp 100
peer 10.0.12.2 as-number 200
#
ipv4-family unicast
undo synchronization
network 10.1.1.1 255.255.255.255 network 11.1.1.1 255.255.255.255 peer 10.0.12.2 enable
#
R2:
R2:
#
acl number 2000
rule 5 permit source 10.1.1.1 0
#
acl number 2001
rule 5 permit source 11.1.1.1 0
#
interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
ip policy-based-route pbr
#
interface GigabitEthernet0/0/1
ip address 10.0.23.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.0.24.2 255.255.255.0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
bgp 200
peer 3.3.3.3 as-number 200
peer 3.3.3.3 connect-interface LoopBack0 peer 4.4.4.4 as-number 200
peer 4.4.4.4 connect-interface LoopBack0 peer 5.5.5.5 as-number 200
peer 5.5.5.5 connect-interface LoopBack0 peer 10.0.12.1 as-number 100
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 reflect-client
peer 3.3.3.3 next-hop-local
peer 4.4.4.4 enable
peer 4.4.4.4 reflect-client
peer 4.4.4.4 next-hop-local
peer 5.5.5.5 enable
peer 5.5.5.5 reflect-client
peer 5.5.5.5 next-hop-local
peer 10.0.12.1 enable
#
ospf 1
area 0.0.0.0
network 10.0.23.0 0.0.0.255
network 10.0.24.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
policy-based-route pbr permit node 10
if-match acl 2000
apply ip-address next-hop 10.0.23.3 policy-based-route pbr permit node 20
if-match acl 2001
apply ip-address next-hop 10.0.24.4
#
R3:
R3:
#
interface GigabitEthernet0/0/0
ip address 10.0.35.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.23.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
bgp 200
peer 2.2.2.2 as-number 200
peer 2.2.2.2 connect-interface LoopBack0 #
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
peer 2.2.2.2 reflect-client
peer 2.2.2.2 next-hop-local
#
ospf 1
area 0.0.0.0
network 10.0.23.0 0.0.0.255
network 10.0.35.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#
R4:
R4:
#