ラベル GNS3-Labs の投稿を表示しています。 すべての投稿を表示
ラベル GNS3-Labs の投稿を表示しています。 すべての投稿を表示

2009年11月8日日曜日

GNS3 で Frame Relay Switch の設定


条件

■ 物理的な接続
R1-Se0/0 -- FRSW-Se0/0
R2-Se0/0 -- FRSW-Se0/1
R3-Se0/0 -- FRSW-Se0/2

■ Frame Relay Switch の設定
DLCI=102 -- DLCI=201
DLCI=103 -- DLCI=301
DLCI=203 -- DLCI=302

■ IP アドレス
R1-Lo0: 10.10.1.1/24
R2-Lo0: 10.10.2.2/24
R3-Lo0: 10.10.3.3/24

R1-Se0/0.102: DLCI=102: 192.168.12.1/24
R1-Se0/0.103 DLCI=103: 192.168.13.1/24
R2-Se0/0.201: DLCI=201: 192.168.12.2/24
R2-Se0/0.203: DLCI=203: 192.168.23.2/24
R3-Se0/0.301: DLCI=301: 192.168.13.3/24
R3-Se0/0.302: DLCI=302: 192.168.23.3/24

■ ルーティング
R1, R2, R3: EIGRP 10


設定

■ FRSW
frame-relay switching
!
interface Serial0/0
description to R1
no ip address
encapsulation frame-relay
clock rate 2000000 !--- Dynamips では自動で入る。
frame-relay intf-type dce
frame-relay route 102 interface Serial0/1 201
frame-relay route 103 interface Serial0/2 301
!
interface Serial0/1
description to R2
no ip address
encapsulation frame-relay
clock rate 2000000 !--- Dynamips では自動で入る。
frame-relay intf-type dce
frame-relay route 201 interface Serial0/0 102
frame-relay route 203 interface Serial0/2 302
!
interface Serial0/2
description to R3
no ip address
encapsulation frame-relay
clock rate 2000000 !--- Dynamips では自動で入る。
frame-relay intf-type dce
frame-relay route 301 interface Serial0/0 103
frame-relay route 302 interface Serial0/1 203

■ R1
interface Loopback0
ip address 10.10.1.1 255.255.255.0
!
interface Serial0/0
no ip address
encapsulation frame-relay
clock rate 2000000 !--- Dynamips では自動で入る。
!
interface Serial0/0.102 point-to-point
description to R2
ip address 192.168.12.1 255.255.255.0
frame-relay interface-dlci 102
!
interface Serial0/0.103 point-to-point
description to R3
ip address 192.168.13.1 255.255.255.0
frame-relay interface-dlci 103
!
router eigrp 10
network 0.0.0.0
no auto-summary

■ R2
(略)

■ R3
(略)


出力
■ FRSW
FRSW#sh frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/0 102 Serial0/1 201 active
Serial0/0 103 Serial0/2 301 active
Serial0/1 201 Serial0/0 102 active
Serial0/1 203 Serial0/2 302 active
Serial0/2 301 Serial0/0 103 active
Serial0/2 302 Serial0/1 203 active

■ R1
R1#sh frame-relay map
Serial0/0.102 (up): point-to-point dlci, dlci 102(0x66,0x1860), broadcast
status defined, active
Serial0/0.103 (up): point-to-point dlci, dlci 103(0x67,0x1870), broadcast
status defined, active

R1#sh ip ro | b ^Gate
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, Serial0/0.102
C 192.168.13.0/24 is directly connected, Serial0/0.103
10.0.0.0/24 is subnetted, 3 subnets
C 10.10.1.0 is directly connected, Loopback0
D 10.10.2.0 [90/2297856] via 192.168.12.2, 00:12:26, Serial0/0.102
D 10.10.3.0 [90/2297856] via 192.168.13.3, 00:12:21, Serial0/0.103
D 192.168.23.0/24 [90/2681856] via 192.168.13.3, 00:12:26, Serial0/0.103
[90/2681856] via 192.168.12.2, 00:12:26, Serial0/0.102

R1#p 10.10.2.2 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.2.2, timeout is 2 seconds:
Packet sent with a source address of 10.10.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/48/76 ms

R1#p 10.10.3.3 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.3.3, timeout is 2 seconds:
Packet sent with a source address of 10.10.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/36/48 ms


注意
  • GNS3 (Dyanmips) では、"clock rate" の設定を明示的に入れる必要はありません。実機では、シリアルケーブルの DCE 側で、必ず "clock rate" の設定を入れる必要があります。
  • ルータの物理インタフェース (Serial) で "no shut" が必要です。

2009年8月30日日曜日

