タグ

タグ:IPv6

カテゴリ:

今回はIPv6 RIPにおける経路の集約を行います。R1とR2はF0/0で接続されていて、Lo0と共にそれぞれリンクローカルアドレスを設定してあります。R2のLo0には集約で使うアドレスを4つ追加しました。

R1(config)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:0:0:2::2
    2001:0:0:22::2
    2001:0:0:222::2
    2001:0:0:2222::2

R1とR2のF0/0でRIPを有効にします。

R1(config)#do sh run int f0/0
〜略〜
interface FastEthernet0/0
ipv6 address FE80::1 link-local
ipv6 rip RIP6 enable

R1(config)#do deb ipv rip
RIP Routing Protocol debugging is on
R1(config)#do sh ipv rip RIP6
RIP process "RIP6", port 521, multicast-group FF02::9, pid 246
     Administrative distance is 120. Maximum paths is 16
     Updates every 30 seconds, expire after 180
     Holddown lasts 0 seconds, garbage collect after 120
     Split horizon is on; poison reverse is off
     Default routes are not generated
     Periodic updates 58, trigger updates 11
  Interfaces:
    Loopback0
    FastEthernet0/0
  Redistribution:
    None

R1のルーティングテーブルにR2のアドレスが表示されることが分かります。

R1(config-if)#do sh ipv rou rip
IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001:0:0:2::/64 [120/2]
     via FE80::2, FastEthernet0/0
R   2001:0:0:22::/64 [120/2]
     via FE80::2, FastEthernet0/0
R   2001:0:0:222::/64 [120/2]
     via FE80::2, FastEthernet0/0
R   2001:0:0:2222::/64 [120/2]
     via FE80::2, FastEthernet0/0

4つのアドレスにpingを実行します。

R1(config)#do pin 2001:0:0:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/10/28 ms
R1(config)#do pin 2001:0:0:22::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:22::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms
R1(config)#do pin 2001:0:0:222::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:222::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms
R1(config)#do pin 2001:0:0:2222::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:2222::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms

pingの実行が確認できたので集約を行います。利用するのはipv6 rip summary-addressコマンドで、ここでは単純に/64を/48に集約します。コマンドを設定するのは集約アドレスを流したいインターフェースで、この場合はR2のF0/0上で利用します。

R2(config-if)#int f0/0
R2(config-if)#ipv rip RIP6 summary-address 2001::/48

RIPでのこの様な設定はOSPFやEIGRPと違い、反映に時間がかかります。CCIE Lab受験時など早く結果を得たい時にはインターフェースを一度shutしルーティングテーブルを消してからno shutします。

設定後、確認すると下記のようにすっきりした形になります。

R1(config)#do sh ipv rou rip
IPv6 Routing Table - 2 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001::/48 [120/2]
     via FE80::2, FastEthernet0/0

pingを実行します。ここではforeachを使っています。CCIE Lab受験時には多くのアドレスに対してpingを実行しますので、foreachの使い方を覚えおくと便利です。

R1(tcl)#foreach router {
+>(tcl)#2001:0:0:2::2
+>(tcl)#2001:0:0:22::2
+>(tcl)#2001:0:0:222::2
+>(tcl)#2001:0:0:2222::2
+>(tcl)#} { puts [ exec "ping $router"]}

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/16 ms

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:22::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:222::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:0:0:2222::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms

R1(tcl)#tclquit

カテゴリ:

今回はIPv6のRIPでメトリックを指定する方法を確認します。現在R1とR2はF0/0とS1/0(フレームリレー)で直接接続されています。

