本案例采用ENSP模拟器来部署华为路由器的路由重分布的案例,在该网络中,R1与R2部署默认路由,R2与R3部署BGP。为了实现PC之间的网络互通,需要在R2路由器部署BGP与默认路由重分布。
1、按照网络拓扑图配置IP地址。
2、部署R1与R2的默认路由。
3、部署R2与R3的BGP。
4、在R2配置BGP与默认路由重分布。
R1:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int eth 0/0/0
[R1-Ethernet0/0/0]ip address 192.168.1.1 24
[R1-Ethernet0/0/0]quit
[R1]int eth 0/0/1
[R1-Ethernet0/0/1]ip address 10.0.0.1 30
[R1-Ethernet0/0/1]quit
[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2
R2:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int eth 0/0/0
[R2-Ethernet0/0/0]ip address 10.0.0.2 30
[R2-Ethernet0/0/0]quit
[R2]int eth 0/0/1
[R2-Ethernet0/0/1]ip address 10.0.0.5 30
[R2-Ethernet0/0/1]quit
[R2]ip route-static 0.0.0.0 0.0.0.0 10.0.0.1
[R2]bgp 100
[R2-bgp]peer 10.0.0.6 as-number 200
[R2-bgp]peer 10.0.0.6 connect-interface eth 0/0/1
[R2-bgp-af-ipv4]default-route imported
[R2-bgp-af-ipv4]import-route static
[R2-bgp-af-ipv4]peer 10.0.0.6 enable
[R2-bgp-af-ipv4]quit
[R2-bgp]quit
R3:
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>u t d
Info: Current terminal debugging is off.
<Huawei>system
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int eth 0/0/0
[R3-Ethernet0/0/0]ip address 192.168.2.1 24
[R3-Ethernet0/0/0]quit
[R3]int eth 0/0/1
[R3-Ethernet0/0/1]ip address 10.0.0.6 30
[R3-Ethernet0/0/1]quit
[R3]bgp 200
[R3-bgp]peer 10.0.0.5 as-number 100
[R3-bgp]peer 10.0.0.5 connect-interface Ethernet 0/0/1
[R3-bgp]ipv4-family unicast
[R3-bgp-af-ipv4]peer 10.0.0.5 enable
[R3-bgp-af-ipv4]network 192.168.2.0 24
[R3-bgp-af-ipv4]quit
[R3-bgp]quit
PC分别填写IP地址,且能相互PING通。
分别在R2与R3使用dis bgp peer可以看到R2与R3已完成BGP邻居建立。
分别在R1、R2、R3使用dis ip routing-table命令查看路由表,均已学习到了相应的路由。
至此,华为路由器BGP与默认路由典型组网配置案例已完成。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作