RIP综合实验

RIP综合实验_第1张图片

配置IP 

RI

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.0.0.1 24
Apr  6 2022 13:18:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]q
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 14.0.0.1 24
Apr  6 2022 13:19:00-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]int l0 
[r1-LoopBack0]ip address 1.1.1.1 24
[r1-LoopBack0]q
[r1]int l1
[r1-LoopBack1]ip address 172.16.1.1 24
[r1-LoopBack1]int l2  
[r1-LoopBack2]ip address 172.16.2.1 24
[r1-LoopBack2]int l3 
[r1-LoopBack3]ip address 172.16.3.1 24
[r1-LoopBack3]

R2

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.0.0.2 24
Apr  6 2022 13:24:35-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 address 23.0.0.1 24
Apr  6 2022 13:24:59-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]int l0
[r2-LoopBack0]ip address 2.2.2.2 24
[r2-LoopBack0]q
[r2]

R3

[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip address 23.0.0.2 24
Apr  6 2022 13:27:02-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 address 34.0.0.1 24
Apr  6 2022 13:27:27-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]q
[r3]int l0
[r3-LoopBack0]ip address 3.3.3.3 24
[r3-LoopBack0]

R4

[r4]int g 0/0/0	
[r4-GigabitEthernet0/0/0]ip address 14.0.0.2 24
Apr  6 2022 13:29:23-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 address 34.0.0.2 24
Apr  6 2022 13:29:48-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 address 45.0.0.1 24
[r4-GigabitEthernet0/0/2]
Apr  6 2022 13:30:24-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 address 46.0.0.1 24
[r4-GigabitEthernet4/0/0]
Apr  6 2022 13:30:51-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]int l0
[r4-LoopBack0]ip address 4.4.4.4 24
[r4-LoopBack0]

R5 

[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip address 45.0.0.2 24
[r5-GigabitEthernet0/0/0]
Apr  6 2022 13:33:42-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 l0
[r5-LoopBack0]ip address 5.5.5.5 24
[r5-LoopBack0]

 R6

[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]ip address 46.0.0.2 24
[r6-GigabitEthernet0/0/0]
Apr  6 2022 13:35:12-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]int g 0/0/1	
[r6-GigabitEthernet0/0/1]ip address 67.0.0.1 24
Apr  6 2022 13:35:32-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r6-GigabitEthernet0/0/1]int l0
[r6-LoopBack0]ip address 6.6.6.6 24
[r6-LoopBack0]

R7

[r7]int g 0/0/0
[r7-GigabitEthernet0/0/0]ip address 67.0.0.2 24
[r7-GigabitEthernet0/0/0]
Apr  6 2022 13:38:24-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip address 7.7.7.7 24
[r7-LoopBack0]

路由配置

R1

[r1]rip
[r1-rip-1]v 2	
[r1-rip-1]network 12.0.0.0	
[r1-rip-1]network 14.0.0.0
[r1-rip-1]network 1.0.0.0	
[r1-rip-1]network 172.16.0.0
[r1-rip-1]

R2

