Current configuration : 737 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
logging queue-limit 100
!
ip subnet-zero
no ip domain lookup
!
!
!
!
interface Ethernet0
ip address 10.1.1.1 255.255.255.0
ip nat inside
!
interface Serial0
no ip address
shutdown
!
interface Serial1
ip address 13.1.1.1 255.255.255.0
ip nat outside
!
ip nat inside source list 1 interface Serial1 overload
no ip http server
ip classless
ip route 192.168.1.0 255.255.255.0 Serial0
ip route 192.168.1.0 255.255.255.0 Serial1
!
!
!
access-list 1 permit 2.2.2.0 0.0.0.255
access-list 1 permit 10.1.1.0 0.0.0.255
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
end
静态NAT配置
ip nat inside static source-IP des-IP
指定什么端口是inside什么是outside
int e 0
ip nat inside
int s 0
ip nat outside
动态NAT配置
#ip nat pool "name" "start-ip" "end-ip"(只有公网地址作池才有意义)mask x.x.x.x
access-list "access-list-number" permit source [source-wildcard]
ip nat inside source list
example:
ip nat pool ccna 12.1.1.4 12.1.1.5 mask 255.255.255.0
ip access-list standard NAT
r1(config-std-nacl)permit 10.1.1.4 0.0.0.1
ip nat inside source list NAT POOL CCNA
clear ip nat translations * 清空nat表,让地址池重置
Overloading端口复用PAT--主流应用
router(config)#access-list access-list-number permit source source-wildcard
ip nat source list NAT interface serial 0 overload
sh ip nat translation
sh ver:35
Switch#sh ver
Cisco IOS Software, C3550 Software (C3550-IPSERVICESK9-M), Version 12.2(25)SEE1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Mon 22-May-06 08:08 by yenanh
Image text-base: 0x00003000, data-base: 0x00DC0370
ROM: Bootstrap program is C3550 boot loader
Switch uptime is 5 minutes
System returned to ROM by power-on
System image file is "flash:/c3550-ipservicesk9-mz.122-25.SEE1.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco WS-C3550-48 (PowerPC) processor (revision H0) with 65526K/8192K bytes of memory.
Processor board ID CAT0733Z2K3
Last reset from warm-reset
Running Layer2/3 Switching Image
Ethernet-controller 1 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 2 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 3 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 4 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 5 has 1 Gigabit Ethernet/IEEE 802.3 interface
Ethernet-controller 6 has 1 Gigabit Ethernet/IEEE 802.3 interface
The password-recovery mechanism is enabled.
384K bytes of flash-simulated NVRAM.
Base ethernet MAC Address: 00:0D:BD:CF:FA:00
Motherboard assembly number: 73-5701-09
Power supply part number: 34-0967-01
Motherboard serial number: CAT07330AHT
Power supply serial number: DTH07310QPW
Model revision number: H0
Motherboard revision number: A0
Model number: WS-C3550-48-SMI
System serial number: CAT0733Z2K3
Configuration register is 0x10F
sh ver:29
Switch(config)#do sh ver
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA10, RELEASE SOFTWARE (fc2)
Copyright (c) 1986-2007 by cisco Systems, Inc.
Compiled Tue 08-May-07 12:18 by myl
Image text-base: 0x80010000, data-base: 0x8067C000
ROM: Bootstrap program is C2950 boot loader
Switch uptime is 9 minutes
System returned to ROM by power-on
System image file is "flash:/c2950-i6k2l2q4-mz.121-22.EA10.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
cisco WS-C2950-24 (RC32300) processor (revision J0) with 19925K bytes of memory.
Processor board ID FOC0822S11E
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:0D:28:61:62:00
Motherboard assembly number: 73-5781-11
Power supply part number: 34-0965-01
Motherboard serial number: FOC06500G8M
Power supply serial number: PHI071900ED
Model revision number: J0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FOC0822S11E
Configuration register is 0xF