实验要求
第一步:
进行地址规划
第二步:
给每个路由器配置ip和环回
r1]interface eth0/0/0
[r1-Ethernet0/0/0]ip add
[r1-Ethernet0/0/0]ip address 192.168.1.1 28
[r1]interface LoopBack 0[r1-LoopBack0]ip address 192.168.1.17 28
[r2-Ethernet0/0/0]ip address 192.168.1.2 28
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.33 28
[r3-Ethernet0/0/0]ip address 192.168.1.3 28
[r3]interface eth0/0/1
[r3-Ethernet0/0/1]ip add
[r3-Ethernet0/0/1]ip address 192.168.1.65 28
r3-LoopBack0]ip add
[r3-LoopBack0]ip address 192.168.1.49 28
r4]interface eth0/0/0
[r4-Ethernet0/0/0]ip add
[r4-Ethernet0/0/0]ip address 192.168.1.66 28
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 4.4.4.1 24
第三步:
宣告
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]
[r1-ospf-1-area-0.0.0.0]network 192.168.1.17 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 192.168.1.49 0.0.0.0
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.65 0.0.0.0
[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.66 0.0.0.0
第四步:
给R4配置缺省
[r4-ospf-1-area-0.0.0.1]default-route-advertise always
第五步:
全网可达,可以ping通R4