助学贷款 2007-11-6 12:54
路由配置案例:全部采用端口复用地址转换
[url=http://tech.haoxz.com/sort/1027/index.html]局域网[/url]采10Mb/s光纤,以[url=http://tech.haoxz.com/sort/1235/index.html]城域网[/url]方式接入Internet。[url=http://www.baidu.com/baidu?tn=jkday2000&word=路由器]路由器[/url]选用拥有2个10/100 Mb/s自适应端口的Cisco 2611。内部网络使用的[url=http://tech.haoxz.com/sort/1137/index.html]IP地址[/url]段为192.168.100.1~192.168.101.254,局域网端口Ethernet 0的IP地址为192.168.100.1,[url=http://tech.haoxz.com/sort/1032/index.html]子网掩码[/url]为255.255.0.0。网络分配的合法IP地址范围为202.99.160.128~ 202.99.160.131,连接ISP的端口Ethernet 1的IP地址为202.99.160.129,子网掩码为255.255.255.252,可用于转换的IP地址为202.99.160.130。要求网络内部的所有计算机均可访问Internet。 interface fastethernet0/0
ip address 192.168.100.1 255.255.0.0 //定义本地端口IP地址
duplex auto
speed auto
ip nat inside //定义为本地端口
!
interface fastethernet0/1
ip address 202.99.160.129 255.255.255.252
duplex auto
speed auto
ip nat outside
!
ip nat pool onlyone 202.99.160.130 202.99.160.130 netmask 255.255.255.252
//定义合法IP地址池,名称为onlyone
access-list 1 permit 192.168.100.0 0.0.0.255 //定义本地访问列表
access-list 1 permit 192.168.101.0 0.0.0.255
ip nat inside source list1 pool onlyone overload //采用端口复用动态地址转换