乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      cisco nat相關(guān)資料

       憂郁_小剛 2010-09-25
      CISCO基本NAT配置路由交換機(jī):思科 2007-08-01 13:37:56 閱讀2299 評論1   字號:大中小 訂閱
      基本NAT配置
      一. 實(shí)驗(yàn)?zāi)康?
            本實(shí)驗(yàn)的目的是通過配置靜態(tài)地址傳輸,動態(tài)地址傳輸,讓學(xué)員對NAT的工作原理有初步的認(rèn)識,掌握NAT在路由器上的配置方法,對NAT在網(wǎng)絡(luò)上的應(yīng)用有更深的了解。
      二. 實(shí)驗(yàn)原理
      1. 什么是NAT?
            NAT即Network Address Translation,它可以讓那些使用私有地址的內(nèi)部網(wǎng)絡(luò)連接到Internet或其它IP網(wǎng)絡(luò)上。NAT路由器在將內(nèi)部網(wǎng)絡(luò)的數(shù)據(jù)包發(fā)送到公用網(wǎng)絡(luò)時,在IP包的報頭把私有地址轉(zhuǎn)換成合法的IP地址。
      2.在NAT實(shí)驗(yàn)中需要理解的術(shù)語:
           1) 內(nèi)部局部地址(Inside Local):在內(nèi)部網(wǎng)絡(luò)中分配給主機(jī)的私有IP地址。
           2) 內(nèi)部全局地址(Inside Global):一個合法的IP地址,它對外代表一個或多個內(nèi)部局部IP地址。
           3) 外部全局地址(Outside Global):由其所有者給外部網(wǎng)絡(luò)上的主機(jī)分配的IP地址。
           4) 外部局部地址(Outside Local):外部主機(jī)在內(nèi)部網(wǎng)絡(luò)中表現(xiàn)出來的IP地址。
      3.NAT的優(yōu)點(diǎn)和缺點(diǎn):
           NAT的優(yōu)點(diǎn):
           (1) 對于那些家庭用戶或者小型的商業(yè)機(jī)構(gòu)來說,使用NAT可以更便宜,更有效率地接入Internet。
           (2) 使用NAT可以緩解目前全球IP地址不足的問題。
           (3) 在很多情況下,NAT能夠滿足安全性的需要。
           (4) 使用NAT可以方便網(wǎng)絡(luò)的管理,并大大提高了網(wǎng)絡(luò)的適應(yīng)性。
           NAT的缺點(diǎn):
           (1) NAT會增加延遲,因?yàn)橐D(zhuǎn)換每個數(shù)據(jù)包包頭的IP地址,自然要增加延遲.
           (2) NAT會使某些要使用內(nèi)嵌地址的應(yīng)用不能正常工作.
      4.NAT的工作原理:
           當(dāng)內(nèi)部網(wǎng)絡(luò)中的一臺主機(jī)想傳輸數(shù)據(jù)到外部網(wǎng)絡(luò)時,它先將數(shù)據(jù)包傳輸?shù)絅AT路由器上,路由器檢查數(shù)據(jù)包的報頭,獲取該數(shù)據(jù)包的源IP信息,并從它的NAT映射表中找出與該IP匹配的轉(zhuǎn)換條目,用所選用的內(nèi)部全局地址(全球唯一的IP地址)來替換內(nèi)部局部地址,并轉(zhuǎn)發(fā)數(shù)據(jù)包。
      當(dāng)外部網(wǎng)絡(luò)對內(nèi)部主機(jī)進(jìn)行應(yīng)答時,數(shù)據(jù)包被送到NAT路由器上,路由器接收到目的地址為內(nèi)部全局地址的數(shù)據(jù)包后,它將用內(nèi)部全局地址通過NAT映射表查找出內(nèi)部局部地址,然后將數(shù)據(jù)包的目的地址替換成內(nèi)部局部地址,并將數(shù)據(jù)包轉(zhuǎn)發(fā)到內(nèi)部主機(jī)。
      5.NAT配置中的常用命令:
      ip nat {inside|outside}:接口配置命令。以在至少一個內(nèi)部和一個外部接口上啟用NAT。
      ip nat inside source static local-ip global-ip:全局配置命令。在對內(nèi)部局部地址使用靜態(tài)地址轉(zhuǎn)換時,用該命令進(jìn)行地址定義。
      access-list access-list-number {permit|deny} local-ip-address:使用該命令為內(nèi)部網(wǎng)絡(luò)定義一個標(biāo)準(zhǔn)的IP訪問控制列表。
      ip nat pool pool-name start-ip end-ip netmask netmask [type rotary]:使用該命令為內(nèi)部網(wǎng)絡(luò)定義一個NAT地址池。
      ip nat inside source list access-list-number pool pool-name [overload]:使用該命令定義訪問控制列表與NAT內(nèi)部全局地址池之間的映射。
      ip nat outside source list access-list-number pool pool-name [overload]:使用該命令定義訪問控制列表與NAT外部局部地址池之間的映射。
      ip nat inside destination list access-list-number pool pool-name:使用該命令定義訪問控制列表與終端NAT地址池之間的映射。
      show ip nat translations:顯示當(dāng)前存在的NAT轉(zhuǎn)換信息。
      show ip nat statistics:查看NAT的統(tǒng)計信息。
      show ip nat translations verbose:顯示當(dāng)前存在的NAT轉(zhuǎn)換的詳細(xì)信息。
      debug ip nat:跟蹤NAT操作,顯示出每個被轉(zhuǎn)換的數(shù)據(jù)包。
      Clear ip nat translations *:刪除NAT映射表中的所有內(nèi)容.
      三. 實(shí)驗(yàn)設(shè)備
           Cisco路由器兩部,帶超級終端的PC機(jī)三臺,Cisco集線器兩臺。
      四. 實(shí)驗(yàn)步驟
         (一) 靜態(tài)NAT,單向動態(tài)NAT和PAT:

      此主題相關(guān)圖片如下:

      1、配置路由器端口的IP地址,并在RouterB和RouterC上配置到202.116.78.0網(wǎng)段的靜態(tài)路由。
      2、在RouterA上分別為RouterB和RouterC配置一條到達(dá)內(nèi)部全局地址的靜態(tài)路由。完成配置后使用show ip route,show interface,show running-configuration查看路由配置的正確性。
      RouterA#config t
      RouterA(config)#ip route 202.116.65.0 255.255.255.0 202.116.64.1
      RouterA(config)#ip route 202.116.67.0 255.255.255.0 202.116.66.1
      3、在RouterA的f0端口配置ACL過濾掉所有私有地址。
         (1)靜態(tài)NAT:
      以RouterB為例
      RouterB#config t
      RouterB(config)# ip nat inside source static 10.0.1.2 202.116.65.1
      RouterB(config)#int f0
      RouterB(config-if)#ip nat inside
      RouterB(config-if)#int s0
      RouterB(config-if)#ip nat outside
           查看靜態(tài)NAT的配置:
      RouterB#show ip nat translations
      RouterB#show ip nat statistics
      RouterB#show ip nat translations verbose
      RouterB#debug ip nat
           檢驗(yàn)靜態(tài)NAT:
           在Host_1上ping 202.116.65.1是否成功?      
           在Host_3上ping Host_1是否成功?
           現(xiàn)在再由Host_1 ping 202.116.65.1是否成功?
           為什么?
         (2)動態(tài)NAT(先刪除靜態(tài)NAT的配置):
           以RouterB為例NAT
      RouterB#config t
      RouterB(config)# ip nat pool CISCO 202.116.65.1 202.116.65.254 netmask 255.255.255.0
      RouterB(config)# access-list 1 permit 10.0.1.2 0.0.0.255
      RouterB(config)#ip nat inside source list 1 pool CISCO
      RouterB(config)#int f0
      RouterB(config-if)#ip nat inside
      RouterB(config-if)#int s0
      RouterB(config-if)#ip nat outside
          用(1)中的命令查看動態(tài)NAT的配置。
          檢驗(yàn)動態(tài)NAT。
        (3)PAT(刪除所有NAT配置,保留ACL的配置):
      以RouterB為例
      RouterB(config)#int loop0
      RouterB(config-if)#ip address 202.116.65.1 255.255.255.0
      RouterB(config-if)#no shut
      RouterB(config)#ip nat inside source list 1 interface loop0 overload
      *************************************************************
       
      cisco路由器端口NAT映射cisco 常用實(shí)例 2009-06-04 02:57:29 閱讀198 評論0   字號:大中小 訂閱
      2621>en
          2621#conf t
          2621(config)#int fa0/0
          2621(config-if)#ip add 192.168.1.1 255.255.255.0  //定義端口的ip地址
          2621(config-if)#no sh  //激活端口
          2621(config-if)#ip nat inside   //定義fa0/0為內(nèi)部端口
          2621(config-if)#exit  //退回全局配置模式 這一步不是必須的,也可以直接用int fa0/1 切換到fa0/1端口
          2621(config)#int fa0/1 
          2621(config-if)# ip add 211.82.20.129 255.255.255.252
          2621(config-if)#no sh
          2621(config-if)#ip nat outside  //定義fa0/1為外部端口
          2621(config-if)#exit
          2621(config)#access-list 9 permit 192.168.1.0 0.0.0.255 //定義需要訪問Internet的本地網(wǎng)絡(luò)的訪問列表
          2621(config)#ip nat pool isp 211.82.20.129 211.82.20.129 netmask 255.255.255.252  //定義NAT地址池,這一步可以省略,由于此IP地址位于路由器的端口,所以,可以不定義NAT池,只使用 ip nat inside source list 命令即可!
          2621(config)#ip nat inside source list 9 pool isp overload   //定義端口復(fù)用地址轉(zhuǎn)換,注意,這里是使用了地址池的情況,如果沒有定義nat地址
      池,可以使用 ip nat inside source list 9 interface fa0/1 overload 來啟用端口復(fù)用轉(zhuǎn)換。
          2621(config)#ip nat inside source static tcp 192.168.1.2 80 211.82.20.129 80  //定義web服務(wù)器的靜態(tài)端口轉(zhuǎn)換
          2621(config)#ip nat inside source static tcp 192.168.1.2 21 211.82.20.129 21  //定義FTP服務(wù)器的靜態(tài)端口轉(zhuǎn)換
          2621(config)# ip route 0.0.0.0 0.0.0.0 interface fa0/1 //定義靜態(tài)路由,如果你內(nèi)網(wǎng)不需要訪問Internet ,這一步可以省掉。
          2621#copy run start //保存配置
      *******************************************************************
       
      近整理了CCNA所有的筆記,清理一下自己的思維,算是對以前知識的溫習(xí),如果不太懂地址轉(zhuǎn)換(NAT)就進(jìn)來看看 ,希望凡子能幫上忙
      復(fù)習(xí)Cisco三種Nat配置筆記  

      *******************************全部采用端口************************
      ISP分配的IP202.99.160.129
      interface fastethernet0/0
      ip address 192.168.1.1 255.255.255.0
      duplex auto
      speed auto
      in nat inside
      no shutdown
      interface fastethernet0/1
      ip address 192.168.2..1 255.255.255.0
      duplex auto
      speed auto
      in nat outside
      no shutdown
      ip nat pool OnlyYou 202.99.160.130 202.99.160.130 netmask 255.255.255.252
      //OnlyYou代表地址池的名稱。 2個202.99.160.130是代表只用一個ip做轉(zhuǎn)換后ip.
      access-list 1 permit 192.168.1.0 0.0.0.255
      access-list 1 permit 192.168.2.0 0.0.0.255
      ip nat inside source list1 pool OnlyYou overload
       

      ***********************動態(tài)地址轉(zhuǎn)換+端口***********************
      ISP分配的IP 有:202.99.160.130~190 255.255.255.192
      Interface fastethernet0/1
      Ip address 192.168.1.1 255.255.255.0
      Ip address 192.168.2.1 255.255.255.0 secondary
      Duplex auto
      Speed auto
      Ip nat inside
      No shutdown
      Interface serial 0/0
      Ip address 202.99.160.129 255.255.255.192
      Duplex auto
      Speed auto
      Ip nat outside
      No shutdwon
      Ip nat pool OutPort 202.99.160.190 202.99.160.190 netmask 255.255.255.192
      Ip nat pool OutPool 202.99.160.130 202.99.160.190 netmask 255.255.255.192
      Ip nat inside source list1 pool OutPort //192.168.1.0段主機(jī)全部轉(zhuǎn)成202.99.160.190
      Ip nat inside source list2 pool OutPool
      //出于訪問ftp站點(diǎn)等考慮:192.168.2.0和192.168.3.0段主機(jī)全部
      //轉(zhuǎn)成202.99.160.130到202.99.160.189中的所有地址。
      Access-list1 permit 192.168.1.0 0.0.0.255
      Access-list2 permit 192.168.2.0 0.0.0.255
      Access-list2 permit 192.168.3.0 0.0.0.255
       
      ***********************靜態(tài)地址轉(zhuǎn)換***********************

      ISP分配的IP地址是:211.82.220.80~211.82.220.87
      211.82.220.81 255.255.255.248
      要求Intranet上的Web.E-mail.Ftp.Media可以被外部訪問.
      Interface fastethernet0/0
      Ip address 192.168.1.1 255.255.255.0
      Duplex auto
      Speed auto
      Ip nat inside
      No shutdown
      Interface fastethernet0/1
      Ip address 211.82.220.81 255.255.255.248
      Speed auto
      Duplex auto
      Ip nat outside
      No shutdown
      Ip nat pool Outpool 211.82.220.86 211.82.20.86 netmask 255.255.255.248
      Access-list 1 permit 192.168.1.2 0.0.0.255
      Access-list 1 permit 192.168.1.3 0.0.0.255
      Access-list 1 permit 192.168.1.4 0.0.0.255
      Access-list 1 permit 192.168.1.5 0.0.0.255
      Ip nat inside source list1 pool Outpool overload
      Ip nat inside source static 192.168.1.2 211.82.220.82
      Ip nat inside source static 192.168.1.3 211.82.220.83
      Ip nat inside source static 192.168.1.4 211.82.220.84
      Ip nat inside source static 192.168.1.5 211.82.220.85
       

      ******************NAT映射****************************
      如果ISP提供的IP地址比較多還可以,但如果不是的時候(如就兩個時),一個用于內(nèi)網(wǎng)地址轉(zhuǎn)換,另一個用于對外網(wǎng)提供服務(wù).
      ISP提供的內(nèi)網(wǎng)上網(wǎng)IP
      Interface ethernet0
      Ip address 192.168.1.1 255.255.255.0
      Duplex auto
      Speed auto
      Ip nat inside
      No shutdown
      Interface fastethernet0/0
      Ip address 211.82.220.129 255.255.255.248
      Duplex auto
      Speed auto
      Ip nat outside
      No shutdown
      Access-list 1 permit 192.168.1.0 0.0.0.255
      Ip nat pool Everybody 211.82.220.130 211.82.220.130 network 255.255.255.252
      Ip nat inside source list1 pool Everybody overload
      Ip nat inside source static tcp 192.168.1.2 80 202.99.220.130 80
      Ip nat inside source static tcp 192.168.1.3 21 202.99.220.130 21
      Ip nat inside source static tcp 192.168.1.4 25 202.99.220.130 25
      Ip nat inside source static tcp 192.168.1.5 110 202.99.220.130 110
       
      *******************利用地址轉(zhuǎn)換實(shí)現(xiàn)負(fù)載均衡********************
      ;當(dāng)有如象騰訊公司似的多服務(wù)器時,使用路由器實(shí)現(xiàn)負(fù)載平衡,可以使它們有平等的訪問機(jī)會.
      Interface fastethernet0/1
      Ip address 192.168.1.1 255.255.255.0
      Duplex auto
      Speed auto
      Ip nat inside
      No shutdown
      Interface fastethernet0/0
      Ip address 202.110.198.81 255.2555.255.248
      Duplex auto
      Speed auto
      Ip nat outside
      Access-list 1 permit 202.110.198.82
      Access-list 2 permit 202.110.198.83
      Access-list 3 permit 192.168.1.0 0.0.0.255
      Ip nat pool Webser 192.168.1.2 192.168.1.3 255.255.255.248 type rotary
      Ip nat pool Ftpser 192.168.1.4 192.168.1.5 255.255.255.248 type rotary
      Ip nat pool normal 202.110.198.84 202.110.198.84 netmask 255.255.255.248
      Ip nat inside destination list 1 pool Webser
      Ip nat inside destination list 2 pool Ftpser
       
       

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多