OSPF基础配置
第1个模块
-------------------------
100台路由器,使用什么样的路由协议来设计这个网络
OSPF基本配置:
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.同时这个接口所在的网络状态信息同步给其他设备,用于计算路由
验证命令:
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
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
----------------------------------------------------------------------------
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
OSPF routing table status : <Active>
Destinations : 1 Routes : 1
Destination/Mask Proto PreCost Flags NextHop Interface
66.1.1.1/32OSPF 10 48 D 10.1.56.6 Serial2/0/0
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
作业:
1.完成R5和R6的OSPF基本配置,不要忘记环回接口
2.尝试完成R1、R4和R5的OSPF邻居配置
{:6_290:}{:6_282:}{:6_283:}
页:
[1]