アーカイブ

2011年01月

「百年の孤独」ガブリエル・ガルシア=マルケス

カテゴリ:

100南米の何もない場所に夫婦がやって来た。やがてマコンドという町になり、鉄道が通った。戦争があり、長く続く雨があった。

有名な作品でずっと読もうと思っていたが、かなり分厚い本なので試験に合格したら読もうとずっと思っていた。ある家族の100年にも渡る不思議な話がこれでもかと続く。

読んでいて参るのが、登場人物の名前。同じ名前、アルカディオやらアウレリャノが何人も出てくるので大混乱。ここまで登場人物一覧を確認しながら読んだ本はかつてない。これから読むのであれば、家系図を作りつつ、出来事をメモしていくといいでしょう。ちなみに英雄、アウレリャノ・ブエンディア大佐には違う女に産ませた息子、アウレリャノが17人います…。

読み終わるとお腹いっぱいという感じだけど、もう一度読みたい気もする。いつか年を取って暇になったら、読もうかな。時間のある時にじっくり読む本を探している方に強くお勧め。

百年の孤独 (Gabriel Jose Garcia Marquez (1967))

カテゴリ:

EIGRPを設定するときの注意点です。下記のような設定がしてあり、F0/0 S1/2 Lo0というIPアドレスが設定してあるインターファイス全てでEIGRPをAS100で設定していきます。

R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            12.12.12.2      YES manual up                    up      
FastEthernet0/1            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  unassigned      YES unset  administratively down down   
Serial1/2                  23.23.23.2      YES manual up                    up      
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  17.17.2.2       YES NVRAM  up                    up      

EIGRPをAS100で指定し起動します。複数のASを指定してEIGRPを利用することも出来ますが、今回は1つだけにします。

R2(config)#router eigrp 100

次にルータIDを指定します。これは必須ではありませんが、意図しないIDになることを避けるために設定する方が望ましいでしょう。ここではLo0のIPアドレスを利用しています。

R2(config-router)#eigrp router-id 17.17.2.2

次にnetworkコマンドを利用しインターフェイスを指定します。ここではワイルドカードを0.0.0.0と指定しています。

R2(config-router)#network 12.12.12.2 0.0.0.0
R2(config-router)#network 23.23.23.2 0.0.0.0
R2(config-router)#network 17.17.2.2 0.0.0.0

networkコマンドで正しくインターフェイスが指定できているかを確認するにはshow ip eigrp interfacesを利用します。

R2#show ip eigrp interfaces
IP-EIGRP interfaces for process 100

                        Xmit Queue   Mean   Pacing Time   Multicast    Pending
Interface        Peers  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Fa0/0              1        0/0        13       0/1           50           0
Se1/2              1        0/0        10       0/15          50           0
Lo0                0        0/0         0       0/1            0           0

指定したインターフェイスの接続先でもEIGRPを有効にすると、すぐに下記のようなログが表示され、接続されたことが確認できるでしょう。EIGRPは非常に高速に接続が完了するのが特徴です。

Jan 26 06:04:50.043: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 12.12.12.1 (FastEthernet0/0) is up: new adjacency
Jan 26 06:05:05.099: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 23.23.23.3 (Serial1/2) is up: new adjacency

隣接ルータとの接続状況を確認するにはshow ip eigrp neighborsを利用します。

R2#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   23.23.23.3              Se1/2             13 00:14:23   10   200  0  3
0   12.12.12.1              Fa0/0             12 00:14:38   13   200  0  4

EIGRPの設定で注意すべき点は初期値では集約ルート(auto-summary)が有効である点です。確認にはshow ip protocolsが利用できます。

R2#show ip protocols | include Automatic network
  Automatic network summarization is in effect

集約ルートが有効である現在のルーティングテーブルは下記のようになっています。インターフェイスでは/24と設定されているネットワークが自動的に/8と集約されていることが分かります。

