1.ospf
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.1.1.2 0.0.0.0
network 172.16.1.2 0.0.0.0
network 172.16.1.22 0.0.0.0
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 172.16.1.1 0.0.0.0
network 172.16.1.5 0.0.0.0
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 172.16.1.6 0.0.0.0
network 172.16.1.9 0.0.0.0
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 172.16.1.17 0.0.0.0
network 172.16.1.21 0.0.0.0
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 6.6.6.6 0.0.0.0
network 172.16.1.13 0.0.0.0
network 172.16.1.18 0.0.0.0
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 7.7.7.7 0.0.0.0
network 34.1.1.7 0.0.0.0
network 172.16.1.10 0.0.0.0
network 172.16.1.14 0.0.0.0
2.bgp
R1
bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2
#
ipv4-family unicast
undo synchronization
network 1.1.1.1 255.255.255.255
import-route direct route-policy aa
peer 12.1.1.2 enable
R2:
bgp 64512
router-id 2.2.2.2
confederation id 2
confederation peer-as 64513
peer 3.3.3.3 as-number 64512
peer 3.3.3.3 connect-interface LoopBack0
peer 12.1.1.1 as-number 1
peer 172.16.1.21 as-number 64513
#
ipv4-family unicast
undo synchronization
aggregate 172.16.0.0 255.255.248.0 as-set detail-suppressed
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 12.1.1.1 enable
peer 12.1.1.1 next-hop-local
peer 172.16.1.21 enable
peer 172.16.1.21 next-hop-local
#
R3
bgp 64512
router-id 3.3.3.3
confederation id 2
peer 2.2.2.2 as-number 64512
peer 2.2.2.2 connect-interface LoopBack0
peer 4.4.4.4 as-number 64512
peer 4.4.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 172.16.3.0 255.255.255.0
peer 2.2.2.2 enable
peer 2.2.2.2 reflect-client
peer 4.4.4.4 enable
peer 4.4.4.4 reflect-client
#
R4
bgp 64512
router-id 4.4.4.4
confederation id 2
confederation peer-as 64513
peer 3.3.3.3 as-number 64512
peer 3.3.3.3 connect-interface LoopBack0
peer 172.16.1.10 as-number 64513
#
ipv4-family unicast
undo synchronization
network 172.16.4.0 255.255.255.0
peer 3.3.3.3 enable
peer 172.16.1.10 enable
peer 172.16.1.10 next-hop-local
#
R5
bgp 64513
router-id 5.5.5.5
confederation id 2
confederation peer-as 64512
peer 6.6.6.6 as-number 64513
peer 6.6.6.6 connect-interface LoopBack0
peer 172.16.1.22 as-number 64512
#
ipv4-family unicast
undo synchronization
peer 6.6.6.6 enable
peer 6.6.6.6 next-hop-local
peer 172.16.1.22 enable
peer 172.16.1.22 next-hop-local
#
R6
bgp 64513
router-id 6.6.6.6
confederation id 2
peer 5.5.5.5 as-number 64513
peer 5.5.5.5 connect-interface LoopBack0
peer 7.7.7.7 as-number 64513
peer 7.7.7.7 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 172.16.6.0 255.255.255.0
peer 5.5.5.5 enable
peer 5.5.5.5 reflect-client
peer 7.7.7.7 enable
peer 7.7.7.7 reflect-client
#
R7
bgp 64513
router-id 7.7.7.7
confederation id 2
confederation peer-as 64512
peer 6.6.6.6 as-number 64513
peer 6.6.6.6 connect-interface LoopBack0
peer 34.1.1.8 as-number 3
peer 172.16.1.9 as-number 64512
#
ipv4-family unicast
undo synchronization
aggregate 172.16.0.0 255.255.248.0 as-set detail-suppressed
network 172.16.7.0 255.255.255.0
peer 6.6.6.6 enable
peer 6.6.6.6 next-hop-local
peer 34.1.1.8 enable
peer 172.16.1.9 enable
peer 172.16.1.9 next-hop-local
#
R8
bgp 3
router-id 8.8.8.8
peer 34.1.1.7 as-number 2
#
ipv4-family unicast
undo synchronization
network 8.8.8.8 255.255.255.255
import-route direct route-policy bb
peer 34.1.1.7 enable
#
反射器
R6
peer 5.5.5.5 reflect-client
peer 7.7.7.7 reflect-client
r3
peer 2.2.2.2 reflect-client
peer 4.4.4.4 reflect-client
聚合防环
aggregate 172.16.0.0 255.255.248.0 as-set detail-suppressed
.策略
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
route-policy aa permit node 10
if-match acl 2000
import-route direct route-policy aa
acl number 2000
rule 5 permit source 192.168.2.0 0.0.0.255
route-policy bb permit node 10
if-match acl 2000
import-route direct route-policy bb
OSPF与BGP配置综合示例
1168

被折叠的 条评论
为什么被折叠?



