HCIA第四天作业

一、实验要求

 二、实验步骤

1.拓扑结构

2.给各路由器接口配置IP

r1

[Huawei]sys	
[Huawei]sysname r1
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Jul 23 2022 20:30:09-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]quit 
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 172.16.2.1 24
Jul 23 2022 20:31:03-08:00 r1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]quit 
[r1]interface g0/0/2	
[r1-GigabitEthernet0/0/2]ip address 12.1.1.1 24
Jul 23 2022 20:31:25-08:00 r1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
	
[r1]interface LoopBack 0	
[r1-LoopBack0]ip address 1.1.1.1 32
[r1-LoopBack0]quit	
[r1]display ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/24       up         up        
GigabitEthernet0/0/1              172.16.2.1/24        up         up        
GigabitEthernet0/0/2              12.1.1.1/24          up         up        
LoopBack0                         1.1.1.1/32           up         up(s)     
NULL0                             unassigned           up         up(s)     

r2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
Jul 23 2022 20:33:20-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]quit
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
Jul 23 2022 20:33:33-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]quit

[r2]interface LoopBack 0
[r2-LoopBack0]ip address 2.2.2.2 32
[r2-LoopBack0]quit	
[r2]display ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.2/24          up         up        
GigabitEthernet0/0/1              23.1.1.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         2.2.2.2/32           up         up(s)     
NULL0  

r3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3	
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 23.1.1.2 24
[r3-GigabitEthernet0/0/0]
Jul 23 2022 20:39:18-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]quit	
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 123.1.1.1 24
Jul 23 2022 20:40:00-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]quit 	
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 3.3.3.3 32
[r3-LoopBack0]quit
	
[r3]display ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              23.1.1.2/24          up         up        
GigabitEthernet0/0/1              123.1.1.1/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         3.3.3.3/32           up         up(s)     
NULL0                             unassigned           up         up(s)     
[r3]

r4

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4	
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 123.1.1.2 24
Jul 23 2022 20:42:57-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r4-GigabitEthernet0/0/0]quit	
[r4]interface g0/0/1	
[r4-GigabitEthernet0/0/1]ip address 45.1.1.1 24
Jul 23 2022 20:43:13-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]quit
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 4.4.4.4 32
[r4-LoopBack0]quit
[r4]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              123.1.1.2/24         up         up        
GigabitEthernet0/0/1              45.1.1.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         4.4.4.4/32           up         up(s)     
NULL0                             unassigned           up         up(s)     
[r4]

r5

[Huawei]sysname r5
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip address 123.1.1.3 24
Jul 23 2022 20:45:42-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]quit
[r5]interface g0/0/01
[r5-GigabitEthernet0/0/1]ip address 56.1.1.1 24
Jul 23 2022 20:46:05-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]quit
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip address 45.1.1.2 24
Jul 23 2022 20:46:22-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]quit	
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.5 32
[r5-LoopBack0]quit	
[r5]display ip int brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              123.1.1.3/24         up         up        
GigabitEthernet0/0/1              56.1.1.1/24          up         up        
GigabitEthernet0/0/2              45.1.1.2/24          up         up        
LoopBack0                         5.5.5.5/32           up         up(s)     
NULL0                             unassigned           up         up(s)     
[r5]

r6

[Huawei]sysname r6	
[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ip address 123.1.1.4 24
Jul 23 2022 20:48:55-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r6-GigabitEthernet0/0/0]quit 
[r6]interface g0/0/1	
[r6-GigabitEthernet0/0/1]ip address 56.1.1.2 24
Jul 23 2022 20:49:28-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r6-GigabitEthernet0/0/1]quit 
[r6]interface LoopBack 0
[r6-LoopBack0]ip address 6.6.6.6 32
[r6-LoopBack0]quit	
[r6]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              123.1.1.4/24         up         up        
GigabitEthernet0/0/1              56.1.1.2/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         6.6.6.6/32           up         up(s)     
NULL0                             unassigned           up         up(s)     
[r6]

2.给PC固定下放地址

