Chinaunix首页 | 论坛 | 博客
  • 博客访问: 371837
  • 博文数量: 114
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1219
  • 用 户 组: 普通用户
  • 注册时间: 2015-02-07 21:23
文章分类

全部博文(114)

文章存档

2018年(1)

2017年(5)

2016年(87)

2015年(21)

我的朋友

分类: 网络与安全

2015-09-04 20:03:30

重载或复用nat也是动态nat的一种,它是通过与ip地址的不同端口组合,把多个非注册的IP地址映射到一个注册的IP地址。
有时,只有一个外部地址,这个地址已经被路由器外接口使用,这种情况下的地址转换过程中,也直接使用接口的ip地址作为转换后的源地址。
公司内部网络使用的IP为10.1.1.1网段,公司网络外部使用静态的合法IP。公司无其它可用的外部地址。
网络拓扑模拟如下 

设置路由器的外部端口IP地址:
R2#show running-config 
Building configuration...


Current configuration : 746 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 61.159.62.130 255.255.255.0
 ip nat outside
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip nat inside source list 1 interface FastEthernet0/1 overload  # 这命令实现将访问控制列表1的地址转换为外部接口中的内部全局IP地址。
ip nat inside source static tcp 10.1.1.3 80 61.159.62.130 80  #端口映射
ip classless
ip route 0.0.0.0 0.0.0.0 61.159.62.129 
!
!
access-list 1 permit 10.1.1.0 0.0.0.255  #定义内部网络允许访问外部的控制列表
定义合法的IP地址池,由于直接使用外部接口,所以不再定义。
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end


clear ip nat translation * 命令清除转换列表中的所有条目。
show ip nat translation 查看转换条目。

阅读(2090) | 评论(0) | 转发(0) |
0

上一篇:CentOS5.8 163 yum源配置文件

下一篇:配置PAT

给主人留下些什么吧!~~