R2#show ip route eigrp
     17.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       17.0.0.0/8 is a summary, 01:27:11, Null0
     23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       23.0.0.0/8 is a summary, 01:28:52, Null0
     12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
D       12.0.0.0/8 is a summary, 01:28:52, Null0

集約ルートを無効にするにはno auto-summaryを利用します。

R2(config)#router eigrp 100
R2(config-router)#no auto-summary

R2#show ip protocols | include Automatic network
  Automatic network summarization is not in effect

隣接するルータでもno auto-summaryを設定し、その後ルーティングテーブルをもう一度確認すると17.0.0.0のネットワークが/24で確認できていることが分かります。

R2#show ip route eigrp
     17.0.0.0/24 is subnetted, 3 subnets
D       17.17.1.0 [90/156160] via 12.12.12.1, 00:14:51, FastEthernet0/0
D       17.17.3.0 [90/2297856] via 23.23.23.3, 00:14:53, Serial1/2

EIGRPでのトポロジを表示するにはshow ip eigrp topologyを利用します。さらに表示されているネットワークを指定することで詳細を確認することが出来ます。またこのコマンドで設定したRouter IDを確認できることが分かります。

R2#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(17.17.2.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 17.17.1.0/24, 1 successors, FD is 156160
        via 12.12.12.1 (156160/128256), FastEthernet0/0
P 17.17.2.0/24, 1 successors, FD is 128256
        via Connected, Loopback0
P 17.17.3.0/24, 1 successors, FD is 2297856
        via 23.23.23.3 (2297856/128256), Serial1/2
P 12.12.12.0/24, 1 successors, FD is 28160
        via Connected, FastEthernet0/0
P 23.23.23.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/2

R2#show ip eigrp topology 17.17.1.0/24
IP-EIGRP (AS 100): Topology entry for 17.17.1.0/24
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 156160
  Routing Descriptor Blocks:
  12.12.12.1 (FastEthernet0/0), from 12.12.12.1, Send flag is 0x0
      Composite metric is (156160/128256), Route is Internal
      Vector metric:
        Minimum bandwidth is 100000 Kbit
        Total delay is 5100 microseconds
        Reliability is 255/255
        Load is 1/255
        Minimum MTU is 1500
        Hop count is 1

EIGRPで全てのインターネットを有効にするにはnetwork 0.0.0.0を利用します。とりあえず複数のルータ間でpingが通るようにしたい場合などに便利です。

R2(config)#no router eigrp 100
R2(config)#router eigrp 100
R2(config-router)#no auto-summary
R2(config-router)#network 0.0.0.0

カテゴリ:

OSPFの設定をする時の注意点です。下記のような設定がしてあり、F0/0 S1/2 Lo0というIPアドレスが設定してあるインターファイス全てでOSPFをarea 0で設定していきます。

R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            12.12.12.2      YES manual up                    up      
FastEthernet0/1            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  unassigned      YES unset  administratively down down   
Serial1/2                  23.23.23.2      YES manual up                    up      
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  17.17.2.2       YES NVRAM  up                    up      

ここではOSPFをプロセスID 1で起動します。MPLSでは複数のプロセスを上げたりしますが、CCNAやCCNPであれば利用するプロセスは1つだけ、IDはいつも1で構いません。

R2#configure terminal
R2(config)#router ospf 1

次にルータIDを指定します。これは必須ではありませんが、意図しないIDになることを避けるために設定する方が望ましいでしょう。ここではLo0のIPアドレスを利用しています。

R2(config-router)#router-id 17.17.2.2

次に利用するインターフェイスを指定します。

R2(config-router)#network 12.12.12.2 0.0.0.0 area 0
R2(config-router)#network 23.23.23.2 0.0.0.0 area 0
R2(config-router)#network 17.17.2.2 0.0.0.0 area 0

入力後、正しく指定されているかを確認しますが。show running-configで確認することはあまり効率的ではありません。show ip ospf interface briefが確実です。このコマンドを利用することで、OSPFが有効になっているインターフェイスのみを表示することが出来ます。またbriefを省けば、詳細が表示されます。

