将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.0255.255.255.0
option 150 ip192.168.0.153
default-router192.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 toh323
allow-connections h323 tosip
allow-connections sip toh323
allow-connections sip tosip
!
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-namecn=IOS-Self-Signed-Certificate-2758260478
revocation-check none
rsakeypairTP-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 53656C662D536967 6E65642D 43657274
69666963 6174652D 3237353832363034 3738301E 170D3036 31313232 31303037
32365A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D5369676E 65642D43 65727469 66696361 74652D32 37353832
36303437 3830819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100DADB C8FCB691 746A5E19 79893333 CC2E4456 7FC5D2C7 042AC16E 590E9560
A99DF8FA A91867B8 08E074575A4ACF03 6680D6DF 8DD3D590D2B77E5A FEC8E34C
84C163B5 15C1DA3911F9B232 28D59FB9 0BCE9797BBD9E828 D48BE2E0 6D3DB65E
55563485 AB0B5347 7E857EA04A4231B1 CCC657B6 EB5CA8AE 0E0283C1 CC4F4A5A
9DC50203 010001A3 78307630 0F060355 1D130101 FF040530 030101FF 30230603
551D1104 1C301A8218726F75 74653238 31312E79 6F757264 6F6D6169 6E2E636F
6D301F06 03551D23 04183016 8014E139 8B107691 812F740D 43C8AEC5 9B7B4C39
9829301D 0603551D 0E04160414E1398B 10769181 2F740D43 C8AEC59B 7B4C3998
29300D06 092A8648 86F70D01 01040500 03818100 5547F983 45F6A28FE43E5D6E
9B0700EA FFC0E779 9D7DA745029DBFEA 12DD3749 CACE92A9DBC184AC47E21EA2
57A05EDD 9FB762E6 374CE282 E120BB07 F0CFAA99 11767EB7 488ECF19 D7FF8F85
B9F058CC 6D35ECF3 20A2AA53 737AB8D8 B03E040D A15538AD 33F96B5B F0FDBB05
12153132 03FEA945 F0F431C14322F9FB 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.120255.255.255.0
ip nat outside //指定连接网络的外部端口
duplex auto
speed auto
no cdp enable
!
interface FastEthernet0/1
ip address 192.168.3.120255.255.255.0
ip nat inside //指定连接网络的内部端口
duplex auto
speed auto
!
interface Serial0/0/0:15
no ip address
isdn switch-typeprimary-qsig
isdn incoming-voice voice
!
interface Dialer0
no ip address
!
ip classless
!
!
ip http server
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat pool abc 192.168.2.10 192.168.2.12 netmask 255.255.255.0 //定义内部合法地址池
ip nat inside source list 1 pool abc //将由access-list指定的内部本地地址与指定的内部合法地址池进行地址转换
!
access-list 1 permit 192.168.3.0 0.0.0.255 //定义一个标准的access-list规则以允许哪些内部地址可以进行动态地址转换
!
!
tftp-server flash:P00303020214.bin
tftp-server flash:P00403020214.bin
!
control-plane
!
!
!
voice-port 0/0/0:15
cptone CN
!
!
!
!
dial-peer cor custom
!
!
!
dial-peer voice 2000 pots
destination-pattern 83....
port 0/0/0:15
!
dial-peer voice 3000 voip
destination-pattern 38....
session protocol sipv2
session target ipv4:192.168.2.4
session transport udp
codec g729br8
fax protocol pass-throughg711alaw
!
dial-peer voice 20 pots
destination-pattern 020....
port 0/0/0:15
!
dial-peer voice 4000 voip
destination-pattern 6...
session targetipv4:192.168.2.20
codec g723ar63
!
gateway
timer receive-rtp 1200
!
!
!
telephony-service
load 7960-7940 P00403020214
max-ephones 20
max-dn 30
ip source-address192.168.0.153 port 2000
auto assign 1 to 4
max-conferences 8 gain -6
call-forward pattern .T
call-forward pattern 6000
transfer-systemfull-consult
transfer-pattern .T
!
!
ephone-dn 1
number 8001
!
!
ephone 1
keepalive 10
mac-address 0019.E7A1.6BAB
speed-dial 1 +99111 label"mydial1"
speed-dial 2 +99222 label"mydial2"
type 7940
button 1:1
!
!
banner login ^C
-----------------------------------------------------------------------
Cisco Router and Security Device Manager (SDM) is installed onthis device.
This feature requires the one-time use of the username"cisco"
with the password "cisco". The default username andpassword have a privilege le
vel of 15.
Please change these publicly known initial credentials using SDMor the IOS CLI.
Here are the Cisco IOS commands.
username <myuser> privilege 15 secret 0 <mypassword>
no username cisco
Replace <myuser> and <mypassword> with the usernameand password you want to use
.
For more information about SDM please follow the instructions inthe 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
免责声明:以上内容源自网络,版权归原作者所有,如有侵犯您的原创版权请告知,我们将尽快删除相关内容。