R1(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Serial1/0                  [up/up]
    FE80::1

Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Serial1/0                  [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

R1(config)#do pin fe80::2
Output Interface: fastethernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2 seconds:
Packet sent with a source address of FE80::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms
R1(config)#do pin fe80::2
Output Interface: serial1/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2 seconds:
Packet sent with a source address of FE80::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/9/24 ms

R1とR2それぞれでF0/0, S1/0, Lo0でIPv6 RIPを有効にします。

R1(config)#int f0/0
R1(config-if)#ipv6 rip RIP6 enable
R1(config-if)#int s1/0
R1(config-if)#ipv6 rip RIP6 enable
R1(config-if)#int lo0
R1(config-if)#ipv6 rip RIP6 enable
R1(config-if)#do sh ipv rip RIP6
RIP process "RIP6", port 521, multicast-group FF02::9, pid 255
     Administrative distance is 120. Maximum paths is 16
     Updates every 30 seconds, expire after 180
     Holddown lasts 0 seconds, garbage collect after 120
     Split horizon is on; poison reverse is off
     Default routes are not generated
     Periodic updates 103, trigger updates 6
  Interfaces:
    Serial1/0
    FastEthernet0/0
    Loopback0
  Redistribution:
    None

R1からR2へのLo0アドレス(2001:2::2)へのルートを確認します。メトリックが2で、2つのインターフェースを利用していることが分かります。

R1(config-if)#do sh ipv rou 2001:2::2
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001:2::/64 [120/2]
     via FE80::2, FastEthernet0/0
     via FE80::2, Serial1/0

R1のインターフェースでメトリック値を指定してみます。ipv6 rip RIP6 metric-offsetコマンドを利用し、3を指定してみました。

R1(config-if)#int f0/0
R1(config-if)#ipv6 rip RIP6 metric-offset 3
R1(config-if)#int s1/0
R1(config-if)#ipv6 rip RIP6 metric-offset 3
R1(config-if)#do deb ipv6 rip
RIP Routing Protocol debugging is on

メトリックが最初の2(1+1)から4(1+3)に変更されたことが分かります。

R1(config-if)#do sh ipv rou 2001:2::2
〜略〜
R   2001:2::/64 [120/4]
     via FE80::2, Serial1/0
     via FE80::2, FastEthernet0/0

次にF0/0のみ、メトリックを5に変更します。これによりF0/0がルーティングから消えることが分かります。

R1(config-if)#int f0/0
R1(config-if)#ipv6 rip RIP6 metric-offset 5

R1(config-if)#do sh ipv rou 2001:2::2
〜略〜
R   2001:2::/64 [120/4]
     via FE80::2, Serial1/0

特定の経路をあえて使わないようにする場合に、metric-offsetはよく使われます。

カテゴリ:

今回はフレームリレーにIPv6の設定を行います。基本的にはIPv4と同じです。R1のS1/0からはDLCI 102、R2のS1/0からはDLCI 201を使って接続を行います。

R1での設定です、カプセル化とIPアドレスを指定しています。DLCIは静的に利用するため、inverse-arpを無効にしました。

R1(config)#int s1/0
R1(config-if)#encapsulation frame-relay
R1(config-if)#no sh
R1(config-if)#no fram inverse-arp
R1(config-if)#ipv6 address fe80::1 link-local

DLCIをframe-relay mapで指定し、確認します。

R1(config-if)#frame-relay map ipv6 fe80::2 102 broadcast
R1(config-if)#do sh fram map
Serial1/0 (up): ipv6 FE80::2 dlci 102(0x66,0x1860), static,
              broadcast,
              CISCO, status defined, active

R2でも同じように設定します。

R2(config)#int s1/0
R2(config-if)#no sh
R2(config-if)#en fram
R2(config-if)#no fram inv
R2(config-if)#ipv add fe80::2 li
R2(config-if)#fram map ipv6 fe80::1 201 b
R2(config-if)#do sh fram map
Serial1/0 (up): ipv6 FE80::1 dlci 201(0xC9,0x3090), static,
              broadcast,
              CISCO, status defined, active

両方のインターフェースがup/upになっていることが分かります。pingで疎通を確認します。

R1(config-if)#do sh ipv int b
Serial1/0                  [up/up]
    FE80::1

R2(config-if)#do sh ipv int b
Serial1/0                  [up/up]
    FE80::2

R1(config-if)#do pin fe80::2
Output Interface: serial1/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2 seconds:
Packet sent with a source address of FE80::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/16 ms

当然ながらLMIタイプが一致しないと接続できません。下記はあえてLMIタイプをCISCOに変えている例です。

R1(config-if)#do sh int s1/0 | i LMI type
  LMI DLCI 0  LMI type is ANSI Annex D  frame relay DTE  segmentation inactive
R1(config-if)#do deb fram lmi
Frame Relay LMI debugging is on
Displaying all Frame Relay LMI data

R1(config-if)#frame-relay lmi-type cisco

Aug 15 06:07:09.215: Serial1/0(out): StEnq, myseq 3, yourseen 0, DTE up
Aug 15 06:07:09.219: datagramstart = 0xF400714, datagramsize = 13
Aug 15 06:07:09.219: FR encap = 0xFCF10309
Aug 15 06:07:09.219: 00 75 01 01 01 03 02 03 00
Aug 15 06:07:09.223:
Aug 15 06:07:19.215: Serial1/0(out): StEnq, myseq 1, yourseen 0, DTE down

R1(config-if)#do sh ipv int b
Serial1/0                  [up/down]
    FE80::1

LMIタイプを元に戻し、Lo0にもIPv6アドレスを設定しました。

R1(config-if)#do sh ipv int b
Serial1/0                  [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

全てのインターフェースでRIPを有効にします。

R1(config-if)#do sh ipv6 rip
RIP process "RIP6", port 521, multicast-group FF02::9, pid 255
     Administrative distance is 120. Maximum paths is 16
     Updates every 30 seconds, expire after 180
     Holddown lasts 0 seconds, garbage collect after 120
     Split horizon is on; poison reverse is off
     Default routes are not generated
     Periodic updates 1, trigger updates 2
  Interfaces:
    Loopback0
    Serial1/0
  Redistribution:
    None

この様に、IPv6でフレームリレーを利用した場合でもルーティングの設定は基本的に同じです。

R1(config-if)#do sh ipv rou rip
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001:2::/64 [120/2]
     via FE80::2, Serial1/0
R1(config-if)#do pin 2001:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/12 ms

カテゴリ:

今回はインターフェースにIPv6アドレスを設定する、ごく基本的な方法を説明します。

R1(config-if)#do sh run int f0/0
Building configuration...

Current configuration : 72 bytes
!
interface FastEthernet0/0
no ip address
end

手っ取り早くIPv6を有効にするにはipv6 enableを利用します。

R1(config-if)#int f0/0
R1(config-if)#ipv6 enable

R1(config-if)#do sh run int f0/0
Building configuration...

Current configuration : 85 bytes
!
interface FastEthernet0/0
no ip address
ipv6 enable
end

R1(config-if)#do sh ipv int b   
FastEthernet0/0            [up/up]
    FE80::C000:12FF:FE13:0

R2にも同じように設定します。

R2(config-if)#int f0/0
R2(config-if)#ipv en
R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::C001:12FF:FE13:0

R1にpingが通ることを確認します。

R2(config-if)#do pin  FE80::C000:12FF:FE13:0
Output Interface: fastethernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::C000:12FF:FE13:0, timeout is 2 seconds:
Packet sent with a source address of FE80::C001:12FF:FE13:0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/9/16 ms

グローバルアドレスを割り当てるには手動とMACアドレスを利用するEUIがあります。

まず手動での割り当てです。IPv4と違いsecondary addressを使わなくても、そのまま複数のアドレスを設定可能です。

R1(config-if)#int f0/0
R1(config-if)#ipv add 2001:1::1/64
R1(config-if)#ipv add 2001:1::10/64
R1(config-if)#ipv add 2001:1::100/64
R1(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::C000:12FF:FE13:0
    2001:1::1
    2001:1::10
    2001:1::100

R2はEUIを使って設定してみます。MACアドレスが利用されていることが分かります。

R2(config-if)#int f0/0
R2(config-if)#ipv address 2001:2::/64 ?
  anycast  Configure as an anycast
  eui-64   Use eui-64 interface identifier
  <cr>

R2(config-if)#ipv address 2001:2::/64 eui-64
R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::C001:12FF:FE13:0
    2001:2::C001:12FF:FE13:0

R2(config-if)#do sh ipv int f0/0
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C001:12FF:FE13:0
〜略〜

カテゴリ:

今回はIPv6におけるアクセスリストの利用方法を確認します。現在、R1とR2はEIGRPを利用しています。

R1#show ipv6 interface b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2#show ipv6 interface brief
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

R1#show ipv6 route eigrp
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
D   2001:2::/64 [90/156160]
     via FE80::2, FastEthernet0/0

R1#ping 2001:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/8/12 ms

アクセス制限をかけていない初期状態ではR1のF0/0とLo0両方からtelnetで接続が可能です。

R1#telnet 2001:2::2 /source-interface f0/0
Trying 2001:2::2 ... Open

User Access Verification

Password:
R2>

R1#telnet 2001:2::2 /source-interface lo0
Trying 2001:2::2 ... Open

User Access Verification

Password:
R2>show users
    Line       User       Host(s)              Idle       Location
   0 con 0                idle                 00:00:16   
* 98 vty 0                idle                 00:00:00 2001:1::1

  Interface    User               Mode         Idle     Peer Address

R2にIPv6でのアクセスリストを使い、接続の制限を行います。IPv6アクセスリストでは名前付きのみが利用可能です。今回は稼働状況を確認するためにlogを加えました。

R2(config)#ipv6 access-list TELNET
R2(config-ipv6-acl)#permit ipv6 2001:1::/64 host 2001:2::2 log
R2(config-ipv6-acl)#do sh ipv ac
IPv6 access list TELNET
    permit ipv6 2001:1::/64 host 2001:2::2 log sequence 10

アクセスリストをline vtyに適用します。

R2(config-ipv6-acl)#line vty 0 4
R2(config-line)#ipv6 access-class TELNET in

接続を確認します。まずf0/0(fe80::1)からでは接続が拒否されます。

R1#telnet 2001:2::2 /source-interface f0/0
Trying 2001:2::2 ...
% Connection refused by remote host

次にlo0(2001:1::1)からの接続は問題がないことが分かります。

R1#telnet 2001:2::2 /source-interface lo0
Trying 2001:2::2 ... Open

User Access Verification

Password:
R2

R2には下記のようにログが表示されます。

R2(config-ipv6-acl)#
Aug  1 06:06:28.675: %IPV6-6-ACCESSLOGP: list TELNET/10 permitted tcp 2001:1::1(13418) -> 2001:2::2(23), 1 packet

R2(config-ipv6-acl)#do sh ipv ac
IPv6 access list TELNET
    permit ipv6 2001:1::/64 host 2001:2::2 log (2 matches) sequence 10

アクセスリストを作成する際は名前付きのみが有効という点以外は、基本的にIPv4と同じ様に利用できます。

カテゴリ:

今回はIPv6での基本的なEIGRPの設定を確認していきます。IPアドレスの設定は前回と同じです。

R1(config)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

IPv6でのルーティングをR1とR2で有効にします。

R1(config)#ipv6 unicast-routing

次にEIGRPのプロセスを有効にします。

R1(config)#ipv6 router eigrp 100

そしてここに独特な設定が必要です。プロセスの中でno shutdownを実行する必要があるのです。実行しないとEIGRPは有効になりません。

R1(config-rtr)#no shutdown

インターフェースでEIGRPを有効にする点はRIPやOSPFと同じです。R2でも同じようにして有効にします。

R1(config-rtr)#int f0/0
R1(config-if)#ipv6 eigrp 100
R1(config-if)#int lo0
R1(config-if)#ipv6 eigrp 100

show ipv6 protocolコマンドで有効なインターフェースを確認します。

R1(config-if)#do sh ipv prot
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "eigrp 100"
  EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
  EIGRP maximum hopcount 100
  EIGRP maximum metric variance 1
  Interfaces:
    FastEthernet0/0
    Loopback0
  Redistribution:
    None
  Maximum path: 16
  Distance: internal 90 external 170

show ipv6 eigrp interfaceコマンドでも有効なインターフェースを確認できます。

R1(config)#do sh ipv ei int
IPv6-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        20       0/1           50           0
Lo0                0        0/0         0       0/1            0           0

IPv4と同じようにIPv6でもEIGRPはすぐに接続が有効になります。

R1(config-if)#do sh ipv ei nei
IPv6-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   Link-local address:     Fa0/0             14 00:00:37   20   200  0  4
    FE80::2

show ipv6 eigrp topologyコマンドを実行すると、lo0でのネットワークがEIGRPで流れていることを確認できます。

R1(config)#do sh ipv ei top
IPv6-EIGRP Topology Table for AS(100)/ID(17.17.1.1)

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

P 2001:1::/64, 1 successors, FD is 128256
        via Connected, Loopback0
P 2001:2::/64, 1 successors, FD is 156160
        via FE80::2 (156160/128256), FastEthernet0/0

R1でIPv6のルーティングテーブルを確認し、pingが実行出来ることを確認しました。

R1(config)#do sh ipv rou ei
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
D   2001:2::/64 [90/156160]
     via FE80::2, FastEthernet0/0

R1(config)#do pin 2001:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/8 ms

カテゴリ:

今回はIPv6での基本的なOSPFの設定を確認していきます。IPアドレスの設定は前回と同じです。

R1(config)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

IPv6でのルーティングをR1とR2で有効にします。

R1(config)#ipv6 unicast-routing

IPv6でもOSPFではプロセスIDを指定して起動します。またルータIDも指定しますが、IPv4アドレスの形式での指定となります。

R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id ?
  A.B.C.D  OSPF router-id in IP address format

R1(config-rtr)#router-id 17.17.1.1

IPv6ではインターフェース単位でOSPFの有効化を指定します。今回はエリア0を利用しました。

R1(config-rtr)#int f0/0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#int lo0
R1(config-if)#ipv6 ospf 1 area 0

インターフェースが有効であることを確認します。

R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "ospf 1"
  Interfaces (Area 0):
    Loopback0
    FastEthernet0/0
  Redistribution:
    None

R1#show ipv6 ospf interface brief
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
Lo0          1     0               13         1     LOOP  0/0
Fa0/0        1     0               4          1     BDR   1/1

R1#debug ipv6 ospf adj
Jul 19 06:41:17.519: OSPFv3: Send LS REQ to 17.17.2.2 length 12 LSA count 1
Jul 19 06:41:17.519: OSPFv3: Send DBD to 17.17.2.2 on FastEthernet0/0 seq 0xDE7 opt 0x0013 flag 0x0 len 28
Jul 19 06:41:17.523: OSPFv3: Rcv LS REQ from 17.17.2.2 on FastEthernet0/0 length 40 LSA count 2
Jul 19 06:41:17.523: OSPFv3: Send UPD to 101.11.13.108 on FastEthernet0/0 length 80 LSA count 2
Jul 19 06:41:17.531: OSPFv3: Rcv LS UPD from 17.17.2.2 on FastEthernet0/0 length 44 LSA count 1
Jul 19 06:41:17.531: OSPFv3: Synchronized with 17.17.2.2 on FastEthernet0/0, state FULL
Jul 19 06:41:17.531: %OSPFv3-5-ADJCHG: Process 1, Nbr 17.17.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done

インターフェースの詳細を表示するとネットワークタイプやコストなど、IPv4と基本的に同じであることがよく分かります。

R1#show ipv6 ospf interface brief f0/0
FastEthernet0/0 is up, line protocol is up
  Link Local Address FE80::1, Interface ID 4
  Area 0, Process ID 1, Instance ID 0, Router ID 17.17.1.1
  Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 17.17.2.2, local address FE80::2
  Backup Designated router (ID) 17.17.1.1, local address FE80::1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:04
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 2, maximum is 2
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 17.17.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)

現在設定されいるエリアを確認します。バックボーンであるArea 0の設定が確認できます。

R1#show ipv6 ospf 1
Routing Process "ospfv3 1" with ID 17.17.1.1
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Reference bandwidth unit is 100 mbps
    Area BACKBONE(0)
        Number of interfaces in this area is 2
        SPF algorithm executed 2 times
        Number of LSA 6. Checksum Sum 0x02B316
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

R2との接続状態を確認します。FULLとなっていることが分かります。

R1#show ipv6 ospf neighbor

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
17.17.2.2         1   FULL/DR         00:00:32    4               FastEthernet0/0

IPv6のルーティングテーブルを見ると、R2のLo0が載っていることが分かります。

R1#show ipv6 route ospf
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
O   2001:2::2/128 [110/1]
     via FE80::2, FastEthernet0/0

pingコマンドで疎通を確認しています。

R1#ping 2001:2::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:2::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/12 ms

カテゴリ:

今回はIPv6でのRIPを設定します。まず最低限の設定で、動きとIPv4との違いを理解できるようにします。

R1とR2はF0/0で直接接続されています。F0/0とLo0にそれぞれリンクローカルアドレスを設定し、Lo0にはそれぞれIPv6アドレス(2001:1::1, 2001:2::2)を割り当てました。これら4つのインターフェースでRIPを有効にします。

R1(config)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1
Loopback0                  [up/up]
    FE80::1
    2001:1::1

R2(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::2
Loopback0                  [up/up]
    FE80::2
    2001:2::2

まず両ルータでIPv6でのルーティングを有効とするためにipv6 unicast-routingコマンドを実行します。

R1(config)#ipv6 ?
〜略〜
  unicast-routing    Enable unicast routing
R1(config)#ipv6 unicast-routing

次にRIPを利用するインターフェースでipv6 ripを実行します。IPv4ではrouter ripの中でnetworkコマンドを利用することでインターフェースを指定しましたが、IPv6では直接インターフェースを利用するのが特徴です。

ipv6 ripコマンドでRIPのプロセスを有効にしますが、任意の文字列をプロセス名として指定します。ここではRIP6としました。4つのインターフェースで同じ設定を行います。

R1(config)#int f0/0
R1(config-if)#ipv6 rip RIP6 enable

上記設定により、自動的にグローバル コンフィギュレーション コマンドであるipv6 router ripが設定されます。

R1(config-if)#do sh run | i RIP6
ipv6 rip RIP6 enable
ipv6 router rip RIP6

インターフェースが有効になっているかをshow ipv6 protocolsコマンドで確認しています。

R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "rip RIP6"
  Interfaces:
    Loopback0
    FastEthernet0/0
  Redistribution:
    None

debugで稼働状況を確認します。

R1#debug ipv6 rip f0/0
Jul 11 06:11:38.583: RIPng: Sending multicast update on FastEthernet0/0 for RIP6
Jul 11 06:11:38.583:        src=FE80::1
Jul 11 06:11:38.587:        dst=FF02::9 (FastEthernet0/0)
Jul 11 06:11:38.587:        sport=521, dport=521, length=32

R2でルートを確認すると確かにRIPによりR1の情報が表示されています。

R2#show ipv6 route rip
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       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
       D - EIGRP, EX - EIGRP external
R   2001:1::/64 [120/2]
     via FE80::1, FastEthernet0/0

pingコマンドで疎通を確認します。

R2#ping 2001:1::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:1::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms

カテゴリ:

今回よりIPv6の設定を紹介します。以前のCCIE LabではインターフェースにIPアドレスを設定する程度の非常に簡単な問題でしたが、現在はそこそこ複雑な設定も出ますのでしっかりと学習しておく必要があります。

まずIPアドレスを設定しますが、最も簡単な方法にipv6 enableコマンドがあります。

R1(config)#int f0/0
R1(config-if)#ipv6 enable
R1(config-if)#no sh
R1(config-if)#do sh ipv6 int b
FastEthernet0/0            [up/up]
    FE80::C000:34FF:FE43:0
〜略〜
R1(config-if)#do sh ipv6 int f0/0
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::C000:34FF:FE43:0 [TEN]
  No Virtual link-local address(es):
  No global unicast address is configured
  Joined group address(es):
〜略〜

上記の様にfe80で始まるリンクローカルアドレスが設定されました。このアドレスはインターフェースのMACアドレスより自動的に生成されます。このアドレスは隣接するデバイス間のみで有効です。

f0/0の接続先であるR2のf0/0にも同じ設定を行います。

R2(config)#int f0/0
R2(config-if)#ipv6 enable
R2(config-if)#no sh

そしてこのままpingが実行可能です。ただしリンクローカルアドレスを利用する際は利用するインターフェースを指定する必要があります。

R2(config-if)#do pin FE80::C000:34FF:FE43:0
Output Interface: FastEthernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::C000:34FF:FE43:0, timeout is 2 seconds:
Packet sent with a source address of FE80::C001:34FF:FE43:0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/16/52 ms

MACアドレスを利用したリンクローカルアドレスは設定は便利なものの、IPアドレスが複雑となりあまり使いやすいとは言えません。固定で指定するには下記のようにします。

R1(config-if)#int f0/0
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#do sh ipv int b
FastEthernet0/0            [up/up]
    FE80::1

R2(config-if)#int f0/0
R2(config-if)#ipv6 address fe80::2 link-local
R2(config-if)#do ping fe80::1

R1はfe80::1、R2はfe80::2と覚えやすいアドレスになりました。そしてこのリンクローカルアドレスは全てのインターフェースで同じものを指定できます。つまりR1のインターフェースf0/0, f0/1, s1/0, s1/1の全てにfe80::1と設定可能です。

次にフレームリレーでの設定を確認します。IPv4の場合と同じようにDLCIを指定するフレームリレーマップが必要です。

R1(config-if)#int s1/0
R1(config-if)#encapsulation frame-relay
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#frame-relay map ipv6 fe80::2 102 broadcast
R1(config-if)#no sh
R1(config-if)#do sh fram map
Serial1/0 (up): ipv6 FE80::2 dlci 102(0x66,0x1860), static,
              broadcast,
              CISCO, status defined, active

R2でも設定を行い、pingが実行出来ることを確認しています。

R2(config-if)#int s1/0
R2(config-if)#en fram
R2(config-if)#ipv6 address fe80::2 link-local
R2(config-if)#frame-relay map ipv6 fe80::1 201 broadcast
R2(config-if)#no sh
R2(config-if)#do sh fram map
Serial1/0 (up): ipv6 FE80::1 dlci 201(0xC9,0x3090), static,
              broadcast,
              CISCO, status defined, active
R2(config-if)#do ping fe80::1
Output Interface: Serial1/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FE80::1, timeout is 2 seconds:
Packet sent with a source address of FE80::2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/12 ms

このページのトップヘ

見出し画像
×