R2#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               17.17.2.2/24       1     LOOP  0/0
Se1/2        1     0               23.23.23.2/24      64    P2P   1/1
Fa0/0        1     0               12.12.12.2/24      1     BDR   1/1

下記はF0/0を指定した例です。ネットワークタイプなどが表示されていることが分かります。

R2#show ip ospf interface FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 12.12.12.2/24, Area 0
  Process ID 1, Router ID 17.17.2.2, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
〜略〜

show running-configで確認した場合は単にどのように入力されたかが表示されるかであり、実際にインターフェイスが有効になっているか確認できません。それに対してshow ip ospf interfaceであれば設定が有効になっているかを確認できます。

また多くのインターフェイスがある場合はnetwork 0.0.0.0とすることで全てをまとめて有効にできます。

R2(config)#no router ospf 1
R2(config)#router ospf 1
R2(config-router)#router-id 17.17.2.2
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0

R2#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               17.17.2.2/24       1     LOOP  0/0
Se1/2        1     0               23.23.23.2/24      64    P2P   1/1
Fa0/0        1     0               12.12.12.2/24      1     BDR   1/1

ちなみにnetwork 0.0.0.0 0.0.0.0 area 0と入力してもnetwork 0.0.0.0 255.255.255.255 area 0と設定されます。

network 0.0.0.0で全てを有効にした場合でも個別のインターフェイスを指定できます。この場合は個別の指定が優先的に設定されます。下記の例ではF0/0のみがarea 1となったことが確認できます。

R2(config-router)#network 12.12.12.2 0.0.0.0 area 1

R2#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               17.17.2.2/24       1     LOOP  0/0
Se1/2        1     0               23.23.23.2/24      64    P2P   1/1
Fa0/0        1     1               12.12.12.2/24      1     WAIT  0/0

インターフェイスを有効化した後にshow ip ospf neighborでネイバーとの接続を確認します。show ip ospf neighbor detailでより詳細な情報が表示されます。

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
17.17.1.1         1   FULL/DR         00:00:31    12.12.12.1      FastEthernet0/0
17.17.3.3         0   FULL/  -        00:00:31    23.23.23.3      Serial1/2

カテゴリ:

OSPFやEIGRPと違い、BGPでは設定を変更してもすぐには反映されません。まずこのことを理解しておかないと、設定が反映されないのは間違っているのかもと悩むことになります。そしてこのことを理解していれば、しばらく待ってからshow ip bgpで確認すればいいとなるのですが、CCIE Labの勉強中や試験中では待っていられない場合も当然ながらあります。このような場合、"clear ip bgp"コマンドを利用します。

R2#clear ip bgp ?
  *                Clear all peers
〜略〜

最も単純な使い方は"clear ip bgp *"です。

R2#clear ip bgp *
R2#
Jan 12 06:00:59.871: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Down User reset
Jan 12 06:00:59.871: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Down User reset
Jan 12 06:01:00.915: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Up
Jan 12 06:01:01.107: %BGP-5-ADJCHANGE: neighbor 12.12.12.1 Up

実行すると分かりますが、これはすべてのBGPセッションのリセットとなります。時間もかかり、あまり効率的な使い方とは言えません。"*"に続けてsoftを指定するとセッションは維持したまま、設定を更新することが出来ます。

R2#clear ip bgp * ?
〜略〜
  soft   Soft reconfig inbound and outbound updates
〜略〜

R2#clear ip bgp * soft ?
  in   Soft reconfig inbound updates
  out  Soft reconfig outbound updates
  <cr>

softに続いてinまたはoutを指定すると片方向のみの更新となります。

下記はネイバー12.12.12.1からのネットワークはweight 100にする実行例です。すぐに結果が反映されたことを確認できます。

R2#show ip bgp
BGP table version is 3, local router ID is 17.17.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.3.0/24    23.23.23.3               0             0 300 i
*> 192.168.1.0      12.12.12.1               0             0 100 i

