LoginSignup
1
3

More than 3 years have passed since last update.

Cisco スイッチに対するVLANとEIGRPを使った設定

Last updated at Posted at 2020-07-14

はじめに

本稿では、ネットワークシュミレータ「Graphical Network Simulator(GNS3)」にて、Cisco スイッチに対する VLANEnhanced IGRP(EIGRP) の設定に関する練習を行います。

GNS3に関する詳細は、「ネットワーク実験室の構築(macOSへGNS3の導入)」を併せてご確認ください。

トポロジー

マルチレイヤースイッチを2つ配置し、結線を行います。
EIGRP.png

課題の確認

  • 管理VLAN用のSVI(Switch Virtual Interface)にIPアドレスを設定する
  • ループバックインターフェイスにIPアドレスを設定する
  • EIGRPプロセスを起動する
  • EIGRPを有効化するインターフェースを指定する
  • 自動経路集約(auto-summary)を無効化する

設定の検証

  • EIGRPのネイバー関係の確認
  • EIGRPのトポロジーテーブル確認
  • ルーティングテーブルの確認
  • pingコマンドによる疎通確認

コマンドの投入

管理VLAN用のSVIにIPアドレスを設定する

SW1」の管理VLAN用(VLAN 1)の「SVI(Switch Virtual Interface)」にIPアドレス(10.1.1.1 / 24)を割り当てます。

SW1(config)#int vlan 1
SW1(config-if)#ip addr 10.1.1.1 255.255.255.0
SW1(config-if)#no shut
SW1(config-if)#end

同様に「SW2」の管理VLAN用(VLAN 1)のSVIにIPアドレス(10.1.1.1 / 24)を割り当てます。

SW2(config)#int vlan 1
SW2(config-if)#ip addr 10.1.1.2 255.255.255.0
SW2(config-if)#no shut
SW2(config-if)#end

「SW1」と「SW2」の疎通確認を行います。

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

ループバックインターフェイスにIPアドレスを設定する

「SW1」にループバックインターフェイスを設定し、IPアドレス「1.1.1.1 /32」を割り当てます。

SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int loop 0
SW1(config-if)#ip addr 1.1.1.1 255.255.255.255

同様に、「SW2」にループバックインターフェイスを設定し、IPアドレス「2.2.2.2 /32」を割り当てます。

SW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW2(config)#int loop 0
SW2(config-if)#ip addr 2.2.2.2 255.255.255.255

EIGRPプロセスを起動する

「SW1」のEIGRPプロセスを起動します。ここでは、Autonomous-System-Number引数として「100」を設定します。

SW1#conf t
SW1(config)#router eigrp 100

同様に「SW2」のEIGRPプロセスを起動します。

SW2#conf t
SW2(config)#router eigrp 100

EIGRPを有効化するインターフェースを指定する

SW1(config-router)#network 0.0.0.0 255.255.255.255
SW2(config-router)#network 0.0.0.0 255.255.255.255

自動経路集約(auto-summary)を無効化する

SW1(config-router)#no auto-summary 
SW2(config-router)#no auto-summary 

設定の検証

EIGRPのネイバー関係の確認

show ip eigrp neighborsコマンド構文にて、ネイバー関係が確立しているか確認します。隣接ルータのIPアドレスが表示されていることを確認します。

SW1#show ip eigrp neighbors 
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   10.1.1.2                Vl1                      12 00:08:49    7   100  0  3
SW2#show ip eigrp neighbors 
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   10.1.1.1                Vl1                      14 00:11:45   11   100  0  3

EIGRPのトポロジーテーブル確認

show ip eigrp topologyコマンド構文にて、EIGRPのトポロジーテーブルを確認します。「宛先ネットワークアドレス」、「ネクストホップアドレス」、「FD(フィージブルディスタンス)/AD(アドバタイズドディスタンス」、「受信したインターフェス」を確認します。

SW1#show ip eigrp topology 
EIGRP-IPv4 Topology Table for AS(100)/ID(1.1.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 2.2.2.2/32, 1 successors, FD is 130816
        via 10.1.1.2 (130816/128256), Vlan1
P 10.1.1.0/24, 1 successors, FD is 2816
        via Connected, Vlan1
P 1.1.1.1/32, 1 successors, FD is 128256
        via Connected, Loopback0
SW2#show ip eigrp topology 
EIGRP-IPv4 Topology Table for AS(100)/ID(2.2.2.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 2.2.2.2/32, 1 successors, FD is 128256
        via Connected, Loopback0
P 10.1.1.0/24, 1 successors, FD is 2816
        via Connected, Vlan1
P 1.1.1.1/32, 1 successors, FD is 130816
        via 10.1.1.1 (130816/128256), Vlan1

ルーティングテーブルの確認

show ip routeコマンド構文にて、ルーティングテーブルを確認します。「宛先ネットワークアドレス」、「ネクストホップアドレス」、「FD(フィージブルディスタンス)/AD(アドバタイズドディスタンス」、「受信したインターフェス」を確認します。

SW1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
D        2.2.2.2 [90/130816] via 10.1.1.2, 00:17:10, Vlan1
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Vlan1
L        10.1.1.1/32 is directly connected, Vlan1
SW2#show ip route

      1.0.0.0/32 is subnetted, 1 subnets
D        1.1.1.1 [90/130816] via 10.1.1.1, 00:19:38, Vlan1
      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Vlan1
L        10.1.1.2/32 is directly connected, Vlan1

pingコマンドによる疎通確認

「SW1」から「SW2」のループバックインターフェイスに対して疎通確認を行います。

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

同様に逆方向からの疎通確認を行います。

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

参考情報

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3