实验四OSPF一
程序员文章站
2024-03-25 11:37:10
...
1、 三个区域分别为0,1,2,分别都有环回R2的环回放在区域0里,R3的环回放在区域2里。
2、 R2ping55.55.55.55走S4/0/0口
3、 R1的10.0.12.1成为DR
4、 在R1,R2,R3上开启认证
1、 所有的路由器起ospf协议
2、 修改G0/0/1的cost值
3、 修改R1G0/0/0接口的优先级为2
4、 在R1、R2、R3上开启认证,开启一个,其他路由器之间的关系会down掉
R2配置:
nterface Serial4/0/0
link-protocol ppp
ip address 10.0.34.1 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 10.0.24.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
ospf cost 50
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
authentication-mode simple plain huawei
network 2.2.2.2 0.0.0.0
network 10.0.12.2 0.0.0.0
network 10.0.34.1 0.0.0.0
area 0.0.0.1
network 10.0.24.1 0.0.0.0
R1:配置:
在这里插入图片描述](https://img-blog.csdnimg.cn/20200331222245595.png) interface GigabitEthernet0/0/1
ip address 10.0.13.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface LoopBack1
ip address 11.11.11.11 255.255.255.0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
authentication-mode simple plain huawei
network 1.1.1.1 0.0.0.0
network 10.0.12.1 0.0.0.0
network 10.0.13.1 0.0.0.0
network 11.11.11.11 0.0.0.0
#
R3:
interface Serial4/0/0
link-protocol ppp
ip address 10.0.34.2 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
#
interface GigabitEthernet0/0/0
ip address 10.0.35.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.0.13.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode simple plain huawei
network 3.3.3.3 0.0.0.0
network 10.0.13.2 0.0.0.0
network 10.0.34.2 0.0.0.0
area 0.0.0.2
network 10.0.35.1 0.0.0.0
#
R4:配置
#
interface GigabitEthernet0/0/1
ip address 10.0.24.2 255.255.255.0
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface LoopBack1
ip address 44.44.44.44 255.255.255.0
#
ospf 1 router-id 4.4.4.4
area 0.0.0.1
network 4.4.4.4 0.0.0.0
network 10.0.24.2 0.0.0.0
network 44.44.44.44 0.0.0.0
#
R5:配置
#
interface GigabitEthernet0/0/1
ip address 10.0.35.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#
interface LoopBack1
ip address 55.55.55.55 255.255.255.0
#
ospf 1 router-id 5.5.5.5
area 0.0.0.2
network 5.5.5.5 0.0.0.0
network 10.0.35.2 0.0.0.0
network 55.55.55.55 0.0.0.0
#