Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 冲浪技巧 > 单接接口 做 NAT
【标  题】:单接接口 做 NAT
【关键字】:NAT
【来  源】:http://blog.chinaunix.net/article.php?articleId=16229&blogId=1397

单接接口 做 NAT

Your Ad Here

一般来说做NAT的时候都是要两个物理接口的。

但是,如果条件有限有的时候只有一个物理接口,而且有不需要创建Dialer的接口的时候。

用下面的 配置来实现:


Building configuration...

Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
!
!
!
!
!
ip subnet-zero
!
!
!
!
interface Loopback0
 ip address 172.16.2.254 255.255.255.252
 ip nat inside
!
interface Ethernet0/0
 ip address 172.16.1.254 255.255.255.0 secondary
 ip address 221.13.145.18 255.255.255.248
 ip nat outside
 ip policy route-map china-glass
 full-duplex
!
interface BRI0/0
 no ip address
 shutdown
!
interface BRI0/1
 no ip address
 shutdown
!
ip nat pool glass 221.13.145.19 221.13.145.20 prefix-length 29
ip nat inside source list 10 pool glass overload
ip classless
ip route 0.0.0.0 0.0.0.0 221.13.145.17
ip route 172.16.1.0 255.255.255.0 Ethernet0/0
no ip http server
!
access-list 10 permit 172.16.1.0 0.0.0.255
access-list 101 permit ip 172.16.1.0 0.0.0.255 any
access-list 101 permit ip any 221.13.145.16 0.0.0.7
route-map china-glass permit 10
 match ip address 101
 set interface loopback 0
!
!
line con 0
 transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end

Router#sh arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  172.16.1.253           21   0000.b4c1.0412  ARPA   Ethernet0/0
Internet  172.16.1.254            -   0003.e396.ee40  ARPA   Ethernet0/0
Internet  221.13.145.17           7   0004.4e2d.1ffc  ARPA   Ethernet0/0
Internet  221.13.145.18           -   0003.e396.ee40  ARPA   Ethernet0/0
Router#ping 221.13.145.17

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 221.13.145.17, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
Router#

SSL Certificates HOWTO:【上一篇】
traceroute的问题:【下一篇】
【相关文章】
  • NAT原理简介、各种 ADSL Modem 及路由器的端口映射方法
  • 路由器NAT功能配置简介
  • NAT 例
  • 从CatOS到NativeIOS
  • native/catalyst
  • 做Double NAT的一种可行方法
  • 实战手记之PPPoE+NAT
  • NAT的应用(转载自中国IT认证实验室)
  • NAT设置全攻略(转载自Cisco技术网络论坛)
  • 2.6内核中Native IPsec基准
  • 【随机文章】
  • 我的第一个helloworld程序
  • shell学习笔记
  • 优雅的解决web布局的问题 -- sitemesh的使用
  • 单片机系统Flash存储器在系统编程设计
  • Mixer Volume Ctrler V1.0
  • AnyCell Report V1.82 For D567 (报表组件)
  • 如何使Microsoft SQL Server的日志文件不会增大?
  • ADO如何使用Update语法
  • 服务器和客户机的信息函数
  • 品牌根据地--中小企业创建领先品牌的思想武器
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.