Xem mẫu
- CCNA Tài li u dành cho h c viên
Ph n 5 : WAN
BÀI 26: C U HÌNH PPP PAP VÀ CHAP
1. Gi i thi u :
PPP (Point-to-Point Protocol) là giao th c óng gói c s d ng th c hi n k t n i
trong m ng WAN. PPP bao g m LCP (Link Control Protocol) và NCP (Network Control
Protocol). LCP c dùng thi t l p k t n i point-to-point, NCP dùng c u hình cho các
giao th c l p m ng khác nhau.
PPP có th c c u hình trên các interface v t lý sau :
Asynchronous serial : c ng serial b t ng b
Synchronous serial : c ng serial ng b
High-Speed Serial Interface (HSSI) : c ng serial t c cao
Integrated Services Digital Network (ISDN)
Quá trình t o session c a PPP g m ba giai o n (phase):
Link-establishment phase
Authentication phase (tùy ch n)
Network layer protocol phase
Tùy ch n xác nh n (authentication) giúp cho vi c qu n lý m ng d dàng h n. PPP s
d ng hai cách xác nh n là PAP (Password Authentication Protocol) và CHAP (Challenge
Handshake Authentication Protocol).
PAP là d ng xác nh n two-way handshake. Sau khi t o liên k t node u xa s g i
usename và password l p i l p l i cho n khi nh n c thông báo ch p nh n ho c t ch i.
Password trong PAP c g i i d ng clear text (không mã hóa).
CHAP là d ng xác nh n three-way handshake. Sau khi t o liên k t, router s g i thông
i p “challenge” cho router u xa. Router u xa s g i l i m t giá tr c tính toán d a
trên password và thông i p “challenge” cho router. Khi nh n c giá tr này, router s ki m
tra l i xem có gi ng v i giá tr c a nó ã tính hay không. N u úng, thì router xem g i xác
nh n úng và k t n i c thi t l p; ng c l i, k t n i s b ng t ngay l p t c.
2. Các câu l nh s d ng trong bài lab :
username name password password
C u hình tên và password cho CHAP và PAP. Tên và password này ph i gi ng v i
router u xa.
encapsulation ppp
C u hình cho interface s d ng giao th c PPP
ppp authentication (chap chap pap pap chap pap)
C u hình cho interface s d ng PAP, CHAP, ho c c hai. Trong tr ng h p c hai
c s d ng, giao th c u tiên c s d ng trong quá trình xác nh n; n u nh giao
th c u b t ch i ho c router u xa yêu c u dùng giao th c th hai thì giao th c th
hai c dùng.
ppp pap sent-username username password password
C u hình username và password cho PAP
debug ppp authentication
Xem trình t xác nh n c a PAP và CHAP
VSIC Education Corporation Trang 164
- CCNA Tài li u dành cho h c viên
3. Mô t bài lab và hình :
hình bài lab nh hình v . Hai router c t tên là Vsic, Vsic2 và c n i v i nhau
b ng cáp serial. a ch IP c a các interface nh hình trên.
4. C u hình router :
a) B c 1 : t tên và a ch cho các interface
Vsic1#sh run
Building configuration...
Current configuration : 497 bytes
version 12.1
hostname Vsic1
enable password cisco
interface Serial0
ip address 192.168.1.1 255.255.255.0
clockrate 64000
end
Vsic2#sh run
Building configuration...
Current configuration : 423 bytes
version 12.1
hostname Vsic2
enable password cisco
interface Serial0
ip address 192.168.1.2 255.255.255.0
end
Chúng ta s ki m tra tr ng thái c a các c ng b ng câu l nh show ip interface brief
Vsic2#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0 unassigned YES unset administratively down down
Serial0 192.168.1.2 YES manual up up
Serial1 unassigned YES unset administratively down down
C ng serial c a router Vsic2 ã up. Làm t ng t ki m tra tr ng thái các c ng c a
router Vsic1.
Chúng ta s d ng câu l nh show interfaces serial bi t c các thông s c a
interface serial các router
Vsic2#sh interfaces serial 0
VSIC Education Corporation Trang 165
- CCNA Tài li u dành cho h c viên
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:02, output 00:00:01, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
15 packets input, 846 bytes, 0 no buffer
Received 15 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
19 packets output, 1708 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
Vsic1#sh int s 0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 00:11:35
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
21 packets input, 2010 bytes, 0 no buffer
Received 21 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
23 packets output, 1280 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface resets
0 output buffer failures, 0 output buffers swapped out
7 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
VSIC Education Corporation Trang 166
- CCNA Tài li u dành cho h c viên
C hai c ng serial c a hai router u s d ng giao th c óng gói là HDLC và tr ng thái c a c
hai u là up
b) B c 2 : C u hình PPP PAP, CHAP
C u hình PPP PAP
ng router Vsic1, chúng ta s c u hình PPP cho interface serial 0 b ng câu l nh
encapsulation ppp
Vsic1(config)#in s0
Vsic1(config-if)#encapsulation ppp
Ki m tra tr ng thái interface serial 0 c a router Vsic1
Vsic1#sh ip int brie
Interface IP-Address OK? Method Status Protocol
Ethernet0 unassigned YES unset administratively down down
Serial0 192.168.1.1 YES manual up down
Serial1 unassigned YES unset administratively down down
Vsic1#sh int s 0
Serial0 is up, line protocol is down
Hardware is HD64570
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set
Keepalive set (10 sec)
LCP REQsent
Closed: IPCP, CDPCP
Last input 00:00:08, output 00:00:01, output hang never
Last clearing of "show interface" counters 00:00:15
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1 packets input, 22 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
7 packets output, 98 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
Nh n xét : interface serial 0 c a router Vsic1 ã b down, ng ngh a v i interface serial 0
c a router Vsic2 c ng b down. Nguyên nhân là hai interface này s d ng giao th c óng gói
khác nhau. (Interface serial 0 c a router Vsic1 s d ng PPP còn Vsic2 s d ng HDLC).
Ví v y chúng ta ph i c u hình cho interface serial 0 c a router Vsic2 c ng s d ng giao th c
PPP.
Vsic2(config)#in s0
VSIC Education Corporation Trang 167
- CCNA Tài li u dành cho h c viên
Vsic2(config-if)#encapsulation ppp
Bây gi chúng ta s ki m tra tr ng thái c a các interface
Vsic2#sh int s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set
Keepalive set (10 sec)
LCP Open
Open: IPCP, CDPCP
Last input 00:00:01, output 00:00:01, output hang never
Last clearing of "show interface" counters 00:00:18
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
15 packets input, 1004 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
13 packets output, 976 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
C hai interface c a hai router ã up tr l i. Do c hai ã c c u hình s d ng cùng
giao th c óng gói là PPP.
Tr c khi c u hình PAP cho hai interface chúng ta s d ng câu l nh debug ppp
authentication xem trình t trao i thông tin c a PAP.
Vsic2#debug ppp authentication
PPP authentication debugging is on
Chúng ta s c u hình PAP cho c hai interface serial 0 nh sau :
Vsic1(config)#username Vsic2 password cisco
Vsic1(config)#in s0
Vsic1(config-if)#ppp authentication pap
Vsic1(config-if)#ppp pap sent-username Vsic1 password cisco
Vsic2(config)#username Vsic1 password cisco
Vsic2(config)#in s0
Vsic2(config-if)#ppp authentication pap
Vsic2(config-if)#ppp pap sent-username Vsic2 password cisco
L uý:
Trong câu l nh username name password password , name và password ph i trùng
v i name và password c a router u xa.
VSIC Education Corporation Trang 168
- CCNA Tài li u dành cho h c viên
Còn trong câu l nh ppp pap sent-username name password password , name và
password là c a chính router chúng ta c u hình
Sau khi chúng ta c u hình PAP xong trên route Vsic2, thì màn hình s xu t hi n trình
t c a PAP
00:09:49: Se0 PPP: Phase is AUTHENTICATING, by both
00:09:49: Se0 PAP: O AUTH-REQ id 1 len 18 from "Vsic2"
00:09:49: Se0 PAP: I AUTH-REQ id 1 len 18 from "Vsic1"
00:09:49: Se0 PAP: Authenticating peer Vsic1
00:09:49: Se0 PAP: O AUTH-ACK id 1 len 5
00:09:49: Se0 PAP: I AUTH-ACK id 1 len 5
00:09:50: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed
state to up
Ý ngh a c a các thông báo :
Dòng thông báo 1 : PPP th c hi n xác nh n hai chi u
Dòng thông báo 2 : Vsic2 g i yêu c u xác nh n
Dòng thông báo 3 : Nh n yêu c u xác nh n t Vsic1
Dòng thông báo 4 : Nh n xác nh n c a Vsic1
Dòng thông báo 5 : G i xác nh n úng n Vsic1
Dòng thông báo 6 : Nh n xác nh n úng t Vsic1
Dòng thông báo 7 : Tr ng thái c a interface c chuy n sang UP
Nh v y hai interface c a router Vsic1 và Vsic2 ã up. Chúng ta ng router Vsic2 ping
interface serial 0 c a router Vsic1 ki m tra.
Vsic2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/60 ms
C u hình PPP CHAP
Tr c khi c u hình PPP CHAP cho hai interface chúng ta g b PAP c hai router
Vsic1(config)#in s0
Vsic1(config-if)#no ppp authentication pap
Vsic1(config-if)#no ppp pap sent-username Vsic1 password cisco
Vsic2(config)#in s0
Vsic2(config-if)#no ppp authentication pap
Vsic2(config-if)#no ppp pap sent-username Vsic2 password cisco
Bây gi chúng ta s c u hình CHAP b ng câu l nh ppp authentication chap
Vsic1(config)#in s0
Vsic1(config-if)#ppp authentication chap
Vsic2(config)#in s0
Vsic2(config-if)#ppp authentication chap
L u ý : khi c u hình PPP CHAP chúng ta v n ph i c u hình cho interface serial ó s d ng
giao th c óng gói PPP b ng câu l nh encapsulation ppp và c ng ph i s d ng câu l nh
VSIC Education Corporation Trang 169
- CCNA Tài li u dành cho h c viên
username name password password c u hình name và password cho giao th c CHAP th c
hi n xác nh n. ây, chúng ta không th c hi n l i các câu l nh ó vì b c c u hình PAP
chúng ta ã th c hi n r i.
Do chúng ta ã s d ng câu l nh debug ppp authentication router Vsic2, nên khi c u hình
CHAP xong hai router thì màn hình s hi n thông báo nh sau : (console cniv i
router Vsic2)
00:15:08: Se0 CHAP: O CHALLENGE id 1 len 28 from "Vsic2"
00:15:08: Se0 CHAP: I CHALLENGE id 2 len 28 from "Vsic1"
00:15:08: Se0 CHAP: O RESPONSE id 2 len 28 from "Vsic2"
00:15:08: Se0 CHAP: I RESPONSE id 1 len 28 from "Vsic1"
00:15:08: Se0 CHAP: O SUCCESS id 1 len 4
00:15:08: Se0 CHAP: I SUCCESS id 2 len 4
00:15:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to
up
Ý ngh a c a các câu thông báo :
Dòng thông báo 1 : Vsic2 g i thông báo “challenge” n router Vsic1
Dòng thông báo 2 : Vsic2 nh n thông báo “challenge” t router Vsic1
Dòng thông báo 3 : Vsic2 g i response n router Vsic1
Dòng thông báo 4 : Vsic2 nh n response t router Vsic1
Dòng thông báo 5 : Vsic2 g i xác nh n thành công n Vsic1
Dòng thông báo 6 : Vsic2 nh n xác nh n thành công t Vsic1
Dòng thông báo 7 : Tr ng thái c a interface serial c chuy n sang UP
Hai interface serial c a router Vsic1 và Vsic2 ã UP, chúng ta ng router Vsic2 ping n
interface serial 0 c a router Vsic1 ki m tra
Vsic2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/60 ms
N u nh name và password trong câu l nh username name password password không úng
thì tr ng thái c a interface s b down. Do quá trình xác nh n gi a hai interface s s d ng
name và password này. N u nh không kh p thì k t n i s b h y
5. T th c hành b ng Dynagen:
ây là s n gi n, h c viên ch c n ch y file lab26ppp.net th c hành bài trên.
VSIC Education Corporation Trang 170
- CCNA Tài li u dành cho h c viên
BÀI 27:C U HÌNH ISDN BASIC
1. Gi i thi u :
ISDN (Integrated Services Digital Network) là m t công ngh truy n d n t c cao
và quay s c s d ng r ng rãi .H th ng m ng này c t o ra cach ây 20 n m và c
ng d ng r ng rãi t i U.S.A u n m 1990.
ISDN l à m ng ph c v cho viêc truy n d n d li u s m t m ng ISDN BRI t
tiêu chu n có th tt it c 128Kbps.
D li u c up lên sau m i 10 giây m ng ISDN cho phép truy n d n các tín hi u
s ,các kênh s ng th i trên dây i n tho i analog thông th ng và u bên kia c gi i
mã qua modem hay các thi t b khác .
2. Mô t bài lab và hình :
Trong bài này chúng ta s s d ng m t thi t b mô ph ng ISDN. Chúng ta s n i hai
router vào thi t b ó b ng cáp th ng.
3. C u hình :
a. C u hình cho router Vsic2:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Vsic2
Vsic2(config)#isdn switch-type basic-ni c u hình lo i ISDN switch
Vsic2(config)#dialer-list 1 protocol ip permit
Vsic2(config)#username Vsic1 password cisco
Vsic2(config)#interface bri 0
Vsic2(config-if)#encapsulation ppp c u hình giao th c óng gói là PPP
Vsic2(config-if)#ip address 200.10.1.2 255.255.255.0
Vsic2(config-if)#isdn spid1 21 21 S SPID number 21 –phone numbers 21
Vsic2(config-if)#dialer-group 1
Vsic2(config-if)#dialer map ip 200.10.1.1 name Vsic1 broadcast 11 c u hình
s c a router u xa Ahena2 th c hi n cu c g i
Vsic2(config-if)#ppp authentication chap c u hình PPP CHAP
Vsic2(config-if)#no shut
Vsic2(config-if)#
b. C u hình cho router Vsic1 :
Router(config)#hostname Vsic1
Vsic1(config)#isdn switch-type basic-ni
VSIC Education Corporation Trang 171
- CCNA Tài li u dành cho h c viên
Vsic1(config)#dialer-list 1 protocol ip permit
Vsic1(config)#username Vsic2 password cisco
Vsic1(config)#interface bri 0
Vsic1(config-if)#encapsulation ppp
Vsic1(config-if)#
Vsic1(config-if)#ip address 200.10.1.1 255.255.255.0
Vsic1(config-if)#isdn spid1 11 11
Vsic1(config-if)#dialer-group 1
Vsic1(config-if)#dialer map ip 200.10.1.2 name Vsic2 broadcast 21
Vsic1(config-if)#ppp authentication chap
Vsic1(config-if)#no shut
Sau khi c u hình xong chúng ta ki m tra l i b ng cách :
Vsic2#sh run
Building configuration...
Current configuration : 726 bytes
!
version 12.1
!
hostname Vsic2
!
username Vsic1 password 0 cisco
!
ip subnet-zero
!
isdn switch-type basic-ni
!
interface BRI0
ip address 200.10.1.2 255.255.255.0
encapsulation ppp
dialer map ip 200.10.1.1 name Vsic1 broadcast 11
dialer-group 1
isdn switch-type basic-ni
isdn spid1 21
ppp authentication chap
!
dialer-list 1 protocol ip permit
end
Vsic2#sh interfaces bri 0
BRI0 is up, line protocol is up (spoofing)
Hardware is BRI
Internet address is 200.10.1.2/24
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set
Last input never, output 00:00:22, output hang never
Last clearing of "show interface" counters 00:18:04
VSIC Education Corporation Trang 172
- CCNA Tài li u dành cho h c viên
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/16 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
1 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 1 abort
10 packets output, 80 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
111 carrier transitions
Chúng ta ki m tra tr ng thái k t n i c a liên k t ISDN b ng câu l nh sau :
Vsic1#sh isdn status
Global ISDN Switchtype = basic-net3
ISDN BRI0 interface
dsl 0, interface ISDN Switchtype = basic-net3
Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 64, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
0 Active Layer 3 Call(s)
Active dsl 0 CCBs = 0
The Free Channel Mask: 0x80000003
Number of L2 Discards = 0, L2 Session ID = 13
Total Allocated ISDN CCBs = 0
Vsic2#sh isdn status
Global ISDN Switchtype = basic-net3
ISDN BRI0 interface
dsl 0, interface ISDN Switchtype = basic-net3
Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 67, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
0 Active Layer 3 Call(s)
Active dsl 0 CCBs = 0
The Free Channel Mask: 0x80000003
Number of L2 Discards = 0, L2 Session ID = 3
Total Allocated ISDN CCBs = 0
N u c u hình úng thì tr ng thái c a Layer 1 là ACTIVE và Layer 2 là
MULTIPLE_FRAME_ESTABLISHED
VSIC Education Corporation Trang 173
- CCNA Tài li u dành cho h c viên
ng router Vsic2, chúng ta ping a ch 200.10.1.1 ki m tra k t n i :
Vsic2#ping 200.10.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.10.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/36/36 ms
Nh n xét : ping thành công và router Vsic2 th c hi n k t n i v i router Vsic1 s dùng
interface dialer 0
Vsic2#sh interfaces bri 0
BRI0 is up, line protocol is up (spoofing)
Hardware is BRI
Internet address is 200.10.1.2/24
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set
Last input 00:00:05, output 00:00:05, output hang never
Last clearing of "show interface" counters 00:09:45
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/16 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
103 packets input, 1111 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
70 packets output, 309 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface resets
0 output buffer failures, 0 output buffers swapped out
5 carrier transitions
L nh show dialer dùng ch tr ng thái kênh B s ng t, s t gi m (drop) sau 120 giây
inactive.
Tr ng thái giao ti p BRI c a router Athen2 c xác nh v i tr ng thái c a router
Athnena1.C ng giao ti p BRI0 c ch d n n kênh D c a m ng trong trang thái này là
UP/UP (spoofing state) ch ng t r ng kênh D ã ho t ng
Vsic2#sh dialer
BRI0 - dialer type = ISDN
Dial String Successes Failures Last DNIS Last status
11 1 0 01:31:13 successful
0 incoming call(s) have been screened.
0 incoming call(s) rejected for callback.
BRI0:1 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
VSIC Education Corporation Trang 174
- CCNA Tài li u dành cho h c viên
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is idle
BRI0:2 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is idle
Vsic1#show dialer
BRI0 - dialer type = ISDN
Dial String Successes Failures Last DNIS Last status
21 0 1 00:01:43 failed
0 incoming call(s) have been screened.
0 incoming call(s) rejected for callback.
BRI0:1 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is idle
BRI0:2 - dialer type = ISDN
Idle timer (120 secs), Fast idle timer (20 secs)
Wait for carrier (30 secs), Re-enable (15 secs)
Dialer state is idle
Bây gi n u nh i s s SPID hay là s Phone numbers thì tr ng thái s thay i,
h th ng ng nhiên là s không th k t n i c.
Vsic2(config)#interface bri0
Vsic2(config-if)#no isdn spid1 21 21
Vsic2(config-if)#isdn spid1 14 14
Vsic2(config-if)#no shut
Vsic2(config-if)#
02:16:31: %ISDN-6-LAYER2DOWN: Layer 2 for Interface BRI0, TEI 70 changed to
down
Vsic2(config-if)#dialer idle-timeout 20 c u hình th i gian idle-timeout là 20s
Vsic2(config-if)#no shut
Vsic2(config-if)#^Z
Vsic2#
Vsic1#ping 200.10.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.10.1.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
4. Cách t th c hành b ng Boson Netsim :
VSIC Education Corporation Trang 175
- CCNA Tài li u dành cho h c viên
M ch ng trình Boson Netsim b t u th c hành. Ta vào File Load
Netmap Ch n file lab27ISDN.top. S gi ng nh s th c hành trên, spid1 v n là 11 và
22..
Ta chú ý r ng trong tr ng trình simulation Boson Netsim khác 1 chút so v i c u hình
th c t , chúng ta ph i thêm “dial string” và trong l nh “isdn spid1” ch c n ch s spid1 là ,
không c n ph i ch ra s i n tho i trong l nh này.
Sau ây là c u hình trên Router VSIC1 vào VSIC2 c a Boson Netsim, khi c u hình
xong ta test b ng l nh ping gi a 2 u router VSIC1 và VSIC2.
VSIC Education Corporation Trang 176
- CCNA Tài li u dành cho h c viên
VSIC Education Corporation Trang 177
- CCNA Tài li u dành cho h c viên
VSIC Education Corporation Trang 178
- CCNA Tài li u dành cho h c viên
BÀI 28: C U HÌNH ISDN DDR
1. Gi i thi u :
ISDN (Integrated Services Digital Network) là m ng s tích h p a d ch v , cung c p cho
chúng ta nhi u lo i hình d ch v s khác nhau, bao g m : data và tho i. ISDN cho phép truy n
các kênh s ng th i trên dây i n tho i thông th ng.
K thu t dial-on-demand routing (DDR) c phát tri n b i Cisco cho phép chúng ta s
d ng ng dây i n tho i t o thành m t m ng WAN. DDR cho phép router th c hi n k t
n i khi có traffic c g i và ng t k t n i khi không c n n. i u này giúp chúng ta ti t
ki m c chi phí r t nhi u.
Trong k thu t DDR, ch khi g p interesting traffic router m i th c hi n k t n i, ngoài ra
thì không. i u này giúp chúng ta qu n lý c m ng t t h n.
Ngoài ra, DDR s d ng idle timeout xác nh th i gian router ng t k t n i n u nh
không có interesting traffic nào c g i.
2. Các câu l nh s d ng trong bài lab :
isdn switch-type switch-type
C u hình lo i c a ISDN switch
isdn spid1 spid number [ldn]
C u hình s SPID và ldn
dialer-list dialer-group-num protocol protocol-name {permit | deny | list access-list-
number}
T o dialer list nh ngh a intersting traffic cho router.
dialer-group group-number
Nhúng dialer list vào m t interface
dialer idle-timeout seconds
C u hình th i gian idle-timeout
dialer pool member number
T o dialer pool
dialer pool number
Nhúng m t dialer interface vào dialer pool
dialer remote name username
C u hình tên c a router u xa
dialer string dial string
C u hình s quay k t n i v i router u xa
3. Mô t bài lab và hình :
VSIC Education Corporation Trang 179
- CCNA Tài li u dành cho h c viên
Trong bài Lab này chúng ta s d ng hai router có c ng BRI và thi t b mô ph ng môi
tr ng ISDN. Cáp n i t c ng BRI c a router n thi t b mô ph ng môi tr ng BRI là cáp
th ng.
Chúng ta kh i t o Loopback 0, Loopback 1, Loopback 2 c hai router. a ch các
c ng c chú thích ngay trên hình. Password c a c hai router là : cisco
4. M c tiêu bài lab :
C u hình k t n i gi a hai router thông qua môi tr ng ISDN trong ch d Dial-on-
demand routing (DDR) s d ng interface dialer.
5. C u hình router :
B c 1: c u hình tên router, các interface loopback và m ng telnet hai router
VSIC1#sh run
Current configuration : 1301 bytes
version 12.1
hostname VSIC1
enable password cisco
interface Loopback0
ip address 10.1.0.1 255.255.255.0
interface Loopback1
ip address 11.1.0.1 255.255.255.0
interface Loopback2
ip address 12.1.0.1 255.255.255.0
line con 0
line aux 0
line vty 0 4
password cisco
login
end
VSIC2#sh run
Current configuration : 1204 bytes
version 12.1
hostname VSIC2
enable password cisco
interface Loopback0
ip address 13.1.0.1 255.255.255.0
interface Loopback1
ip address 14.1.0.1 255.255.255.0
interface Loopback2
ip address 15.1.0.1 255.255.255.0
line con 0
line aux 0
line vty 0 4
password cisco
login
end
VSIC Education Corporation Trang 180
- CCNA Tài li u dành cho h c viên
B c 2: C u hình lo i ISDN Switch s d ng và s SPID và ldn.
S SPID và ldn c cung c p b i nhà cung c p d ch v ISDN.
VSIC1#conf t
VSIC1(config)#isdn switch-type basic-net3 C u hình lo i ISDN witch
VSIC1(config)# in bri0
VSIC1(config-if)#isdn spid1 21 21 C u hình s SPID và ldn
VSIC2#conf t
VSIC2(config)#isdn switch-type basic-net3
VSIC2(config)# in bri0
VSIC2(config-if)#isdn spid1 11 11
B c 3 : nh tuy n cho các router
ây chúng ta dùng Static route nh tuy n cho các router ch không dùng các
giao th c nh tuy n ng nh RIP, IGRP … Lý do ta ph i dùng static route se c gi i
thích m c Nguyên nhân không nên dùng các giao th c nh tuy n ng trong c u hình
ISDN DDR
VSIC1#conf t
VSIC1(config)#ip route 13.1.0.0 255.255.255.0 192.168.0.2
VSIC1(config)#ip route 14.1.0.0 255.255.255.0 192.168.0.2
VSIC1(config)#ip route 15.1.0.0 255.255.255.0 192.168.0.2
VSIC2#conf t
VSIC2(config)#ip route 10.1.0.0 255.255.255.0 192.168.0.1
VSIC2(config)#ip route 11.1.0.0 255.255.255.0 192.168.0.1
VSIC2(config)#ip route 12.1.0.0 255.255.255.0 192.168.0.1
B c 4 : C u hình interesting traffic
Router ch th c hi n k t n i khi và ch khi g p các interesting traffic; ngoài ra, router
s không k t n i. Interesting traffic c nh ngh a cho router b ng : lo i traffic, ngu n ho c
ích n c a m t gói tin. (thông qua access list).
Interesting traffic c c u hình b ng câu l nh dialer-list.
Trong bài này, i v i router VSIC1, chúng ta c u hình interesting traffic là t t c các traffic
khác traffic telnet n m ng 14.1.0.0/24. Chúng ta dùng Extended access list c u hình.
VSIC1#conf t
VSIC1(config)#access-list 101 deny tcp any 14.1.0.0 0.0.0.255 eq telnet
VSIC1(config)#access-list 101 permit ip any any
VSIC1(config)#dialer-list 1 protocol ip list 1
i v i router VSIC2, c u hình các traffic c a m ng 13.1.0.0/24 và 14.1.0.0/24 là interesting
traffic. Chúng ta dùng Standard access list c u hình.
VSIC2#conf t
VSIC2(config)#access-list 1 permit 13.1.0.0 0.0.0.255
VSIC2(config)#access-list 1 permit 14.1.0.0 0.0.0.255
VSIC2(config)#dialer-list 1 protocol ip list 1
B c 5 : C u hình interface dialer cho router
VSIC Education Corporation Trang 181
- CCNA Tài li u dành cho h c viên
Trong bài chúng ta s d ng PPP thay cho HDLC vì PPP có tính b o m t cao. M c
nh c a router Cisco s d ng HDLC.
VSIC1(config)#username VSIC2 password cisco
VSIC1(config-if)#in bri0
VSIC1(config-if)#encapsulation ppp
VSIC1(config-if)#ppp authentication chap
VSIC1(config-if)#dialer pool-member 1 C u hình interface BRI0 thu c
dialer pool 1
VSIC1(config-if)#no shut
VSIC1(config-if)#exit
VSIC1(config)#in dialer 1
VSIC1(config-if)# ip address 192.168.0.1 255.255.255.0
VSIC1(config-if)#encapsulation ppp
VSIC1(config-if)#ppp authentication chap
VSIC1(config-if)#dialer remote-name VSIC2 C u hình tên router k t n i
VSIC1(config-if)#dialer string 11 C u hình s g i cho router ó
VSIC1(config-if)#dialer pool 1 C u hình interface dialer 1 thu c pool 1
VSIC1(config-if)#dialer idle-timeout 180 Router s ng t k t n i n u nh
không có traffic nào truy n trong
kho ng th i gian c u hình
VSIC1(config-if)#dialer-group 1 S d ng dialer list 1 cho interface này
VSIC1(config-if)#no shut
VSIC1(config-if)#exit
C u hình t ng t cho router VSIC2
VSIC2(config)#username VSIC1 password cisco
VSIC2(config-if)#in bri0
VSIC2(config-if)#encapsulation ppp
VSIC2(config-if)#ppp authentication chap
VSIC2(config-if)#dialer pool-member 1
VSIC2(config-if)#no shut
VSIC2(config-if)#exit
VSIC2(config)#in dialer 0
VSIC2(config-if)# ip address 192.168.0.2 255.255.255.0
VSIC2(config-if)#encapsulation ppp
VSIC2(config-if)#ppp authentication chap
VSIC2(config-if)#dialer remote-name VSIC1
VSIC2(config-if)#dialer string 21
VSIC2(config-if)#dialer pool 1
VSIC2(config-if)#dialer idle-timeout 180
VSIC2(config-if)#dialer-group 1
VSIC2(config-if)#no shut
VSIC2(config-if)#exit
6. Ki m tra k t qu :
Ki m tra tr ng thái k t n i c a interface BRI0
VSIC1#sh isdn status
VSIC Education Corporation Trang 182
- CCNA Tài li u dành cho h c viên
Global ISDN Switchtype = basic-net3
ISDN BRI0 interface
dsl 0, interface ISDN Switchtype = basic-net3
Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 64, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
1 Active Layer 3 Call(s)
CCB:callid=8004, sapi=0, ces=1, B-chan=1, calltype=DATA
Active dsl 0 CCBs = 1
The Free Channel Mask: 0x80000002
Number of L2 Discards = 0, L2 Session ID = 0
Total Allocated ISDN CCBs = 1
N u c u hình úng thì tr ng thái c a Layer 1 là ACTIVE và Layer 2 là
MULTIPLE_FRAME_ESTABLISHED.
Ki m tra các interesting traffic.
ng router VSIC2, chúng ta ping t interface loopback 1 (14.1.0.1) n interface
loopback 2 (12.1.0.1) c a router VSIC1
VSIC2#ping
Protocol [ip]:
Target IP address: 12.1.0.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 14.1.0.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.0.1, timeout is 2 seconds:
00:30:15: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:30:15: %DIALER-6-BIND: Interface BR0:1 bound to profile Di0.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 32/35/36 ms
00:30:16: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1,
changed state to up
00:30:21: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 21
VSIC1
Nh n xét : ping thành công và router VSIC2 th c hi n k t n i v i router VSIC1 s dùng
interface dialer 0
VSIC Education Corporation Trang 183
nguon tai.lieu . vn