需求分析
省厅。地市到县区有路由
而县区到地市和省厅没有路由
从而实现整个网络的互通
 

 
R1 在接口上配置 ip 地址,并使用 loopback 模拟网段 1.0
[Router]dis cu
 Now create configuration...
 Current configuration
 !
    version 1.74
    local-user user1 service-type administrator password simple 123
    undo pos-server addr-switch
    firewall enable
    aaa-enable
    aaa accounting-scheme optional
 !
 interface Aux0
    async mode flow
    link-protocol ppp
 !
 interface Ethernet0
    ip address 192.168.100.4 255.255.255.0
 !
  interface Ethernet1
    ip address 192.168.4.1 255.255.255.0
 !
 interface Serial0
    link-protocol ppp
 !
 interface Serial1
    link-protocol ppp                    
 !                                       
 interface Async0
    physical-mode async                  
    async mode protocol                  
    link-protocol ppp
 !
 interface Async1
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async2
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async3
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async4
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async5
    physical-mode async                  
    async mode protocol
    link-protocol ppp
 !
 interface Async6
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async7
    physical-mode async
    async mode protocol
     link-protocol ppp
 !
 interface Async8
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async9
    physical-mode async
    async mode protocol
    link-protocol ppp
 !                                       
 interface Async10
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async11
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async12
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async13
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async14
    physical-mode async
    async mode protocol                  
    link-protocol ppp
  !
 interface Async15
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
  interface LoopBack1
    ip address 192.168.1.1 255.255.255.0
 !
 return
 
[Router]
[Router]dis ip rou
Routing Tables:
 Destination/Mask Proto    Pref     Metric     Nexthop    Interface
      127.0.0.0/8   Direct    0         0        127.0.0.1 LoopBack0          
      127.0.0.1/32 Direct    0         0        127.0.0.1 LoopBack0          
    192.168.1.0/24 Direct    0         0      192.168.1.1 LoopBack1          
    192.168.1.1/32 Direct    0         0        127.0.0.1 LoopBack0          
    192.168.4.0/24 Direct    0         0      192.168.4.1 Ethernet1          
    192.168.4.1/32 Direct    0         0        127.0.0.1 LoopBack0          
 192.168.100.0/24 Direct     0         0    192.168.100.4 Ethernet0          
 192.168.100.4/32 Direct     0         0        127.0.0.1 LoopBack0          
[Router]
R2  在接口上配置 ip 地址,并使用 loopback 模拟网段 2.0
[R6]dis cu
 Now create configuration...
 Current configuration
 !
    version 1.74
    local-user user1 service-type administrator password simple 123
    sysname R6
    undo pos-server addr-switch
    firewall enable
    aaa-enable
    aaa accounting-scheme optional
 !
 interface Aux0
    async mode flow
    link-protocol ppp
 !
 interface Ethernet0
    ip address 192.168.100.6 255.255.255.0
 !
  interface Ethernet1
    ip address 192.168.5.1 255.255.255.0
 !
 interface Serial0
    link-protocol ppp
 !                                        
 interface Serial1
    link-protocol ppp                    
 !                                       
 interface Async0
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async1
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async2
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async3
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async4
    physical-mode async
    async mode protocol                  
    link-protocol ppp                    
 !
 interface Async5
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async6
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
 interface Async7
    physical-mode async
    async mode protocol
    link-protocol ppp
 !
   interface LoopBack1
    ip address 192.168.2.1 255.255.255.0
 !
 return
 
[R6]
[R6]
[R6]dis ip rou
Routing Tables:
 Destination/Mask Proto    Pref     Metric     Nexthop    Interface
      127.0.0.0/8   Direct    0         0        127.0.0.1 LoopBack0          
      127.0.0.1/32 Direct    0         0        127.0.0.1 LoopBack0          
    192.168.2.0/24 Direct    0         0      192.168.2.1 LoopBack1          
    192.168.2.1/32 Direct    0         0        127.0.0.1 LoopBack0          
    192.168.5.0/24 Direct    0         0      192.168.5.1 Ethernet1           
    192.168.5.1/32 Direct    0         0        127.0.0.1 LoopBack0           
 192.168.100.0/24 Direct     0         0    192.168.100.6 Ethernet0          
 192.168.100.6/32 Direct     0         0        127.0.0.1 LoopBack0          
