华为BGP实验案例

小皮
370小皮首席执行运营官
其他 2020-02-08 17:54:57
370 其他 2020-02-08 17:54:57

图片:1.png



 
实验要求: 1.1.1.1访问5.5.5.5走R1-R2-R4-R5
                  5.5.5.5访问1.1.1.1走R5-R4-R3-R1
一、配置IP
二、为R2、R3、R4配置IGP动态路由OSPF
R2
<R2>sys
Enter system view, return user view with
Ctrl+Z.
[R2]ospf 100
[R2-ospf-100]area 0.0.0.0
[R2-ospf-100-area-0.0.0.0]net  
[R2-ospf-100-area-0.0.0.0]network 12.1.1.0
0.0.0.255
[R2-ospf-100-area-0.0.0.0]network 24.1.1.0
0.0.0.255
[R2-ospf-100-area-0.0.0.0]
R3
<R3>sys
Enter system view, return user view with
Ctrl+Z.
[R3]ospf 100
[R3-ospf-100]area 0.0.0.0
[R3-ospf-100-area-0.0.0.0]net  
[R3-ospf-100-area-0.0.0.0]network 13.1.1.0
0.0.0.255
[R3-ospf-100-area-0.0.0.0]network
34.1.1.0 0.0.0.255

R4
<R4>sys
Enter system view, return user view with
Ctrl+Z.

[R4]ospf 100
[R4-ospf-100]area 0.0.0.0
[R4-ospf-100-area-0.0.0.0]net
[R4-ospf-100-area-0.0.0.0]network
24.1.1.0 0.0.0.255

[R4-ospf-100-area-0.0.0.0]network
45.1.1.0 0.0.0.255

[R4-ospf-100-area-0.0.0.0]network
34.1.1.0 0.0.0.255

配置bgp

R1
[R1]bgp 100
[R1-bgp]rou
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 12.1.1.2 as  
[R1-bgp]peer 12.1.1.2 as-n      
[R1-bgp]peer 12.1.1.2 as-number 200
[R1-bgp]peer 13.1.1.3 as-n      
[R1-bgp]peer 13.1.1.3 as-number 200
[R1-bgp]net
[R1-bgp]network 1.1.1.1 255.255.255.255
R2
[R2]bgp 200
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 12.1.1.1 as-n      
[R2-bgp]peer 12.1.1.1 as-number 100
[R2-bgp]peer 24.1.1.4 as-number 200
[R2-bgp]im  
[R2-bgp]import-route ospf 100
[R2-bgp]peer 24.1.1.4 next      
[R2-bgp]peer 24.1.1.4 next-hop-local
R3
[R3]
[R3]bgp 200
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 13.1.1.1 as-n      
[R3-bgp]peer 13.1.1.1 as-number 100
[R3-bgp]peer 34.1.1.4 as-n      
[R3-bgp]peer 34.1.1.4 as-number 200
[R3-bgp]im  
[R3-bgp]import-route ospf 100
[R3-bgp]peer 34.1.1.4 next-    
[R3-bgp]peer 34.1.1.4 next-hop-local
R4
[R4]bgp 200
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 24.1.1.2 as-number 200
[R4-bgp]peer 34.1.1.3 as-number 200
[R4-bgp]peer 45.1.1.5 as-number 300
[R4-bgp]undo synchronization
[R4-bgp]import-route ospf 100
[R4-bgp]peer 24.1.1.2 next-hop-local
[R4-bgp]peer 34.1.1.3 next-hop-local
R5
[R5]bgp 300
[R5-bgp]router-id 5.5.5.5
[R5-bgp]peer 45.1.1.4 as-number
200

[R5-bgp]net  
[R5-bgp]network 5.5.5.5
255.255.255.255

[R5-bgp]
配置选路规则
R2
[R2]route-policy xiao permit node 10
Info: New Sequence of this List.
[R2-route-policy]apply local-preference
222

[R2-route-policy]bgp 200
[R2-bgp]peer 12.1.1.1 route-policy xiao
export

R3
[R3]route-policy pi permit node
10
Info: New Sequence of this
List.
[R3-route-policy]apply
local-preference 222
[R3-route-policy]bgp 200

[R3-bgp]peer 34.1.1.4 route-policy pi
export


本文标题:华为BGP实验案例
本文作者:小皮
本文来自:蚁安黑客官网
转载请注明本文链接:http://bbs.mayidui.net/t3134.html
游客
登录黑客论坛后才可以回帖,黑客登录 或者 注册黑客
weixin
蚁安黑客

找黑客工具、找黑客教程、找黑客朋友,你想不到的黑客技术这儿都有!

微信号:baiyiwangan