注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 一个黑客与一个电脑白痴的..
 帮助

有关NAT


2008-03-04 15:56:47
 标签:nat   [推送到技术圈]

版权声明:原创作品,谢绝转载!否则将追究法律责任。
    上次去某地电信局做一台2811地址转换,是最简单的静态地址一对一转换。
    下面是配置:

Router#show running-config
Building configuration...
Current configuration : 1152 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
!
!
voice-card 0
 no dspfarm
!
!
interface FastEthernet0/0
 ip address 132.100.193.36 255.255.255.128
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/2/0
 switchport access vlan 999
!
interface FastEthernet0/2/1
!
interface FastEthernet0/2/2
!
interface FastEthernet0/2/3
!
interface Vlan1
 no ip address
!        
interface Vlan999
 ip address 192.168.1.35 255.255.255.0

 ip nat inside
 ip virtual-reassembly
!
ip route 132.0.0.0 255.0.0.0 132.100.193.126
!
!
ip http server
no ip http secure-server
ip nat inside source static 192.168.1.30 132.100.193.33
ip nat inside source static 192.168.1.40 132.100.193.34

!
access-list 1 permit any
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
scheduler allocate 20000 1000
!
end

在公司test的配置(做了一对一跟动态):
 
Router#show running-config
Building configuration...
Current configuration : 1217 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
ip cef
!
!
voice-card 0
 no dspfarm
!
!
!
interface FastEthernet0/0
 ip address 192.168.1.100 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/2/0
 switchport access vlan 999
!
interface FastEthernet0/2/1
!
interface FastEthernet0/2/2
!
interface FastEthernet0/2/3
!
interface Vlan1
 no ip address
!
interface Vlan999
 ip address 172.16.1.1 255.255.255.0
 ip nat inside

 ip virtual-reassembly
!
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
ip http server
no ip http secure-server
ip nat pool test 192.168.1.10 192.168.1.11 netmask 255.255.255.0
ip nat inside source list 1 pool test overload
ip nat inside source static 172.16.1.3 192.168.1.100
ip nat inside source static 172.16.1.4 192.168.1.101
!
access-list 1 permit any
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
 login
!
scheduler allocate 20000 1000
!
end
 

本文出自 “成熟的季节” 博客,谢绝转载!





    文章评论
 
2008-03-04 16:12:50
再解释的详细些就更好了

2008-03-04 16:46:48
由于客户要求可能用2个以上的内部局域网端口。加了块4ESW模块。。起了VLAN做NAT,然后就划端口就行了。

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: