R1路由器初始化配置:
router(config)#hostname r1 //给路由器启名字 r1(config)#int s0 r1(config-if)#ip address 100.1.16.1 255.255.255.0 //设置ip地址 r1(config-if)#enc frame-relay //封装帧中继 r1(config-if)#frame-relay map ip 100.1.16.6 116 broadcast //映射对方的ip地址 r1(config-if)#no shutdown //打开接口
R6初始化配置:
router(config)#host r6 //给路由器启名字 r6(config)#int s0 r6(config-if)#ip address 100.1.16.6 255.255.255.0 //设置ip地址 r6(config-if)#enc frame-relay //封装帧中继 r6(config-if)#frame-relay map ip 100.1.16.1 611 broadcast //映射对方的ip地址 r6(config-if)#no shutdown //打开接口
检验配置是否正确:
r1#show frame-relay map 看是否有active的
r1#show frame-relay pvc 检查pvc的状态
或者ping 对方的接口地址看看能否ping通
路由协议rip/eigrp/ospf 配置命令:
router(config)#router rip //启用rip协议
router(config-router)#net 100.1.0.0 //将接口网络放到协议中,接口应该是up的。
router(config)#router ospf 10 //启用ospf 进程号码任意数
router(config-router)#network 100.1.0.0 0.0.255.255 area 0 //将网络100.1.0.0 放到区域0中
router(config)#router eigrp 10 //启用eigrp协议
router(config-router)#net 100.1.0.0 //将接口网络放到协议中,接口应该是up的
检查是否学到路由:
show ip route
其他常用命令:
router(config-if)#clock rate 64000 //在dce接口上启用时钟 router(config)#line con 0 router(config-line)#logging syn //打开同步功能,阻止log干扰命令
|