国产一级一区二区_segui88久久综合9999_97久久夜色精品国产_欧美色网一区二区

掃一掃
關注微信公眾號

配置網(wǎng)絡地址轉(zhuǎn)換和靜態(tài)端口地址轉(zhuǎn)換支持內(nèi)部網(wǎng)絡服務器
2006-04-17   網(wǎng)絡

前言

® Cisco IOS網(wǎng)絡地址轉(zhuǎn)換(NAT)為IP地址簡單 化和保存設計,因為啟用使用未注冊的IP 地址連接到互聯(lián)網(wǎng)的專 用的IP內(nèi)部網(wǎng)絡。 NAT在內(nèi)部網(wǎng)絡動手術在一個Cisco路由器 ,一起通常連接二個網(wǎng)絡,并且轉(zhuǎn)換專用的(內(nèi)部本地)地址為公共 地址(Outside Local)在信息包轉(zhuǎn)發(fā)到另一個網(wǎng)絡之前。 作為 此功能一部分,NAT只可以配置為整個網(wǎng)絡做通告一個地址對外界。 這從世界有效隱藏內(nèi)部網(wǎng)絡因而提供附加安全性。

背景理論

其中一個NAT主要功能是靜態(tài)端口地址轉(zhuǎn)換(PAT),也 指"超載"在Cisco IOS配置。 靜態(tài)PAT設計允許本地和全局地 址的之間一對一映射。普通的使用為靜態(tài)PAT是允許互聯(lián)網(wǎng)用 戶從公共網(wǎng)絡訪問位于專用網(wǎng)絡的網(wǎng)絡服務器。

欲知關于NAT的更多信息, 點擊此處

下面 的表顯示IP地址空間三個塊可用為專用網(wǎng)絡。

IP地址空間

10.0.0.0 - 10.255.255.255 (/8 前綴或255.0.0.0子網(wǎng))

A類

172.16.0.0 - 172.31.255.255 (/16前綴或255.255.0.0子網(wǎng))

B類

192.168.0.0 - 192.168.255.255 (/24 前綴或255.255.255.0子網(wǎng))

C類

在下面的示例,互 聯(lián)網(wǎng)服務提供商(ISP) 分配DSL訂戶僅單個IP地址,171.68.1.1/24 。 指定的IP地址是一個注冊的獨立IP地址和稱為內(nèi)部全局地 址。此注冊的IP地址在專用網(wǎng)絡將由來自公共網(wǎng)絡的互聯(lián)網(wǎng) 用戶用于通過整個專用網(wǎng)絡訪問互聯(lián)網(wǎng)并且到達網(wǎng)絡服務器。

專用LAN,192.168.0.0/24,連接到 NAT路由器的以太網(wǎng)接口。此專用LAN包含幾臺個人計算機和 一個網(wǎng)絡服務器。配置NAT路由器轉(zhuǎn)換來自這些個人計算機的 未注冊的IP地址(內(nèi)部本地地址)到單個公共IP地址 (Inside Global - 171.68.1.1)訪問互聯(lián)網(wǎng)。

注意192.168.0.5 (網(wǎng)絡服務器)是一個地址在不可能 路由對互聯(lián)網(wǎng)的專用地址空間。 唯一的可視IP地址為了能到 達網(wǎng)絡服務器的公共互聯(lián)網(wǎng)用戶將是171.68.1.1。所以,配 置NAT路由器執(zhí)行IP地址171.68.1.1端口80 (用于端口80訪問互聯(lián)網(wǎng) )和192.168.0.5端口80的之間一次一對一映射。此映射在公 共側(cè)允許互聯(lián)網(wǎng)用戶訪問內(nèi)部網(wǎng)絡服務器。

以下網(wǎng)絡拓撲和示例配置可以用于Cisco 827,1417 ,SOHO77和1700/2600/3600 ADSL WIC。例如,Cisco 827用 于本文。

配 置

在此部分,您介紹用 信息配置在本文描述的功能。

注意: 找到其它信息關于用于本文的命令,使用IOS命 令查找工具

網(wǎng)絡圖

本文使用網(wǎng)絡建 立圖示如下的。

827spat.gif

配置

Cisco 827

