HCIA复习

在这里插入图片描述
在这里插入图片描述
The device is running!

sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy r1
[r1]int gi0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Jan 13 2021 17:53:02-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int gi0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[r1-GigabitEthernet0/0/1]
Jan 13 2021 17:53:52-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]int loo
[r1]int LoopBack 0
[r1-LoopBack0]ip add 192.168.1.32 28
Error: The specified IP address is invalid.
[r1-LoopBack0]ip add 192.168.1.33 28
[r1-LoopBack0]int
[r1-LoopBack0]int loo 1
[r1-LoopBack1]ip add 192.168.1.49 28
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 27 192.168.1.2
Info: The destination address and mask of the configured static route mismatched
, and the static route 192.168.1.0/27 was generated.
[r1]
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.2
[r1]ip rou
[r1]ip route
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.6
[r1]ip route-static 192.168.1.24 30 192.168.1.6
[r1]ip route-static 192.168.1.24 30 192.168.1.2
[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.6
[r1]display ip int
[r1]display ip interface br
[r1]display ip interface 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 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/30 up up
GigabitEthernet0/0/1 192.168.1.5/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]ping 192.168.1.9
PING 192.168.1.9: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.9: bytes=56 Sequence=1 ttl=255 time=260 ms
Reply from 192.168.1.9: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.1.9: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 192.168.1.9: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.9: bytes=56 Sequence=5 ttl=255 time=20 ms

— 192.168.1.9 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/74/260 ms

[r1]ping 192.168.1.21
PING 192.168.1.21: 56 data bytes, press CTRL_C to break
Request time out
Reply from 192.168.1.21: bytes=56 Sequence=2 ttl=254 time=80 ms
Reply from 192.168.1.21: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 192.168.1.21: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 192.168.1.21: bytes=56 Sequence=5 ttl=254 time=30 ms

— 192.168.1.21 ping statistics —
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 20/40/80 ms

[r1]ping 192.168.1.129
PING 192.168.1.129: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=253 time=80 ms
Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=253 time=50 ms
Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=253 time=50 ms

— 192.168.1.129 ping statistics —
5 packet(s) transmitted
3 packet(s) received
40.00% packet loss
round-trip min/avg/max = 50/60/80 ms

[r1]ip rou
[r1]ip route
[r1]ip route-static 2.2.2.0 24 192.168.1.22
[r1]ping 2.2.2.1
PING 2.2.2.1: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.1: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 2.2.2.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 2.2.2.1: bytes=56 Sequence=5 ttl=253 time=30 ms

— 2.2.2.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/34/40 ms
[r1]ip route-static 0.0.0.0 0 2.2.2.2
[r1]ip route-static 192.168.1.32 27 NULL 0
[r1]ping 2.2.2.1
PING 2.2.2.1: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.1: bytes=56 Sequence=1 ttl=253 time=20 ms
Reply from 2.2.2.1: bytes=56 Sequence=2 ttl=253 time=20 ms
Reply from 2.2.2.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=4 ttl=253 time=120 ms
Reply from 2.2.2.1: bytes=56 Sequence=5 ttl=253 time=20 ms

— 2.2.2.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/42/120 ms

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r1]undo ip route-static 192.168.1.16 30 192.168.1.6
[r1]ip route-static 192.168.1.16 28 192.168.1.6
[r1]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy Enter system view, return user view with Ctrl+Z. [r1]aaa [r1-aaa]lo [r1-aaa]local-user cisco pr [r1-aaa]local-user cisco privilege le [r1-aaa]local-user cisco privilege level 15 pa [r1-aaa]local-user cisco privilege level 15 password ci [r1-aaa]local-user cisco privilege level 15 password cipher 456 Info: Add a new user. [r1-aaa]q [r1]us [r1]user-bind [r1]user-group [r1]user-interface vty 0 4 [r1-ui-vty0-4]au [r1-ui-vty0-4]authentication-mode aaa [r1-ui-vty0-4]

The device is running!

sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sy r2
[r2]int gi0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
Jan 13 2021 17:56:24-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]int gi0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
Jan 13 2021 17:56:50-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]q
[r2]int loo 0
[r2-LoopBack0]ip add 192.168.1.65 28
[r2-LoopBack0]int loo 1
[r2-LoopBack1]ip add 192.168.1.81 28
[r2]ip route
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.4 30 192.168.1.10
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.16 30 192.168.1.10
[r2]ip route-static 192.168.1.16 30 192.168.1.1
[r2]ip rou
[r2]ip route
[r2]ip route-static 192.168.1.20 30 192.168.1.10
[r2]ip route-static 192.168.1.24 30 192.168.1.10
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r2]ip route-static 2.2.2.0 24 192.168.1.22
[r2]ip route-static 2.2.2.0 24 192.168.1.26
[r2]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r2]ping 2.2.2.1
PING 2.2.2.1: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.1: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 2.2.2.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 2.2.2.1: bytes=56 Sequence=5 ttl=254 time=30 ms

