CISCOの様々な設定例



●ルート集約

example-routing01.png

 catalyst3750-5で172.21.1.0/24をサブネット化してネットワークを設定します。
 catalyst3750-5でサブネットを設定するたびに、Router_Bからサブネットを広報するのは設定上も面倒です。
 したがって、Router_Bからは172.21.1.0/24を集約して広報するように設定します。
 ポイントは、
    catalyst3750-5では
  • デフォルートの設定
  • VLAN間のルーティング設定
  • Router_Bでは
  • 集約してstaticの設定
  • ルーティングプロトコルでのstatic再配送設定
●catalyst3750-5の設定
!
interface GigabitEthernet2/0/1
 switchport access vlan 11
 switchport mode access
!
interface GigabitEthernet2/0/2
 switchport access vlan 11
 switchport mode access
!
interface Vlan11
 ip address 172.21.1.253 255.255.255.248
!
interface Vlan13
 ip address 172.21.1.14 255.255.255.240
!
interface Vlan14
 ip address 172.21.1.30 255.255.255.240
!
ip route 0.0.0.0 0.0.0.0 172.21.1.254
ip route 172.21.1.16 255.255.255.240 Vlan13
ip route 172.21.1.32 255.255.255.240 Vlan14
!
●Router_Bの設定
!
interface FastEthernet8
 switchport access vlan 11
 no ip address
!
interface Vlan11
 ip address 172.21.1.254 255.255.255.248
!
router eigrp 1
 redistribute static
!
ip route 172.21.1.0 255.255.255.0 172.21.1.253
!

●ルート集約(その2)

example-routing02.png

 上記の設定のRouter_BにSTPを設定して接続します。
 Router_Bをルートブリッジにするためpriorityを4096に設定します。
●Router_Bの設定
!
spanning-tree portfast bpduguard
spanning-tree vlan 11 priority 4096
!
interface FastEthernet8
 switchport access vlan 11
 no ip address
!
interface Vlan11
 ip address 172.21.1.254 255.255.255.248
!
router eigrp 1
 redistribute static
!
ip route 172.21.1.0 255.255.255.0 172.21.1.253
!
 Router_Bがルートブリッジになっているか確認します。
Router_B#show spanning-tree brief 
  (省略)
VLAN11
  Spanning tree enabled protocol ieee
  Root ID    Priority    4096
             Address     0026.9969.8e66
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    4096
             Address     0026.9969.8e66
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300
Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet8        128.7    128    19 FWD     0  4096 0026.9969.8e66 128.7  
FastEthernet9        128.8    128    19 FWD     0  4096 0026.9969.8e66 128.8  
  (省略)
Router_B#sh spanning-tree vlan 11
 VLAN11 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 4096, address 0026.9969.8e66
  Configured hello time 2, max age 20, forward delay 15
  We are the root of the spanning tree
  Topology change flag not set, detected flag not set
  Number of topology changes 1 last change occurred 09:13:29 ago
          from FastEthernet8
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15 
  Timers: hello 1, topology change 0, notification 0, aging 300
 Port 7 (FastEthernet8) of VLAN11 is forwarding
   Port path cost 19, Port priority 128, Port Identifier 128.7.
   Designated root has priority 4096, address 0026.9969.8e66
   Designated bridge has priority 4096, address 0026.9969.8e66
   Designated port id is 128.7, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   BPDU: sent 16619, received 1
 Port 8 (FastEthernet9) of VLAN11 is forwarding
   Port path cost 19, Port priority 128, Port Identifier 128.8.
   Designated root has priority 4096, address 0026.9969.8e66
   Designated bridge has priority 4096, address 0026.9969.8e66
   Designated port id is 128.8, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   BPDU: sent 16618, received 0
 catalyst3750-5はcatalyst3750でSTPのモードはMSTとして動作させています。
 しかし、Router_BはCisco 1812JであるためSTPはIEEE 802.1D規格となります。
 この場合、動作するのはSTP(IEEE 802.1D)となります。