Current Configuration:
 ! 
 version 12.1
 service timestamps debug uptime
 service timestamps log uptime
 !
 hostname 827
 !
 ip subnet-zero
 no ip domain-lookup
 !
 bridge irb
 !
 interface Ethernet0
 ip address 192.168.0.254 255.255.255.0
 ip nat inside
 
 !--- This is the inside local IP address and it's a private IP address. 
 
 !
 interface ATM0
 no ip address
 no atm ilmi-keepalive
 pvc 0/35
 encapsulation aal5snap
 !
 bundle-enable
 dsl operating-mode auto 
 bridge-group 1
 !
 interface BVI1
 ip address 171.68.1.1 255.255.255.240
 ip nat outside
 
 !--- This is the inside global IP address.
 !--- This is your public IP address and it is provided to you by your ISP.
 !
 ip nat inside source list 1 interface BVI1 overload
 
 !--- This statement makes the router perform PAT for all the 
 !--- End Stations behind the Ethernet interface that are using 
 !--- private IP addresses defined in access list #1.
 
 ip nat inside source static tcp 192.168.0.5 80 171.68.1.1 80 extendable 
 
 !--- This statement performs the static address translation for the Web server. 
 !--- With this statement, users trying to reach 171.68.1.1 port 80 (www) will be 
 !--- automatically redirected to 192.168.0.5 port 80 (www), which in this case 
 !--- is the Web server.
 
 ip classless
 ip route 0.0.0.0 0.0.0.0 171.68.1.254
 
 !--- IP address 171.68.1.254 is the next hop IP address, also
 !--- called the default gateway.
 !--- Your ISP can tell you what IP address to configure as the next hop address.
 
 !
 access-list 1 permit 192.168.0.0 0.0.0.255
 
 !--- This access list defines the private network 
 !--- that will be network address translated. 
 
 bridge 1 protocol ieee 
 bridge 1 route ip 
 !
 end

驗證
從 show ip nat translation 命 令輸出,內(nèi)部本地是配置的IP地址分配到網(wǎng)絡服務器在內(nèi)部網(wǎng)絡。 注意192.168.0.5是一個地址在不可能路由對互聯(lián)網(wǎng)的專用地 址空間。Inside Global是內(nèi)部主機的IP地址,是網(wǎng)絡服務器 ,因為看起來對外部網(wǎng)絡。此地址是那個為設法從互聯(lián)網(wǎng)訪 問網(wǎng)絡服務器的眾人所知。

因為 看起來對內(nèi)部網(wǎng)絡, Outside Local 是外部主機的IP 地址。它必 要不是一個合法地址; 它從在里面可以路由的地址空間分配 。

外部 全局地址是IP 地址分配到一臺主機在外部網(wǎng)絡由主機所有者。 地址從可以全局路由的地址或網(wǎng)絡空間分配。

注意地址171.68.1.1與端口號 80 (HTTP) 被轉(zhuǎn)換為192.168.0.5端口80和反之亦然。所以 ,互聯(lián)網(wǎng)用戶能訪問網(wǎng)絡服務器即使網(wǎng)絡服務器在一個專用網(wǎng)絡用 一個專用IP地址。

欲知關于如何的 更多信息排除NAT故障,請參閱 驗證NAT操作 和基本的NAT故障排除。

827#
827#show ip nat translation
Pro Inside global Inside local Outside local Outside global
tcp 171.68.1.1:80 192.168.0.5:80 --- ---
tcp 171.68.1.1:80 192.168.0.5:80 198.133.219.1:11000 198.133.219.1:11000
827#

排除故障
如果需要排除地址轉(zhuǎn)換 故障,您在路由器 能 發(fā)出 term mon 和 debug ip nat detailed命令發(fā)現(xiàn)地址正確地是否被轉(zhuǎn)換。可 視IP地址為了能到達網(wǎng)絡服務器的外部用戶是171.68.1.1 。 例如,用戶從互聯(lián)網(wǎng)的公共側(cè)設法到達171.68.1.1端口80 ( 萬維網(wǎng))將自動地重定向?qū)?92.168.0.5端口80 (萬維網(wǎng)),在這種情 況下是網(wǎng)絡服務器。

827#term mon
827#debug ip nat detailed
IP NAT detailed debugging is on
827#
03:29:49: NAT: creating portlist proto 6 globaladdr 171.68.1.1
03:29:49: NAT: Allocated Port for 192.168.0.5 -> 171.68.1.1: wanted 80 got 80
03:29:49: NAT: o: tcp (198.133.219.1, 11000) -> (171.68.1.1, 80) [0]
<... snipped ...>

熱詞搜索:

上一篇:對傳統(tǒng)路由協(xié)議的擴展最大限度地減少網(wǎng)絡中斷
下一篇:IIS服務器組建

分享到: 收藏
主站蜘蛛池模板: 灵武市| 固安县| 肇东市| 青神县| 石渠县| 长兴县| 加查县| 大新县| 西华县| 南丰县| 安溪县| 桑植县| 彭州市| 抚顺市| 五峰| 汉沽区| 宜春市| 尉氏县| 兰坪| 通城县| 新乡县| 凉城县| 镇赉县| 博客| 咸丰县| 东山县| 镇宁| 左贡县| 茶陵县| 台中县| 江城| 福贡县| 平果县| 金沙县| 左权县| 亳州市| 治多县| 内黄县| 阜宁县| 甘洛县| 柘城县|