! !
telephony-service
load 7960-7940 P00403020214 max-ephones 20 max-dn 30
ip source-address 192.168.0.153 port 2000 auto assign 1 to 4 max-conferences 8 gain -6 call-forward pattern .T call-forward pattern 6000 transfer-system full-consult transfer-pattern .T ! !
ephone-dn 1 number 8001 ! !
ephone 1 keepalive 10
mac-address 0019.E7A1.6BAB speed-dial 1 +99111 label \ speed-dial 2 +99222 label \ type 7940 button 1:1 ! !
banner login ^C
-----------------------------------------------------------------------
Cisco Router and Security Device Manager (SDM) is installed on this device. This feature requires the one-time use of the username \
with the password \vel of 15.
Please change these publicly known initial credentials using SDM or the IOS CLI.
Here are the Cisco IOS commands.
username
Replace
For more information about SDM please follow the instructions in the QUICK START
GUIDE for your router or go to http://www.cisco.com/go/sdm ----------------------------------------------------------------------- ^C ! line con 0 password cisco login line aux 0 line vty 0 4 privilege level 15 password cisco login local
transport input telnet ssh line vty 5 15 privilege level 15 login local
transport input telnet ssh !
scheduler allocate 20000 1000 ! End
配置完成后可以用以下语句进行查看: show ip nat statistcs show ip nat translations 2、动态地址转换适用的环境:
动态地址转换也是将本地地址与内部合法地址一对一的转换,但是动态地址转换是从内部合法地址池中动态地选择一个末使用的地址对内部本地地址进行转换。
动态地址转换基本配置步骤:
(1)、在全局设置模式下,定义内部合法地址池
ip nat pool 地址池名称 起始IP地址 终止IP地址 子网掩码 注:其中地址池名称可以任意设定。
(2)、在全局设置模式下,定义一个标准的access-list规则以允许哪些内部地址可以进行动态地址转换。 Access-list 标号 permit 源地址 通配符
注:其中标号为1-99之间的整数。
(3)、在全局设置模式下,将由access-list指定的内部本地地址与指定的内部合法地址池进行地址转换。 ip nat inside source list 访问列表标号 pool 内部合法地址池名字 (4)、指定与内部网络相连的内部端口,在端口设置状态下: ip nat inside
(5)、指定与外部网络相连的外部端口,在端口设置状态下: ip nat outside
CISCO2811配置动态NAT地址转换实例:
将2811的FastEthernet0/0作为外部端口,FastEthernet0/1作为内部端口。其中192.168.3.0网段采用动态地址转换,对应内部合法地址分别对应为192.168.2.10,192.168.2.11,192.168.2.12。
路由器2811的配置:
route2811#show run Building configuration...
Current configuration : 6546 bytes !
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption !
hostname route2811 !
boot-start-marker boot-end-marker !
logging buffered 4096 errors
enable secret 5 $1$Ihwd$HMLrd7gHvZGC4YHCBVPx5/ !
no aaa new-model !
resource policy !
network-clock-participate wic 0 ip subnet-zero ! ! ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.0.153 !
ip dhcp pool ipphone import all
network 192.168.0.0 255.255.255.0 option 150 ip 192.168.0.153 default-router 192.168.0.153 lease infinite ! !
ip domain name yourdomain.com isdn switch-type primary-qsig
carrier-id Word !
voice-card 0 no dspfarm ! ! !
voice service voip
allow-connections h323 to h323 allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip !
voice service vofr
modem passthrough codec g711alaw ! ! ! ! ! ! ! ! ! ! !
fax receive called-subscriber $d$ fax send transmitting-subscriber $s$ fax interface-type fax-mail !
crypto pki trustpoint TP-self-signed-2758260478 enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-2758260478 revocation-check none
rsakeypair TP-self-signed-2758260478 ! !
crypto pki certificate chain TP-self-signed-2758260478 certificate self-signed 01
30820250 308201B9 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 69666963 6174652D 32373538 32363034 3738301E 170D3036 31313232 31303037 32365A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D32 37353832
36303437 3830819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 8100DADB C8FCB691 746A5E19 79893333 CC2E4456 7FC5D2C7 042AC16E 590E9560 A99DF8FA A91867B8 08E07457 5A4ACF03 6680D6DF 8DD3D590 D2B77E5A FEC8E34C 84C163B5 15C1DA39 11F9B232 28D59FB9 0BCE9797 BBD9E828 D48BE2E0 6D3DB65E 55563485 AB0B5347 7E857EA0 4A4231B1 CCC657B6 EB5CA8AE 0E0283C1 CC4F4A5A 9DC50203 010001A3 78307630 0F060355 1D130101 FF040530 030101FF 30230603 551D1104 1C301A82 18726F75 74653238 31312E79 6F757264 6F6D6169 6E2E636F 6D301F06 03551D23 04183016 8014E139 8B107691 812F740D 43C8AEC5 9B7B4C39 9829301D 0603551D 0E041604 14E1398B 10769181 2F740D43 C8AEC59B 7B4C3998 29300D06 092A8648 86F70D01 01040500 03818100 5547F983 45F6A28F E43E5D6E 9B0700EA FFC0E779 9D7DA745 029DBFEA 12DD3749 CACE92A9 DBC184AC 47E21EA2 57A05EDD 9FB762E6 374CE282 E120BB07 F0CFAA99 11767EB7 488ECF19 D7FF8F85 B9F058CC 6D35ECF3 20A2AA53 737AB8D8 B03E040D A15538AD 33F96B5B F0FDBB05 12153132 03FEA945 F0F431C1 4322F9FB 10766C54 quit
username dengyg privilege 15 secret 5 $1$/NYs$eZP61fvI7zabpi1xBalW0.
username admincisco privilege 15 view root secret 5 $1$CKgk$IuL1hXtwRCggI38b1spa u0 ! !
controller E1 0/0/0 framing NO-CRC4 clock source internal line-termination 75-ohm pri-group timeslots 1-16 ! ! !
interface FastEthernet0/0
ip address 192.168.2.120 255.255.255.0
ip nat outside //指定连接网络的外部端口 duplex auto speed auto no cdp enable !
interface FastEthernet0/1
ip address 192.168.3.120 255.255.255.0
ip nat inside //指定连接网络的内部端口 duplex auto speed auto !
interface Serial0/0/0:15 no ip address
isdn switch-type primary-qsig