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