OSPF与VLAN实验综合

一、实验要求

1.R1-R3为区域0,R3-R4为区域1;其中R3的用户设备也在区域0,R1-R2各有一个环回
2.R1-R3 R3为DR设备,没有BDR
3.R4环回地址已固定,其他网段使用192.168.1.0/24进行合理的分配
4.R4环回不能宣告,全网可达,保障更新安全,避免环路,减少路由条目

二、实验拓扑

 

三、实验步骤

1.IP地址划分

area0:192.168.1.0 25

R1环回:192.168.1.0 28
R2环回:192.168.1.16 28
R123 0/0/0 :192.168.1.32 28

vlan2:192.168.1.48 28
vlan3:192.168.1.64 28

area1:192.168.1.128 25

R3-R4:192.168.1.128 30

R1

R2

R3

R4

2.VLAN

LSW2

[LSW2]vlan 2
[LSW2-vlan2]
Jul 13 2023 19:35:49-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 9, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW2-vlan2]vlan 3
[LSW2-vlan3]
Jul 13 2023 19:35:59-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 10, the
 change loop count is 0, and the maximum number of records is 4095.

[LSW2]int g0/0/2

[SW2-GigabitEthernet0/0/2]port link-type access
[LSW2-GigabitEthernet0/0/2]
Jul 13 2023 19:27:49-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 5, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW2-GigabitEthernet0/0/2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port link-t    
[LSW2-GigabitEthernet0/0/3]port link-type access
[LSW2-GigabitEthernet0/0/3]
Jul 13 2023 19:29:19-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 6, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW2-GigabitEthernet0/0/3]int g0/0/2
[LSW2-GigabitEthernet0/0/2]port de    
[LSW2-GigabitEthernet0/0/2]port default vlan 2
[LSW2-GigabitEthernet0/0/2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port default vlan 3
[LSW2-GigabitEthernet0/0/1]port link-type trunk   
[LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
[LSW2-GigabitEthernet0/0/1]
Jul 13 2023 19:31:29-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 8, the 
change loop count is 0, and the maximum number of records is 4095.

R3

[R3]int g0/0/1.1
[R3-GigabitEthernet0/0/1.1]dot1q termination vid 2
Jul 13 2023 19:39:29-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1.1 has entered the UP state. 
[R3-GigabitEthernet0/0/1.1]arp broadcast enable 
[R3-GigabitEthernet0/0/1.1]int g0/0/1.2
[R3-GigabitEthernet0/0/1.2]dot1q termination vid 3
Jul 13 2023 19:40:06-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1.2 has entered the UP state. 
[R3-GigabitEthernet0/0/1.2]arp broadcast enable 

测试:

 

3.OSPF

R1

[R1-ospf-1]ospf 1 router-id 1.1.1.1
[R1-ospf-1-area-0.0.0.0]network 192.168.1.32 0.0.0.15
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.15
[R1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0

R2

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1-area-0.0.0.0]network 192.168.1.32 0.0.0.15
[R2-ospf-1-area-0.0.0.0]network 192.168.1.16 0.0.0.15
[R2-ospf-1-area-0.0.0.0]network 192.168.1.34 0.0.0.0

R3

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1-area-0.0.0.0]network 192.168.1.32 0.0.0.15
[R3-ospf-1-area-0.0.0.0]network 192.168.1.35 0.0.0.0
[R3-ospf-1-area-0.0.0.0]area 1
[R3-ospf-1-area-0.0.0.1]network 192.168.1.128 0.0.0.3
[R3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.0

R4

[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.1]network 192.168.1.128 0.0.0.3
[R4-ospf-1-area-0.0.0.1]network 192.168.1.130 0.0.0.0

测试:

4.DR竞选

R1

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ospf dr-priority 0

R2

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ospf dr-priority 0

5.全网可达

R4

[R4-ospf-1]default-route-advertise always 

测试:

 

6.更新安全

R3

[R3-GigabitEthernet0/0/2]ospf authentication-mode md5 1 cipher 123456

R4

[R4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456

7.汇总

R3

[R3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.128

8.防环机制

[R3]ip route-static 192.168.1.0 25 null 0
 

R1

 

R2

 

R3

 

R4

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鲸珞

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值