6.1 問題
如圖配置IP地址和OSPF
AS 234 使用聯盟和路由反射,解決路由傳遞問題
AS 100 和 AS 234 配置 EBGP 鄰居
AS 500 和 AS 234 配置穩定 EBGP 鄰居
確保 Loopback10和Loopback50互通ide
配置思路:
1.數據傳到R1-R2-R3再往下傳的時候須要把R3作成路由反射器。
-須要配置客戶機能夠是R2或者是R6或者同時都作成客戶機,可是不能都不是客戶機。.
2.R4不用管若是是出現相應的須要分割狀況也按照這個方式進行配置就能夠的
3.IP 地址OSPF,R2 R3 R6 R4之間BGP鄰居關係設置
4.R1 直連EBGP設置, R5穩定import模式引入設置
4.非直聯的使用LOOPBACK接口穩定鏈接的時候必須使用
[R4-bgp]peer 10.10.6.6 ebgp-max-hop 直連檢測機制須要用的命令oop
4.[R3-bgp]peer 10.10.6.6 reflect-client //設置R3到R6的路由反射器
this
R1路由設置router
[R1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
[R1-GigabitEthernet0/0/0]q
[R1]int LoopBack 10
[R1-LoopBack10]ip add 10.10.10.10 24
[R1-LoopBack10]q
[R1]bgp 100
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 192.168.12.2 as-number 234
Warning: Local interface is already configured with this address.
[R1-bgp]dis this
[V200R003C00]
#
bgp 100
router-id 1.1.1.1
peer 192.168.12.2 as-number 234
#
ipv4-family unicast
undo synchronization
peer 192.168.12.1 enable
#
return
[R1-bgp]network 10.10.10.0 255.255.255.0
[R1-bgp]dis this
[V200R003C00]
#
bgp 100
router-id 1.1.1.1
peer 192.168.12.1 as-number 234
#
ipv4-family unicast
undo synchronization
network 10.10.10.0 255.255.255.0
peer 192.168.12.2 enableblog
R2:R1,R3鄰居設置
[R2]bgp 64523
[R2-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 2.2.2.2
confederation id 234
confederation peer-as 64544
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
peer 192.168.12.1 as-number 100
#
ipv4-family unicast
undo synchronization
peer 10.10.3.3 enable
peer 10.10.3.3 next-hop-local
peer 192.168.12.1 enable
#
return接口
R3:R2,R6鄰居設置
[R3-bgp]peer 10.10.6.6 as-number 64523
[R3-bgp]peer 10.10.6.6 connect-interface LoopBack 0
[R3]bgp 64523
[R3]dis bgp routing-table peer 10.10.6.6 advertised-routes
[R3]bgp 64523ip
[R3-bgp]peer 10.10.6.6 reflect-client /設置R3到R6的路由反射器
[R3-bgp]dis bgp routing-table peer 10.10.6.6 advertised-routes
[R3]bgp 64523
[R3-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 3.3.3.3
confederation id 234
confederation peer-as 64544
peer 10.10.2.2 as-number 64523
peer 10.10.2.2 connect-interface LoopBack0
peer 10.10.6.6 as-number 64523
peer 10.10.6.6 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.2.2 enable
peer 10.10.6.6 enable
peer 10.10.6.6 reflect-client
#
return路由
R6:R3,R4鄰居設置it
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 192.168.64.6 24
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 192.168.36.6 24
[R6-GigabitEthernet0/0/1]q
[R6]int LoopBack 0
[R6-LoopBack0]ip add 10.10.6.6 32
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 192.168.36.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 192.168.64.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 10.10.6.6 0.0.0.0
[R6-ospf-1-area-0.0.0.0]q
[R6]bgp 64523
[R6-bgp]confederation id 234io
[R6-bgp]confederation peer-as 64544
[R6-bgp]router-id 6.6.6.6
[R6-bgp]peer 10.10.3.3 as-number 64523
[R6-bgp]peer 10.10.3.3 connect-interface LoopBack 0
[R6-bgp]peer 10.10.4.4 as-number 64544
[R6-bgp]peer 10.10.4.4 connect-interface LoopBack 0
[R6-bgp]peer 10.10.4.4 ebgp-max-hop
<R6>dis bgp peer
[R6]bgp 64523
[R6-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 6.6.6.6
confederation id 234
confederation peer-as 64544
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
peer 10.10.4.4 as-number 64544
peer 10.10.4.4 ebgp-max-hop 255
peer 10.10.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.3.3 enable
peer 10.10.4.4 enable
#
return
R4:R6,R5鄰居設置
[R4]bgp 64544
[R4-bgp]dis this
[V200R003C00]
#
bgp 64544
router-id 4.4.4.4
confederation id 234
confederation peer-as 64523
peer 10.10.5.5 as-number 500
peer 10.10.5.5 ebgp-max-hop 255
peer 10.10.5.5 connect-interface LoopBack0
peer 10.10.6.6 as-number 64523
peer 10.10.6.6 ebgp-max-hop 255
peer 10.10.6.6 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.5.5 enable
peer 10.10.6.6 enable
peer 10.10.6.6 next-hop-local
#
return
R5的BGP設置
[R5]bgp 500[R5-bgp]dis this[V200R003C00]#bgp 500router-id 5.5.5.5peer 10.10.4.4 as-number 234 peer 10.10.4.4 ebgp-max-hop 255 peer 10.10.4.4 connect-interface LoopBack0#ipv4-family unicastundo synchronizationimport-route directpeer 10.10.4.4 enable#return