Лабораторно упражнение N 1
Забележка: Провежда се след Модул 2
Switch # show running-config
Switch # show startup-config
Switch # show version
Switch # show flash
Switch # dir flash:
Switch # erase startup-config /изтриване на конфигурационния файл/
Switch # delete flash:vlan.dat /изтриване на конфигурираните VLAN-и/
Switch # show interface vlan 1
Switch # show ip interface vlan 1
Switch # show interface F 0/1
Switch # show vlan
Switch(config) # hostname Switch-1
Switch-1(config) # enable password class
Switch-1(config) # enable secret cisco
Switch-1(config) # service password-encryption
Switch-1(config) # no ip domain-lookup
Switch-1(config) # line console 0
Switch-1(config-line) # password cisco
Switch-1(config) # login
Switch-1(config-line) # logging synchronous
Switch-1(config) # line vty 0 15
Switch-1(config) # password cisco
Switch-1(config) # login
Switch-1(config-line) # logging synchronous
Switch-1(config) # banner motd #UNAUTHORIZED ACCESS STRICTLY PROHIBITED!#
Switch-1 (config) # username user1 password 0 cisco1
Switch-1 (config) # username user2 password 0 cisco2
Switch-1 (config) # line vty 0 15
Switch-1 (config-line) # login local
Switch-1 (config-line) # exit
Switch (config) # hostname Switch-1
Switch-1 (config) # ip domain-name cisco-lab.com
Switch-1 (config) # crypto key generate rsa
Switch-1 (config) # ip ssh version 2 /ако не се въведе тази команда, ssh-сървъра работи на най-високата версия която ssh-клиента поддържа/
Switch-1 (config) # ip ssh time-out 60
Switch-1 (config) # ip ssh authentication-retries 3
Switch-1 # show ip ssh
Switch-1 # show ssh
Switch-1 (config) # line vty 0 15
Switch-1 (config-line) # login local
Switch-1 (config-line) # transport input ssh /осигурява достъп единствено по SSH/
Switch-1 (config) # crypto key zeroize rsa /изтрива генерираните крипто ключове/
Switch-1(config) # interface vlan 1
Switch-1(config-if) # shutdown
Switch-1(config-if) # exit
Switch-1(config) # vlan 99
Switch-1(config-vlan) # name MANAGEMENT
Switch-1(config-vlan) # exit
Switch-1(config) # interface vlan 99
Switch-1(config-if) # ip address 192.168.1.151 255.255.255.0
Switch-1(config-if) # no shutdown
Switch-1 # show interface vlan 99
/интерфейс vlan 99 остава Down докато не се асоциира в този VLAN 99 поне един порт на суича който да е Up/
Switch-1(config) # interface range F 0/1 – 24, G 0/1 - 2
Switch-1(config-if-range) # switchport access vlan 99
Switch-1 # show interface vlan 99
Switch-1 # show vlan brief
Switch-1(config) # ip default-gateway 192.168.1.1
Switch-1(config) # interface F 0/1
Switch-1(config-if) # duplex auto
Switch-1(config-if) # speed auto
Switch-1(config-if) # mdix auto
Switch-1 # show controllers ethernet-controller F 0/1 phy | include Auto-MDIX
/Auto-MDIX - case sensitive!/
Switch-1 # show mac-address-table
Switch-1 # show mac-address-table ?
Switch-1 # show mac-address-table dynamic
Switch-1 # clear mac-address-table dynamic
Switch-1(config) # mac-address-table ageing-time 600
Switch-1(config) # mac-address-table static 00e0.2917.1884 vlan 99 interface Fa0/4
Switch-1# show mac-address-table static /показва статичните MAC адреси, но не и към кой порт са асоциирани/
Switch-1 # show running-config /да се види статичната асоциация/
Switch-1(config) # no mac-address-table static 00e0.2917.1884 vlan 99 interface F 0/4 /премахване на статичния запис от MAC таблицата/
или изчистване на всички записи:
Switch-1 # clear mac-address-table /изтрива всички записи/
Switch-1 # clear mac-address-table dynamic /изтрива само динамичните записи/
От браузър на PC1 да се отвори http://192.168.1.151