1. 程式人生 > >思科outside口特性

思科outside口特性

outside ip地址 source 思科

一、技術分享

二、匹配規則:

inside:先路由,後NAT


outside:先NAT,後路由




三、四種NAT:

ip nat inside source static 192.168.1.2 202.67.54.3

從inside進入,從outside出去的源IP地址為192.168.1.2轉換為202.67.54.3

ip nat inside destination static 192.168.1.2 202.67.54.3

從inside進入,outside出去的目的IP為192.168.1.2轉換為202.67.54.3

ip nat outside source static 192.168.1.2 202.67.54.3

從outside進入,inside出去的源IP為192.168.1.2轉換為202.67.54.3

ip nat outside destination static 192.168.1.2 202.67.54.3

從outside進入,inside出去的目的IP為192.168.1.2轉換為202.67.54.3

第一條等價於第四條,第二條等價於第三條



四、實驗現象

ip nat inside 一定是出outside才會發生轉換

ip nat outside 一定是出inside才會發生轉換

http://www.2cto.com/net/201309/244766.html



五、實操

技術分享

自己總結的第四步可能有些問題,但是不知道PC1為什麽會把發給他的包丟掉,又找不到合理解釋,希望有了解的人可以告訴我下。

各設備配置:

技術分享

R0:

Router#show running-config
Building configuration...

Current configuration : 757 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial1/0
ip address 8.8.8.7 255.255.255.0
ip nat inside
clock rate 64000
!
interface Serial1/1
no ip address
shutdown
!
interface Serial1/2
no ip address
shutdown
!
interface Serial1/3
no ip address
shutdown
!
ip nat outside source static 1.1.1.2 2.2.2.3
ip classless
ip route 0.0.0.0 0.0.0.0 8.8.8.8
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end




R1:

Router#show running-config
Building configuration...

Current configuration : 662 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 2.2.2.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial1/0
ip address 8.8.8.8 255.255.255.0
!
interface Serial1/1
no ip address
shutdown
!
interface Serial1/2
no ip address
shutdown
!
interface Serial1/3
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 8.8.8.7
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end




PC1:

技術分享


參考:http://www.2cto.com/net/201309/244766.html

但還是不明白回包流程為什麽會失敗,也許他解釋的太抽象,有理解的,請舉個小例子給我解釋下回包為什麽會失敗,不勝感激


本文出自 “飛奔的小GUI” 博客,請務必保留此出處http://9237101.blog.51cto.com/9227101/1923618

思科outside口特性