Router#show interface serial 0 Serial 0 is up, line protocol is up Hardware is MCI Serial Internet address is 150.136.190.203, subnet mask is 255.255.255.0 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 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; input queue 0/75, 0 drops Five minute input rate 0 bits/sec, 0 packets/sec Five minute output rate 0 bits/sec, 0 packets/sec 16263 packets input, 1347238 bytes, 0 no buffer Received 13983 broadcasts, 0 runts, 0 giants 2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort 22146 packets output, 2383680 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets, 0 restarts 1 carrier transitions B. 舉例: 設(shè)置如下: Router1:
interface Serial0 ip address 192.200.10.1 255.255.255.0 clockrate 1000000 Router2:
interface Serial0 ip address 192.200.10.2 255.255.255.0 ! C. 舉例使用E1線路實(shí)現(xiàn)多個(gè)64K專線連接. 相關(guān)命令: 任務(wù) 命令 進(jìn)入controller配置模式 controller {t1 e1} number 選擇幀類型 framing {crc4 no-crc4} 選擇line-code類型 linecode {ami b8zs hdb3} 建立邏輯通道組與時(shí)隙的映射 channel-group number timeslots range1 顯示controllers接口狀態(tài) show controllers e1 [slot/port]2 注: 1. 當(dāng)鏈路為T1時(shí),channel-group編號(hào)為0-23, Timeslot范圍1-24; 當(dāng)鏈路為E1時(shí), channel-group編號(hào)為0-30, Timeslot范圍1-31. 2.使用show controllers e1觀察controller狀態(tài),以下為幀類型為crc4時(shí)controllers正常的狀態(tài). Router# show controllers e1 e1 0/0 is up. Applique type is Channelized E1 - unbalanced Framing is CRC4, Line Code is HDB3 No alarms detected. Data in current interval (725 seconds elapsed): 0 Line Code Violations, 0 Path Code Violations 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations, 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins, 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs 以下例子為E1連接3條64K專線, 幀類型為NO-CRC4,非平衡鏈路,路由器具體設(shè)置如下:
shanxi#wri t Building configuration... Current configuration: ! version 11.2 no service udp-small-servers no service tcp-small-servers ! hostname shanxi ! enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/ enable passWord shanxi ! ! ip subnet-zero ! controller E1 0 framing NO-CRC4 channel-group 0 timeslots 1 channel-group 1 timeslots 2 channel-group 2 timeslots 3 ! interface Ethernet0 ip address 133.118.40.1 255.255.0.0 media-type 10BaseT ! interface Ethernet1 no ip address shutdown ! interface Serial0:0 ip address 202.119.96.1 255.255.255.252 no ip mroute-cache ! interface Serial0:1 ip address 202.119.96.5 255.255.255.252 no ip mroute-cache ! interface Serial0:2 ip address 202.119.96.9 255.255.255.252 no ip mroute-cache ! no ip classless ip route 133.210.40.0 255.255.255.0 Serial0:0 ip route 133.210.41.0 255.255.255.0 Serial0:1 ip route 133.210.42.0 255.255.255.0 Serial0:2 ! line con 0 line aux 0 line vty 0 4 password shanxi login ! end 6、配置PPP: PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的繼續(xù)者,它提供了跨過同步和異步電路實(shí)現(xiàn)路由器到路由器(router-to-router)和主機(jī)到網(wǎng)絡(luò)(host-to-network)的連接。
interface serial 0 encapsulation frame-relay interface s 0.1 multipoint ip address 11.10.11.1 255.255.255.0 frame-relay interface-dlci 41 frame-relay interface-dlci 42
Configuration for RouterC:
interface serial 0 encapsulation frame-relay interface s 0.1 point-to-point ip address 11.10.16.2 255.255.255.0 frame-relay interface-dlci 46
Configuration for RouterB:
interface serial 0 encapsulation frame-relay interface s 0.1 multipoint ip address 11.10.11.3 255.255.255.0 frame-relay interface-dlci 43 frame-relay interface-dlci 44 ! interface s 0.2 point-to-point ip address 11.10.13.1 255.255.255.0 frame-relay interface-dlci 48
Frame Relay Switching Example
Configuration for RouterA:
frame-relay switching ! int s 0 no ip address frame-relay encapsulation frame-relay route 167 tun0 43 frame-relay intf-type dce ! int s 1 ip address 131.108.100.1 255.255.255.0 ! int tu 0 tunnel source serial 1 tunnel destination 131.108.13.2
Configuration for RouterB:
frame-relay switching ! int s 0 no ip address frame-relay encapsulation frame-relay route 9 tun0 43 frame-relay intf-type dce ! int s 1 ip address 131.108.13.2 255.255.255.0 ! int tu 0 tunnel source serial 1 tunnel destination 131.108.100.1
Channelized E1 Interface Example
假設(shè)是7500系列路由器,E1接口(MIP板)在插槽4上面.一個(gè)channel-group可對(duì)應(yīng)多個(gè)時(shí)間槽,本例中serial4/0:1有5*64Kbps的數(shù)率. Configuration for Router:
interface ethernet 0 ip address 192.1.0.65 255.255.255.192 ! interface serial 0 ip address 192.200.10.6 255.255.255.252 ! router ospf 200 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.64 0.0.0.63 area 2 ! Router3:
interface ethernet 0 ip address 192.1.0.130 255.255.255.192 ! router ospf 300 network 192.1.0.128 0.0.0.63 area 1 ! Router4:
interface ethernet 0 ip address 192.1.0.66 255.255.255.192 ! router ospf 400 network 192.1.0.64 0.0.0.63 area 1 ! 相關(guān)調(diào)試命令: debug ip ospf events debug ip ospf packet show ip ospf show ip ospf database show ip ospf interface show ip ospf neighbor show ip route 3. 使用身份驗(yàn)證 為了安全的原因,我們可以在相同OSPF區(qū)域的路由器上啟用身份驗(yàn)證的功能,只有經(jīng)過身份驗(yàn)證的同一區(qū)域的路由器才能互相通告路由信息。 在默認(rèn)情況下OSPF不使用區(qū)域驗(yàn)證。通過兩種方法可啟用身份驗(yàn)證功能,純文本身份驗(yàn)證和消息摘要(md5)身份驗(yàn)證。純文本身份驗(yàn)證傳送的身份驗(yàn)證口令為純文本,它會(huì)被網(wǎng)絡(luò)探測器確定,所以不安全,不建議使用。而消息摘要(md5)身份驗(yàn)證在傳輸身份驗(yàn)證口令前,要對(duì)口令進(jìn)行加密,所以一般建議使用此種方法進(jìn)行身份驗(yàn)證。 使用身份驗(yàn)證時(shí),區(qū)域內(nèi)所有的路由器接口必須使用相同的身份驗(yàn)證方法。為起用身份驗(yàn)證,必須在路由器接口配置模式下,為區(qū)域的每個(gè)路由器接口配置口令。 任務(wù) 命令 指定身份驗(yàn)證 area area-id authentication [message-digest] 使用純文本身份驗(yàn)證 ip ospf authentication-key password 使用消息摘要(md5)身份驗(yàn)證 ip ospf message-digest-key keyid md5 key 以下列舉兩種驗(yàn)證設(shè)置的示例,示例的網(wǎng)絡(luò)分布及地址分配環(huán)境與以上基本配置舉例相同,只是在Router1和Router2的區(qū)域0上使用了身份驗(yàn)證的功能。: 1.使用純文本身份驗(yàn)證 Router1:
interface ethernet 0 ip address 192.1.0.129 255.255.255.192 ! interface serial 0 ip address 192.200.10.5 255.255.255.252 ip ospf authentication-key cisco ! router ospf 100 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.128 0.0.0.63 area 1 area 0 authentication ! Router2:
interface ethernet 0 ip address 192.1.0.65 255.255.255.192 ! interface serial 0 ip address 192.200.10.6 255.255.255.252 ip ospf authentication-key cisco ! router ospf 200 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.64 0.0.0.63 area 2 area 0 authentication ! 例2.消息摘要(md5)身份驗(yàn)證: Router1:
interface ethernet 0 ip address 192.1.0.129 255.255.255.192 ! interface serial 0 ip address 192.200.10.5 255.255.255.252 ip ospf message-digest-key 1 md5 cisco ! router ospf 100 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.128 0.0.0.63 area 1 area 0 authentication message-digest ! Router2:
interface ethernet 0 ip address 192.1.0.65 255.255.255.192 ! interface serial 0 ip address 192.200.10.6 255.255.255.252 ip ospf message-digest-key 1 md5 cisco ! router ospf 200 network 192.200.10.4 0.0.0.3 area 0 network 192.1.0.64 0.0.0.63 area 2 area 0 authentication message-digest ! 相關(guān)調(diào)試命令: debug ip ospf adj debug ip ospf events