脚本:
R1:
en
conf t
host CCNA
line con 0
exec-time 0 0
logg sy
exit
int fa0/1
ip add 192.168.1.254 255.255.255.0
no sh
exit
int s1/0
no sh
ip add 10.1.1.1 255.255.255.252
exit
telephony-service
max-ephones 10
max-dn 20
keepalive 10
ip source-address 192.168.1.254 port2000
system message CCNA
exit
ephone-dn 1
number 1111
name host1
exit
ephone-dn 2
number 2222
name host2
exit
ephone 1
mac-address 00D0.D345.8B84
type 7985
button 1:1
video
exit
ephone 2
mac-address 0001.C99B.B51B
type 7985
button 1:2
video
exit
dial-peer voice 1 voip
destination-pattern 3333
session target ipv4:10.1.1.2
exit
dial-peer voice 2 voip
destination-pattern 4444
session target ipv4:10.1.1.2
exit
ip route 0.0.0.0 0.0.0.0 10.1.1.2
ip dhcp excluded-address 192.168.1.254
ip dhcp pool CCNA
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
option 150 ip 192.168.1.254
end
clock set 14:30:00 5 may 2013
conf t
telephony-service
creat cnf-file
end
R2:
ene
conf t
host CCNA
line con 0
exec-time 0 0
logg sy
exit
int fa0/1
ip add 192.168.2.254 255.255.255.0
no sh
exit
int s1/0
no sh
ip add 10.1.1.2 255.255.255.252
clock rate 64000
exit
telephony-service
max-ephones 10
max-dn 20
keepalive 10
ip source-address 192.168.2.254 port 2000
system message CCNA
exit
ephone-dn 1
number 3333
name host3
exit
ephone-dn 2
number 4444
name host4
exit
ephone 1
mac-address 0090.2189.C038
type 7985
button 1:1
exi
ephone 2
mac-address 00E0.A361.0643
type 7985
button 1:2
exit
dial-peer voice 1 voip
destination-pattern 1111
session target ipv4:10.1.1.1
exit
dial-peer voice 2 voip
destination-pattern 2222
session target ipv4:10.1.1.1
exitlo
ip route 0.0.0.0 0.0.0.0 10.1.1.1
ip dhcp excluded-address 192.168.2.254
ip dhcp pool CCNA
network 192.168.2.0 255.255.255.0
default-router 192.168.2.254
option 150 ip 192.168.2.254
end
clock set 14:30:00 5 may 2013
conf t
telephony-service
creat cnf-file
end
脚本:
RouterA:
system-view
sysname RouterA
radius scheme h3c
key authentication test
key accounting test
primary authentication 1.1.1.3 1812
primary accounting 1.1.1.3 1813
user-name-format without-domain
server-type extended
domain system
authentication voip radius-scheme h3c
authorization voip radius-scheme test
accounting voip radius-scheme h3c
qu
voice-setup
dial-program
gw-access-number 12345
process-config cardnumber
card-digit 10
password-digit 4
authentication
authorization
accounting
redialtimes 3
end
RouterB:
system-view
sysname RouterB
radius scheme h3c
key authentication test
key accounting test
primary authentication 1.1.1.3 1812
primary accounting 1.1.1.3 1813
user-name-format without-domain
server-type extended
domain system
authentication voip radius-scheme h3c
authorization voip radius-scheme test
accounting voip radius-scheme h3c
qu
voice-setup
dial-program
gw-access-number 12345
process-config cardnumber
card-digit 10
password-digit 4
authentication
authorization
accounting
redialtimes 3
end