HCIA复习实验作业

一.拓扑图

2.需求分析

3.配置

R1
 ip配置......(代码被清空,自行配置)
配置静态路由和缺省路由:

<r1>sys

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

[r1]ip route   

[r1]ip route- 

[r1]ip route-static 192.168.1.128 27 192.168.1.6

[r1]ip route- 

[r1]ip route-static 192.168.1.128 27 192.168.1.2

[r1]

[r1]ip route   

[r1]ip route- 

[r1]ip route-static 192.168.1.16 30 192.168.1.2

[r1]ip route- 

[r1]ip route-static 192.168.1.16 30 192.168.1.6

[r1]ip route- 

[r1]ip route-static 192.168.1.20 30 192.168.1.2

[r1]ip route- 

[r1]ip route-static 192.168.1.20 30 192.168.1.6

[r1]ip route- 

[r1]ip route-static 192.168.1.12 30 192.168.1.6

[r1]ip route- 

[r1]ip route-static 192.168.1.96 27 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

<r1>sys

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

[r1]ip route- 

[r1]ip route-static 0.0.0.0 0 192.168.1.2

[r1]ip route- 

[r1]ip route-static 0.0.0.0 0 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

<r1>sys

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

[r1]ping 192.168.1.161

  PING 192.168.1.161: 56  data bytes, press CTRL_C to break

    Request time out

    Request time out

    Reply from 192.168.1.161: bytes=56 Sequence=3 ttl=253 time=120 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=20 ms

  --- 192.168.1.161 ping statistics ---

    5 packet(s) transmitted

    3 packet(s) received

    40.00% packet loss

    round-trip min/avg/max = 20/56/120 ms

[r1]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=30 ms

  --- 192.168.1.161 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 30/30/30 ms

[r1]ping 12.0.0.5

  PING 12.0.0.5: 56  data bytes, press CTRL_C to break

    Reply from 12.0.0.5: bytes=56 Sequence=1 ttl=253 time=40 ms

    Reply from 12.0.0.5: bytes=56 Sequence=2 ttl=253 time=30 ms

    Reply from 12.0.0.5: bytes=56 Sequence=3 ttl=253 time=30 ms

    Reply from 12.0.0.5: bytes=56 Sequence=4 ttl=253 time=30 ms

    Reply from 12.0.0.5: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 12.0.0.5 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 30/32/40 ms

给路由器配置空接口防止环路:

[r1]ip route- 

[r1]ip route-static 192.168.1.32 27 nu

[r1]ip route-static 192.168.1.32 27 NULL 0

