【正文】
packet show dialer show isdn status 舉例 :執(zhí)行 debug dialer 命令觀察 router2 呼叫 router1,router1 回?fù)?router2的過程 . router1debug dialer router2ping router1 00:03:50: %LINK3UPDOWN: Interface BRI0:1, changed state to up 00:03:50: BRI0:1:PPP callback Callback server starting to router2 572 00:03:50: BRI0:1: disconnecting call 00:03:50: %LINK3UPDOWN: Interface BRI0:1, changed state to down 00:03:50: BRI0:1: disconnecting call 00:03:50: BRI0:1: disconnecting call 00:03:51: %LINK3UPDOWN: Interface BRI0:2, changed state to up 00:03:52: callback to router2 already started 00:03:52: BRI0:2: disconnecting call 00:03:52: %LINK3UPDOWN: Interface BRI0:2, changed state to down 00:03:52: BRI0:2: disconnecting call 00:03:52: BRI0:2: disconnecting call 00:04:05: : Callback timer expired 00:04:05: BRI0:beginning callback to router2 572 00:04:05: BRI0: Attempting to dial 572 00:04:05: Freeing callback to router2 572 00:04:05: %LINK3UPDOWN: Interface BRI0:1, changed state to up 00:04:05: BRI0:1: No callback negotiated 00:04:05: %LINK3UPDOWN: Interface VirtualAccess1, changed state to up 00:04:05: dialer Protocol up for Vi1 00:04:06: %LINEPROTO5UPDOWN: Line protocol on Interface BRI0:1, changed state to up 00:04:06: %LINEPROTO5UPDOWN: Line protocol on Interface VirtualAccess1, chang ed state to up 00:04:11: %ISDN6CONNECT: Interface BRI0:1 is now connected to 572 router1 4. ISDN 訪問首都在線 263 網(wǎng)實例 : Cisco 路由器配置手冊 26/61 本地局部網(wǎng)地址為 ,屬于保留地址,通過 NAT 地址翻譯功能,局域網(wǎng)用戶可以 通過 ISDN 上 263 網(wǎng)訪問 Inter。我國電話局所提供 ISDN PRI 為 30B+D。 Cisco IOS 版本 開始,軟件支持本地管理接口( LMI)“自動感覺”, “自動感覺”使接口能確定交換機支持的 LMI 類型,用戶可以不明確配置 LMI 接口類型。 幀中繼技術(shù)提供面向連接的數(shù)據(jù)鏈路層的通信,在每對設(shè)備之間都存在一條定義好的通信鏈路,且該鏈路有一個鏈路識別碼。我們知道為了避免路由循環(huán),路由器支持 split horizon 法則,它只允許路由更新被分配到路由器的其它接口,而不會 再分配路由更新回到此路由被接收的接口。 2. 有關(guān)命令 : 任務(wù) 命令 設(shè)置 封裝 encapsulation x25 [dce] 設(shè)置 地址 x25 address 設(shè)置遠(yuǎn)方站點的地址映射 x25 map protocol address [protocol2 address2[...[protocol9 address9]]] x121address [option] 設(shè)置最大的雙向虛電路數(shù) x25 htc citcuitnumber1 設(shè)置一次連接可同時建立的虛電路數(shù) x25 nvc count2 設(shè)置 x25 在清除空閑虛電路前的等待周期 x25 idle minutes 重新啟動 x25,或清一個 svc,啟動一個 pvc 相關(guān)參數(shù) clear x25 {serial number | cmnsinterface macaddress} [vcnumber] 3 清 x25 虛電路 clear x25vc 顯示接口及 x25 相關(guān)信息 show interfaces serial show x25 interface show x25 map show x25 vc 注: 虛電路號從 1 到 4095, Cisco 路由器默認(rèn)為 1024,國內(nèi)一般分配為 16。 的第一層定義了電氣和物理端口特性。 CHAP 和 PAP 在 RFC 1334 上有詳細(xì)的說明。由于在 Router1上端口 Serial 0地址為 , 這個網(wǎng)屬于直連的網(wǎng),已經(jīng)存在訪問 ,所以不需要在 Router1 上添加靜態(tài)路由。 4. 使用網(wǎng)絡(luò)地址翻譯( NAT) NAT( Network Address Translation)起到將內(nèi)部私有地址翻譯成外部合法的全局地址的功能,它使得不具有合法 IP 地址的用戶可以通過 NAT 訪問到外部 Inter. 當(dāng)建立內(nèi)部 網(wǎng)的時候 ,建議使用以下地址組用于主機 ,這些地址是由 Network Working Group(RFC 1918)保留用于私有網(wǎng)絡(luò)地址分配的 . Class A: to Class B: to Class C: to 命令描述如下: 任務(wù) 命令 定義一個標(biāo)準(zhǔn)訪問列表 accesslist accesslistnumber permit source [sourcewildcard] 定義一個全局地址池 ip nat pool name startip endip {mask mask | prefixlength prefixlength} [type rotary] 建立動態(tài)地址翻譯 ip nat inside source {list {accesslistnumber | name} pool name [overload] | static localip globalip} 指定內(nèi)部和外部端口 ip nat {inside | outside} 如下圖所示, Cisco 路由器配置手冊 9/61 路由器的 Ether 0 端口為 inside 端口,即此端口連接內(nèi)部網(wǎng) 絡(luò),并且此端口所連接的網(wǎng)絡(luò)應(yīng)該被翻譯, Serial 0 端口為 outside 端口,其擁有合法 IP 地址(由 NIC 或服務(wù)提供商所分配的合法的 IP 地址) ,來自網(wǎng)絡(luò) 地址作為自己的合法地址,經(jīng)由 Serial 0 口訪問 Inter。 接下來,系統(tǒng)會對 每個接口進行參數(shù)的設(shè)置。 設(shè)置對話過程 顯示提示信息 全局參數(shù)的設(shè)置 接口參數(shù)的設(shè)置 顯示結(jié)果 利用設(shè)置對話過程可以避免手工輸入命令的煩瑣,但它還不能完全代替手工設(shè)置,一些特殊的設(shè)置還必須通過手工輸入的方式完成。 2. router 在 router提示符下鍵入 enable,路由器進入特權(quán)命令狀態(tài) router,這時不但可以執(zhí)行所有的用戶命令,還可以看到和更改路由器的設(shè)置內(nèi)容。 router(configline)。 for help. Use ctrlc to abort configuration dialog at any prompt. Default settings are in square brackets 39。 顯示結(jié)束后,系統(tǒng)會問是否使用這個設(shè)置: Use this configuration? [yes/no]: yes 如果回答 yes,系統(tǒng)就會把設(shè)置的結(jié)果存入路由器的 NVRAM 中,然后結(jié)束設(shè)置對話過程,使路由器開始正常的工作。 設(shè)置如下: ip nat pool c2501 mask interface Ether 0 ip address ip nat inside ! interface Serial 0 ip address ip nat outside ! ip route Serial 0 accesslist 2 permit ! Dynamic NAT ! ip nat inside source list 2 pool c2501 overload line console 0 exectimeout 0 0 ! line vty 0 4 end 配 置靜態(tài)路由 通過配置靜態(tài)路由,用戶可以人為地指定對某一網(wǎng)絡(luò)訪問時所要經(jīng)過的路徑 ,在網(wǎng)絡(luò)結(jié)構(gòu)比較簡單,且一般到達某一網(wǎng)絡(luò)所經(jīng)過的路徑唯一的情況下采用靜態(tài)路由。 1. 有關(guān)命令 Cisco 路由器配置手冊 11/61 端口設(shè)置 任務(wù) 命令 設(shè)置 HDLC 封裝 encapsulation hdlc 設(shè)置 DCE 端線路速度 clockrate speed 復(fù)位一個硬件接口 clear interface serial unit 顯示接口狀態(tài) show interfaces serial [unit] 1 注 : Cisco 同步串口狀態(tài)的例子 . Routershow interface serial 0 Serial 0 is up, line protocol is up Hardware is MCI Serial Inter address is , sub mask is MTU 1500 bytes, BW 1544 Kbit, DLY 20200 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 0:00:07, output 0:00:00, output hang never Output queue 0/40, 0 drops。 2. 舉例 路由器 Router1 和 Router2 的 S0 口均封裝 PPP 協(xié)議,采用 CHAP 做認(rèn)證,在 Router1 中應(yīng)建立一個用戶,以對端路由器主機名作為用戶名,即用戶名應(yīng)為 router2。 DCE 設(shè)備是專用通信設(shè)備,如調(diào)制解調(diào)器和分組交換機。同時應(yīng)對照服務(wù)提供商對于 交換機端口的設(shè)置來配置路由器的相關(guān)參數(shù),若出現(xiàn)參數(shù)不匹配則可能會導(dǎo)致連接失敗或其它意外情況。你可以將路由器邏輯地連接到相同物理接口的不同子接口 , 這樣來自不同子接口的路由更新就可以被分配到其他子接口,同時又滿足 split horizon 法則。幀中繼 即支持 PVC 也支持 SVC。 ISDN 的基本速率接口( BRI)服務(wù)提供 2 個 B 信道和 1 個 D 信道( 2B+D)。 covers the EuroISDN EDSS1 signalling system primary5 NET5 switches (UK and Europe) vn2 French VN2 ISDN switches vn3 French VN3 ISDN switches Japan ntt Japanese NTT ISDN switches primaryntt Japanese ISDN PRI switches North America basic5ess ATamp。 set user remote 使用 PPP/IPCP set ip framing none 設(shè)置上網(wǎng)用戶帳號 set ppp clientname 263 設(shè)置上網(wǎng)口令 set ppp password client Enter new Password: 263 ReType new Password: 263 不用 PPP/CHAP或 PAP做認(rèn)證 set ppp authenti