DynagenでCCIEを目指す
20100330 ipv6 static route
最終更新:
it_certification
-
view
目的
- IPv6 addressの設定方法を確認します。
構成
- 設定概要
- ipv6アドレスを設定します
- staticルーティングを定義します。
- R1, R2の間は1本がactive系で2本のstandby系です。
- 2本のstandby系は負荷分散するように設定します。
- 構成図

- netファイル
ghostios = True sparsemem = True model = 3620 [localhost] [[3620]] image = C:\Program Files\Dynamips\images\c3620-j1s3-mz.123-18.bin ram = 256 [[ROUTER R1]] e1/0 = R2 e1/0 e1/1 = R2 e1/1 e1/2 = R2 e1/2 [[ROUTER R2]] f0/0 = R3 f0/0 [[ROUTER R3]]
- R1
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback1 no ip address ipv6 address 2000::1:1:1/128 ! interface Ethernet1/0 no ip address half-duplex ipv6 address 2000::1:1/112 ipv6 address FE80::1:10 link-local ipv6 enable ! interface Ethernet1/1 no ip address half-duplex ipv6 address 2000::2:1/112 ipv6 enable ! interface Ethernet1/2 no ip address half-duplex ipv6 address 2000::3:1/112 ! interface Ethernet1/3 no ip address shutdown half-duplex ! ip http server ip classless ! ! ipv6 route ::/0 2000::3:2 10 ipv6 route ::/0 2000::2:2 10 ipv6 route ::/0 2000::1:2 ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R2
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::4:2/112 ! interface Ethernet1/0 no ip address half-duplex ipv6 address 2000::1:2/112 ! interface Ethernet1/1 no ip address half-duplex ipv6 address 2000::2:2/112 ! interface Ethernet1/2 no ip address half-duplex ipv6 address 2000::3:2/122 ! interface Ethernet1/3 no ip address shutdown half-duplex ! ip http server ip classless ! ! ipv6 route ::/0 2000::3:1 10 ipv6 route ::/0 2000::2:1 10 ipv6 route ::/0 2000::1:1 ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 login ! ! end
- R3
! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R3 ! boot-start-marker boot-end-marker ! ! no aaa new-model ip subnet-zero ! ! ! ip cef ipv6 unicast-routing ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2000::4:3/112 ! ip http server ip classless ! ! ipv6 route ::/0 2000::4:2 ! ! ! ! ! ! line con 0 line aux 0 line vty 0 4 ! ! end
検証1 ipv6 設定
- ipv6アドレスの設定
ipv6によるルーティングを有効にします。
R1(config)#ipv6 unicast-routing
I/Fに対して、ipv6を有効にします。この時点で、EUI-64形式のインタフェースIDのリンクローカルアドレスが自動設定されます。
R1(config)#interface Ethernet 1/0 R1(config-if)#ipv6 enable R1(config-if)#do show ipv6 interface Ethernet 1/0 Ethernet1/0 is administratively down, line protocol is down IPv6 is enabled, link-local address is FE80::CE00:FFF:FE20:10 [TENTATIVE] <-EUI-64形式のipv6 address No global unicast address is configured Joined group address(es): FF02::1 FF02::2 FF02::1:FF20:10 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisements are sent every 200 seconds ND router advertisements live for 1800 seconds Hosts use stateless autoconfig for addresses.
EUI-64形式のリンクローカルアドレスは分かりづらいので、リンクローカルアドレスを明示的に指定します。
以下のgeneさんの記事に読んだ限りでは、この方法が実践的であると思います。しかし、CCIE対策の動作確認が主な目的なので、リンクローカルアドレスの設定は以降省略します。
http://www.n-study.com/network/2005/08/ciscoipv6.html
以下のgeneさんの記事に読んだ限りでは、この方法が実践的であると思います。しかし、CCIE対策の動作確認が主な目的なので、リンクローカルアドレスの設定は以降省略します。
http://www.n-study.com/network/2005/08/ciscoipv6.html
R1(config-if)#ipv6 address FE80::1:10 link-local R1(config-if)#do show ipv6 interface Ethernet 1/0 Ethernet1/0 is administratively down, line protocol is down IPv6 is enabled, link-local address is FE80::1:10 [TENTATIVE] No global unicast address is configured Joined group address(es): FF02::1 FF02::2 FF02::1:FF01:10 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisements are sent every 200 seconds ND router advertisements live for 1800 seconds Hosts use stateless autoconfig for addresses.
グローバルユニキャストアドレスの設定を行います。
R1(config-if)#ipv6 address 2000::1:1/112 R1(config-if)#do show ipv6 interface Ethernet 1/0 Ethernet1/0 is administratively down, line protocol is down IPv6 is enabled, link-local address is FE80::1:10 [TENTATIVE] Global unicast address(es): 2000::1:1, subnet is 2000::1:0/112 [TENTATIVE] Joined group address(es): FF02::1 FF02::2 FF02::1:FF01:1 FF02::1:FF01:10 MTU is 1500 bytes ICMP error messages limited to one every 100 milliseconds ICMP redirects are enabled ND DAD is enabled, number of DAD attempts: 1 ND reachable time is 30000 milliseconds ND advertised reachable time is 0 milliseconds ND advertised retransmit interval is 0 milliseconds ND router advertisements are sent every 200 seconds ND router advertisements live for 1800 seconds Hosts use stateless autoconfig for addresses.
ipv4と同様にno shutdownコマンドも入力します。
R1(config-if)#no shutdown
同様の手順で、構成図の通りipv6アドレスを全I/Fに対して設定します。
- static routeの設定
R1に対し、以下の通りstatic routeを設定します。
R1(config)#ipv6 route ::/0 2000::1:2 R1(config)#ipv6 route ::/0 2000::2:2 10 R1(config)#ipv6 route ::/0 2000::3:2 10 R1(config)#do show ipv6 route IPv6 Routing Table - 12 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 S ::/0 [1/0] via 2000::1:2 <- 表示されるのは2000::1:2のみです。floating staticは表示されません。 C 2000::1:0/112 [0/0] via ::, Ethernet1/0 L 2000::1:1/128 [0/0] via ::, Ethernet1/0 C 2000::2:0/112 [0/0] via ::, Ethernet1/1 L 2000::2:1/128 [0/0] via ::, Ethernet1/1 C 2000::3:0/112 [0/0] via ::, Ethernet1/2 L 2000::3:1/128 [0/0] via ::, Ethernet1/2 LC 2000::1:1:1/128 [0/0] via ::, Loopback1 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0
R2に対し、以下の通りstatic routeを設定します。
R2(config)#ipv6 route ::/0 2000::1:1 R2(config)#ipv6 route ::/0 2000::2:1 10 R2(config)#ipv6 route ::/0 2000::3:1 10 R2(config)#do show ipv6 route - 略 - S ::/0 [1/0] via 2000::1:1
R3に対し、以下の通りstatic routeを設定します。
R3(config)#ipv6 route ::/0 2000::4:2 R3(config)#do show ipv6 route - 略 - S ::/0 [1/0] via 2000::4:2
検証2 正常系の疎通確認
- 疎通確認
R1からR3へのping応答を確認します。
R1#ping 2000::4:3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::4:3, timeout is 2 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max R1#traceroute 2000::4:3 Type escape sequence to abort. Tracing the route to 2000::4:3 1 2000::1:2 52 msec 36 msec 20 msec 2 2000::4:3 32 msec 28 msec 24 msec
R3からR1 loopback 1へのping応答を確認します。
R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/67/128 ms R3#traceroute 2000::1:1:1 Type escape sequence to abort. Tracing the route to 2000::1:1:1 1 2000::4:2 48 msec 8 msec 8 msec 2 2000::1:1 8 msec 28 msec 32 msec
検証3 経路切替の確認
- I/Fのshutdown
R1 e1/0をshutdownさせます。
R1(config)#interface Ethernet 1/0 R1(config-if)#shutdown
- 疎通確認
R1からR3へは疎通可能ですが、R3からR1へは疎通不可能になりました。
R1#ping 2000::4:3 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::4:3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/46/100 ms R1# R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) R3#traceroute 2000::1:1:1 Type escape sequence to abort. Tracing the route to 2000::1:1:1 1 2000::4:2 64 msec 16 msec 8 msec 2 2000::4:2 !H * !H
- shutdownおよび経路の確認
疎通負荷の原因を確かめます。R2を見ると、shutdownした対向のI/Fであるe/0/0が依然upしたままになっています。そのため、floating staticが機能せず疎通不可能になっている事が分かります。
(この症状がバグなのか仕様なのかは不明です。)
(この症状がバグなのか仕様なのかは不明です。)
R2#show ipv6 interface brief FastEthernet0/0 [up/up] FE80::CE01:DFF:FE78:0 2000::4:2 Ethernet1/0 [up/up] FE80::CE01:DFF:FE78:10 2000::1:2 Ethernet1/1 [up/up] FE80::CE01:DFF:FE78:11 2000::2:2 Ethernet1/2 [up/up] FE80::CE01:DFF:FE78:12 2000::3:2 Ethernet1/3 [administratively down/down] unassigned R2#show ipv6 route - 略 - S ::/0 [1/0] via 2000::1:1
検証4 負荷分散の確認
- I/Fのshutdown
R2 e1/0をshutdownさせます。
R2(config)#interface Ethernet 1/0 R2(config-if)#shutdown
- 経路の確認
今度は、floating staticが浮かび上がった事が確認できます。
R2#show ipv6 route - 略 - S ::/0 [10/0] via 2000::3:1 via 2000::2:1
- 疎通確認
R3, R1間のpingが可能になりました。tracerouteの結果が複数表示されているのは、「ttlが2で1回目に送信されたパケットは2000::2:1経由、ttlが2で2回目に送信されたパケットは2000::3:1経由、ttlが2で3回目に送信されたパケットは2000::2:1経由である」という意味です。
R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/68 ms R3#traceroute 2000::1:1:1 Type escape sequence to abort. Tracing the route to 2000::1:1:1 1 2000::4:2 84 msec 28 msec 24 msec 2 2000::2:1 28 msec 2000::3:1 36 msec 2000::2:1 24 msec
- 負荷分散の確認
etherchannelなどによる負荷分散は送信元IPアドレスと宛先IPアドレスに基づいて負荷分散されますが、今回のようにstatic routeで負荷分散する場合はパケット単位で負荷分散されるようです。
負荷分散の様子を確かめるために、大量のpingをR3からR1に送信します。
しかし、なぜか5回しかpingが送信されません。これも仕様でしょうか…。
負荷分散の様子を確かめるために、大量のpingをR3からR1に送信します。
しかし、なぜか5回しかpingが送信されません。これも仕様でしょうか…。
R3#ping 2000::1:1:1 repeat 5000 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/48 ms
pingコマンドを気合で連打した直後に、間髪おかずR2のカウンタを確かめます。
R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/20/28 ms R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/36/56 ms R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/41/80 ms R3#ping 2000::1:1:1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2000::1:1:1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/24/44 ms R3# R2#show interfaces summary *: interface is up IHQ: pkts in input hold queue IQD: pkts dropped from input queue OHQ: pkts in output hold queue OQD: pkts dropped from output queue RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec) TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec) TRTL: throttle count Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL ------------------------------------------------------------------------ * FastEthernet0/0 0 0 0 0 1000 1 1000 1 0 Ethernet1/0 0 0 0 0 0 0 0 0 0 * Ethernet1/1 0 0 0 0 1000 1 1000 1 0 * Ethernet1/2 0 0 0 0 1000 1 1000 1 0 Ethernet1/3 0 0 0 0 0 0 0 0 0 NOTE:No separate counters are maintained for subinterfaces Hence Details of subinterface are not shown R2#
補足
- CCOによると、「Cisco IOS ソフトウェア リリース 12.2(2)T または 12.0(21)ST 以降がサポートされているハードウェア プラットフォームでは、IPv6 もサポートされています。」とあります。
- Dynagen上のc2621でIOS12.4(21)を使用した場合は、ipv6コマンドを入力する事ができませんでした。
添付ファイル