R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router bgp 200
R2(config-router)#neighbor 12.12.12.1 weight 100
R2(config-router)#^Z

R2#clear ip bgp * soft in
R2#show ip bgp          
BGP table version is 4, local router ID is 17.17.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 172.16.3.0/24    23.23.23.3               0             0 300 i
*> 192.168.1.0      12.12.12.1               0           100 100 i

"*"を使うと全てのネイバーが対象になります。数が多い場合は特定のネイバーを指定するといいでしょう。

R2#clear ip bgp 12.12.12.1 soft in

カテゴリ:

下記の様なBGPテーブルがあります。この中から192.168.2.0と192.168.3.0のルートを抜き出すためにprefix-listを利用します。

R1#show version | include IOS
Cisco IOS Software, 3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T12, RELEASE SOFTWARE (fc3)
R1#show ip bgp
BGP table version is 27, local router ID is 17.17.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.0.0      12.12.12.2               0             0 200 i
*> 192.168.1.0      12.12.12.2               0             0 200 i
*> 192.168.2.0      12.12.12.2               0             0 200 i
*> 192.168.3.0      12.12.12.2               0             0 200 i

R1#show running-config | include LIST1
ip prefix-list LIST1 seq 5 permit 192.168.2.0/24
ip prefix-list LIST1 seq 10 permit 192.168.3.0/24

R1#show ip prefix-list LIST1
ip prefix-list LIST1: 2 entries
   seq 5 permit 192.168.2.0/24
   seq 10 permit 192.168.3.0/24

この設定が有効であるかどうかはshow ip bgp prefix-listを使うと簡単に確認することができます。

R1#show ip bgp ?
〜略〜
  prefix-list        Display routes matching the prefix-list
〜略〜

R1#show ip bgp prefix-list LIST1
BGP table version is 28, local router ID is 17.17.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.2.0      12.12.12.2               0             0 200 i
*> 192.168.3.0      12.12.12.2               0             0 200 i

さてLIST1は2行で設定してありますが、これを1行で書けという問題がありがちです。LIST2の様に書けば問題ないはずですが、同じ方法で試してみます。

R1#show running-config | include LIST2
ip prefix-list LIST2 seq 5 permit 192.168.2.0/23 le 24

R1#show ip prefix-list LIST2
ip prefix-list LIST2: 1 entries
   seq 5 permit 192.168.2.0/23 le 24

R1#show ip bgp prefix-list LIST2
BGP table version is 28, local router ID is 17.17.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.2.0      12.12.12.2               0             0 200 i
*> 192.168.3.0      12.12.12.2               0             0 200 i

問題ないようです。試しにこの2つにroute-mapを使いweightを設定してみます。sequence 100はweightを設定しないルートのために必要です。

R1#show running-config | section route-map
route-map WEIGHT permit 10
match ip address prefix-list LIST2
set weight 100
route-map WEIGHT permit 100

R1#show route-map WEIGHT
route-map WEIGHT, permit, sequence 10
  Match clauses:
    ip address prefix-lists: LIST2
  Set clauses:
    weight 100
  Policy routing matches: 0 packets, 0 bytes
route-map WEIGHT, permit, sequence 100
  Match clauses:
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes

R1#show running-config | section bgp
router bgp 100
〜略〜
neighbor 12.12.12.2 route-map WEIGHT in
〜略〜

上記の設定でweightが設定されたことが分かります。このようにshow ip bgp prefix-listを使うことでprefix-listが意図した通りの設定になっているかを確認することができます。

R1#show ip bgp
BGP table version is 36, local router ID is 17.17.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.0.0      12.12.12.2               0             0 200 i
*> 192.168.1.0      12.12.12.2               0             0 200 i
*> 192.168.2.0      12.12.12.2               0           100 200 i
*> 192.168.3.0      12.12.12.2               0           100 200 i
*> 192.168.4.0      12.12.12.2               0             0 200 i

このページのトップヘ

見出し画像
×