その辺に転がっている少し古めのCatalystを再生することが多いので覚書
尚、わざとデフォルトゲートウェイを設定しない(セキュリティ向上のため機器管理用のVLANを展開して、足を出しているLinuxでしかtelnetが出来ないようにしている)等しています。
(Catalyst 2940,2950,3550,3560,3750等のIOS12.x系)
初期化
write erase
delete vlan.dat
reload
構築1
- 一時的な時刻の設定
en
clock set 10:00:00 10 Feb 2015
- 時刻関連
conf t
clock timezone JST 9
service timestamps debug datetime localtime
service timestamps log datetime localtime
- ホストネーム
hostname TEST
- Webログインを停止
no ip http server
no ip http secure-server
- ミスしたコマンドをドメイン扱いして検索しにいかないようにする
no ip domain-lookup
- パスワードの設定 (enable)
service password-encryption
enable secret ******
- パスワードの設定 コンソール・telnet
line con 0
logging synchronous
width 512
line vty 0 15
password ******
login
logging synchronous
end
- 一度保存
wr mem
休憩
構築2
- VTPの設定
VTPモードは使用しない
さらにVLAN情報がvlan.datだけでなくConfigに載るようにする
conf t
vtp mode transparent
- VLANの設定
vlan 40
name NET40
vlan 101
name VLAN101
vlan 102
name VLAN102
- IPの設定
int Vlan 40
ip address 192.168.40.11 255.255.255.0
ip route-cache
no ip proxy-arp
- syslogの設定
logging facility local1
logging 192.168.40.6
logging 192.168.40.7
- snmpの設定
snmp-server view iso iso included
snmp-server community hoge-r view iso RO
- NTPの設定
ntp server 192.168.40.6
ntp server 192.168.40.7
- 終了
end
wr mem
休憩
構築3
- 下流ポートのリンクアップを早くする
switchport mode access を設定したポートに対して、デフォルトでprotfastを設定
(30秒ぐらい→5秒ぐらいに短縮)
conf t
spanning-tree portfast default
- ループ対策
spanning-tree portfast bpduguard default
- VLANのアサイン
int Gi0/1
switchport trunk encapsulation dot1q #物による#
switchport trunk allowed vlan 40,101,102
switchport mode trunk
switchport nonegotiate
int range Fa0/1 - 4
switchport mode access
switchport access vlan 101
int range Fa0/5 - 8
switchport mode access
switchport access vlan 102
end
wr mem
終了。
とりあえず、ここまですればエッジスイッチとしての役目は果たしてくれる。