第1个模块
-------------------------
100台路由器,使用什么样的路由协议来设计这个网络
OSPF基本配置:
[R1]ospf ?
INTEGER<1-65535> Process ID //进程ID,OSPF邻居建立不要求进程ID相同
mib-binding Mib-Binding a Process
router-id <Group> router-id command group //路由器ID可以自动选择,但是强烈建议手工配置
valid-ttl-hops Valid GTSM TTL hops //TTL安全
vpn-instance VPN routing/forwarding Instance //和MPLS VPN有关
<cr> Please press ENTER to execute command
R5:
ospf 1 router-id 5.5.5.5
area 0.0.0.56
network 10.1.56.0 0.0.0.255 //含义1、10.1.56.0/24范围内的设备开启了OSPF 2、同时这个接口所在的网络状态信息同步给其他设备,用于计算路由
R6:
ospf 1
area 0.0.0.56 //简单快速的配置方案,但是容易忽略掉创建区域
interface Serial2/0/0
link-protocol ppp
ip address 10.1.56.6 255.255.255.0
ospf enable 1 area 0.0.0.56 //该接口开启了OSPF,并且属于区域56.同时这个接口所在的网络状态信息同步给其他设备,用于计算路由
验证命令:
[R5]display ospf interface //哪些接口运行了OSPF
OSPF Process 1 with Router ID 5.5.5.5
Interfaces
Area: 0.0.0.56 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
10.1.56.5 P2P P-2-P 48 1 0.0.0.0 0.0.0.0
[R5]display ospf peer brief //查看OSPF邻居的简要信息,R5通过s2/0/0同邻居66.1.1.1在区域56中构建了邻居(邻接)
OSPF Process 1 with Router ID 5.5.5.5
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.56 Serial2/0/0 66.1.1.1 Full
----------------------------------------------------------------------------
[R5]display ip routing-table protocol ospf //查看通过OSPF得到的路由表
Route Flags: R - relay, D - download to fib //转发信息库(forwarding information base)
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 1 Routes : 1