HCIA复习

HCIA复习_第1张图片
第一步:IP地址规划与划分 如图所示
HCIA复习_第2张图片
第二步:配置各设备与端口IP
r1:

[r1]int lo0
[r1-LoopBack0]
[r1-LoopBack0]ip ad
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int lo1
[r1-LoopBack1]
[r1-LoopBack1]ip ad
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]
[r1-GigabitEthernet0/0/1]ip ad
[r1-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.10
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.10
[r1]ip route-static 192.168.1.4 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.10
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.10

[r1]display this
ip route-static 192.168.1.4 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.128 255.255.255.224 192.168.1.2
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10

[r1]display ip interface brief

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/30 up up
GigabitEthernet0/0/1 192.168.1.9/30 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 192.168.1.33/28 up up(s)
LoopBack1 192.168.1.49/28 up up(s)
NULL0 unassigned up up(s)

[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.10

ping 192.168.1.161
PING 192.168.1.161: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.161: bytes=56 Sequence=1 ttl=253 time=30 ms
Reply from 192.168.1.161: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 192.168.1.161: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 192.168.1.161: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 192.168.1.161: bytes=56 Sequence=5 ttl=253 time=40 ms

[r1]ip route-static 192.168.1.32 27 nu
[r1]ip route-static 192.168.1.32 27 NULL 0

r2:

[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[r2]ip route
[r2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
[r2]ip route
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.8 30 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.6
[r2]display this
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.1
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
[r2]ip route
[r2]ip route-static 192.168.1.64 27 nu
[r2]ip route-static 192.168.1.64 27 NULL 0

r3:

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r3-GigabitEthernet0/0/1]int g0/0/2
[r3-GigabitEthernet0/0/2]ip address 192.168.1.97 27
[r3]display ip routing-table
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.8/30 Direct 0 0 D 192.168.1.10 GigabitEthernet
0/0/0
192.168.1.10/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.1.11/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.1.12/30 Direct 0 0 D 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.13/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.1.15/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.1.96/27 Direct 0 0 D 192.168.1.97 GigabitEthernet
0/0/2
192.168.1.97/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
192.168.1.127/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

[r3]display ip interface brief

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.10/30 up up
GigabitEthernet0/0/1 192.168.1.13/30 up up
GigabitEthernet0/0/2 192.168.1.97/27 up up
LoopBack0 unassigned up up(s)
NULL0 unassigned up up(s)
[r3]dhcp enable
[r3]ip pool a
[r3-ip-pool-a]network 192.168.1.96 ma
[r3-ip-pool-a]network 192.168.1.96 mask 27
[r3-ip-pool-a]gateway-list 192.168.1.97
[r3-ip-pool-a]dns-list 114.114.114.114 8.8.8.8
[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]dhcp select global
[r3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
[r3]ip route-static 192.168.1.32 27 192.168.1.9
[r3]ip route-static 192.168.1.0 30 192.168.1.9
[r3]ip route-static 192.168.1.64 27 192.168.1.9
[r3]ip route-static 192.168.1.64 27 192.168.1.14

r4:
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.21 30
[r4-GigabitEthernet0/0/2]int e4/0/0
[r4-Ethernet4/0/0]ip address 192.168.1.17 30
[r4]ip route
[r4]ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.0 30 192.168.1.5
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.8 30 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]display ip routing-table protocol static
0.0.0.0/0 Static 60 0 RD 192.168.1.18 Ethernet4/0/0
192.168.1.0/30 Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
192.168.1.8/30 Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.32/27 Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
192.168.1.64/27 Static 60 0 RD 192.168.1.5 GigabitEthernet
0/0/0
192.168.1.96/27 Static 60 0 RD 192.168.1.13 GigabitEthernet
0/0/1
[r4]ip route-static 192.168.1.0 24 n
[r4]ip route-static 192.168.1.0 24 NULL 0
[r4]ip route-static 192.168.1.160 27 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22 pr
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
[r4]ip route-static 192.168.1.160 27 192.168.1.22 pr
[r4]ip route-static 192.168.1.160 27 192.168.1.22 preference 61
[r4]undo ip route-static 192.168.1.0 24 nu
[r4]undo ip route-static 192.168.1.0 24 NULL 0
[r4]undo ip route-static 192.168.1.160 27 192.168.1.22 preference 61
[r4]ip route-static 192.168.1.192 26 nu
[r4]ip route-static 192.168.1.192 26 NULL 0
[r4]undo ip route-static 192.168.1.160 27
[r4]ip route-static 192.168.1.128 27 nu
[r4]ip route-static 192.168.1.128 27 NULL 0
[r4]ip route-static 192.168.1.24 30 nu
[r4]ip route-static 192.168.1.24 30 NULL 0
[r4]ip route-static 192.168.1.28 30 nu
[r4]ip route-static 192.168.1.28 30 NULL 0

r5:
[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.1.18 30
[r5-GigabitEthernet0/0/0]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/0]int g0/0/1
[r5-GigabitEthernet0/0/1]ip address 56.1.1.1 24
[r5-LoopBack0]ip ad
[r5-LoopBack0]ip address 192.168.1.161 28
[r5]ip route-static 0.0.0.0 0.0.0.0 56.1.1.2
[r5]ip route-static 192.168.1.0 24 192.168.1.17
[r5]ip route-static 192.168.1.0 24 192.168.1.21 pr
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 61
[r5]acl 2000
[r5-acl-basic-2000]rule per
[r5-acl-basic-2000]rule permit sou
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]int g0/0/1
[r5-GigabitEthernet0/0/1]nat ou
[r5-GigabitEthernet0/0/1]nat outbound 2000

HCIA复习_第3张图片
HCIA复习_第4张图片
HCIA复习_第5张图片

你可能感兴趣的:(HCIA复习)