CCIE R/S Written Sample Question – Part 2 を解いてみる


問題


ルータの出力

R1#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 7 subnets
D 10.37.37.0 [90/307200] via 10.30.30.3, 00:02:16, FastEthernet0/1
D 10.36.36.0 [90/307200] via 10.30.30.3, 00:34:05, FastEthernet0/1
C 10.30.30.0 is directly connected, FastEthernet0/1
D 10.25.25.0 [90/307200] via 10.20.20.2, 00:03:09, FastEthernet0/0
D 10.24.24.0 [90/307200] via 10.20.20.2, 00:34:05, FastEthernet0/0
C 10.20.20.0 is directly connected, FastEthernet0/0
C 10.10.10.0 is directly connected, Loopback0

R2#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 7 subnets
D 10.37.37.0 [90/332800] via 10.20.20.1, 00:02:53, FastEthernet0/0
D 10.36.36.0 [90/332800] via 10.20.20.1, 00:34:41, FastEthernet0/0
D 10.30.30.0 [90/307200] via 10.20.20.1, 00:34:41, FastEthernet0/0
C 10.25.25.0 is directly connected, FastEthernet1/0
C 10.24.24.0 is directly connected, FastEthernet0/1
C 10.20.20.0 is directly connected, FastEthernet0/0
D 10.10.10.0 [90/409600] via 10.20.20.1, 00:32:17, FastEthernet0/0

R3#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
C 10.37.37.0/24 is directly connected, FastEthernet1/0
C 10.36.36.0/24 is directly connected, FastEthernet0/1
C 10.30.30.0/24 is directly connected, FastEthernet0/0
D 10.25.25.0/24 [90/332800] via 10.30.30.1, 00:04:08, FastEthernet0/0
D 10.24.24.0/24 [90/332800] via 10.30.30.1, 00:35:04, FastEthernet0/0
D 10.20.20.0/24 [90/307200] via 10.30.30.1, 00:35:04, FastEthernet0/0
D 10.10.10.0/24 [90/409600] via 10.30.30.1, 00:32:40, FastEthernet0/0
D 10.0.0.0/8 is a summary, 00:03:16, Null0

R4#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 7 subnets
D 10.37.37.0 [90/358400] via 10.24.24.2, 00:03:31, FastEthernet0/0
D 10.36.36.0 [90/358400] via 10.24.24.2, 00:33:51, FastEthernet0/0
D 10.30.30.0 [90/332800] via 10.24.24.2, 00:33:51, FastEthernet0/0
D 10.25.25.0 [90/307200] via 10.24.24.2, 00:04:24, FastEthernet0/0
C 10.24.24.0 is directly connected, FastEthernet0/0
D 10.20.20.0 [90/307200] via 10.24.24.2, 00:33:51, FastEthernet0/0
D 10.10.10.0 [90/435200] via 10.24.24.2, 00:32:55, FastEthernet0/0

R5#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 7 subnets
D 10.37.37.0 [90/358400] via 10.25.25.2, 00:03:47, FastEthernet0/0
D 10.36.36.0 [90/358400] via 10.25.25.2, 00:31:29, FastEthernet0/0
D 10.30.30.0 [90/332800] via 10.25.25.2, 00:31:29, FastEthernet0/0
C 10.25.25.0 is directly connected, FastEthernet0/0
D 10.24.24.0 [90/307200] via 10.25.25.2, 00:31:29, FastEthernet0/0
D 10.20.20.0 [90/307200] via 10.25.25.2, 00:31:29, FastEthernet0/0
D 10.10.10.0 [90/435200] via 10.25.25.2, 00:31:29, FastEthernet0/0

R6#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.36.36.0/24 is directly connected, FastEthernet0/0
D 10.0.0.0/8 [90/307200] via 10.36.36.3, 00:04:01, FastEthernet0/0

R7#sh ip ro | b ^G
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.37.37.0/24 is directly connected, FastEthernet0/0
D 10.0.0.0/8 [90/307200] via 10.37.37.3, 00:04:16, FastEthernet0/0

ポイント
  • クエリの範囲を制限する方法 (複数の EIGRP AS、EIGRP Stub、prefix filtering) についての質問である。
  • R2 の auto-summary は、全てのルータが同じメジャー ネットワーク (10/8) に所属しているので、意味が無い。
  • R3 に手動の集約があるので、どのルータも R6 と R7 を超えて、このサブネットのクエリを受信することは無いが、R6 と R7 は、クエリを受信する。
参考

CCIE R/S Written Sample Question – Part 1 を解いてみる


問題

http://blog.internetworkexpert.com/2009/08/23/ccie-rs-written-sample-question-part-1/