— 2.2.2.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/32/40 ms

[r2]ip route-static 0.0.0.0 0 2.2.2.2
[r2]ip rou
[r2]ip route
[r2]ip route-static 192.168.1.64 27 NULL 0
[r2]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r2]undo ip route-static 192.168.1.16 30 192.168.1.1
[r2]undo ip route-static 192.168.1.16 30 192.168.1.10
[r2]ip rou
[r2]ip route
[r2]ip route-static 192.168.1.16 28 192.168.1.1
[r2]ip route-static 192.168.1.16 28 192.168.1.10

[r3]int gi0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
Jan 13 2021 17:58:25-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]int gi 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
Jan 13 2021 17:58:53-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]int gi0/0/2
[r3-GigabitEthernet0/0/2]ip add 192.168.1.17 30
Jan 13 2021 17:59:18-08:00 r3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r3-GigabitEthernet0/0/2]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r3]ip rou
[r3]ip route
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.96 27 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14
[r3]ip route-static 192.168.1.24 30 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r3]ping 192.168.1.129
PING 192.168.1.129: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=254 time=100 ms
Reply from 192.168.1.129: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=254 time=30 ms

— 192.168.1.129 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/48/100 ms

[r3]ip route-static 2.2.2.0 24 192.168.1.22
[r3]ip route-static 2.2.2.0 24 192.168.1.26
[r3]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r3]ip route-static 0.0.0.0 0 2.2.2.2
[r3]int gi0/0/2
[r3-GigabitEthernet0/0/2]dhcp e
[r3-GigabitEthernet0/0/2]dhcp en
[r3-GigabitEthernet0/0/2]dhcp enq
^
Error: Unrecognized command found at ‘^’ position.
[r3-GigabitEthernet0/0/2]q
[r3]dhcp en
[r3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool a
Info: It’s successful to create an IP address pool.
[r3-ip-pool-a]net
[r3-ip-pool-a]netbios-type
[r3-ip-pool-a]network 192.168.1.16 mask 30
[r3-ip-pool-a]ga
[r3-ip-pool-a]gateway-list 192.168.1.17
[r3-ip-pool-a]dn
[r3-ip-pool-a]dns-list 114.114.114.114
[r3-ip-pool-a]q
[r3]int gi0/0/2
[r3-GigabitEthernet0/0/2]dhc
[r3-GigabitEthernet0/0/2]dhcp se
[r3-GigabitEthernet0/0/2]dhcp select gl
[r3-GigabitEthernet0/0/2]dhcp select global
[r3-GigabitEthernet0/0/2]q
[r3]undo ip pool a
Warning: There are IP addresses allocated in the pool. Are you sure to delete th
e pool ?[Y/N]:y
[r3]int gi 0/0/2
[r3-GigabitEthernet0/0/2]undo ip add 192.168.1.17 30
Jan 13 2021 19:04:09-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the DOWN state.
[r3-GigabitEthernet0/0/2]ip add 192.168.1.17 28
Jan 13 2021 19:05:32-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r3-GigabitEthernet0/0/2]q
[r3]dhcp en
[r3]dhcp enable
[r3]ip pool a
Info: It’s successful to create an IP address pool.
[r3-ip-pool-a]net
[r3-ip-pool-a]netbios-type
[r3-ip-pool-a]network 192.168.1.16 mask 28
[r3-ip-pool-a]ga
[r3-ip-pool-a]gateway-list 192.168.1.17
[r3-ip-pool-a]dn
[r3-ip-pool-a]dns-list 114.114.114.114
[r3-ip-pool-a]q
[r3]int gi0/0/2
[r3-GigabitEthernet0/0/2]dhcp se
[r3-GigabitEthernet0/0/2]dhcp select gl
[r3-GigabitEthernet0/0/2]dhcp select global

[r4]int gi0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30
Jan 13 2021 17:59:55-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]int gi 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.14 30
[r4-GigabitEthernet0/0/1]
Jan 13 2021 18:00:37-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]int gi0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.21 30
[r4-GigabitEthernet0/0/2]
Jan 13 2021 18:01:10-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r4-GigabitEthernet0/0/2]int gi4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.25 30
[r4-GigabitEthernet4/0/0]
Jan 13 2021 18:01:38-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[r4-GigabitEthernet4/0/0]q
[r4]int loo0
[r4-LoopBack0]ip add 192.168.1.97 28
[r4-LoopBack0]int loo 1
[r4-LoopBack1]ip add 192.168.1.113 28
[r4-LoopBack1]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r4]ip rou
[r4]ip route
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.16 30 192.168.1.13
[r4]ip rou
[r4]ip route
[r4]ip route-static 192.168.1.128 27 192.168.1.21
Error: The next-hop address is invalid.
[r4]ip route-static 192.168.1.128 27 192.168.1.22
[r4]ip route-static 192.168.1.128 27 192.168.1.26
[r4]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on
[r4]ip route-static 2.2.2.0 24 192.168.1.22
[r4]ip route-static 2.2.2.0 24 192.168.1.26
[r4]ip route-static 0.0.0.0 0 2.2.2.2
[r4]ip rou
[r4]ip route
[r4]ip route-static 192.168.1.96 27 NULL 0
[r4]ping 2.2.2.1
PING 2.2.2.1: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.1: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 2.2.2.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 2.2.2.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 2.2.2.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 2.2.2.1: bytes=56 Sequence=5 ttl=255 time=10 ms

