OSPF默认路由和认证的配置

在这里插入图片描述
1.配置各台路由器IP地址
部分参考代码如下,请自行完善:
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#no shutdown

R2(config)#interface Fa0/0
R2(config-if)#ip add 192.168.1.5 255.255.255.252
R2(config-if)#no shutdown

R3(config)#interface s2/0
R3(config-if)#ip add 202.10.10.1 255.255.255.0
R3(config-if)#clock rate 64000
R3 (config-if)#no shutdown

2.OSPF的配置
R1(config)#router ospf 1
R1(config-router)#network 172.16.1.0 0.0.0.255 area 0

R2(config)#router ospf 1
R2(config-router)#network 192.168.1.4 0.0.0.3 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 0

R3(config)#router ospf 1
R3(config-router)#network 192.168.1.4 0.0.0.3 area 0

3.在企业边界路由器R3上配置到Internet的默认路由,同时向内部的OSPF区域内注入一条默认路由。
R3(config)#ip route 0.0.0.0 0.0.0.0 se2/0
R3(config)#router ospf 1
R3(config-router)#default-information originate 向OSPF网络注入一条默认路由

4.在ISP的边界路由器上配置去企业网内部的静态路由,使得到企业网内部能够通信
ISP(config)#ip route 172.16.1.0 255.255.255.0 202.10.10.1
ISP(config)#ip route 192.168.1.4 255.255.255.252 202.10.10.1

5.在R1上启用ospf的明文认证
R1(config)#interface f0/0
R1(config-if)#ip ospf authentication 启用ospf认证
R1(config-if)#ip ospf authentication-key cisco 使用明文密码进行认证

6.在R2上启用ospf的认证
R2(config)#interface f1/0
R2(config-if)#ip ospf authentication
R2(config-if)#ip ospf authentication-key cisco

7.配置基于md5的密码接口认证如下,配置完成后,请查看R1的路由表。
R1(config)#interface f0/0
R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf message-digest-key 1 md5 cisco
R2(config)#interface f1/0
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf message-digest-key 1 md5 cisco

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值