cisco路由器NAT地址转换
Current configuration : 1476 bytes !version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
multilink bundle-name authenticated
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
!
interface FastEthernet1/1
no switchport
ip address 172.30.1.2 255.255.255.0
ip nat outside (定义它为外网口)
ip virtual-reassembly
!
interface FastEthernet1/2
no switchport
ip address 172.16.1.1 255.255.255.0
ip nat inside (定义它为内网口)
ip virtual-reassembly
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface Vlan1
no ip address
!
ip route 172.16.3.0 255.255.255.0 172.16.1.2(与R3的默认路由相回应,路由应该是一去一回的,否则网络是不会通的)
ip route 172.16.4.0 255.255.255.0 172.16.1.2
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface FastEthernet1/1 overload
!
access-list 1 permit 172.16.3.0 0.0.0.255 (定义互联网访问控制,现在是两个网段都开通,等下将172.16.4.0段关闭,看NAT地址是否还生效?)
access-list 1 permit 172.16.4.0 0.0.0.255
!
control-plane
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
login
!
!
end
页:
[1]