DynagenでCCIEを目指す
Frame Relay on Pysical Interface
最終更新:
it_certification
-
view
1. 目的
- 物理I/Fに対するframe-relayの設定方法を確認します。
2. 構成
2.1. 設定概要
- SW1, SW2をフレームリレースイッチとして代用します。
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 = SW1 s0/0 s0/1 = SW1 s0/1 [[ROUTER SW1]] s0/2 = SW2 s0/2 [[ROUTER SW2]] s0/0 = R2 s0/0 s0/1 = R2 s0/1 [[ROUTER R2]]
2.4. 初期設定
- R1
デフォルト設定
- SW1
デフォルト設定
- SW2
デフォルト設定
- R2
デフォルト設定
3. [検証] フレームリレースイッチの作成
3.1. 設定投入
ルータをフレームリレースイッチとして代用する事ができます。
SW1に投入する設定は以下の通りです。
SW1に投入する設定は以下の通りです。
Router(config)#hostname SW1 SW1(config)# SW1(config)#frame-relay switching SW1(config)# SW1(config)#interface Serial 0/0 SW1(config-if)#encapsulation frame-relay SW1(config-if)#frame-relay lmi-type cisco <- LMIを指定します。デフォルトはciscoですので、ciscoを使用する場合は省略可能です。 SW1(config-if)#clock rate 6420 <- clock rateを指定します。実機では必須の設定ですが、dynagenなどの仮想環境では設定を省いても疎通可能です。 SW1(config-if)#frame-relay intf-type dce SW1(config-if)#frame-relay route 101 interface Serial 0/2 112 SW1(config-if)#no shutdown SW1(config-if)#exit SW1(config)# SW1(config)#interface Serial 0/1 SW1(config-if)#encapsulation frame-relay SW1(config-if)#clock rate 6420 SW1(config-if)#frame-relay intf-type dce SW1(config-if)#frame-relay route 201 interface Serial 0/2 212 SW1(config-if)#no shutdown SW1(config-if)#exit SW1(config)# SW1(config)#interface Serial 0/2 SW1(config-if)#encapsulation frame-relay SW1(config-if)#frame-relay intf-type dte <- SW1側をDTE, SW2側をDCEとします。 SW1(config-if)#frame-relay route 112 interface Serial 0/0 101 SW1(config-if)#frame-relay route 212 interface Serial 0/0 201 SW1(config-if)#no shutdown SW1(config-if)#exit SW1(config)# SW1(config)#
SW2に投入する設定は以下の通りです。
Router(config)#hostname SW2 SW2(config)# SW2(config)#frame-relay switching SW2(config)# SW2(config)#interface Serial 0/0 SW2(config-if)#encapsulation frame-relay SW2(config-if)#clock rate 6420 SW2(config-if)#frame-relay intf-type dce SW2(config-if)#frame-relay route 102 interface Serial 0/2 112 SW2(config-if)#no shutdown SW2(config-if)#exit SW2(config)# SW2(config)#interface Serial 0/1 SW2(config-if)#encapsulation frame-relay SW2(config-if)#clock rate 6420 SW2(config-if)#frame-relay intf-type dce SW2(config-if)#frame-relay route 202 interface Serial 0/2 212 SW2(config-if)#no shutdown SW2(config-if)#exit SW2(config)# SW2(config)#interface Serial 0/2 SW2(config-if)#encapsulation frame-relay SW2(config-if)#clock rate 6420 SW2(config-if)#frame-relay intf-type dce <- SW1側をDTE, SW2側をDCEとします。 SW2(config-if)#frame-relay route 112 interface Serial 0/0 102 SW2(config-if)#frame-relay route 212 interface Serial 0/1 202 SW2(config-if)#no shutdown SW2(config-if)#exit SW2(config)# SW2(config)#
3.2. ルーティングの確認
フレームリレースイッチはDLCIというタグ情報に基づいて、ルーティングします。「どんなDLCIが付加されたパケットが、どのI/Fから入って来たか」という情報に基づき、「どんなDLCIを付加し、どのI/Fから転送すれば良いのか」を決定します。
ルーティングに関する設定は、show frame-relay routeコマンドで確認できます。
ルーティングに関する設定は、show frame-relay routeコマンドで確認できます。
SW1#show frame-relay route Input Intf Input Dlci Output Intf Output Dlci Status Serial0/0 101 Serial0/2 112 active Serial0/1 201 Serial0/2 212 active Serial0/2 112 Serial0/0 101 inactive Serial0/2 212 Serial0/1 201 inactive SW1# SW2#show frame-relay route Input Intf Input Dlci Output Intf Output Dlci Status Serial0/0 102 Serial0/2 112 active Serial0/1 202 Serial0/2 212 active Serial0/2 112 Serial0/0 102 inactive Serial0/2 212 Serial0/1 202 inactive SW2#
4. [検証] フレームリレーの基本設定
4.1. 設定投入
R1, R2間で疎通可能になるよう設定します。
R1, R2に以下の設定を投入します。
R1, R2に以下の設定を投入します。
R1(config)#interface Serial 0/0 R1(config-if)#encapsulation frame-relay R1(config-if)#frame-relay lmi-type cisco <- LMIを指定します。デフォルトはciscoですので、ciscoを使用する場合は省略可能です。 R1(config-if)#frame-relay inverse-arp <- inverse-arpを有効にします。デフォルトで有効な機能ですので、省略可能な設定です。 R1(config-if)#ip address 192.168.1.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)# R1(config)#interface Serial 0/1 R1(config-if)#encapsulation frame-relay R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)# Router(config)#hostname R2 R2(config)#interface Serial 0/0 R2(config-if)#encapsulation frame-relay R2(config-if)#ip address 192.168.1.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)# R2(config)#interface Serial 0/1 R2(config-if)#encapsulation frame-relay R2(config-if)#ip address 192.168.2.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#
4.2. 設定確認
show frame-relay mapコマンドでDLCIとip addressのマッピング情報を確認する事ができます。
(inverse ARPという仕組みにより自動的にマッピング情報が作成されますが、作成までにはある程度時間がかかります。私の環境の場合では、マッピング情報が作成されるまでに約1分間かかりました。)
(inverse ARPという仕組みにより自動的にマッピング情報が作成されますが、作成までにはある程度時間がかかります。私の環境の場合では、マッピング情報が作成されるまでに約1分間かかりました。)
R1#show frame-relay map Serial0/0 (up): ip 192.168.1.2 dlci 101(0x65,0x1850), dynamic, broadcast,, status defined, active Serial0/1 (up): ip 192.168.2.2 dlci 201(0xC9,0x3090), dynamic, broadcast,, status defined, active R1#
shoe frame-relay lmiによりLMIの設定を確認する事ができます。
R1#show frame-relay lmi LMI Statistics for interface Serial0/0 (Frame Relay DTE) LMI TYPE = CISCO Invalid Unnumbered info 0 Invalid Prot Disc 0 Invalid dummy Call Ref 0 Invalid Msg Type 0 Invalid Status Message 0 Invalid Lock Shift 0 Invalid Information ID 0 Invalid Report IE Len 0 Invalid Report Request 0 Invalid Keep IE Len 0 Num Status Enq. Sent 59 Num Status msgs Rcvd 59 Num Update Status Rcvd 0 Num Status Timeouts 0 Last Full Status Req 00:00:49 Last Full Status Rcvd 00:00:49 LMI Statistics for interface Serial0/1 (Frame Relay DTE) LMI TYPE = CISCO Invalid Unnumbered info 0 Invalid Prot Disc 0 Invalid dummy Call Ref 0 Invalid Msg Type 0 Invalid Status Message 0 Invalid Lock Shift 0 Invalid Information ID 0 Invalid Report IE Len 0 Invalid Report Request 0 Invalid Keep IE Len 0 Num Status Enq. Sent 56 Num Status msgs Rcvd 56 Num Update Status Rcvd 0 Num Status Timeouts 0 Last Full Status Req 00:00:16 Last Full Status Rcvd 00:00:16 R1#
4.3. 疎通確認
R1からR2への疎通が可能な事を確認します。
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/63/136 ms R1# R1# R1#ping 192.168.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/44/76 ms R1#
5. [検証] パケットの観察
5.1. パケットの観察
下記のようR1からR2へのpingを送信した際のパケットを観察します。
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/63/136 ms R1#
SW1 s0/0でパケットキャプチャした結果は以下の通りです。
IPのパケットがフレームリレーでカプセル化されている事が分かります。また、R1でDLCI 101が付加された事も読み取れます。
IPのパケットがフレームリレーでカプセル化されている事が分かります。また、R1でDLCI 101が付加された事も読み取れます。
#ref error :ご指定のファイルが見つかりません。ファイル名を確認して、再度指定してください。 (100%)
;
SW1 s0/2でパケットキャプチャした結果は以下の通りです。
SW1で DLCI 101をDLCI 112に書き換えて転送している様子が読み取れます。SW1 s0/2, SW2 s0/2の間は、192.168.1.0/24と192.168.2.0/24のセグメントが相乗りしている事になりますが、フレームリレーはDLCIの情報を元に転送を行うので同一セグメントにパケットを転送する事ができます。
SW1で DLCI 101をDLCI 112に書き換えて転送している様子が読み取れます。SW1 s0/2, SW2 s0/2の間は、192.168.1.0/24と192.168.2.0/24のセグメントが相乗りしている事になりますが、フレームリレーはDLCIの情報を元に転送を行うので同一セグメントにパケットを転送する事ができます。
#ref error :ご指定のファイルが見つかりません。ファイル名を確認して、再度指定してください。 (100%)
;
6. [検証] inverse ARPの動作確認
6.1. 概要
IP網でパケットを転送するにあたり、ip addressに対応するMACアドレスを調べてからパケットを転送します(RARP)。フレームリレー網でこの機能に相当するのがinverse ARPです。inverse ARPにより、ip addressに対応するDLCIを調べる事ができます。
6.2. 検証準備
debug frame-relay packetを有効にします。
R1#debug frame-relay packet Frame Relay packet debugging is on R1#
frame-relay mapを削除し、削除された事をshowコマンドで確認します。
R1#clear frame-relay inarp R1# R1#show frame-relay map R1#
6.3. 疎通不能の確認
ip address 192.168.1.2に対応するDLCIが分からない状態では、pingが届かない事を確認します。
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: *Mar 1 00:38:31.127: Serial0/0:Encaps failed--no map entry link 7(IP). *Mar 1 00:38:33.127: Serial0/0:Encaps failed--no map entry link 7(IP). *Mar 1 00:38:35.127: Serial0/0:Encaps failed--no map entry link 7(IP). *Mar 1 00:38:37.127: Serial0/0:Encaps failed--no map entry link 7(IP).! Success rate is 20 percent (1/5), round-trip min/avg/max = 64/64/64 ms R1#
6.4. inverse ARP の確認
しばらく待つと、inverse ARP Requestを送受信した旨のデバッグメッセージを確認できます。
R1# *Mar 1 00:38:38.747: Serial0/0(o): dlci 101(0x1851), pkt encaps 0x0300 0x8000 0x0000 0x806 (ARP), datagramsize 34 *Mar 1 00:38:38.751: FR: Sending INARP Request on interface Serial0/0 dlci 101 for link 7(IP) *Mar 1 00:38:38.771: broadcast dequeue *Mar 1 00:38:38.771: Serial0/0(o):Pkt sent on dlci 101(0x1851), pkt encaps 0x300 0x8000 0x0 0x806 (ARP), datagramsize 34 *Mar 1 00:38:38.799: Serial0/0(i): dlci 101(0x1851), pkt encaps 0x0300 0x8000 0x0000 0x806 (ARP), datagramsize 34 *Mar 1 00:38:38.799: Serial0/0: frame relay INARP received *Mar 1 00:38:39.127: Serial0/0(o): dlci 101(0x1851), pkt type 0x800(IP), datagramsize 104 *Mar 1 00:38:39.187: Serial0/0(i): dlci 101(0x1851), pkt type 0x800, datagramsize 104 R1# *Mar 1 00:39:12.051: Serial0/1(o): dlci 201(0x3091), pkt encaps 0x0300 0x8000 0x0000 0x806 (ARP), datagramsize 34 *Mar 1 00:39:12.055: FR: Sending INARP Request on interface Serial0/1 dlci 201 for link 7(IP) *Mar 1 00:39:12.075: broadcast dequeue *Mar 1 00:39:12.075: Serial0/1(o):Pkt sent on dlci 201(0x3091), pkt encaps 0x300 0x8000 0x0 0x806 (ARP), datagramsize 34 *Mar 1 00:39:12.127: Serial0/1(i): dlci 201(0x3091), pkt encaps 0x0300 0x8000 0x0000 0x806 (ARP), datagramsize 34 *Mar 1 00:39:12.127: Serial0/1: frame relay INARP received R1# R1#
ip addressに対応するDLCIを解決できる事を確認します。
R1#show frame-relay map Serial0/0 (up): ip 192.168.1.2 dlci 101(0x65,0x1850), dynamic, broadcast,, status defined, active Serial0/1 (up): ip 192.168.2.2 dlci 201(0xC9,0x3090), dynamic, broadcast,, status defined, active R1#
pingによる疎通が可能になった事を確認します。
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/44/84 ms R1#
7. [検証] inverse ARP 無効時の設定
7.1. 設定投入
R1でinverse ARPを無効にします。
inverse ARPが無効である場合は、以下設定例のようにip addressとDLCIのマッピングを静的に定義する必要があります。
inverse ARPが無効である場合は、以下設定例のようにip addressとDLCIのマッピングを静的に定義する必要があります。
R1(config)#interface Serial 0/0 R1(config-if)#no frame-relay inverse-arp R1(config-if)#frame-relay map ip 192.168.1.2 101 R1(config-if)#exit R1(config)# R1(config)#interface Serial 0/1 R1(config-if)#no frame-relay inverse-arp R1(config-if)#frame-relay map ip 192.168.2.2 201 R1(config-if)#^Z R1#
7.2. 設定確認
ip addressとDLCIのマッピングが静的に定義されている事を確認します。
R1#clear frame-relay inarp R1# R1#show frame-relay map Serial0/0 (up): ip 192.168.1.2 dlci 101(0x65,0x1850), static, CISCO, status defined, active Serial0/1 (up): ip 192.168.2.2 dlci 201(0xC9,0x3090), static, CISCO, status defined, active R1#
7.3. 疎通確認
R1, R2間で疎通可能である事を確認します。
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/40/92 ms R1# R1# R1#ping 192.168.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/37/108 ms R1#
8. [補足] フレームリレーのパケットキャプチャ
8.1. フレームリレーのパケットキャプチャ
フレームリレーをキャプチャする際は、ethernetの場合と指定方法が若干異なります。
dynagenのcaptureコマンドのhelpをご覧下さい。Frame-Relayの場合は、「FR」とlink-typeの指定が必要である事が分かり案す。
dynagenのcaptureコマンドのhelpをご覧下さい。Frame-Relayの場合は、「FR」とlink-typeの指定が必要である事が分かり案す。
=> capture [no] capture device interface filename [link-type] Begins a capture of all packets in and out of "interface" on "device". Enclose the filename in quotes if there are spaces in the filespec. The capture file is written to the dynamips host. Link type is one of: ETH (Ethernet 10/100/1000) FR (Frame-Relay) HDLC (Cisco HDLC) PPP (PPP on serial) Captures of ethernet interfaces default to EN10MB, but for serial interf aces the link type must be specified. Examples: capture R1 f0/0 example.cap -- Capture packets in and out of f0/0 on R1 and write the output to example.cap capture R1 s0/0 example2.cap HDLC -- Capture and specify HDLC encapsulation no capture R1 s0/0 -- End the packet capture =>
実際のコマンドの例は以下の通りです。
=> capture SW1 s0/0 sw1_00.cap FR => no capture SW1 s0/0
9. [補足] 設定ミス時の挙動
9.1. LMIが異なる場合
LMIは機器間で同じ規格を使用する必要があります。LMIが異なる場合の挙動について観察します。
SW1(config)#interface Serial 0/0 SW1(config-if)#frame-relay lmi-type q933a
LMIが異なるとdown状態になる事が分かります。(LMIはkeep aliveの機能も備えているので)
R1# *Mar 1 00:47:59.747: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down R1#
9.2. DCE, DTEが同じである場合
シリアルケーブルによる接続時は、一方をDCE, もう一方をDCEとして設定する必要があります。
両側がDTEになってしまった場合の挙動について観察します。
両側がDTEになってしまった場合の挙動について観察します。
SW1(config)#interface Serial 0/1 SW1(config-if)#frame-relay intf-type dte
両側がDTEになるとdown状態になる事が分かります。
R1# *Mar 1 00:51:33.051: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down R1#