很多網絡技術上的新手,還不知道如何配置cisco/' target='_blank'>思科路由器的NAT功能。不過沒關系,看完小編這個文章應該對你幫助會很大。那麼接下來就讓小編來教你如何配置思科路由器NAT功能吧。
首先,小編必須要介紹下什麼是NAT。
NAT,英文全稱為Network Address Translation,是指網絡IP地址轉換。NAT的出現是為了解決IP日益短缺的問題,將多個內部地址映射為少數幾個甚至一個公網地址。這樣,就可以讓我們內部網中的計算機通過偽IP訪問INTERNET的資源。如我們局域網中的192.168.1.1地址段屬私網地址,就是通過NAT轉換過來的。
NAT分為靜態地址轉換、動態地址轉換、復用動態地址轉換。
下面是小編將列出思科路由器NAT配置實例,希望對您有所幫助。
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2611
!
enable secret 5 $JIeG$UZJNjKhcptJXHPc/BP5GG0
enable password 2323ipro
!
ip subnet-zero
no ip source-route
no ip finger
!
!
!
interface Ethernet0/0
ip address 192.168.10.254 255.255.255.0 secondary
ip address 218.27.84.249 255.255.255.248
no ip directed-broadcast
ip accounting output-packets
no ip mroute-cache
no cdp enable
!
interface Serial0/0
ip unnumbered Ethernet0/0
no ip directed-broadcast
ip accounting output-packets
ip nat outside
no ip mroute-cache
no fair-queue
no cdp enable
!
interface Ethernet0/1
ip address 192.168.2.254 255.255.255.0
no ip directed-broadcast
ip nat inside
no ip mroute-cache
no cdp enable
!
interface Virtual-TokenRing35
no ip address
no ip directed-broadcast
no ip mroute-cache
shutdown
ring-speed 16
!
router rip
redistribute connected
network 192.168.2.0
network 192.168.10.0
network 218.27.84.0
!
ip default-gateway 218.27.127.217
ip nat pool nat-pool 218.27.84.252 218.27.84.254 netmask 255.255.255.248
ip nat inside source list 1 pool nat-pool overload
ip nat inside source static 192.168.2.254 218.27.84.249
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0
ip http server
ip http port 9091
ip ospf name-lookup
!
ip access-list extended filterin
permit tcp any host 218.27.84.249 eq www reflect httpfilter
access-list 1 permit 192.168.2.0 0.0.0.255
no cdp run
!
line con 0
transport input none
line aux 0
line vty 0 4
password routr
login
!
end
按照步驟敲完這些代碼,那麼你應該就會了解到如何配置思科路由器NAT功能了。如果覺得不錯請給小編一個贊吧。