NAT实验

NAT实验

要求

拓补 

 

IP的配置与路由配置

 

[r1]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/24       up         up        
GigabitEthernet0/0/1              192.168.12.1/24      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
静态路由
 34.0.0.0/24  Static  60   0          RD   192.168.12.2    GigabitEthernet
0/0/1


[r2]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.12.2/24      up         up        
GigabitEthernet0/0/1              192.168.2.1/24       up         up        
GigabitEthernet0/0/2              23.0.0.1/24          up         up        
NULL0                             unassigned           up         up(s)  
静态路由
34.0.0.0/24  Static  60   0          RD   23.0.0.2        GigabitEthernet
0/0/2
 192.168.1.0/24  Static  60   0          RD   192.168.12.1    GigabitEthernet
0/0/0

[r3]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              23.0.0.2/24          up         up        
GigabitEthernet0/0/1              34.0.0.1/24          up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)  

[Telnet]
接口IP
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.2/24       up         up 
缺省路由
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.1     GigabitEthernet
0/0/0


[test 1]
缺省路由
        0.0.0.0/0   Static  60   0          RD   34.0.0.1        GigabitEthernet
0/0/0
接口IP
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              34.0.0.2/24          up         up        

[test 2]
缺省路由
        0.0.0.0/0   Static  60   0          RD   34.0.0.1        GigabitEthernet
0/0/0
接口IP
GigabitEthernet0/0/0              34.0.0.3/24          up         up     

 

配置NAT与ACL

interface GigabitEthernet0/0/2
 ip address 23.0.0.1 255.255.255.0 
 traffic-filter inbound acl 3000
 traffic-filter outbound acl 3001
 nat server protocol tcp global current-interface telnet inside 192.168.1.2 teln
et
 nat outbound 2000 address-group 1 no-pat
 
 acl配置
 [r2-acl-adv-3000]rule deny tcp source 34.0.0.3 0 destination 23.0.0.1 0 destinat
ion-port eq 23 --- test2的Telnet访问控制

[r2-acl-adv-3001]rule deny icmp source 192.168.2.2 0 destination 34.0.0.2 0--- PC2的访问控制
 

 

测试

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值