[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 23.0.0.0	
[r2-rip-1]network 2.0.0.0
[r2-rip-1]

R3

[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 23.0.0.0	
[r3-rip-1]network 34.0.0.0	
[r3-rip-1]network 3.0.0.0
[r3-rip-1]

R4

[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 34.0.0.0
[r4-rip-1]network 14.0.0.0
[r4-rip-1]network 45.0.0.0
[r4-rip-1]network 46.0.0.0
[r4-rip-1]network 4.0.0.0
[r4-rip-1]

R5

[r5]rip
[r5-rip-1]v 2
[r5-rip-1]network 45.0.0.0
[r5-rip-1]

R6

[r6]rip
[r6-rip-1]v 1
[r6-rip-1]network 46.0.0.0	
[r6-rip-1]network 67.0.0.0
[r6-rip-1]network 6.0.0.0
[r6-rip-1]
[r6]int g 0/0/0
[r6-GigabitEthernet0/0/0]rip version 2
[r6-GigabitEthernet0/0/0]q	
[r6]display ip routing-table protocol rip 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 11       Routes : 11       

RIP routing table status : 
         Destinations : 11       Routes : 11

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
        2.2.2.0/24  RIP     100  3           D   46.0.0.1        GigabitEthernet
0/0/0
        3.3.3.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
        4.4.4.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
        7.0.0.0/8   RIP     100  1           D   67.0.0.2        GigabitEthernet
0/0/1
       12.0.0.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
       14.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
       34.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
       45.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
     172.16.0.0/22  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

[r6]

 

R7

[r7]rip
[r7-rip-1]v 1
[r7-rip-1]network 67.0.0.0	
[r7-rip-1]network 7.0.0.0
[r7-rip-1]
display ip routing-table protocol rip 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 12       Routes : 12       

RIP routing table status : 
         Destinations : 12       Routes : 12

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
        2.0.0.0/8   RIP     100  4           D   67.0.0.1        GigabitEthernet
0/0/0
        3.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
        4.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
        6.0.0.0/8   RIP     100  1           D   67.0.0.1        GigabitEthernet
0/0/0
       12.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
       14.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
       34.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       45.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       46.0.0.0/8   RIP     100  1           D   67.0.0.1        GigabitEthernet
0/0/0
     172.16.0.0/16  RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

减少路由条目,进行路由汇总

R1

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.252.0
[r1-GigabitEthernet0/0/0]int g 0/0/1	
[r1-GigabitEthernet0/0/1]rip summary-address 172.16.0.0 255.255.252.0

配空接口防环

[r1]ip route-static 172.16.0.0 22 n 0

创建acl列表进行流量抓取

[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0
[r3-acl-basic-2000]rule permit source 1.1.1.0 0

加大开销值

[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]rip metricin 2000 ?
  INTEGER<1-15>  The value of metric adding to route
[r3-GigabitEthernet0/0/1]rip metricin 2000 2

增加路由传递安全性  在接口上做认证

[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]rip authentication-mode ?
  hmac-sha256  
  md5          MD5 authentication
  simple       Simple authentication
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 ?
  nonstandard  Nonstandard MD5 authentication packet format (IETF)
  usual        Huawei MD5 authentication packet format
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher ?
  STRING<1-16>/<24,32>  Plain text/Encrypted text
[r1-GigabitEthernet0/0/0]rip authentication-mode md5 usual cipher 123456
[r1-GigabitEthernet0/0/0]
[r2]int g 0/0/0	
[r2-GigabitEthernet0/0/0]rip authentication-mode  md5 ?
  nonstandard  Nonstandard MD5 authentication packet format (IETF)
  usual        Huawei MD5 authentication packet format
[r2-GigabitEthernet0/0/0]rip authentication-mode  md5 usual cipher 123456
[r2-GigabitEthernet0/0/0]

实现全网可达 在边界路由器上做配置 让它主动下发一个指向边界路由器的缺省

[r5]rip
[r5-rip-1]default-route originate 

R6和R7不能学习到达R1路由  路由过滤

[r6]acl 2000
[r6-acl-basic-2000]rule deny source 172.16.0.0 0
[r6-acl-basic-2000]rule deny source 1.1.1.0 0	
[r6-acl-basic-2000]rule permit source any 
[r6-acl-basic-2000]q
[r6]rip
[r6-rip-1]filter-policy ?
  INTEGER<2000-2999>  Apply basic ACL
  acl-name            Specify IP Access Control List (ACL) name for filtering   
                      routes
  gateway             Filter routes based on the distributing gateway
  ip-prefix           Specify IP prefix for filtering routes
[r6-rip-1]filter-policy 2000 ?
  export  Specify an export policy
  import  Specify an import policy
[r6-rip-1]filter-policy 2000 import 
[r6-rip-1]q
[r6]display ip routing-table protocol rip 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 10       Routes : 10       

RIP routing table status : 
         Destinations : 10       Routes : 10

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
        2.2.2.0/24  RIP     100  3           D   46.0.0.1        GigabitEthernet
0/0/0
        3.3.3.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
        4.4.4.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
        7.0.0.0/8   RIP     100  1           D   67.0.0.2        GigabitEthernet
0/0/1
       12.0.0.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
       14.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/24  RIP     100  2           D   46.0.0.1        GigabitEthernet
0/0/0
       34.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0
       45.0.0.0/24  RIP     100  1           D   46.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

[r7]display ip routing-table protocol rip 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 11       Routes : 11       

RIP routing table status : 
         Destinations : 11       Routes : 11

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
        2.0.0.0/8   RIP     100  4           D   67.0.0.1        GigabitEthernet
0/0/0
        3.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
        4.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
        6.0.0.0/8   RIP     100  1           D   67.0.0.1        GigabitEthernet
0/0/0
       12.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
       14.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/8   RIP     100  3           D   67.0.0.1        GigabitEthernet
0/0/0
       34.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       45.0.0.0/8   RIP     100  2           D   67.0.0.1        GigabitEthernet
0/0/0
       46.0.0.0/8   RIP     100  1           D   67.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

[r7]

R1telnetR2环回实际上telnetR7上

[r7]aaa
[r7-aaa]local-user admin privilege level 15 password cipher 123456
[r7-aaa]local-user admin service-type telnet
[r7-aaa]q	
[r7]user-interface vty 0 4	
[r7-ui-vty0-4]authentication-mode aaa
[r7-ui-vty0-4]q
[r7]
telnet 7.7.7.7
  Press CTRL_] to quit telnet mode
  Trying 7.7.7.7 ...
  Connected to 7.7.7.7 ...

Login authentication


Username:admin
Password:

端口映射

[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]nat server protocol tcp ?
  global  Specify global information of NAT
[r2-GigabitEthernet0/0/0]nat server protocol tcp global ?
  X.X.X.X            Global IP address of NAT
  current-interface  Address of current interface
  interface          Specify the interface
[r2-GigabitEthernet0/0/0]nat server protocol tcp global interface ?
  loopback  Interface type
[r2-GigabitEthernet0/0/0]nat server protocol tcp global interface loopback 0 23 
inside 7.7.7.7 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
[r2-GigabitEthernet0/0/0]
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 7.0.0.0 0
[r2-acl-basic-2000]q
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]rip metricin 2000 10
[r2-GigabitEthernet0/0/0]q
[r2]display ip routing-table protocol rip 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 12       Routes : 18       

RIP routing table status : 
         Destinations : 12       Routes : 18

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  3           D   23.0.0.2        GigabitEthernet
0/0/1
                    RIP     100  3           D   12.0.0.1        GigabitEthernet
0/0/0
        1.1.1.0/24  RIP     100  1           D   12.0.0.1        GigabitEthernet
0/0/0
        3.3.3.0/24  RIP     100  1           D   23.0.0.2        GigabitEthernet
0/0/1
        4.4.4.0/24  RIP     100  2           D   12.0.0.1        GigabitEthernet
0/0/0
                    RIP     100  2           D   23.0.0.2        GigabitEthernet
0/0/1
        6.6.6.0/24  RIP     100  3           D   12.0.0.1        GigabitEthernet
0/0/0
                    RIP     100  3           D   23.0.0.2        GigabitEthernet
0/0/1
        7.0.0.0/8   RIP     100  4           D   23.0.0.2        GigabitEthernet
0/0/1
       14.0.0.0/24  RIP     100  1           D   12.0.0.1        GigabitEthernet
0/0/0
       34.0.0.0/24  RIP     100  1           D   23.0.0.2        GigabitEthernet
0/0/1
       45.0.0.0/24  RIP     100  2           D   12.0.0.1        GigabitEthernet
0/0/0
                    RIP     100  2           D   23.0.0.2        GigabitEthernet
0/0/1
       46.0.0.0/24  RIP     100  2           D   12.0.0.1        GigabitEthernet
0/0/0
                    RIP     100  2           D   23.0.0.2        GigabitEthernet
0/0/1
       67.0.0.0/24  RIP     100  3           D   12.0.0.1        GigabitEthernet
0/0/0
                    RIP     100  3           D   23.0.0.2        GigabitEthernet
0/0/1
     172.16.0.0/22  RIP     100  1           D   12.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

[r2]
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 12.0.0.0 0
[r4-acl-basic-2000]q
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]rip metricin 2000 10
[r4-GigabitEthernet0/0/0]q
[r4]display ip routing-table protocol rip
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : RIP
         Destinations : 10       Routes : 11       

RIP routing table status : 
         Destinations : 10       Routes : 11

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   RIP     100  1           D   45.0.0.2        GigabitEthernet
0/0/2
        1.1.1.0/24  RIP     100  1           D   14.0.0.1        GigabitEthernet
0/0/0
        2.2.2.0/24  RIP     100  2           D   34.0.0.1        GigabitEthernet
0/0/1
                    RIP     100  2           D   14.0.0.1        GigabitEthernet
0/0/0
        3.3.3.0/24  RIP     100  1           D   34.0.0.1        GigabitEthernet
0/0/1
        6.6.6.0/24  RIP     100  1           D   46.0.0.2        GigabitEthernet
4/0/0
        7.0.0.0/8   RIP     100  2           D   46.0.0.2        GigabitEthernet
4/0/0
       12.0.0.0/24  RIP     100  2          D   14.0.0.1        GigabitEthernet
0/0/0
       23.0.0.0/24  RIP     100  1           D   34.0.0.1        GigabitEthernet
0/0/1
       67.0.0.0/24  RIP     100  1           D   46.0.0.2        GigabitEthernet
4/0/0
     172.16.0.0/22  RIP     100  1           D   14.0.0.1        GigabitEthernet
0/0/0

RIP routing table status : 
         Destinations : 0        Routes : 0

[r4]
telnet 2.2.2.2
  Press CTRL_] to quit telnet mode
  Trying 2.2.2.2 ...
  Connected to 2.2.2.2 ...

Login authentication


Username:admin
Password:
  ----------------------------------------------------------------------------- 
    
  User last login information:     
  -----------------------------------------------------------------------------
  Access Type: Telnet      
  IP-Address : 67.0.0.1     
  Time       : 2022-04-06 15:17:27-08:00     
  -----------------------------------------------------------------------------

 

你可能感兴趣的:(网络)