[R6]
[F2]dis cu 在接口上配置 ip 地址,并制定 trust 区域
配置 acl 规则,应用在相应的接口上
并配置默认路由
#
 sysname F2
#
 firewall packet-filter enable
 firewall packet-filter default permit
#
 insulate
#
 firewall statistic system enable
#
radius scheme system
 server-type extended
#
domain system
#
local-user admin
 password cipher .]@USE=B,53Q=^Q`MAF4<1!!
 service-type telnet terminal
 level 3
 service-type ftp
local-user user1
 password simple 123
 service-type telnet
 level 3
#                                         
acl number 3000
 rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
acl number 3001
 rule 0 permit ip source 192.168.3.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
#
interface Aux0
 async mode flow
#
interface Ethernet0/0
 ip address 192.168.100.42 255.255.255.0
#
interface Ethernet0/1
 ip address 192.168.4.2 255.255.255.0
 nat outbound 3000
#
interface Ethernet0/2
 ip address 192.168.5.2 255.255.255.0
 nat outbound 3001
#
interface Ethernet0/3
 ip address 192.168.3.1 255.255.255.0
#
interface Ethernet0/4
#                                         
interface Encrypt1/0
#
interface NULL0
#
firewall zone local
 set priority 100
#
firewall zone trust
 add interface Ethernet0/0
 add interface Ethernet0/3
 set priority 85
#
firewall zone untrust
 add interface Ethernet0/1
 add interface Ethernet0/2
 set priority 5
#
firewall zone DMZ
 set priority 50
#
firewall interzone local trust
#
firewall interzone local untrust
#                                         
firewall interzone local DMZ
#
firewall interzone trust untrust
#
firewall interzone trust DMZ
#
firewall interzone DMZ untrust
#
 FTP server enable
#
 ip route-static 192.168.1.0 255.255.255.0 192.168.4.1 preference 60
 ip route-static 192.168.2.0 255.255.255.0 192.168.5.1 preference 60
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
 authentication-mode scheme
#
return
[F2] dis ip rou   
[F2] dis ip routing-table
 Routing Table: public net
Destination/Mask    Protocol Pre Cost        Nexthop         Interface
127.0.0.0/8         DIRECT   0    0           127.0.0.1       InLoopBack0
127.0.0.1/32        DIRECT   0    0           127.0.0.1       InLoopBack0
192.168.1.0/24     STATIC   60   0           192.168.4.1     Ethernet0/1
192.168.2.0/24     STATIC   60   0           192.168.5.1     Ethernet0/2
192.168.4.0/24     DIRECT   0    0           192.168.4.2     Ethernet0/1
192.168.4.2/32     DIRECT   0    0           127.0.0.1       InLoopBack0
192.168.5.0/24     DIRECT   0    0           192.168.5.2     Ethernet0/2
192.168.5.2/32     DIRECT   0    0           127.0.0.1       InLoopBack0
192.168.100.0/24    DIRECT   0    0           192.168.100.42 Ethernet0/0
192.168.100.42/32 DIRECT    0    0           127.0.0.1       InLoopBack0
 
测试
[F2]ping 192.168.1.1
 PING 192.168.1.1: 56 data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=12 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=6 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=4 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=4 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=5 ms
 
 --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/6/12 ms
 
[F2]ping 192.168.2.1
 PING 192.168.2.1: 56 data bytes, press CTRL_C to break
    Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time=8 ms
    Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time=4 ms
    Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time=4 ms
    Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time=5 ms
    Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=255 time=7 ms
 
 --- 192.168.2.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/5/8 ms