各ルータの出力

R1#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 6 subnets
C 10.60.60.0 is directly connected, FastEthernet0/1
D 10.50.50.0 [90/307200] via 10.60.60.6, 00:45:25, FastEthernet0/1
D 10.40.40.0 [90/332800] via 10.60.60.6, 00:13:39, FastEthernet0/1
D 10.30.30.0 [90/332800] via 10.10.10.2, 00:13:39, FastEthernet0/0
D 10.20.20.0 [90/307200] via 10.10.10.2, 00:50:29, FastEthernet0/0
C 10.10.10.0 is directly connected, FastEthernet0/0

R2#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D EX 1.1.1.0 [170/2662400] via 10.20.20.3, 00:13:03, FastEthernet0/1
10.0.0.0/24 is subnetted, 6 subnets
D 10.60.60.0 [90/307200] via 10.10.10.1, 00:49:53, FastEthernet0/0
D 10.50.50.0 [90/332800] via 10.10.10.1, 00:13:03, FastEthernet0/0
D 10.40.40.0 [90/332800] via 10.20.20.3, 00:13:03, FastEthernet0/1
D 10.30.30.0 [90/307200] via 10.20.20.3, 00:18:55, FastEthernet0/1
C 10.20.20.0 is directly connected, FastEthernet0/1
C 10.10.10.0 is directly connected, FastEthernet0/0

R3#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D EX 1.1.1.0 [170/2636800] via 10.30.30.4, 00:18:38, FastEthernet0/0
10.0.0.0/24 is subnetted, 6 subnets
D 10.60.60.0 [90/332800] via 10.20.20.2, 00:18:38, FastEthernet0/1
D 10.50.50.0 [90/332800] via 10.30.30.4, 00:18:38, FastEthernet0/0
D 10.40.40.0 [90/307200] via 10.30.30.4, 00:20:04, FastEthernet0/0
C 10.30.30.0 is directly connected, FastEthernet0/0
C 10.20.20.0 is directly connected, FastEthernet0/1
D 10.10.10.0 [90/307200] via 10.20.20.2, 00:24:31, FastEthernet0/1

R4#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D EX 1.1.1.0 [170/2611200] via 10.40.40.5, 00:19:13, FastEthernet0/1
10.0.0.0/24 is subnetted, 6 subnets
D 10.60.60.0 [90/332800] via 10.40.40.5, 00:19:13, FastEthernet0/1
D 10.50.50.0 [90/307200] via 10.40.40.5, 00:19:13, FastEthernet0/1
C 10.40.40.0 is directly connected, FastEthernet0/1
C 10.30.30.0 is directly connected, FastEthernet0/0
D 10.20.20.0 [90/307200] via 10.30.30.3, 00:20:39, FastEthernet0/0
D 10.10.10.0 [90/332800] via 10.30.30.3, 00:19:13, FastEthernet0/0

R5#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
D EX 1.1.1.0 [170/2585600] via 10.50.50.6, 00:19:33, FastEthernet0/0
10.0.0.0/24 is subnetted, 6 subnets
D 10.60.60.0 [90/307200] via 10.50.50.6, 00:19:33, FastEthernet0/0
C 10.50.50.0 is directly connected, FastEthernet0/0
C 10.40.40.0 is directly connected, FastEthernet0/1
D 10.30.30.0 [90/307200] via 10.40.40.4, 00:19:33, FastEthernet0/1
D 10.20.20.0 [90/332800] via 10.40.40.4, 00:19:33, FastEthernet0/1
D 10.10.10.0 [90/332800] via 10.50.50.6, 00:19:33, FastEthernet0/0

R6#sh ip ro | b ^Gate
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
B 1.1.1.0 [20/0] via 10.60.60.1, 00:44:31
10.0.0.0/24 is subnetted, 6 subnets
C 10.60.60.0 is directly connected, FastEthernet0/1
C 10.50.50.0 is directly connected, FastEthernet0/0
D 10.40.40.0 [90/307200] via 10.50.50.5, 00:14:18, FastEthernet0/0
D 10.30.30.0 [90/332800] via 10.50.50.5, 00:14:18, FastEthernet0/0
D 10.20.20.0 [90/332800] via 10.60.60.1, 00:14:18, FastEthernet0/1
D 10.10.10.0 [90/307200] via 10.60.60.1, 00:46:05, FastEthernet0/1

ポイント
  • AD 値を比較する: eBGP (20), Internal EIGRP (90), External EIGRP (170), iBGP (200)
  • R1 は、1.1.1.0/24 を BGP でアドバタイズしている。
  • R6 の BGP の neighbor の設定が正しいことをチェックする。

