这节来学习华为eNSP模拟器 bgp协议,首先建好拓扑图,5台路由器、4台客户端,如下:
接着配置路由器硬件,AR3配两个2SA接口卡,其它配1个2SA接口卡,如下图:
所有设备配置相应IP地址,如上面拓扑图所示。
接下来配置路由器:
先把AR3路由器IP配上,命令如下:
<Huawei>sys
[Huawei]sysname R3
[R3]int s2/0/0
[R3-Serial2/0/0]ip add 10.0.0.2 8
[R3]int s2/0/1
[R3-Serial2/0/1]ip add 20.0.0.2 8
[R3]int s1/0/0
[R3-Serial1/0/0]ip add 30.0.0.2 8
[R3]int s1/0/1
[R3-Serial1/0/1]ip add 40.0.0.2 8
配置AR1路由器,命令如下:
<Huawei>sys
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[R1]int s2/0/0
[R1-Serial2/0/0]ip add 10.0.0.1 8
[R1]bgp 100
[R1-bgp]router-id 10.0.0.1
[R1-bgp]peer 10.0.0.2 as-number 300
[R1-bgp]network 10.0.0.0
[R1-bgp]network 192.168.1.0
<R1>sa
配置AR2路由器,命令如下:
<Huawei>sys
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.2 24
[R2]int s2/0/0
[R2-Serial2/0/0]ip add 20.0.0.1 8
[R2]bgp 200
[R2-bgp]router-id 20.0.0.1
[R2-bgp]peer 20.0.0.2 as-number 300
[R2-bgp]network 20.0.0.0
[R2-bgp]network 192.168.2.0
<R2>sa
配置AR4路由器,命令如下:
<Huawei>sys
[Huawei]sysname R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.3.2 24
[R4]int s2/0/0
[R4-Serial2/0/0]ip add 30.0.0.1 8
[R4]bgp 400
[R4-bgp]router-id 30.0.0.1
[R4-bgp]peer 30.0.0.2 as-number 300
[R4-bgp]network 30.0.0.0
[R4-bgp]network 192.168.3.0
<R4>sa
配置AR5路由器,命令如下:
<Huawei>sys
[Huawei]sysname R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.4.2 24
[R5]int s2/0/0
[R5-Serial2/0/0]ip add 40.0.0.1 8
[R5]bgp 500
[R5-bgp]router-id 40.0.0.1
[R5-bgp]peer 40.0.0.2 as-number 300
[R5-bgp]network 40.0.0.0
[R5-bgp]network 192.168.4.0
<R5>sa
再配置AR3路由器,命令如下:
[R3]bgp 300
[R3-bgp]router-id 10.0.0.2
[R3-bgp]peer 10.0.0.1 as-number 100
[R3-bgp]peer 20.0.0.1 as-number 200
[R3-bgp]peer 30.0.0.1 as-number 400
[R3-bgp]peer 40.0.0.1 as-number 500
[R3-bgp]network 10.0.0.0
[R3-bgp]network 20.0.0.0
[R3-bgp]network 30.0.0.0
[R3-bgp]network 40.0.0.0
<R3>sa
全部配置完了,我们开始测试下:
PC1 ping PC2
PC1 ping PC3
PC2 ping PC4
经测试所有设备均ping通,这节学习完毕!
上一篇:华为eNSP模拟器 ospf协议
讨论数量:0