华为eNSP——综合实验(公司内部网络访问外网的模拟)

一、实验环境

5台路由器,7台路交换机,1台服务器,7台电脑pc 连接成如下拓扑图。
绿色部分为互联网(外网),黄色部分为公司网络(内网),方形蓝色方形部分为OSPF区域,圆形蓝色椭圆形域为RIP区域。
在这里插入图片描述

二、实验目的

1. 实验目的1

用PC1、PC2、PC3、PC4、PC5、PC6去ping PC7,查看连通性。

2. 实验目的2

抓包查看内网地址在访问外网地址被转换成外网地址进行通信的过程。

三、实验过程

R1

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 202.2.2.1 24
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 202.2.12.1 24
[R1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R1-GigabitEthernet0/0/1]q
[R1]ip route-static 0.0.0.0 0.0.0.0 202.2.12.2

R2

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int g6/0/0
[R2-GigabitEthernet6/0/0]ip add 202.2.12.2 24
[R2-GigabitEthernet6/0/0]un sh
Info: Interface GigabitEthernet6/0/0 is not shutdown.
[R2-GigabitEthernet6/0/0]q
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.113.2 24
[R2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.1.111.1 24
[R2-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 10.1.112.1 24
[R2-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R2-GigabitEthernet0/0/2]int loo 0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]q
[R2]ospf 110
[R2-ospf-110]a 0
[R2-ospf-110-area-0.0.0.0]network 10.1.113.0 0.0.0.255
[R2-ospf-110-area-0.0.0.0]network 10.1.111.0 0.0.0.255
[R2-ospf-110-area-0.0.0.0]network 10.1.112.0 0.0.0.255
[R2-ospf-110-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-110-area-0.0.0.0]q
[R2-ospf-110]q
[R2]ip route-static 8.8.8.8 32 202.2.12.1
[R2]ospf 110
[R2-ospf-110]default-route-advertise 
[R2-ospf-110]q
[R2]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 31       Routes : 32       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   202.2.12.1      GigabitEthernet
6/0/0
        2.2.2.2/32  Direct  0    0           D   127.0.0.1       LoopBack0
        3.3.3.3/32  OSPF    10   1           D   10.1.113.3      GigabitEthernet
0/0/0
      10.1.11.0/24  OSPF    10   2           D   10.1.111.12     GigabitEthernet
0/0/1
      10.1.12.0/24  OSPF    10   2           D   10.1.111.12     GigabitEthernet
0/0/1
      10.1.13.0/24  OSPF    10   2           D   10.1.112.12     GigabitEthernet
0/0/2
      10.1.14.0/24  OSPF    10   2           D   10.1.112.12     GigabitEthernet
0/0/2
      10.1.21.0/24  O_ASE   150  6           D   10.1.113.3      GigabitEthernet
0/0/0
      10.1.22.0/24  O_ASE   150  6           D   10.1.113.3      GigabitEthernet
0/0/0
     10.1.100.0/24  O_ASE   150  6           D   10.1.113.3      GigabitEthernet
0/0/0
     10.1.111.0/24  Direct  0    0           D   10.1.111.1      GigabitEthernet
0/0/1
     10.1.111.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   10.1.111.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     10.1.112.0/24  Direct  0    0           D   10.1.112.1      GigabitEthernet
0/0/2
     10.1.112.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
   10.1.112.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
     10.1.113.0/24  Direct  0    0           D   10.1.113.2      GigabitEthernet
0/0/0
     10.1.113.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   10.1.113.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     10.1.122.0/24  OSPF    10   2           D   10.1.111.12     GigabitEthernet
0/0/1
                    OSPF    10   2           D   10.1.112.12     GigabitEthernet
0/0/2
     10.1.134.0/24  O_ASE   150  6           D   10.1.113.3      GigabitEthernet
0/0/0
     10.1.135.0/24  O_ASE   150  6           D   10.1.113.3      GigabitEthernet
0/0/0
    11.11.11.11/32  OSPF    10   1           D   10.1.111.12     GigabitEthernet
0/0/1
    22.22.22.22/32  OSPF    10   1           D   10.1.112.12     GigabitEthernet
0/0/2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
     202.2.12.0/24  Direct  0    0           D   202.2.12.2      GigabitEthernet
6/0/0
     202.2.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
6/0/0
   202.2.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
6/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[R2]acl 3000
[R2-acl-adv-3000]rule permit ip source 10.1.100.0 0.0.0.255
[R2-acl-adv-3000]int g6/0/0
[R2-GigabitEthernet6/0/0]nat outbound 3000
[R2-GigabitEthernet6/0/0]q
[R2]nat static protocol tcp global 8.8.8.8 www inside 10.1.100.100 www

R3

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 10.1.113.3 24
[R3-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0]q
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 10.1.134.3 24
[R3-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R3-GigabitEthernet0/0/1]int loo 0
[R3-LoopBack0]ip add 3.3.3.3 32
[R3-LoopBack0]q
[R3]rip 1
[R3-rip-1]v 2
[R3-rip-1]un summary 	
[R3-rip-1]network 10.0.0.0	
[R3-rip-1]network 3.0.0.0
[R3-rip-1]q
[R3]rip 1
[R3-rip-1]v 2
[R3-rip-1]undo network 3.0.0.0
[R3-rip-1]q
[R3]ospf 110 router-id 3.3.3.3
[R3-ospf-110]a 0
[R3-ospf-110-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-110-area-0.0.0.0]network 10.1.113.0 0.0.0.255
[R3-ospf-110-area-0.0.0.0]q
[R3-ospf-110]q
[R3]ospf 110
[R3-ospf-110]import-route rip 1 type 1 cost 5
[R3-ospf-110]q
[R3]rip 1
[R3-rip-1]import-route ospf 110 cost 5
[R3-rip-1]q
[R3]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 15       Routes : 15       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.3/32  Direct  0    0           D   127.0.0.1       LoopBack0
      10.1.21.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
      10.1.22.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.100.0/24  RIP     100  2           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.113.0/24  Direct  0    0           D   10.1.113.3      GigabitEthernet
0/0/0
     10.1.113.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   10.1.113.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     10.1.134.0/24  Direct  0    0           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.134.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   10.1.134.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     10.1.135.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[R3]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 26       Routes : 26       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   O_ASE   150  1           D   10.1.113.2      GigabitEthernet
0/0/0
        2.2.2.2/32  OSPF    10   1           D   10.1.113.2      GigabitEthernet
0/0/0
        3.3.3.3/32  Direct  0    0           D   127.0.0.1       LoopBack0
      10.1.11.0/24  OSPF    10   3           D   10.1.113.2      GigabitEthernet
0/0/0
      10.1.12.0/24  OSPF    10   3           D   10.1.113.2      GigabitEthernet
0/0/0
      10.1.13.0/24  OSPF    10   3           D   10.1.113.2      GigabitEthernet
0/0/0
      10.1.14.0/24  OSPF    10   3           D   10.1.113.2      GigabitEthernet
0/0/0
      10.1.21.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
      10.1.22.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.100.0/24  RIP     100  2           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.111.0/24  OSPF    10   2           D   10.1.113.2      GigabitEthernet
0/0/0
     10.1.112.0/24  OSPF    10   2           D   10.1.113.2      GigabitEthernet
0/0/0
     10.1.113.0/24  Direct  0    0           D   10.1.113.3      GigabitEthernet
0/0/0
     10.1.113.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   10.1.113.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     10.1.122.0/24  OSPF    10   3           D   10.1.113.2      GigabitEthernet
0/0/0
     10.1.134.0/24  Direct  0    0           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.134.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   10.1.134.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     10.1.135.0/24  RIP     100  1           D   10.1.134.4      GigabitEthernet
0/0/1
    11.11.11.11/32  OSPF    10   2           D   10.1.113.2      GigabitEthernet
0/0/0
    22.22.22.22/32  OSPF    10   2           D   10.1.113.2      GigabitEthernet
0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[R3]rip 1
[R3-rip-1]default-route originate 
[R3-rip-1]q

R4

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R4
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 10.1.134.4 24
[R4-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 10.1.135.4 24
[R4-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R4-GigabitEthernet0/0/2]q
[R4]v b 21 22
Info: This operation may take a few seconds. Please wait for a moment...done.
[R4]int g0/0/0.21
[R4-GigabitEthernet0/0/0.21]d t v 21
[R4-GigabitEthernet0/0/0.21]ip add 10.1.21.1 24
[R4-GigabitEthernet0/0/0.21]un sh
Info: Interface GigabitEthernet0/0/0.21 is not shutdown.
[R4-GigabitEthernet0/0/0.21]a b e
[R4-GigabitEthernet0/0/0.21]q
[R4]int g0/0/0.22
[R4-GigabitEthernet0/0/0.22]d t v 22
[R4-GigabitEthernet0/0/0.22]ip add 10.1.22.1 24
[R4-GigabitEthernet0/0/0.22]un sh
Info: Interface GigabitEthernet0/0/0.22 is not shutdown.
[R4-GigabitEthernet0/0/0.22]a b e
[R4-GigabitEthernet0/0/0.22]q
[R4]rip 1
[R4-rip-1]v 2
[R4-rip-1]un summary 
[R4-rip-1]network 10.0.0.0
[R4-rip-1]q
[R4]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 17       Routes : 17       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.1.21.0/24  Direct  0    0           D   10.1.21.1       GigabitEthernet
0/0/0.21
      10.1.21.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.21
    10.1.21.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.21
      10.1.22.0/24  Direct  0    0           D   10.1.22.1       GigabitEthernet
0/0/0.22
      10.1.22.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.22
    10.1.22.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.22
     10.1.100.0/24  RIP     100  1           D   10.1.135.5      GigabitEthernet
0/0/2
     10.1.134.0/24  Direct  0    0           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.134.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   10.1.134.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     10.1.135.0/24  Direct  0    0           D   10.1.135.4      GigabitEthernet
0/0/2
     10.1.135.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
   10.1.135.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[R4]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 30       Routes : 30       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  1           D   10.1.134.3      GigabitEthernet
0/0/1
        2.2.2.2/32  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
        3.3.3.3/32  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
      10.1.11.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
      10.1.12.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
      10.1.13.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
      10.1.14.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
      10.1.21.0/24  Direct  0    0           D   10.1.21.1       GigabitEthernet
0/0/0.21
      10.1.21.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.21
    10.1.21.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.21
      10.1.22.0/24  Direct  0    0           D   10.1.22.1       GigabitEthernet
0/0/0.22
      10.1.22.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.22
    10.1.22.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0.22
     10.1.100.0/24  RIP     100  1           D   10.1.135.5      GigabitEthernet
0/0/2
     10.1.111.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.112.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.113.0/24  RIP     100  1           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.122.0/24  RIP     100  6           D   10.1.134.3      GigabitEthernet
0/0/1
     10.1.134.0/24  Direct  0    0           D   10.1.134.4      GigabitEthernet
0/0/1
     10.1.134.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
   10.1.134.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
     10.1.135.0/24  Direct  0    0           D   10.1.135.4      GigabitEthernet
0/0/2
     10.1.135.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
   10.1.135.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2

R5

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.	
[Huawei]sysname R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 10.1.100.1 24
[R5-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R5-GigabitEthernet0/0/0]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add 10.1.135.5 24
[R5-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R5-GigabitEthernet0/0/2]q
[R5]rip 1
[R5-rip-1]v 2
[R5-rip-1]un summary 	
[R5-rip-1]network 10.0.0.0
[R5-rip-1]q
[R5]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 15       Routes : 15       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        3.3.3.3/32  RIP     100  7           D   10.1.135.4      GigabitEthernet
0/0/2
      10.1.21.0/24  RIP     100  1           D   10.1.135.4      GigabitEthernet
0/0/2
      10.1.22.0/24  RIP     100  1           D   10.1.135.4      GigabitEthernet
0/0/2
     10.1.100.0/24  Direct  0    0           D   10.1.100.1      GigabitEthernet
0/0/0
     10.1.100.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
   10.1.100.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
     10.1.113.0/24  RIP     100  2           D   10.1.135.4      GigabitEthernet
0/0/2
     10.1.134.0/24  RIP     100  1           D   10.1.135.4      GigabitEthernet
0/0/2
     10.1.135.0/24  Direct  0    0           D   10.1.135.5      GigabitEthernet
0/0/2
     10.1.135.5/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
   10.1.135.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

RSW1

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname RSW1
[RSW1]v b 11 12 1000 1001
Info: This operation may take a few seconds. Please wait for a moment...done.
[RSW1]int g0/0/21
[RSW1-GigabitEthernet0/0/21]p l a
[RSW1-GigabitEthernet0/0/21]p d v 11
[RSW1-GigabitEthernet0/0/21]un sh
Info: Interface GigabitEthernet0/0/21 is not shutdown.
[RSW1-GigabitEthernet0/0/21]int g0/0/22
[RSW1-GigabitEthernet0/0/22]p l a
[RSW1-GigabitEthernet0/0/22]p d v 12
[RSW1-GigabitEthernet0/0/22]un sh
Info: Interface GigabitEthernet0/0/22 is not shutdown.
[RSW1-GigabitEthernet0/0/22]q
[RSW1]int Eth-Trunk 1	
[RSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/11 to 0/0/12
Info: This operation may take a few seconds. Please wait for a moment...done.
[RSW1-Eth-Trunk1]p l a
[RSW1-Eth-Trunk1]p d v 1000
[RSW1-Eth-Trunk1]un sh
Info: Interface Eth-Trunk1 is not shutdown.
[RSW1-Eth-Trunk1]q
[RSW1]int Vlanif 11
[RSW1-Vlanif11]ip add 10.1.11.1 24
[RSW1-Vlanif11]q
[RSW1]int Vlanif 12
[RSW1-Vlanif12]ip add 10.1.12.1 24
[RSW1-Vlanif12]q
[RSW1]int Vlanif 1000
[RSW1-Vlanif1000]ip add 10.1.122.11 24
[RSW1-Vlanif1000]q	
[RSW1]int Vlanif 1001
[RSW1-Vlanif1001]ip add 10.1.111.12 24]
[RSW1-Vlanif1001]q
[RSW1]int loo 0
[RSW1-LoopBack0]ip add 11.11.11.11 32
[RSW1-LoopBack0]q
[RSW1]ospf 110 router-id 11.11.11.11
[RSW1-ospf-110]a 0
[RSW1-ospf-110-area-0.0.0.0]network 10.1.11.0 0.0.0.255
[RSW1-ospf-110-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[RSW1-ospf-110-area-0.0.0.0]network 10.1.122.0 0.0.0.255
[RSW1-ospf-110-area-0.0.0.0]network 10.1.111.0 0.0.0.255
[RSW1-ospf-110-area-0.0.0.0]network 11.11.11.11 0.0.0.0
[RSW1-ospf-110-area-0.0.0.0]q
[RSW1-ospf-110]q
[RSW1]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 9        Routes : 9        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.1.11.0/24  Direct  0    0           D   10.1.11.1       Vlanif11
      10.1.11.1/32  Direct  0    0           D   127.0.0.1       Vlanif11
      10.1.12.0/24  Direct  0    0           D   10.1.12.1       Vlanif12
      10.1.12.1/32  Direct  0    0           D   127.0.0.1       Vlanif12
     10.1.122.0/24  Direct  0    0           D   10.1.122.11     Vlanif1000
    10.1.122.11/32  Direct  0    0           D   127.0.0.1       Vlanif1000
    11.11.11.11/32  Direct  0    0           D   127.0.0.1       LoopBack0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[RSW1]int g0/0/1
[RSW1-GigabitEthernet0/0/1]p l a
[RSW1-GigabitEthernet0/0/1]p d v 1001
[RSW1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[RSW1-GigabitEthernet0/0/1]q
[RSW1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 18       Routes : 19       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   O_ASE   150  1           D   10.1.111.1      Vlanif1001
        2.2.2.2/32  OSPF    10   1           D   10.1.111.1      Vlanif1001
      10.1.11.0/24  Direct  0    0           D   10.1.11.1       Vlanif11
      10.1.11.1/32  Direct  0    0           D   127.0.0.1       Vlanif11
      10.1.12.0/24  Direct  0    0           D   10.1.12.1       Vlanif12
      10.1.12.1/32  Direct  0    0           D   127.0.0.1       Vlanif12
      10.1.13.0/24  OSPF    10   2           D   10.1.122.12     Vlanif1000
      10.1.14.0/24  OSPF    10   2           D   10.1.122.12     Vlanif1000
     10.1.111.0/24  Direct  0    0           D   10.1.111.12     Vlanif1001
    10.1.111.12/32  Direct  0    0           D   127.0.0.1       Vlanif1001
     10.1.112.0/24  OSPF    10   2           D   10.1.111.1      Vlanif1001
                    OSPF    10   2           D   10.1.122.12     Vlanif1000
     10.1.113.0/24  OSPF    10   2           D   10.1.111.1      Vlanif1001
     10.1.122.0/24  Direct  0    0           D   10.1.122.11     Vlanif1000
    10.1.122.11/32  Direct  0    0           D   127.0.0.1       Vlanif1000
    11.11.11.11/32  Direct  0    0           D   127.0.0.1       LoopBack0
    22.22.22.22/32  OSPF    10   1           D   10.1.122.12     Vlanif1000
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

RSW2

<Huawei>u t m
Info: Current terminal monitor is off.	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.	
[Huawei]sysname RSW2
[RSW2]v b 13 14 1000 1002
Info: This operation may take a few seconds. Please wait for a moment...done.
[RSW2]int g0/0/2
[RSW2-GigabitEthernet0/0/2]q
[RSW2]int g0/0/23
[RSW2-GigabitEthernet0/0/23]p l a
[RSW2-GigabitEthernet0/0/23]p d v 13
[RSW2-GigabitEthernet0/0/23]un sh
Info: Interface GigabitEthernet0/0/23 is not shutdown.
[RSW2-GigabitEthernet0/0/23]int g0/0/24
[RSW2-GigabitEthernet0/0/24]p l a
[RSW2-GigabitEthernet0/0/24]p d v 14
[RSW2-GigabitEthernet0/0/24]un sh
Info: Interface GigabitEthernet0/0/24 is not shutdown.
[RSW2-GigabitEthernet0/0/24]q
[RSW2]int Eth-Trunk 1
[RSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/11 to 0/0/12
Info: This operation may take a few seconds. Please wait for a moment...done.
[RSW2-Eth-Trunk1]p l a
[RSW2-Eth-Trunk1]p d v 1000
[RSW2-Eth-Trunk1]un sh
Info: Interface Eth-Trunk1 is not shutdown.
[RSW2-Eth-Trunk1]q
[RSW2]int Vlanif 13
[RSW2-Vlanif13]ip add 10.1.13.1 24
[RSW2-Vlanif13]q
[RSW2]int Vlanif 14
[RSW2-Vlanif14]ip add 10.1.14.1 24
[RSW2-Vlanif14]q
[RSW2]int Vlanif 1000
[RSW2-Vlanif1000]ip add 10.1.122.12 24
[RSW2-Vlanif1000]q	
[RSW2]int Vlanif 1002
[RSW2-Vlanif1002]ip add 10.1.112.12 24
[RSW2-Vlanif1002]q
[RSW2]int loo 0
[RSW2-LoopBack0]ip add 22.22.22.22 32
[RSW2-LoopBack0]q
[RSW2]ospf 110 router-id 22.22.22.22
[RSW2-ospf-110]a 0
[RSW2-ospf-110-area-0.0.0.0]network 10.1.13.0 0.0.0.255
[RSW2-ospf-110-area-0.0.0.0]network 10.1.14.0 0.0.0.255
[RSW2-ospf-110-area-0.0.0.0]network 10.1.122.0 0.0.0.255
[RSW2-ospf-110-area-0.0.0.0]network 10.1.112.0 0.0.0.255
[RSW2-ospf-110-area-0.0.0.0]network 22.22.22.22 0.0.0.0
[RSW2-ospf-110-area-0.0.0.0]q
[RSW2-ospf-110]q
[RSW2]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 12       Routes : 12       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.1.11.0/24  OSPF    10   2           D   10.1.122.11     Vlanif1000
      10.1.12.0/24  OSPF    10   2           D   10.1.122.11     Vlanif1000
      10.1.13.0/24  Direct  0    0           D   10.1.13.1       Vlanif13
      10.1.13.1/32  Direct  0    0           D   127.0.0.1       Vlanif13
      10.1.14.0/24  Direct  0    0           D   10.1.14.1       Vlanif14
      10.1.14.1/32  Direct  0    0           D   127.0.0.1       Vlanif14
     10.1.122.0/24  Direct  0    0           D   10.1.122.12     Vlanif1000
    10.1.122.12/32  Direct  0    0           D   127.0.0.1       Vlanif1000
    11.11.11.11/32  OSPF    10   1           D   10.1.122.11     Vlanif1000
    22.22.22.22/32  Direct  0    0           D   127.0.0.1       LoopBack0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[RSW2]int g0/0/2
[RSW2-GigabitEthernet0/0/2]p l a
[RSW2-GigabitEthernet0/0/2]p d v 1002
[RSW2-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[RSW2-GigabitEthernet0/0/2]q
[RSW2]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 18       Routes : 19       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   O_ASE   150  1           D   10.1.112.1      Vlanif1002
        2.2.2.2/32  OSPF    10   1           D   10.1.112.1      Vlanif1002
      10.1.11.0/24  OSPF    10   2           D   10.1.122.11     Vlanif1000
      10.1.12.0/24  OSPF    10   2           D   10.1.122.11     Vlanif1000
      10.1.13.0/24  Direct  0    0           D   10.1.13.1       Vlanif13
      10.1.13.1/32  Direct  0    0           D   127.0.0.1       Vlanif13
      10.1.14.0/24  Direct  0    0           D   10.1.14.1       Vlanif14
      10.1.14.1/32  Direct  0    0           D   127.0.0.1       Vlanif14
     10.1.111.0/24  OSPF    10   2           D   10.1.122.11     Vlanif1000
                    OSPF    10   2           D   10.1.112.1      Vlanif1002
     10.1.112.0/24  Direct  0    0           D   10.1.112.12     Vlanif1002
    10.1.112.12/32  Direct  0    0           D   127.0.0.1       Vlanif1002
     10.1.113.0/24  OSPF    10   2           D   10.1.112.1      Vlanif1002
     10.1.122.0/24  Direct  0    0           D   10.1.122.12     Vlanif1000
    10.1.122.12/32  Direct  0    0           D   127.0.0.1       Vlanif1000
    11.11.11.11/32  OSPF    10   1           D   10.1.122.11     Vlanif1000
    22.22.22.22/32  Direct  0    0           D   127.0.0.1       LoopBack0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

SW7

<Huawei>u t m
Info: Current terminal monitor is off.	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW7
[SW7]int e0/0/1
[SW7-Ethernet0/0/1]p l a
[SW7-Ethernet0/0/1]q
[SW7]v b 21 22
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW7]int e0/0/1
[SW7-Ethernet0/0/1]p l a
[SW7-Ethernet0/0/1]p d v 21
[SW7-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW7-Ethernet0/0/1]int e0/0/2
[SW7-Ethernet0/0/2]p l a
[SW7-Ethernet0/0/2]p d v 22
[SW7-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW7-Ethernet0/0/2]int e0/0/10
[SW7-Ethernet0/0/10]p l t 
[SW7-Ethernet0/0/10]p t a v 21 22
[SW7-Ethernet0/0/10]un sh
Info: Interface Ethernet0/0/10 is not shutdown.
[SW7-Ethernet0/0/10]q
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值