思科路由器如何配置NAT功能
思科路由器如何配置NAT功能
很多網(wǎng)絡技術上的新手,還不知道如何配置思科路由器的NAT功能。不過沒關系,看完小編這個文章應該對你幫助會很大。那么接下來就讓小編來教你如何配置思科路由器NAT功能吧。
首先,小編必須要介紹下什么是NAT。
NAT,英文全稱為Network Address Translation,是指網(wǎng)絡IP地址轉換。NAT的出現(xiàn)是為了解決IP日益短缺的問題,將多個內部地址映射為少數(shù)幾個甚至一個公網(wǎng)地址。這樣,就可以讓我們內部網(wǎng)中的計算機通過偽IP訪問INTERNET的資源。如我們局域網(wǎng)中的192.168.1.1地址段屬私網(wǎng)地址,就是通過NAT轉換過來的。
NAT分為靜態(tài)地址轉換、動態(tài)地址轉換、復用動態(tài)地址轉換。
下面是小編將列出思科路由器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功能了。如果覺得不錯請給小編一個贊吧。