多协议路由重分步
拓扑简介
5台路由器互联,R1-R2使用OSPF,R2-R3使用RIP,R3-R4使用EIGRP,R4-R5使用STATIC,R5-R1使用BGP,要求多协议路由做完后使用重分步,全网互通。
预配置
R1
interface Loopback0 ip address 1.1.1.1 255.255.255.0 ! interface Ethernet0/0 description R1-R2 ip address 12.0.0.1 255.255.255.0 ! interface Ethernet0/2 description R1-R5 ip address 51.0.0.1 255.255.255.0
R2
interface Loopback0 description ospf-loop ip address 1.1.1.2 255.255.255.255 ! interface Loopback1 description rip-loop ip address 2.2.2.2 255.255.255.0 ! interface Ethernet0/0 description R2-R1 ip address 12.0.0.2 255.255.255.0 ! interface Ethernet0/1 description R2-R3 ip address 23.0.0.1 255.255.255.0
R3
interface Loopback0 description rip-loop ip address 3.3.3.3 255.255.255.0 ! interface Loopback1 description eigrp-loop ip address 6.6.6.6 255.255.255.0 ! interface Ethernet0/0 description R3-R4 ip address 34.0.0.1 255.255.255.0 ! interface Ethernet0/1 description R3-R2 ip address 23.0.0.2 255.255.255.0
R4
interface Loopback0 description static-loop ip address 4.4.4.4 255.255.255.0 ! interface Loopback1 description eigrp-loop ip address 7.7.7.7 255.255.255.0 ! interface Ethernet0/0 description R4-R3 ip address 34.0.0.2 255.255.255.0 ! interface Ethernet0/1 description R4-R5 ip address 45.0.0.1 255.255.255.0
R5
interface Loopback0 description static-loop ip address 5.5.5.5 255.255.255.0 ! interface Ethernet0/1 description R5-R4 ip address 45.0.0.2 255.255.255.0 ! interface Ethernet0/2 description R5-R1 ip address 51.0.0.2 255.255.255.0
路由配置
【R1】---R1与R2开启ospf,R1与R5开启bgp
router ospf 100 启动ospf进程,进程号为100 network 1.1.1.1 0.0.0.0 area 0 宣告R1的ospf直连回环接口地址到区域0 network 12.0.0.1 0.0.0.255 area 0 宣告R1-R2直连接口地址到区域0 ! router bgp 1 启动bgp进程,进程号为1 bgp log-neighbor-changes 记录并显示邻居建立过程的信息 neighbor 51.0.0.2 remote-as 1 指定邻居 network 1.1.1.1 mask 255.255.255.255 宣告直连回环接口地址 network 12.0.0.0 mask 255.255.255.0 宣告R1-R2直连网段 network 51.0.0.0 mask 255.255.255.0 宣告R1-R5直连网段
【R2】---R2与R1开启ospf,R2与R3开启rip
router ospf 100 启动ospf进程,进程号为100 network 1.1.1.2 0.0.0.255 area 0 宣告R2的ospf直连回环接口地址到区域0 network 12.0.0.2 0.0.0.255 area 0 宣告R2-R1直连接口地址到区域0 ! router rip 启动rip进程 version 2 指定版本2 network 2.2.2.2 宣告R2的rip直连回环接口地址 network 23.0.0.1 宣告R2-R3直连接口地址 no auto-summary 关闭自动汇总
【R3】---R3与R2开启rip,R3与R4开启eigrp
router rip 启动rip进程 version 2 指定版本2 network 3.3.3.3 宣告R3的rip直连回环接口地址 network 23.0.0.2 宣告R3-R2直连接口地址 no auto-summary 关闭自动汇总 ! router eigrp 200 启动eigrp进程,进程号为200 network 6.6.6.6 宣告R3的eigrp直连回环接口地址 network 34.0.0.1 宣告R3-R4直连接口地址
【R4】---R4与R3开启eigrp,R4与R5开启static
router eigrp 200 启动eigrp进程,进程号为200 network 7.7.7.7 宣告R4的eigrp直连回环接口地址 network 4.4.4.4 宣告R4的eigrp直连回环接口地址 network 34.0.0.2 宣告R4-R3直连接口地址 ! ip route 0.0.0.0 0.0.0.0 e0/0 配置默认路由到R4-R3出接口 ip route 5.5.5.0 255.255.255.0 45.0.0.2 permanent 配置永久静态路由到R5的回环接口,下一跳为R5-R4直连接口
【R5】---R5与R4开启static,R5与51开启bgp
ip route 0.0.0.0 0.0.0.0 Ethernet0/1 配置默认路由到R5-R4出接口 ip route 4.4.4.0 255.255.255.0 45.0.0.1 permanent 配置永久静态路由到R4的回环接口,下一跳为R4-R5直连接口 ! router bgp 1 启动bgp进程,进程号为1 bgp log-neighbor-changes 记录并显示邻居建立过程的信息 neighbor 51.0.0.1 remote-as 1 指定邻居 network 5.5.5.5 mask 255.255.255.255 宣告直连回环接口地址 network 45.0.0.0 mask 255.255.255.0 宣告R5-R4直连网段 network 51.0.0.0 mask 255.255.255.0 宣告R5-R1直连网段
重分步配置
R1
router bgp 1 redistribute ospf 100 重分步进程号为100的ospf协议 ! router ospf 100 redistribute bgp 1 subnets 重分步进程号为1的bgp协议的子网
R2
router ospf 100 redistribute rip subnets 重分步rip子网 ! router rip redistribute ospf 100 metric 2 重分步进程号为100的ospf协议,度量值为2
R3
router eigrp 200 redistribute rip metric 10000 100 255 1 1500 重分步rip,带宽度量为10000,延迟度量为100,可靠度量为255,负载为1,最大传输单元1500 ! router rip redistribute eigrp 200 metric 2 重分步进程号为200的eigrp协议,度量值为2
R4
router eigrp 200 redistribute static metric 10000 100 255 1 1500 重分步静态路由
R5
router bgp 1 redistribute connected 重分步直连路由 redistribute static 重分步静态路由
路由表
R1
R2
R3
R4
R5
本站所有文章均可随意转载,转载时请保留原文链接及作者。