- 论坛徽章:
- 0
|
思科路由器上实现NAT实例
NAT实现方式多种多样。现在使用Cisco 2611来进行设置,讲解NAT 技术在企业中的实际使用。
如图形所示:
![]()
企业申请了一个IP段: 202.103.100.128---202.103.100.135/29 [其中:125和135不能使用]
现在IP地址分配如下:
设备名称
地址空间
NAT
分配IP
地址数量
S0
202.103.100.129
-----
202.103.100.129/29
1
WEB服务器
192.168.10.2/24
静态
202.103.100.130/29
1
财务部门
192.168.20.0/24
端口复用
202.103.100.131/29
1
其他部门
192.168.30.0/24
动态
202.103.100.132—134/29
3
具体的 配置如下:
1 使用S0为外部接口,E0为内部接口
Router(config)#interface s0
Router(config-if)#ip address 202.103.100.129 255.255.255.248
Router(config-if)#no shutdown
Router(config-if)#ip nat outside
Router(config)#interface e0
Router(config-if)#ip address 192.168.100.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#ip nat inside
2 为各个部门配置地址池 finace 财务部 other –其他
Ip nat pool finace 202.103.100.131 202.103.100.131 netmask 255.255.255.248
Ip nat pool other 202.103.100.132 202.103.100.134 netmask 255.255.255.248
3 访问控制列表
Ip nat inside source list 1 pool finace overload
Ip nat inside source list 2 pool other
access-list 1 permit 192.168.20.0 0.0.0.255
Access-list 2 permit 192.168.30.0 0.0.0.255
4 建立静态路由
Ip nat inside source static tcp 192.168.10.2 202.103.100.130 80
5设置default 路由
Ip route 0.0.0.0 0.0.0.0 s0
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/24661/showart_222031.html |
|