hcia综合实验

配IP+ospf宣告

<r1>system-view

[r1]interface g0/0/1

[r1-GigabitEthernet0/0/1]ip address 172.16.97.1 19

[r1-GigabitEthernet0/0/1]quit

[r1]interface g0/0/0

[r1-GigabitEthernet0/0/0]ip address 172.16.1.1 19

[r1-GigabitEthernet0/0/0]quit

[r1]interface LoopBack 0

[r1-LoopBack0]ip address 1.1.1.1 32

[r1-LoopBack0]quit

[r1]ospf 1 router-id 1.1.1.1

[r1-ospf-1]area 0

[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

[r1-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.0

[r1-ospf-1-area-0.0.0.0]quit

[r1-ospf-1]area 1      

[r1-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

[r1-ospf-1-area-0.0.0.1]quit

[r1-ospf-1]area 0

[r1-ospf-1-area-0.0.0.0]net

[r1-ospf-1-area-0.0.0.0]network 172.16.1.0 0.0.0.255

[r1-ospf-1-area-0.0.0.0]quit

[r1-ospf-1]area 1

[r1-ospf-1-area-0.0.0.1]network 172.16.97.0 0.0.0.255

<r2>system-view

[r2]interface g0/0/0

[r2-GigabitEthernet0/0/0]ip address 172.16.33.1 19

[r2-GigabitEthernet0/0/0]quit

[r2]interface g0/0/1

[r2-GigabitEthernet0/0/1]ip address 172.16.129.1 19

[r2-GigabitEthernet0/0/1]quit

[r2]interface LoopBack 0

[r2-LoopBack0]ip address 2.2.2.2 32

[r2-LoopBack0]quit

[r2]ospf 1 rou

[r2]ospf 1 router-id 2.2.2.2

[r2-ospf-1]area 0

[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

[r2-ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255

[r2-ospf-1-area-0.0.0.0]quit

[r2-ospf-1]quit

[r2]ospf 1 router-id 2.2.2.2

[r2-ospf-1]area 2

[r2-ospf-1-area-0.0.0.2]network 172.16.0.0 0.0.255.255

[r2-ospf-1-area-0.0.0.2]network 172.16.0.0 0.0.0.255

[r2-ospf-1-area-0.0.0.2]network 172.16.33.0 0.0.0.255

[r2-ospf-1-area-0.0.0.2]quit

[r2-ospf-1]area 2

[r2-ospf-1-area-0.0.0.2]network 172.16.129.0 0.0.0.0

[r2-ospf-1-area-0.0.0.2]quit

[r2-ospf-1]area 0

[r2-ospf-1-area-0.0.0.0]network 172.16.33.0 0.0.0.0

<r3>system-view

Enter system view, return user view with Ctrl+Z.

[r3]interface g0/0/0

[r3-GigabitEthernet0/0/0]ip address 172.16.65.1 19

[r3-GigabitEthernet0/0/0]quit     

[r3]interface g0/0/1

[r3-GigabitEthernet0/0/1]ip address 172.16.161.1 19

[r3-GigabitEthernet0/0/1]quit

[r3]interface lo

[r3]interface LoopBack 0

[r3-LoopBack0]ip address 3.3.3.3 32

[r3-LoopBack0]q

[r3]ospf 1 route-id 3.3.3.3

[r3-ospf-1]area 0

[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

[r3-ospf-1-area-0.0.0.0]network 172.16.65.0 0.0.0.255

[r3-ospf-1-area-0.0.0.0]quit

[r3-ospf-1]area 3

[r3-ospf-1-area-0.0.0.3]network 172.16.161.0 0.0.0.0

[r3-ospf-1-area-0.0.0.3]quit

[r3-ospf-1]quit

<r4>system-view

[r4]interface g0/0/0

[r4-GigabitEthernet0/0/0]ip address 172.16.161.2 19

[r4-GigabitEthernet0/0/0]q

[r4]interface LoopBack 0

[r4-LoopBack0]ip address 4.4.4.4 32

[r4-LoopBack0]quit

[r4]ospf 1 router-id 4.4.4.4

[r4-ospf-1]area 3

[r4-ospf-1-area-0.0.0.3]network 4.4.4.4 0.0.0.0

[r4-ospf-1-area-0.0.0.3]network 172.16.161.0 0.0.0.255

[r4-ospf-1-area-0.0.0.3]network 172.16.255.0 0.0.0.255

<r5>system-view

Enter system view, return user view with Ctrl+Z.

[r5]interface g0/0/0

[r5-GigabitEthernet0/0/0]ip address 172.16.193.2 19

[r5-GigabitEthernet0/0/0]q

[r5]interface LoopBack 0

[r5-LoopBack0]ip address 5.5.5.5 32

[r5-LoopBack0]quit

[r5]ospf 1 router-id 5.5.5.5

[r5-ospf-1]area 2

[r5-ospf-1-area-0.0.0.2]network 172.16.129.0 0.0.0.255

[r5-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0

[r5-ospf-1-area-0.0.0.2]network 172.16.193.0 0.0.0.255<r6>system-view

Enter system view, return user view with Ctrl+Z.

[r6]interface LoopBack 0

[r6-LoopBack0]ip address 6.6.6.6 32

[r6-LoopBack0]quit

[r6]ospf 1 router-id 6.6.6.6

[r6-ospf-1]area 1

[r6-ospf-1-area-0.0.0.1]network 172.16.97.0 0.0.0.255

[r6-ospf-1-area-0.0.0.1]network 6.6.6.6 0.0.0.0

[r6-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.255

[r6-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

<r7>system-view n

[r7]dhcp enable

[r7]ip pool 1

Info: It's successful to create an IP address pool.

[r7-ip-pool-1]network 11.1.1.0 mask 24

[r7-ip-pool-1]gateway-list 11.1.1.1

[r7-ip-pool-1]dns-list 8.8.8.8

[r7-ip-pool-1]quit

[r7]interface g0/0/1

[r7-GigabitEthernet0/0/1]dhcp select global

[r7-GigabitEthernet0/0/1]quit

3.加快收敛速度

[r1]interface g0/0/0

[r1-GigabitEthernet0/0/0]ospf timer hello 5

[r1-GigabitEthernet0/0/0]quit

[r1]interface g0/0/1

[r1-GigabitEthernet0/0/1]ospf timer hello 5

[r2]interface g0/0/0

[r2-GigabitEthernet0/0/0]ospf timer hello 5

[r2-GigabitEthernet0/0/0]q

[r2]interface g0/0/1

[r2-GigabitEthernet0/0/1]ospf timer hello 5

[r3]interface g0/0/0

[r3-GigabitEthernet0/0/0]ospf timer hello 5

[r3-GigabitEthernet0/0/0]q

[r3]int

[r3]interface g0/0/1

[r3-GigabitEthernet0/0/1]ospf timer  hello 5

[r4]int

[r4]interface g0/0/0

[r4-GigabitEthernet0/0/0]ospf timer hello 5

[r4-GigabitEthernet0/0/0]q

[r4]interface g0/0/1

[r4-GigabitEthernet0/0/1]ospf timer  hello 5

[r5]interface g0/0/0

[r5-GigabitEthernet0/0/0]ospf timer hello 5

[r5-GigabitEthernet0/0/0]q

[r5]interface g0/0/1

[r5-GigabitEthernet0/0/1]ospf timer hello 5

[r6]interface g0/0/0

[r6-GigabitEthernet0/0/0]ospf timer hello 5

[r6-GigabitEthernet0/0/0]quit

[r6]interface g0/0/1

[r6-GigabitEthernet0/0/1]ospf timer hello 5

4.

[r2]interface g0/0/0

[r2-GigabitEthernet0/0/0]ospf dr-priority 0

[r3]interface g0/0/0

[r3-GigabitEthernet0/0/0]ospf dr-priority 0

5.

<Huawei>system-view

[Huawei]sysname sw2

[sw2]

Nov 29 2022 13:29:17-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25

.191.3.1 configurations have been changed. The current change number is 4, the c

hange loop count is 0, and the maximum number of records is 4095.vl

[sw2]vlan batch 2 3

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw2]

Nov 29 2022 13:29:27-08:00 sw2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25

.191.3.1 configurations have been changed. The current change number is 5, the c

hange loop count is 0, and the maximum number of records is 4095.

[sw2]interface e0/0/2

[sw2-Ethernet0/0/2]port link-type access

[sw2-Ethernet0/0/2]port default vlan 2

[sw2-Ethernet0/0/2]quit

[sw2]interface e0/0/3

[sw2-Ethernet0/0/3]port link-type access

[sw2-Ethernet0/0/3]port default vlan 3

[sw2-Ethernet0/0/3]q

[sw2]interface e0/0/1

[sw2-Ethernet0/0/1]port link-type trunk

[sw2-Ethernet0/0/1]port trunk  allow-pass vlan all

<r5>system-view

Enter system view, return user view with Ctrl+Z.

[r5]interface g0/0/1.1

[r5-GigabitEthernet0/0/1.1]ip address 172.16.193.1 19

[r5-GigabitEthernet0/0/1.1]dot1q termination vid 2

Nov 29 2022 13:32:48-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/1.1 has entered the UP state.

[r5-GigabitEthernet0/0/1.1]q

[r5]interface g0/0/1.2

[r5-GigabitEthernet0/0/1.2]dot1q termination vid 3

[r5-GigabitEthernet0/0/1.2]ip address 192.168.2.1 24

Nov 29 2022 13:36:39-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1.2 has entered the UP state.

[r5-GigabitEthernet0/0/1.2]q

[r5]interface g0/0/1.1

[r5-GigabitEthernet0/0/1.1]ip address 192.168.1.1 24

[r5-GigabitEthernet0/0/1.1]quit

[r5]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[r5]ip pool 1

Info: It's successful to create an IP address pool.

[r5-ip-pool-1]network 192.168.1.0 mask 24

[r5-ip-pool-1]gateway-list 192.168.1.1

[r5-ip-pool-1]dns-list 8.8.8.8

[r5-ip-pool-1]q

[r5]ip pool 2

Info: It's successful to create an IP address pool.

[r5-ip-pool-2]network 192.168.2.0 mask 24

[r5-ip-pool-2]gateway-list 192.168.2.1

[r5-ip-pool-2]dns-list 8.8.8.8

[r5-ip-pool-2]q

[r5]int

[r5]interface g0/0/1.1

[r5-GigabitEthernet0/0/1.1]dhcp select global

[r5-GigabitEthernet0/0/1.1]q

[r5]interface g0/0/1.2

[r5-GigabitEthernet0/0/1.2]dhcp select global

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname sw3

[sw3]vlan batch 4 5

Info: This operation may take a few seconds. Please wait for a moment...done.

[sw3]

Nov 29 2022 16:05:23-08:00 sw3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25

.191.3.1 configurations have been changed. The current change number is 5, the c

hange loop count is 0, and the maximum number of records is 4095.

[sw3]interface e0/0/2

[sw3-Ethernet0/0/2]port link-type access

[sw3-Ethernet0/0/2]port default vlan 4

[sw3-Ethernet0/0/2]

Nov 29 2022 16:06:33-08:00 sw3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25

.191.3.1 configurations have been changed. The current change number is 7, the c

hange loop count is 0, and the maximum number of records is 4095.q

[sw3]interface e0/0/3

[sw3-Ethernet0/0/3]port link-type access

[sw3-Ethernet0/0/3]port default vlan 5

[sw3-Ethernet0/0/3]

Nov 29 2022 16:07:03-08:00 sw3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25

.191.3.1 configurations have been changed. The current change number is 9, the c

hange loop count is 0, and the maximum number of records is 4095.q

[sw3]interface e0/0/1

[sw3-Ethernet0/0/1]port link-type trunk

[sw3-Ethernet0/0/1]port trunk allow-pass vlan  all

<r4>system-view

Enter system view, return user view with Ctrl+Z.

[r4]interface g0/0/1.1

[r4-GigabitEthernet0/0/1.1]ip address 192.168.3.1 24

[r4-GigabitEthernet0/0/1.1]dot1q termination vid 4

Nov 29 2022 16:08:48-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/1.1 has entered the UP state.

[r4-GigabitEthernet0/0/1.1]q

[r4]interface g0/0/1.2

[r4-GigabitEthernet0/0/1.2]ip address 192.168.4.1 24

[r4-GigabitEthernet0/0/1.2]dot1q termination vid 5

[r4-GigabitEthernet0/0/1.2]q

[r4]dhcp enable

Info: The operation may take a few seconds. Please wait for a moment.done.

[r4]ip pool 1

Info: It's successful to create an IP address pool.

[r4-ip-pool-1]network 192.168.3.0 mask 24

[r4-ip-pool-1]gateway-list 192.168.3.1

[r4-ip-pool-1]dns-list 8.8.8.8

[r4-ip-pool-1]q

[r4]ip pool 2

[r4-ip-pool-2]network 192.168.4.0 mask 24

[r4-ip-pool-2]gateway-list 192.168.4.1

[r4-ip-pool-2]dns-list 8.8.8.8

[r4-ip-pool-2]q

[r4]interface g0/0/1.1

[r4-GigabitEthernet0/0/1.1]dhcp select global

[r4-GigabitEthernet0/0/1.1]q

[r4]int

[r4]interface g0/0/1.2

[r4-GigabitEthernet0/0/1.2]dhcp select global

[r6]acl 2000

[r6-acl-basic-2000]rule permit source any

[r6-acl-basic-2000]q

[r6]interface g0/0/1

[r6-GigabitEthernet0/0/1]nat outbound 2000

6.

7.

[r6]user-interface vty 0 4

[r6-ui-vty0-4]authentication-mode password

Please configure the login password (maximum length 16):123

8.

[r4]acl 3000

[r4-acl-adv-3000]rule deny tcp source 192.168.3.1 0.0.0.0 destination-port172.16.97.1 0.0.0.0 desyination-port eq 23

[r4-GigabitEthernet0/0/1]traffic-filter inbound acl 3000

[r5-acl-adv-3000]rule deny icmp source 192.168.2.1 0.0.0.0 destination 192.168.4.1 0.0.0.0 icmp-type echo-reply

[r5-GigabitEthernet0/0/1]traffic-filter inbound acl 3000

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值