[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

<r1>sys

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

[r1]ping 1.0.0.6

  PING 1.0.0.6: 56  data bytes, press CTRL_C to break

    Request time out

    Reply from 1.0.0.6: bytes=56 Sequence=2 ttl=252 time=60 ms

    Reply from 1.0.0.6: bytes=56 Sequence=3 ttl=252 time=40 ms

    Reply from 1.0.0.6: bytes=56 Sequence=4 ttl=252 time=30 ms

    Reply from 1.0.0.6: bytes=56 Sequence=5 ttl=252 time=40 ms

  --- 1.0.0.6 ping statistics ---

    5 packet(s) transmitted

    4 packet(s) received

    20.00% packet loss

    round-trip min/avg/max = 30/42/60 ms

[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

<r1>sys

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

[r1]te     

[r1]telnet s    

[r1]telnet server en      

[r1]telnet server enable

 Error: TELNET server has been enabled

[r1]aaa

[r1-aaa]lo     

[r1-aaa]local-user xiaomi p

[r1-aaa]local-user xiaomi password ci      

[r1-aaa]local-user xiaomi password cipher xiaomi12345 pri  

[r1-aaa]local-user xiaomi password cipher xiaomi12345 privilege l     

[r1-aaa]local-user xiaomi password cipher xiaomi12345 privilege level 15

Info: Add a new user.

[r1-aaa]lo     

[r1-aaa]local-user xiaomi   

[r1-aaa]local-user xiaomi s 

[r1-aaa]local-user xiaomi service-type telnet

[r1-aaa]q

[r1]user-in    

[r1]user-interface vty 0 4

[r1-ui-vty0-4]au  

[r1-ui-vty0-4]authentication-mode ?

  aaa       AAA authentication

  password  Authentication through the password of a user terminal interface

[r1-ui-vty0-4]authentication-mode aaa

[r1-ui-vty0-4]q

[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

<r1>sys

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

[r1]tr      

[r1]tracert 192.168.1.161

 traceroute to  192.168.1.161(192.168.1.161), max hops: 30 ,packet length: 40,pr

ess CTRL_C to break

 1 192.168.1.2 70 ms  10 ms 192.168.1.6 30 ms

 2 192.168.1.14 40 ms  20 ms  20 ms

 3 192.168.1.18 50 ms  30 ms  30 ms

[r1]tracert 192.168.1.161

 traceroute to  192.168.1.161(192.168.1.161), max hops: 30 ,packet length: 40,pr

ess CTRL_C to break

 1 192.168.1.2 20 ms  20 ms 192.168.1.6 20 ms

 2 192.168.1.14 20 ms  30 ms  20 ms

 3 192.168.1.22 30 ms  30 ms  30 ms

[r1]ping 1.0.0.6

  PING 1.0.0.6: 56  data bytes, press CTRL_C to break

    Request time out

    Reply from 1.0.0.6: bytes=56 Sequence=2 ttl=252 time=80 ms

    Reply from 1.0.0.6: bytes=56 Sequence=3 ttl=252 time=40 ms

    Reply from 1.0.0.6: bytes=56 Sequence=4 ttl=252 time=40 ms

    Reply from 1.0.0.6: bytes=56 Sequence=5 ttl=252 time=40 ms

  --- 1.0.0.6 ping statistics ---

    5 packet(s) transmitted

    4 packet(s) received

    20.00% packet loss

    round-trip min/avg/max = 40/50/80 ms

R2
ip配置:

The device is running!

<Huawei>

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

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

<Huawei>sys

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

[Huawei]sys r2

[r2]int g 0/0/0

[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30

Mar 17 2024 22:56:12-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 g 0/0/1

[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30

Mar 17 2024 22:56:45-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 l0

[r2-LoopBack0]ip add 192.168.1.65 28

[r2-LoopBack0]int l1

[r2-LoopBack1]ip add 192.168.1.81 28

[r2-LoopBack1]q

[r2]dis ip int b

*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.2/30       up         up       

GigabitEthernet0/0/1              192.168.1.9/30       up         up       

GigabitEthernet0/0/2              unassigned           down       down     

LoopBack0                         192.168.1.65/28      up         up(s)    

LoopBack1                         192.168.1.81/28      up         up(s)    

NULL0                             unassigned           up         up(s)    

[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

配置静态路由和缺省路由:

<r2>sys

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

[r2]ip route- 

[r2]ip route-static 192.168.1.128 27 192.168.1.10

[r2]ip route- 

[r2]ip route-static 192.168.1.16 30 192.168.1.10

[r2]ip route- 

[r2]ip route-static 192.168.1.20 30 192.168.1.10

[r2]ip route- 

[r2]ip route-static 192.168.1.12 30 192.168.1.10

[r2]ip route- 

[r2]ip route-static 192.168.1.96 27 192.168.1.10

[r2]ip route- 

[r2]ip route-static 192.168.1.196 27 192.168.1.1

Info: The destination address and mask of the configured static route mismatched

, and the static route 192.168.1.192/27 was generated.

[r2]ip route- 

[r2]ip route-static 192.168.1.96 27 192.168.1.1

[r2]ip route- 

[r2]ip route-static 192.168.1.4 30 192.168.1.1

[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

<r2>sys

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

[r2]ip route- 

[r2]ip route-static 0.0.0.0 0 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

给路由器配置空接口防止环路:

<r2>sys

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

[r2]ip route- 

[r2]ip route-static 192.168.1.64 27 nu

[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

R3
ip配置:

The device is running!

<Huawei>

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

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

<Huawei>sys

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

[Huawei]sys r3

[r3]int g 0/0/0

[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30

[r3-GigabitEthernet0/0/0]

Mar 17 2024 23:04:00-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 g 0/0/1

[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30

Mar 17 2024 23:04:33-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 g 0/0/2

[r3-GigabitEthernet0/0/2]ip add 192.168.1.97 27

Mar 17 2024 23:05:48-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]q

[r3]dis ip int b

*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 0

The number of interface that is UP in Protocol is 4

The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol 

GigabitEthernet0/0/0              192.168.1.6/30       up         up       

GigabitEthernet0/0/1              192.168.1.13/30      up         up       

GigabitEthernet0/0/2              192.168.1.97/27      up         up       

NULL0                             unassigned           up         up(s)    

[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

<r3>sys

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

[r3]dhcp en

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

[r3]dhcp enable

[r3]ip pool aa

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

[r3-ip-pool-aa]network 192.168.1.96 mask 27

[r3-ip-pool-aa]gateway-list 192.168.1.97

[r3-ip-pool-aa]dns-list 8.8.8.8 114.114.114.114

[r3-ip-pool-aa]q

[r3]int g 0/0/2

[r3-GigabitEthernet0/0/2]dhcp select global

[r3-GigabitEthernet0/0/2]q

[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

配置静态路由和缺省路由:

<r3>sys

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

[r3]ip route- 

[r3]ip route-static 192.168.1.32 27 192.168.1.5

[r3]ip route- 

[r3]ip route-static 192.168.1.0 30 192.168.1.5

[r3]ip route- 

[r3]ip route-static 192.168.1.64 27 192.168.1.5

[r3]ip route- 

[r3]ip route-static 192.168.1.64 27 192.168.1.14

[r3]ip route- 

[r3]ip route-static 192.168.1.8 30 192.168.1.14

[r3]ip route- 

[r3]ip route-static 192.168.1.128 27 192.168.1.14

[r3]ip route- 

[r3]ip route-static 192.168.1.6 30 192.168.1.14

Info: The destination address and mask of the configured static route mismatched

, and the static route 192.168.1.4/30 was generated.

[r3]ip route- 

[r3]ip route-static 192.168.1.16 30 192.168.1.14

[r3]ip route- 

[r3]ip route-static 192.168.1.20 30 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

<r3>sys

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

[r3]ip route- 

[r3]ip route-static 0.0.0.0 0 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

R4
ip配置:

The device is running!

<Huawei>

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

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

<Huawei>sys

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

[Huawei]sys r4

[r4]int g 0/0/0

[r4-GigabitEthernet0/0/0]ip add 192.168.1.10 30

Mar 17 2024 23:07:09-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 g 0/0/1

[r4-GigabitEthernet0/0/1]ip add 192.168.1.14 30

Mar 17 2024 23:07:43-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 g 0/0/2

[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30

[r4-GigabitEthernet0/0/2]

Mar 17 2024 23:08:40-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 g 4/0/0

[r4-GigabitEthernet4/0/0]ip add 192.168.1.21 30

[r4-GigabitEthernet4/0/0]

Mar 17 2024 23:09:40-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 l0

[r4-LoopBack0]ip add 192.168.1.129 28

[r4-LoopBack0]int l1

[r4-LoopBack1]ip add 192.168.1.145 28

[r4-LoopBack1]q

[r4]dis ip int b

*down: administratively down

^down: standby

(l): loopback

(s): spoofing

The number of interface that is UP in Physical is 7

The number of interface that is DOWN in Physical is 2

The number of interface that is UP in Protocol is 7

The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol 

Ethernet3/0/0                     unassigned           down       down     

Ethernet3/0/1                     unassigned           down       down     

GigabitEthernet0/0/0              192.168.1.10/30      up         up       

GigabitEthernet0/0/1              192.168.1.14/30      up         up       

GigabitEthernet0/0/2              192.168.1.17/30      up         up       

GigabitEthernet4/0/0              192.168.1.21/30      up         up       

LoopBack0                         192.168.1.129/28     up         up(s)    

LoopBack1                         192.168.1.145/28     up         up(s)    

NULL0                             unassigned           up         up(s)    

[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>sys

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

[r4]ip route- 

[r4]ip route-static 192.168.1.96 27 192.168.1.13

[r4]ip route- 

[r4]ip route-static 192.168.1.4 30 192.168.1.13

[r4]ip route- 

[r4]ip route-static 192.168.1.32 27 192.168.1.13

[r4]ip route- 

[r4]ip route-static 192.168.1.32 27 192.168.1.9

[r4]ip route- 

[r4]ip route-static 192.168.1.0 30 192.168.1.0

[r4]ip route- 

[r4]ip route-static 192.168.1.0 30 192.168.1.9

[r4]ip route- 

[r4]ip route-static 192.168.1.64 27 192.168.1.9

[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>sys

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

[r4]ip route- 

[r4]ip route-static 0.0.0.0 0 192.168.1.18

[r4]ip route- 

[r4]ip route-static 0.0.0.0 0 192.168.1.22

[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>sys

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

[r4]ip route- 

[r4]ip route-static 192.168.1.128 27 nu    

[r4]ip route-static 192.168.1.128 27 NULL 0

[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>sys

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

[r4]ip route- 

[r4]ip route-static 0.0.0.0 0 192.168.1.22 p

[r4]ip route-static 0.0.0.0 0 192.168.1.22 pre   

[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61

Info: Succeeded in modifying route.

Mar 18 2024 01:30:24-08:00 r4 %%01RM/4/IPV4_DEFT_RT_CHG(l)[0]:IPV4 default Route

 is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=GigabitEt

hernet4/0/0, Nexthop=192.168.1.22, Neighbour=0.0.0.0, Preference=1023410176, Lab

el=NULL, Metric=0)

[r4]

[r4]dis ip rou 

[r4]dis ip routing-table p    

[r4]dis ip routing-table protocol st    

[r4]dis ip routing-table protocol static

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Public routing table : Static

         Destinations : 7        Routes : 10       Configured Routes : 10

Static routing table status : <Active>

         Destinations : 7        Routes : 8

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.18    GigabitEthernet

0/0/2

    192.168.1.0/30  Static  60   0          RD   192.168.1.9     GigabitEthernet

0/0/0

    192.168.1.4/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.13    GigabitEthernet

0/0/1

                    Static  60   0          RD   192.168.1.9     GigabitEthernet

0/0/0

   192.168.1.64/27  Static  60   0          RD   192.168.1.9     GigabitEthernet

0/0/0

   192.168.1.96/27  Static  60   0          RD   192.168.1.13    GigabitEthernet

0/0/1

  192.168.1.128/27  Static  60   0           D   0.0.0.0         NULL0

Static routing table status : <Inactive>

         Destinations : 2        Routes : 2

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  61   0          R    192.168.1.22    GigabitEthernet

4/0/0

    192.168.1.0/30  Static  60   0          R    192.168.1.0     GigabitEthernet

0/0/0

[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

R5
配置nat转换以及端口映射:

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

<r5>sys

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

[r5]acl 2000

[r5-acl-basic-2000]rule p   

[r5-acl-basic-2000]rule permit s

[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[r5-acl-basic-2000]q

[r5]int g 0/0/1

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

[r5-GigabitEthernet0/0/1]q

[r5]ping 1.0.0.6

  PING 1.0.0.6: 56  data bytes, press CTRL_C to break

    Reply from 1.0.0.6: bytes=56 Sequence=1 ttl=255 time=40 ms

    Reply from 1.0.0.6: bytes=56 Sequence=2 ttl=255 time=30 ms

    Reply from 1.0.0.6: bytes=56 Sequence=3 ttl=255 time=20 ms

    Reply from 1.0.0.6: bytes=56 Sequence=4 ttl=255 time=30 ms

    Reply from 1.0.0.6: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 1.0.0.6 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 20/30/40 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

<r5>sys

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

[r5]int g 0/0/1

[r5-GigabitEthernet0/0/1]na     

[r5-GigabitEthernet0/0/1]nat s  

[r5-GigabitEthernet0/0/1]nat server g      

[r5-GigabitEthernet0/0/1]nat server global p   

[r5-GigabitEthernet0/0/1]nat server p      

[r5-GigabitEthernet0/0/1]nat server protocol tcp g 

[r5-GigabitEthernet0/0/1]nat server protocol tcp global cu   

[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 in   

[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins

ide 192.168.1.5 23

Warning:The port 23 is well-known port. If you continue it may cause function fa

ilure.

Are you sure to continue?[Y/N]:y

  Info: The NAT in the network has existed.

  Already existing configuration will be covered with current configure. [Y/N]:

y

[r5-GigabitEthernet0/0/1]dis th

[V200R003C00]

#

interface GigabitEthernet0/0/1

 ip address 12.0.0.5 255.255.255.0

 nat server protocol tcp global current-interface telnet inside 192.168.1.5 teln

et

 nat outbound 2000

#

return

[r5-GigabitEthernet0/0/1]

  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>sys

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

[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>sys

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

[r5]ip route-static 192.168.1.128 27 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.12 30 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.96 27 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.4 30 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.32 27 192.168.1.21 pre 61

[r5]ip route-static 192.168.1.0 30 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.64 27 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]ip route-static 192.168.1.8 30 192.168.1.21 pre 61

Info: Succeeded in modifying route.

[r5]dis ip rou 

[r5]dis ip routing-table pr   

[r5]dis ip routing-table protocol st    

[r5]dis ip routing-table protocol static

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Public routing table : Static

         Destinations : 10       Routes : 18       Configured Routes : 18

Static routing table status : <Active>

         Destinations : 10       Routes : 11

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   12.0.0.6        GigabitEthernet

0/0/1

    192.68.1.32/27  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

                    Static  60   0          RD   192.168.1.21    GigabitEthernet

0/0/2

    192.168.1.0/30  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

    192.168.1.4/30  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

    192.168.1.8/30  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

   192.168.1.12/30  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

   192.168.1.32/27  Static  61   0          RD   192.168.1.21    GigabitEthernet

0/0/2

   192.168.1.64/27  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

   192.168.1.96/27  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

  192.168.1.128/27  Static  60   0          RD   192.168.1.17    GigabitEthernet

0/0/0

Static routing table status : <Inactive>

         Destinations : 7        Routes : 7

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

    192.168.1.0/30  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

    192.168.1.4/30  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

    192.168.1.8/30  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

   192.168.1.12/30  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

   192.168.1.64/27  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

   192.168.1.96/27  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

  192.168.1.128/27  Static  61   0          R    192.168.1.21    GigabitEthernet

0/0/2

[r5]int g 0/0/0

[r5-GigabitEthernet0/0/0]sh

[r5-GigabitEthernet0/0/0]shutdown

Mar 18 2024 01:45:43-08:00 r5 %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEthern

et0/0/0 has turned into DOWN state.

[r5-GigabitEthernet0/0/0]

[r5-GigabitEthernet0/0/0]

Mar 18 2024 01:45:43-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the DOWN state.

[r5-GigabitEthernet0/0/0]undo sh    

[r5-GigabitEthernet0/0/0]undo shutdown

[r5-GigabitEthernet0/0/0]

Mar 18 2024 01:46:40-08:00 r5 %%01IFPDT/4/IF_STATE(l)[2]:Interface GigabitEthern

et0/0/0 has turned into UP state.

[r5-GigabitEthernet0/0/0]

Mar 18 2024 01:46:40-08:00 r5 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP

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

[r5-GigabitEthernet0/0/0]

[r5-GigabitEthernet0/0/0]q

[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

R6
ip 配置:

The device is running!

<Huawei>

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

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

<Huawei>sys

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

[Huawei]sys r6

[r6]int g 0/0/0

[r6-GigabitEthernet0/0/0]ip add 12.0.0.6 24

[r6-GigabitEthernet0/0/0]

Mar 17 2024 23:19:18-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]q

[r6]int l0

[r6-LoopBack0]ip add 1.0.0.6 24

[r6-LoopBack0]q

[r6]dis ip int b

*down: administratively down

^down: standby

(l): loopback

(s): spoofing

The number of interface that is UP in Physical is 3

The number of interface that is DOWN in Physical is 2

The number of interface that is UP in Protocol is 3

The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol 

GigabitEthernet0/0/0              12.0.0.6/24          up         up       

GigabitEthernet0/0/1              unassigned           down       down     

GigabitEthernet0/0/2              unassigned           down       down     

LoopBack0                         1.0.0.6/24           up         up(s)    

NULL0                             unassigned           up         up(s)    

[r6]

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

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

4.验证

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

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

<r6>telnet 12.0.0.5

  Press CTRL_] to quit telnet mode

  Trying 12.0.0.5 ...

  Error: Can't connect to the remote host

<r6>

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

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

<r6>telnet 12.0.0.5

  Press CTRL_] to quit telnet mode

  Trying 12.0.0.5 ...

  Connected to 12.0.0.5 ...

Login authentication

Username:xiaomi

Password:

<r1>

<r1>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值