LoginSignup
0
0

More than 3 years have passed since last update.

ネットワーク構築【前編】VTP

Last updated at Posted at 2020-08-13

今回やること

VTPを使ってVLAN情報の同期の動きについて実際に構築して、見てみようと思います。
VLAN絡みもCCNAの試験範囲なので、机上と実際に手を動かしての両方から学習しようと思います。

使用ツール

GNS3
IOS: c2600-adventerprisek9-mz.124-17

ネットワーク構成図

左から右に向かってVLANを同期するようにしたいので
下記のような構成図を作成。
VLAN.jpeg

構築

では構築していきます。

今回設定したい内容は下記
1.各PC向きのインターフェイスにアクセスポート設定
2.VLAN割り当て
3.スイッチ間のtrunkの設定
4.タグ指定
5.VTPにドメイン付与
6.VTPモードをそれぞれのスイッチに設定
7.お試しでVTPにパスワード設定

ではESW1からやっていきます。

ESW1#vlan data
ESW1(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
ESW1(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
ESW1(vlan)#app
APPLY completed.
ESW1(vlan)#exit
APPLY completed.
Exiting....
ESW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ESW1(config)#int f1/0
ESW1(config-if)#sw mo acc
ESW1(config-if)#sw acc v 10
ESW1(config-if)#no sh
ESW1(config-if)#exit
ESW1(config)#
ESW1(config)#int f1/15
ESW1(config-if)#sw mo tr
ESW1(config-if)#
*Mar  1 00:34:25.289: %DTP-5-TRUNKPORTON: Port Fa1/15 has become dot1q trunk
ESW1(config-if)#sw tr en dot1q
ESW1(config-if)#no sh
ESW1(config-if)#exit
ESW1(config)#

ここで気付きました。
f1/1の設定漏れてる・・・
急ぎ設定。

今は検証環境だから気楽にできるからいいですが、手順書の重要性を
再確認できた瞬間でした。

ESW1(config)#int f1/1
ESW1(config-if)#sw mo acc
ESW1(config-if)#sw acc v 20
ESW1(config-if)#no sh
ESW1(config-if)#exit
ESW1(config)#

これでOK。
次は引き続きVTP設定の投入。

ESW1(config)#vtp domain benkyo
                 ^
% Invalid input detected at '^' marker.

ん?
なぜ入らないのだろう。
tabキー押してもテローンテローンと音が鳴るばかりで候補がでてこない。

ESW1(config)#vtp ?
  file   Configure IFS filesystem file where VTP configuration is stored.
  if-id  Configure interface as the preferred source for the VTP IP updater
         address.

ESW1(config)#vtp

あれ・・・
私の知っている範囲だとvtp domain , vtp mode , vtp password とか色々でてくる
はずなんだけど。

調べ中・・・

結局有力な情報掴めず。。。

そして、ふと思いつく。
もしかして、vlan database入る必要あるのか!?

ESW1#vlan data
ESW1(vlan)#vtp domain benkyo
Changing VTP domain name from NULL to benkyo
ESW1(vlan)#vtp mode server
               ^
% Invalid input detected at '^' marker.

ESW1(vlan)#vtp mo
ESW1(vlan)#vtp
ESW1(vlan)#vtp s
ESW1(vlan)#vtp server
ESW1(vlan)#vtp server mo
ESW1(vlan)#vtp server ?
  <cr>

ESW1(vlan)#vtp ?
  client       Set the device to client mode.
  domain       Set the name of the VTP administrative domain.
  password     Set the password for the VTP administrative domain.
  pruning      Set the administrative domain to permit pruning.
  server       Set the device to server mode.
  transparent  Set the device to transparent mode.
  v2-mode      Set the administrative domain to V2 mode.

ESW1(vlan)#vtp se
ESW1(vlan)#vtp server
Device mode already VTP SERVER.
ESW1(vlan)#vtp pass hogehoge
Setting device VLAN database password to hogehoge.
ESW1(vlan)#app
APPLY completed.
ESW1(vlan)#

database入らないとダメらしいですね。
configのモードでは、この環境だとダメらしいです。
知ってるコマンドで対応できなくて、時間が大分かかりなんとか設定完了。。。

解決したと言っていいのか、定かではないですが前進して良かったです。

本日は予定時間内で終わらなかったので、記事を2部構成にしようと思います。

ということで、一旦writeして終わり。

ESW1#write memory
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]y
Building configuration...
[OK]
ESW1#

後編に続きます

0
0
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
0
0