[r1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool 1
Info: It's successful to create an IP address pool.
[r1-ip-pool-1]network 192.168.1.0 mask 255.255.255.0	
[r1-ip-pool-1]gateway-list 192.168.1.1 	
[r1-ip-pool-1]dns-list 8.8.8.8 114.114.114.114	
[r1-ip-pool-1]static-bind ip-address 192.168.1.11 mac-address 5489-980E-5C41	
[r1-ip-pool-1]static-bind ip-address 192.168.1.22 mac-address 5489-9839-5234
[r1-ip-pool-1]quit
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global 	
[r1-GigabitEthernet0/0/0]quit 
[r1]ip pool 2
Info: It's successful to create an IP address pool.
[r1-ip-pool-2]network 172.16.2.0 mask 255.255.255.0
[r1-ip-pool-2]gateway-list 172.16.2.1	
[r1-ip-pool-2]dns-list 8.8.8.8 114.114.114.114
[r1-ip-pool-2]static-bind ip-address 172.16.2.33 mac-address 5489-9867-68AA	
[r1-ip-pool-2]static-bind ip-address 172.16.2.44 mac-address 5489-9862-5462
[r1-ip-pool-2]quit
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]dhcp select global 

PC开启DHCP服务 

3.开启OSPF

r1

[r1]ospf 100 router-id 1.1.1.1
[r1-ospf-100]area 1	
[r1-ospf-100-area-0.0.0.1]network 0.0.0.0 255.255.255.255

r2

[r2]ospf 100 router-id 2.2.2.2
[r2-ospf-100]area 1
[r2-ospf-100-area-0.0.0.0]network 0.0.0.0 255.255.255.255

r3

[r3]ospf 100 router-id 3.3.3.3
[r3-ospf-100]area 1
[r3-ospf-100-area-0.0.0.1]network 23.1.1.2 0.0.0.0
[r3-ospf-100-area-0.0.0.1]quit
[r3-ospf-100]area 0	
[r3-ospf-100-area-0.0.0.0]network 123.1.1.1 0.0.0.0	
[r3-ospf-100-area-0.0.0.0]network 3.3.3.3 0.0.0.0

r4

[r4]ospf 100 router-id 4.4.4.4
[r4-ospf-100]area 0	
[r4-ospf-100-area-0.0.0.0]network 123.1.1.2 0.0.0.0

[r4-ospf-100]area 2
[r4-ospf-100-area-0.0.0.2]network 4.4.4.4 0.0.0.0
[r4-ospf-100-area-0.0.0.2]quit	
[r4-ospf-100]area 0	
[r4-ospf-100-area-0.0.0.0]network 45.1.1.1 0.0.0.0

r5

[r5]ospf 100 router-id 5.5.5.5
[r5-ospf-100]area 0
[r5-ospf-100-area-0.0.0.0]network 123.1.1.3 0.0.0.0
[r5-ospf-100-area-0.0.0.0]network 45.1.1.2 0.0.0.0
[r5-ospf-100-area-0.0.0.0]network 56.1.1.1 0.0.0.0
[r5-ospf-100]area 2
[r5-ospf-100-area-0.0.0.2]network 5.5.5.5 0.0.0.0

r6

[r6]ospf 100 router-id 6.6.6.6
[r6-ospf-100]area 0	
[r6-ospf-100-area-0.0.0.0]network 123.1.1.4 0.0.0.0
[r6-ospf-100-area-0.0.0.0]network 56.1.1.2 0.0.0.0
[r6-ospf-100]area 2
[r6-ospf-100-area-0.0.0.2]network 6.6.6.6 0.0.0.0

r4

[r4-ospf-100-area-0.0.0.2]undo network 4.4.4.4 0.0.0.0

4.

 r4

[r4]ospf 100
[r4-ospf-100]default-route-advertise always 

5.验证全网可达

6. r3456只有r3为dr没有bdr

r4、5、6

[r4]interface g0/0/0	
[r4-GigabitEthernet0/0/0]ospf dr-priority 0

 7.保证更新安全 r12之间明文 r23之间密文

[r1]interface g0/0/2
[r1-GigabitEthernet0/0/2]ospf authentication-mode simple cipher 123
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123

[r2]interface g0/0/1	
[r2-GigabitEthernet0/0/1]ospf authentication-mode md5
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123	
[r3-GigabitEthernet0/0/0]ospf authentication-mode md5

8.加快收敛速度

r12

[r1]interface g0/0/2	
[r1-GigabitEthernet0/0/2]ospf timer hello 5

9.area1 铭文 area2 密文

r12

[r1]
[r1]ospf 100
[r1-ospf-100]area 1
[r1-ospf-100-area-0.0.0.1]authentication-mode simple cipher 123

r3

[r3]ospf 100
[r3-ospf-100]area 1
[r3-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123	

r456

[r4]ospf 100
[r4-ospf-100]area 2
[r4-ospf-100-area-0.0.0.2]authentication-mode simple cipher 123	
[r4-ospf-100-area-0.0.0.2]authentication-mode md5

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值