4. ISDN訪問首都在線263網(wǎng)實例: 本地局部網(wǎng)地址為10.0.0.0/24,屬于保留地址,通過NAT地址翻譯功能,局域網(wǎng)用戶可以通過ISDN上263網(wǎng)訪問Internet。263的ISDN電話號碼為2633,用戶為263,口令為263,所涉及的命令如下表:
任務
命令
指定接口通過PPP/IPCP地址協(xié)商獲得IP地址
ip address negotiated
指定內(nèi)部和外部端口
ip nat {inside | outside}
使用ppp/pap作認證
ppp authentication pap callin
指定接口屬于撥號組1
dialer-group 1
定義撥號組1允許所有IP協(xié)議
dialer-list 1 protocol ip permit
設(shè)定撥號,號碼為2633
dialer string 2633
設(shè)定登錄263的用戶名和口令
ppp pap sent-username 263 password 263
設(shè)定默認路由
ip route 0.0.0.0 0.0.0.0 bri 0
設(shè)定符合訪問列表2的所有源地址被翻譯為bri 0所擁有的地址
ip nat inside source list 2 interface bri 0 overload
設(shè)定訪問列表2,允許所有協(xié)議
access-list 2 permit any
具體配置如下:
hostname Cisco2503
!
isdn switch-type basic-net3
!
ip subnet-zero
no ip domain-lookup
ip routing
!
interface Ethernet 0
ip address 10.0.0.1 255.255.255.0
ip nat inside
no shutdown
!
interface Serial 0
shutdown
no description
no ip address
!
interface Serial 1
shutdown
no description
no ip address
!
interface bri 0
ip address negotiated
ip nat outside
encapsulation ppp
ppp authentication pap callin
ppp multilink
dialer-group 1
dialer hold-queue 10
dialer string 2633
dialer idle-timeout 120
ppp pap sent-username 263 password 263
no cdp enable
no ip split-horizon
no shutdown
!
ip classless
!
! Static Routes
!
ip route 0.0.0.0 0.0.0.0 bri 0
!
! Access Control List 2
!
access-list 2 permit any
!
dialer-list 1 protocol ip permit
!
! Dynamic NAT
!
ip nat inside source list 2 interface bri 0 overload
snmp-server community public ro
!
line console 0
exec-timeout 0 0
!
line vty 0 4
!
end
5. Cisco765M通過ISDN撥號上263
由于Cisco765的設(shè)置命令與我們常用的Cisco路由器的命令不同,所以以下列舉了通過Cisco765上263訪問Internet的具體命令行設(shè)置步驟。
>set system c765
c765> set multidestination on
c765> set switch net3
c765> set ppp multilink on
c765> cd lan
c765:LAN> set ip routing on
c765:LAN> set ip address 10.0.0.1
c765:LAN> set ip netmask 255.0.0.0
c765:LAN> set briding off
c765:LAN>cd
c765> set user remotenet
New user remotenet being created
c765:remotenet> set ip routing on
c765:remotenet> set bridging off
c765:remotenet> set ip framing none
c765:remotenet> set ppp clientname 263
c765:remotenet> set ppp password client
Enter new Password: 263
Re-Type new Password: 263
c765:remotenet> set ppp authentication out none
c765:remotenet> set ip address 0.0.0.0
c765:remotenet> set ip netmask 0.0.0.0
c765:remotenet> set ppp address negotiation local on
c765:remotenet> set ip pat on
c765:remotenet> set ip route destination 0.0.0.0/0 gateway 0.0.0.0
c765:remotenet> set number 2633
c765:remotenet> set active
命令描述如下:
任務
命令
設(shè)置路由器系統(tǒng)名稱
set system c765
允許路由器呼叫多個目的地
set multidestination on
設(shè)置ISDN交換機類型為NET3
set switch net3
允許點到點間多條通道連接實現(xiàn)負載均衡
set ppp multilink on
關(guān)掉橋接
set briding off
建立用戶預制文件用于設(shè)置撥號連接參數(shù)- 可以設(shè)置多個用戶預制文件用于相同的物理端口對應于不同的連接。
set user remotenet
使用PPP/IPCP
set ip framing none
設(shè)置上網(wǎng)用戶帳號
set ppp clientname 263
設(shè)置上網(wǎng)口令
set ppp password client
Enter new Password: 263
Re-Type new Password: 263
不用PPP/CHAP或PAP做認證
set ppp authentication out none
允許地址磋商
set ppp address negotiation local on
設(shè)置地址翻譯
set ip pat on
設(shè)置默認路由
set ip route destination 0.0.0.0/0 gateway 0.0.0.0
設(shè)置ISP的電話號碼
set number 2633
激活用戶預制文件
set active