— 2.2.2.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/24/50 ms
[r4]undo ip route-static 192.168.1.16 30 192.168.1.13
[r4]ip rou
[r4]ip route
[r4]ip route-static 192.168.1.16 28 192.168.1.13

[r5]int gi0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
Jan 13 2021 18:03:22-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]int gi0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.26 30
Jan 13 2021 18:04:20-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]int gi0/0/2
[r5-GigabitEthernet0/0/2]ip add 2.2.2.1 24
Jan 13 2021 18:04:51-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]q
[r5]int loo 0
[r5-LoopBack0]ip add 192.168.1.129 27
[r5-LoopBack0]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r5]ip rou
[r5]ip route
[r5]ip route-static 192.168.1.32 27 192.168.1.21
[r5]ip route-static 192.168.1.64 27 192.168.1.21
[r5]ip route-static 192.168.1.96 27 192.168.1.21
[r5]ip route-static 192.168.1.0 30 192.168.1.21
[r5]ip route-static 192.168.1.4 30 192.168.1.21
[r5]ip route-static 192.168.1.16 30 192.168.1.21
[r5]ip route-static 192.168.1.12 30 192.168.1.21
[r5]ip route-static 192.168.1.18 30 192.168.1.21
Error: The route already exists.
[r5]ip route-static 192.168.1.8 30 192.168.1.21
[r5]ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=180 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=40 ms

— 2.2.2.2 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/56/180 ms

[r5]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

sy
Enter system view, return user view with Ctrl+Z.
[r5]ip route-static 0.0.0.0 0 2.2.2.2
[r5]ip rou
[r5]ip route
[r5]ip route-static 192.168.1.128 27 NULL 0
[r5]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on
[r5]
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.16 255.255.255.252 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.25 prefer 61
[r5]
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.25 prefer 61
[r5]aaa
[r5-aaa]lo
[r5-aaa]local-user huawei pr
[r5-aaa]local-user huawei privilege le
[r5-aaa]local-user huawei privilege level 15 pa
[r5-aaa]local-user huawei privilege level 15 password ci
[r5-aaa]local-user huawei privilege level 15 password cipher 123
Info: Add a new user.
[r5-aaa]q
[r5]us
[r5]user-bind
[r5]user-group
[r5]user-interface vty 0 4
[r5-ui-vty0-4]qu
[r5-ui-vty0-4]quit au
[r5-ui-vty0-4]au
[r5-ui-vty0-4]authentication-mode aaa
[r5-ui-vty0-4]q

[isp]int gi 0/0/0
[isp-GigabitEthernet0/0/0]ip add 2.2.2.2 24
Jan 13 2021 18:06:12-08:00 isp %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[isp-GigabitEthernet0/0/0]q
[isp]int loo 0
[isp-LoopBack0]ip add 3.3.3.1 24

telnet 2.2.2.1
Press CTRL_] to quit telnet mode
Trying 2.2.2.1 …
Connected to 2.2.2.1 …

Login authentication

Username:huawei
Password:

Please check whether system data has been changed, and save data in time

Configuration console time out, please retry to log on

The connection was closed by the remote host

在这里插入图片描述
在这里插入图片描述
总结起来看,TCP三次握手过程就是client与server在相互确认各自发送和接收是否正常的过程:
第一次握手:client—>server,server确认了cilent的发送能力和自己的接收能力是正常的
第二次握手:server—>client,client确认了自己的发送能力和server的接收能力是正常的,但是server此时不清楚自己的发送能力是否正常
第三次握手:client—>server,server确认了自己的发送能力正常,同时也表明双方也都确认完毕,可以开始传输数据。

最简单的理解
一:建立TCP连接:三次握手协议
客户端:我要对你讲话,你能听到吗;
服务端:我能听到;而且我也要对你讲话,你能听到吗;
客户端:我也能听到。
二:关闭TCP连接:四次握手协议
客户端:我说完了,我要闭嘴了;
服务端:我收到请求,我要闭耳朵了;
(客户端收到这个确认,于是安心地闭嘴了。)
服务端还没倾诉完自己的故事,于是继续唠唠叨叨向客户端说了半天,直到说完为止
服务端:我说完了,我也要闭嘴了;
客户端:我收到请求,我要闭耳朵了;(事实上,客户端为了保证这个确认包成功送达,等待了两个最大报文生命周期后,才闭上耳朵。)
(服务端收到这个确认,于是安心地闭嘴了。

猜你喜欢

转载自blog.csdn.net/W981113/article/details/112587078
今日推荐