1.项目背景
Jan16 公司有北京总部、广州分部和上海分部 3 个办公地点,各分部与总部之间使用路
由器互联。公司要求通过配置单区域 OSPF 动态路由,实现公司之间能够互相访问。项目拓
扑如图 1 所示,具体要求如下:
(1) 路由器 R1、R2 和 R3 通过 VPN 互联; (2) R1、R2 和 R3 之间网络通过单区域 OSPF 动态路由实现互联;
(3) 拓扑测试计算机和路由器的 IP 与接口信息如拓扑所示。
Jan16 公司有北京总部、广州分部和上海分部 3 个办公地点,各分部与总部之间使用路
由器互联。公司要求通过配置单区域 OSPF 动态路由,实现公司之间能够互相访问。项目拓
扑如图 1 所示,具体要求如下:
(1) 路由器 R1、R2 和 R3 通过 VPN 互联; (2) R1、R2 和 R3 之间网络通过单区域 OSPF 动态路由实现互联;
(3) 拓扑测试计算机和路由器的 IP 与接口信息如拓扑所示。
2.思路:连接不同的区域,实现通讯
(公网可以拖一个cloud)
先开分部再开总部
(1)路由器R1,R2,R3实现互联
Pc1的网关:离她最近的路由器的领口(直连接口的地址)
测试直连的网段能不能互通
补充 :
通过display命令检查IP地址正确性
测试直连direct网段,保证每个网段IP互通
然后save(在用户模式)
考虑跨网段互通,设备的“路由表”,静态/动态
ospf,ISIS BGP(类似开启导航,计算出所需要的路由)
display ip routing-table
(1)静态路由
北京R1分别写去往上海和广州的路由
!!!最好全配上 以防一条路坏了 无路可走。
修改优先级 避免环路(pre优先级越低越优先,次优默认的是60)
路由表展示的最优的
ip route-static 目的网段 子网掩码 出接口 吓一跳 pre 50最优
display ip route//显示路由信息
tracert 目的ip //查看路径,到达的每一个地方
undo ip route-static all//删除静态路由
(2)OSPF的动态路由(必须是相同区域)
OSPFV3//开启ospf的协议,open short path firest,最短路径优先选取
OSPF//OSPFv2
area 0//区域0
network 网段1 反掩码
display this//展示网段
display ospf peer brief//检查路由器间关系