2009年5月23日土曜日

GNS3 (Dynamips) で SDM を使ってみる


CCNP で SDM (Cisco Router and Security Device Manager) が出題されるので、実際触ってみたいという方も多いでしょう。今回は GNS3 で SDM を使ってみた。

環境
  • ホスト OS: Ubuntu 9.04 (amd64)
  • GNS3: 0.6.1
  • Dynamips: 0.2.8-RC2-amd64
  • KVM (仮想マシン) ゲスト OS: Windows XP Professional SP3
  • JRE: 1.6.0_03 (http://java.sun.com/products/archive/ から、ダウンロードする。)
  • SDM: SDM 2.5 (English)

手順
  1. Cisco (http://www.cisco.com/pcgi-bin/tablebuild.pl/sdm) から、SDM のインストーラとリリースノートをダウンロードする。
  2. リリースノートを読んで、使用条件を満たしているか確認する。
  3. gns3 を起動して、仮想ルータと雲 (Cloud) を配置、接続する。
    雲 (Cloud) で「NIO イーサネット」を使用するには、root 権限が必要となる。
    (gksudo -g gns3 & として起動)
  4. 仮想ルータのインタフェースに IP アドレスを割り当て、PC (私の場合、仮想マシン) から PING できることを確認する。
  5. PC に JRE をインストールする。リリースノートを読んで対応するバージョンをインストールすること。JRE 1.6.0_13 では動作しませんでした。複数のバージョンの JRE がインストールされている場合は、コントロールパネル > Java から、Java コントロールパネルを起動。Java タブの Java アプレットのランタイム設定でバージョンを選択できる。
  6. Cisco からダウンロードした SDM (SDM-V25.zip) を展開、展開したフォルダ内の Help.htm に従ってルータを設定する。
  7. 展開したフォルダ内の setup.exe を実行する。
  8. Install Options: Select where you want to install Cisco SDM.
    インストール先を選択する。ルータのフラッシュに空きが十分ある場合は、[Cisco Router] を、無ければ [This Computer] を選択すればよい。
  9. Router Authentication: Enter router authentication Information.
    ルータの IP アドレスとユーザ名、パスワードを入力する。
  10. Flash installation options: Select the type of installation for Cisco SDM
    [Typical] を選択すればよい。
  11. Select Cisco SDM Components
    規定値でよい。
  12. SDM インストール終了後、IE で、[https://<ルータの IP アドレス>/] へアクセスする。
    * IE、JRE から証明書に関する警告が表示されるので許可する。
    * IE のポップアップ ブロックは無効にする。
    * IE、JRE からの認証ダイアログにユーザ名、パスワードを入力する。
    * Windows ファイアウォールの警告が表示されたら、ブロックを解除する。

参考

2009年5月16日土曜日

bgp suppress-inactive


bgp suppress-inactive コマンドについて、GNS3 で検証してみた。

IP アドレス
  • R1 - f0/0: 192.168.12.1/24
  • R1 - f0/1: 192.168.15.1/24
  • R1 - lo10: 10.10.1.1/24
  • R1 - lo11: 10.11.1.1/24
  • R2 - f0/0: 192.168.12.2/24
  • R2 - f0/1: 192.168.23.2/24
  • R3 - f0/0: 192.168.23.3/24
  • R3 - f0/1: 192.168.34.3/24
  • R4 - f0/0: 192.168.34.4/24
  • R4 - lo10: 10.10.4.1/24
  • R5 - f0/0: 192.168.15.5/24
  • R5 - f0/1: 192.168.23.5/24
BGP に関わる設定
  • R1
    router bgp 1
    no synchronization
    bgp log-neighbor-changes
    network 10.10.1.0 mask 255.255.255.0
    network 10.11.1.0 mask 255.255.255.0
    neighbor 192.168.12.2 remote-as 2
    no auto-summary
  • R2
    router bgp 2
    no synchronization
    bgp log-neighbor-changes
    network 192.168.23.0
    neighbor 192.168.12.1 remote-as 1
    neighbor 192.168.23.3 remote-as 3
    no auto-summary
  • R3
    router bgp 3
    bgp log-neighbor-changes
    neighbor 192.168.23.2 remote-as 2
    neighbor 192.168.34.4 remote-as 4
    !
    address-family ipv4
    neighbor 192.168.23.2 activate
    neighbor 192.168.34.4 activate
    no auto-summary
    no synchronization
    bgp suppress-inactive
    exit-address-family
  • R4
    router bgp 4
    no synchronization
    bgp log-neighbor-changes
    network 10.10.4.0 mask 255.255.255.0
    neighbor 192.168.34.3 remote-as 3
    no auto-summary
show コマンド
  • R3 - show ip route
    R3#sh ip ro | b Gateway
    Gateway of last resort is not set
    10.0.0.0/24 is subnetted, 3 subnets
    S 10.11.1.0 [1/0] via 192.168.23.2
    S 10.10.1.0 [1/0] via 192.168.23.5
    B 10.10.4.0 [20/0] via 192.168.34.4, 00:37:24
    C 192.168.23.0/24 is directly connected, FastEthernet0/0
    C 192.168.34.0/24 is directly connected, FastEthernet0/1
  • R3 - show ip bgp
    R3#sh ip bgp | b Network
    Network Next Hop Metric LocPrf Weight Path
    r> 10.10.1.0/24 192.168.23.2 0 2 1 i
    *> 10.10.4.0/24 192.168.34.4 0 0 4 i
    r> 10.11.1.0/24 192.168.23.2 0 2 1 i
    r> 192.168.23.0 192.168.23.2 0 0 2 i
  • R3 - show ip bgp rib-failure
    R3#sh ip bgp rib-failure
    Network Next Hop RIB-failure RIB-NH Matches
    10.10.1.0/24 192.168.23.2 Higher admin distance No
    10.11.1.0/24 192.168.23.2 Higher admin distance Yes
    192.168.23.0 192.168.23.2 Higher admin distance Yes
  • R4 - show ip route
    R4#sh ip ro | b Gateway
    Gateway of last resort is not set
    10.0.0.0/24 is subnetted, 2 subnets
    B 10.11.1.0 [20/0] via 192.168.34.3, 00:40:22
    C 10.10.4.0 is directly connected, Loopback10
    B 192.168.23.0/24 [20/0] via 192.168.34.3, 00:40:22
    C 192.168.34.0/24 is directly connected, FastEthernet0/0
  • R4 - show ip bgp
    R4#sh ip bgp | b Network
    Network Next Hop Metric LocPrf Weight Path
    *> 10.10.4.0/24 0.0.0.0 0 32768 i
    *> 10.11.1.0/24 192.168.34.3 0 3 2 1 i
    *> 192.168.23.0 192.168.34.3 0 3 2 i
結果の考察

R3 で bgp suppress-inactive コマンドを使っている。

R3 の show ip bgp rib-failure を確認してみた。
BGP より優先される AD 値の ルートがルーティングテーブルにあるネットワークは、Higher admin distance となっている。
その中で、RIB-NH Matches の列が、No になっているネットワーク (10.10.1.0/24) のみが、R4 にアドバタイズされていない。

コマンドレファレンスを調べてみると、RIB-NH Matches の列は、以下の 3 種類がある。(※ 訳に自信無し)
  • Yes: RIB のネクストホップが BGP ルートと同じか、再帰的に辿った結果が、BGP のネクストホップと同じネットワークに隣接している場合。
  • No: RIB のネクストホップを再帰的に辿った結果が、BGP のネクストホップと違う場合。
  • n/a: bgp suppress-inactive が設定されていない。
R3#sh ip bgp rib-failure
Network Next Hop RIB-failure RIB-NH Matches
10.10.1.0/24 192.168.23.2 Higher admin distance No
10.11.1.0/24 192.168.23.2 Higher admin distance Yes
192.168.23.0 192.168.23.2 Higher admin distance Yes

  • 10.10.1.0/24 の BGP のネクストホップは、192.168.23.2 で、スタティックルートのネクストホップは、192.168.23.5 で違うため、RIB-NH Matches = No となる。即ち、BGP でアドバタイズされない。
  • 10.11.1.0/24 の BGP のネクストホップは、192.168.23.2 で、スタティックルートのネクストホップは、192.168.23.2 で同じため、RIB-NH Matches = Yes となる。即ち、BGP でアドバタイズされる。
  • 192.168.23.0 の BGP のネクストホップは、192.168.23.2 で、ルーティングテーブルでは、directly connected である。BGP のネクストホップと同じネットワークに隣接しているため、RIB-NH Matches = Yes となる。即ち、BGP でアドバタイズされる。
bgp suppress-inactive コマンドで、BGP のアドバタイズが抑制されるのは、rib-failure の原因となった、ルーティングテーブルにある AD 値優先のルートと、ネクストホップが違う場合のようだ。
厳密に整合性を維持できるルートのみ BGP でアドバタイズすることを目的とするコマンドと考えれば、この動作は納得がいく。

(注意) 結果の考察に書いてあることは、完全に私の推測です。シスコのドキュメントに基づいた記述ではないことをご了承ください。

参考