DynagenでCCIEを目指す
HDLC, PPP
最終更新:
it_certification
-
view
1. 目的
- Serial I/Fを介した接続方法について動作確認を行います。
2. 構成
2.1. 設定概要
- 特になし
2.2. 構成図

2.3. netファイル
model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 128 [[ROUTER R1]] s0/0 = R2 s0/0 [[ROUTER R2]]
2.4. 初期設定
- R1
初期設定
- R2
初期設定
3. [検証] HDLC
3.1. HDLCの設定
HDLCによる接続を設定します。
Serial I/Fではカプセル化のデフォルトがHDLCであるため、HDLCを明示的に設定する必要はありません。注意すべき点と言えば、片方をDTE, もう片方をDCEとして設定する事くらいです。
Serial I/Fではカプセル化のデフォルトがHDLCであるため、HDLCを明示的に設定する必要はありません。注意すべき点と言えば、片方をDTE, もう片方をDCEとして設定する事くらいです。
R1(config)#interface Serial0/0 R1(config-if)#ip address 192.168.12.1 255.255.255.0 R1(config-if)#no shutdown R2(config)#interface Serial0/0 R2(config-if)#ip address 192.168.12.2 255.255.255.0 R2(config-if)#clock rate 64000 R2(config-if)#no shutdown
3.2. 疎通確認
R1, R2間で疎通可能な事を確認します。
R1#ping 192.168.12.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/32/36 ms R1#
3.3. 設定確認
HDLCでカプセル化されている事を確認します。
R1#show interfaces Serial 0/0 Serial0/0 is up, line protocol is up Hardware is M4T Internet address is 192.168.12.1/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, crc 16, loopback not set <- カプセル化の方法を確認します。
4. [検証] PPP 基本設定
4.1. PPP 設定投入
R1, R2をPPPで接続します。設定は以下の通りです。
R1(config)#interface Serial0/0 R1(config-if)#encapsulation ppp R2(config)#interface Serial0/0 R2(config-if)#encapsulation ppp
4.2. 疎通確認
R1, R2間で疎通可能な事を確認します。
R1#ping 192.168.12.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/45/84 ms R1#
4.3. ルーティングテーブルの確認
PPPで接続されている場合、ルーティングテーブル上はConnectedで表示されます。
R1#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set 192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.12.0/24 is directly connected, Serial0/0 C 192.168.12.2/32 is directly connected, Serial0/0 R1#
5. [検証] PPP 静的なアドレス割当
5.1. 設定投入
PPPはIPCP(Internet Protocol Control Protocol)という規格を用いて、ピアにIPアドレスを割り当てる事ができます。以下は、R1に11.11.11.11/32を割り当てる設定です。
R1(config)#interface Serial0/0 R1(config-if)#ip address negotiated R2(config)#interface Serial0/0 R2(config-if)#peer default ip address 11.11.11.1
5.2. 設定確認
R1に割り当てられたIPアドレスを確認します。設定直後は、IPアドレスが割り当てられていません。
R1#show ip interface brief Interface IP-Address OK? Method Status Protocol Serial0/0 unassigned YES manual up up Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down R1#
IPCPによってアドレスが割り当てられる様子は、debug ppp negotiationで確認できます。デバッグを有効にし、R1 s0/0をshut no shutします。
R1#debug ppp negotiation PPP protocol negotiation debugging is on R1# R1(config)#interface Serial 0/0 R1(config-if)#shutdown R1(config-if)# *Mar 1 00:11:48.599: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down *Mar 1 00:11:48.635: Se0/0 PPP: Sending Acct Event[Down] id[2] *Mar 1 00:11:48.639: Se0/0 CDPCP: State is Closed *Mar 1 00:11:48.639: Se0/0 IPCP: State is Closed *Mar 1 00:11:48.643: Se0/0 PPP: Phase is TERMINATING *Mar 1 00:11:48.643: Se0/0 LCP: State is Closed *Mar 1 00:11:48.643: Se0/0 PPP: Phase is DOWN *Mar 1 00:11:49.599: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down R1(config-if)# R1(config-if)#no shutdown R1(config-if)# *Mar 1 00:11:54.835: Se0/0 PPP: Outbound cdp packet dropped *Mar 1 00:11:56.807: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up *Mar 1 00:11:56.811: Se0/0 PPP: Using default call direction *Mar 1 00:11:56.811: Se0/0 PPP: Treating connection as a dedicated line *Mar 1 00:11:56.815: Se0/0 PPP: Session handle[1F000002] Session id[2] *Mar 1 00:11:56.815: Se0/0 PPP: Phase is ESTABLISHING, Active Open *Mar 1 00:11:56.819: Se0/0 LCP: O CONFREQ [Closed] id 8 len 10 *Mar 1 00:11:56.819: Se0/0 LCP: MagicNumber 0x001770AB (0x0506001770AB) *Mar 1 00:11:56.931: Se0/0 LCP: I CONFREQ [REQsent] id 2 len 10 *Mar 1 00:11:56.935: Se0/0 LCP: MagicNumber 0x00174DE5 (0x050600174DE5) *Mar 1 00:11:56.935: Se0/0 LCP: O CONFACK [REQsent] id 2 len 10 *Mar 1 00:11:56.939: Se0/0 LCP: MagicNumber 0x00174DE5 (0x050600174DE5) *Mar 1 00:11:56.939: Se0/0 LCP: I CONFACK [ACKsent] id 8 len 10 *Mar 1 00:11:56.943: Se0/0 LCP: MagicNumber 0x001770AB (0x0506001770AB) *Mar 1 00:11:56.943: Se0/0 LCP: State is Open *Mar 1 00:11:56.947: Se0/0 PPP: Phase is FORWARDING, Attempting Forward *Mar 1 00:11:56.947: Se0/0 PPP: Phase is ESTABLISHING, Finish LCP *Mar 1 00:11:56.951: Se0/0 PPP: Phase is UP *Mar 1 00:11:56.955: Se0/0 IPCP: O CONFREQ [Closed] id 1 len 10 *Mar 1 00:11:56.955: Se0/0 IPCP: Address 0.0.0.0 (0x030600000000) *Mar 1 00:11:56.959: Se0/0 CDPCP: O CONFREQ [Closed] id 1 len 4 *Mar 1 00:11:56.963: Se0/0 PPP: Process pending ncp packets *Mar 1 00:11:57.031: Se0/0 IPCP: I CONFREQ [REQsent] id 1 len 10 *Mar 1 00:11:57.031: Se0/0 IPCP: Address 192.168.12.2 (0x0306C0A80C02) *Mar 1 00:11:57.035: Se0/0 IPCP: O CONFACK [REQsent] id 1 len 10 *Mar 1 00:11:57.039: Se0/0 IPCP: Address 192.168.12.2 (0x0306C0A80C02) *Mar 1 00:11:57.039: Se0/0 IPCP: I CONFNAK [ACKsent] id 1 len 10 *Mar 1 00:11:57.043: Se0/0 IPCP: Address 11.11.11.11 (0x03060B0B0B0B) *Mar 1 00:11:57.043: Se0/0 IPCP: O CONFREQ [ACKsent] id 2 len 10 *Mar 1 00:11:57.047: Se0/0 IPCP: Address 11.11.11.11 (0x03060B0B0B0B) *Mar 1 00:11:57.051: Se0/0 CDPCP: I CONFREQ [REQsent] id 1 len 4 *Mar 1 00:11:57.051: Se0/0 CDPCP: O CONFACK [REQsent] id 1 len 4 *Mar 1 00:11:57.055: Se0/0 CDPCP: I CONFACK [ACKsent] id 1 len 4 *Mar 1 00:11:57.055: Se0/0 CDPCP: State is Open *Mar 1 00:11:57.091: Se0/0 IPCP: I CONFACK [ACKsent] id 2 len 10 *Mar 1 00:11:57.095: Se0/0 IPCP: Address 11.11.11.11 (0x03060B0B0B0B) *Mar 1 00:11:57.095: Se0/0 IPCP: State is Open *Mar 1 00:11:57.099: Se0/0 IPCP: Install negotiated IP interface address 11.11.11.11 <- IPアドレスが割り当てられた事が分かります *Mar 1 00:11:57.107: Se0/0 IPCP: Install route to 192.168.12.2 *Mar 1 00:11:57.115: Se0/0 IPCP: Add link info for cef entry 192.168.12.2 *Mar 1 00:11:57.951: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up R1(config-if)#
R1 s0/0にIPアドレスが割り当てられた事を確認します。
R1#show ip interface brief Interface IP-Address OK? Method Status Protocol Serial0/0 11.11.11.11 YES IPCP up up Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down R1#
6. [検証] PPP プールによるアドレス割当
6.1. 設定投入
プールを用いてIPアドレスを割り当てる事も可能です。
R2(config)#ip local pool POOL_PPP 11.0.0.0 11.0.0.254 R2(config)# R2(config)#interface Serial0/0 R2(config-if)#peer default ip address pool POOL_PPP
6.2. 設定確認
R1 s0/0をshut no shutします。
R1(config)#interface Serial 0/0 R1(config-if)#shutdown R1(config-if)# *Mar 1 00:17:36.279: %LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down *Mar 1 00:17:36.283: Se0/0 PPP: Sending Acct Event[Down] id[4] *Mar 1 00:17:36.287: Se0/0 CDPCP: State is Closed *Mar 1 00:17:36.287: Se0/0 IPCP: State is Closed *Mar 1 00:17:36.287: Se0/0 IPCP: Remove link info for cef entry 192.168.12.2 *Mar 1 00:17:36.291: Se0/0 PPP: Phase is TERMINATING *Mar 1 00:17:36.291: Se0/0 LCP: State is Closed *Mar 1 00:17:36.295: Se0/0 PPP: Phase is DOWN *Mar 1 00:17:36.303: Se0/0 IPCP: Remove route to 192.168.12.2 *Mar 1 00:17:37.279: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down R1(config-if)#no shutdown R1(config-if)# *Mar 1 00:17:41.775: Se0/0 PPP: Outbound cdp packet dropped *Mar 1 00:17:43.755: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up *Mar 1 00:17:43.759: Se0/0 PPP: Using default call direction *Mar 1 00:17:43.759: Se0/0 PPP: Treating connection as a dedicated line *Mar 1 00:17:43.763: Se0/0 PPP: Session handle[E8000003] Session id[3] *Mar 1 00:17:43.763: Se0/0 PPP: Phase is ESTABLISHING, Active Open *Mar 1 00:17:43.767: Se0/0 LCP: O CONFREQ [Closed] id 9 len 10 *Mar 1 00:17:43.767: Se0/0 LCP: MagicNumber 0x001CBBF0 (0x0506001CBBF0) *Mar 1 00:17:43.887: Se0/0 LCP: I CONFREQ [REQsent] id 3 len 10 *Mar 1 00:17:43.891: Se0/0 LCP: MagicNumber 0x001C9916 (0x0506001C9916) *Mar 1 00:17:43.891: Se0/0 LCP: O CONFACK [REQsent] id 3 len 10 *Mar 1 00:17:43.895: Se0/0 LCP: MagicNumber 0x001C9916 (0x0506001C9916) *Mar 1 00:17:43.895: Se0/0 LCP: I CONFACK [ACKsent] id 9 len 10 *Mar 1 00:17:43.899: Se0/0 LCP: MagicNumber 0x001CBBF0 (0x0506001CBBF0) *Mar 1 00:17:43.899: Se0/0 LCP: State is Open *Mar 1 00:17:43.903: Se0/0 PPP: Phase is FORWARDING, Attempting Forward *Mar 1 00:17:43.903: Se0/0 PPP: Phase is ESTABLISHING, Finish LCP *Mar 1 00:17:43.907: Se0/0 PPP: Phase is UP *Mar 1 00:17:43.911: Se0/0 IPCP: O CONFREQ [Closed] id 1 len 10 *Mar 1 00:17:43.911: Se0/0 IPCP: Address 0.0.0.0 (0x030600000000) *Mar 1 00:17:43.915: Se0/0 CDPCP: O CONFREQ [Closed] id 1 len 4 *Mar 1 00:17:43.915: Se0/0 PPP: Process pending ncp packets *Mar 1 00:17:43.947: Se0/0 IPCP: I CONFREQ [REQsent] id 1 len 10 *Mar 1 00:17:43.951: Se0/0 IPCP: Address 192.168.12.2 (0x0306C0A80C02) *Mar 1 00:17:43.951: Se0/0 IPCP: O CONFACK [REQsent] id 1 len 10 *Mar 1 00:17:43.955: Se0/0 IPCP: Address 192.168.12.2 (0x0306C0A80C02) *Mar 1 00:17:43.959: Se0/0 IPCP: I CONFNAK [ACKsent] id 1 len 10 *Mar 1 00:17:43.959: Se0/0 IPCP: Address 11.0.0.0 (0x03060B000000) *Mar 1 00:17:43.963: Se0/0 IPCP: O CONFREQ [ACKsent] id 2 len 10 *Mar 1 00:17:43.963: Se0/0 IPCP: Address 11.0.0.0 (0x03060B000000) *Mar 1 00:17:43.967: Se0/0 CDPCP: I CONFREQ [REQsent] id 1 len 4 *Mar 1 00:17:43.971: Se0/0 CDPCP: O CONFACK [REQsent] id 1 len 4 *Mar 1 00:17:43.971: Se0/0 CDPCP: I CONFACK [ACKsent] id 1 len 4 *Mar 1 00:17:43.975: Se0/0 CDPCP: State is Open *Mar 1 00:17:44.031: Se0/0 IPCP: I CONFACK [ACKsent] id 2 len 10 *Mar 1 00:17:44.031: Se0/0 IPCP: Address 11.0.0.0 (0x03060B000000) *Mar 1 00:17:44.035: Se0/0 IPCP: State is Open *Mar 1 00:17:44.035: Se0/0 IPCP: Install negotiated IP interface address 11.0.0.0 *Mar 1 00:17:44.051: Se0/0 IPCP: Install route to 192.168.12.2 *Mar 1 00:17:44.059: Se0/0 IPCP: Add link info for cef entry 192.168.12.2 *Mar 1 00:17:44.907: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up R1(config-if)#
R1 s0/0にIPアドレスが割り当てられた事を確認します。
R1#show ip interface brief Interface IP-Address OK? Method Status Protocol Serial0/0 11.0.0.0 YES IPCP up up Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down R1#
添付ファイル