ネットワーク関連
目次
>enable (config)#configure terminal (config)#hostname [HOSTNAME]
>enable #configure terminal (config)#interface vlan1 (config-if)#ip address [IP]/[MASK]
>enable #configure terminal (config)#ip route 0.0.0.0/0 [GATEWAY]
>enable #configure terminal (config)#clock set HH:MM:SS dd mmm yyyy
>enable #configure terminal (config)#clock timezone JST plus 9
>enable #configure terminal (config)#ntp server [NTP SERVER]
syslogサーバへのログ転送設定。
(config)# log host [IP] (config)# log host [IP] level [LEVEL]
(config)# log host 172.16.1.1 (config)# log host 172.16.1.1 level informational
(config)#snmp-server
(config)#snmp-server community [COMMUNITY] ro
(config)#snmp-server host [IP] traps version 2c [COMMUNITY]
(config)#snmp-server enable trap auth dhcpsnooping lldp loopprot power-inline (config)#snmp-server view [VIEW_NAME] 1 included (config)#snmp-server community [COMMUNITY] view [VIEW_NAME] (config)#snmp-server host [IP] version 2c [COMMUNITY]
(config)#interface port1.0.1-1.0.9 (config-if)#snmp trap link-status
LLDPを使用するためには、LLDPの有効化の他にポート単位での発出情報の有効化が必要となる。
#conf t (config)#lldp run (config)#interface port1.0.1-1.0.9 (config-if)#lldp transmit (config-if)#lldp receive (config-if)#lldp tlv-select all
>enable #configure terminal (config)#username admin privilege 15 password [PASSWORD] (config)#username manager password [PASSWORD]
(config)#crypto key generate hostkey rsa Generating host key (1024 bits rsa) This may take a while. Please wait ... Done WARNING: The SSH server must now be enabled with "service ssh"
(config)#ssh server allow-users admin (config)#service ssh ip WARNING: SSHv1 host key does not exist. SSH will not be available for version 1.
>enable #configure terminal (config)#no service telnet
>enable #copy running-config startup-config