Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Архив1 / docx56 / Лаба 3.docx
Скачиваний:
41
Добавлен:
01.08.2013
Размер:
81.91 Кб
Скачать

Лабораторная работа №12 Конфигурация свитча

Свитч 4:

%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to up

Из панели инструментов выбираем свитч 4. Присваиваем ему имя хоста 2950sw4 и пароль cisco. Назначаем IP адрес 197.10.1.100/24 и маску подсети 197.10.1.1.

Switch#

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname 2950sw4

2950sw4(config)#enable secret cisco

2950sw4(config)#interface vlan1

2950sw4(config-if)#ip address 197.10.1.100 255.255.255.0

2950sw4(config-if)#no shutdown

2950sw4(config-if)#exit

2950sw4(config)#ip default-gateway 197.10.1.1

2950sw4(config)#^Z

%SYS-5-CONFIG_I: Configured from console by console

На свитче 4 запускаем команду показа spantree.

2950sw4#show spanning-tree

VLAN001

Spanning tree enabled protocol ieee

Root ID Priority 32768

Address 000C.1499.5696

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 000C.1696.2345

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Port ID Designated Port ID

Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr

---------------- -------- --------- --- --------- -------------------- --------

Fa0/1 32768.1 0 FWD 0 32768 000C.1696.2345 0.1

Fa0/12 32768.12 19 FWD 0 32768 000C.1499.5696 19.12

На свитче 4 запускаем команду таблицы мак адресов. Это покажет, какие устройства подсоединены к какому порту свитча.

2950sw4#show mac-address-table

VLAN001

Spanning tree enabled protocol ieee

Root ID Priority 32768

Address 000C.1499.5696

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32768

Address 000C.1696.2345

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300

Interface Port ID Designated Port ID

Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr

---------------- -------- --------- --- --------- -------------------- --------

Fa0/1 32768.1 0 FWD 0 32768 000C.1696.2345 0.1

Fa0/12 32768.12 19 FWD 0 32768 000C.1499.5696 19.12

Mac Address Table

------------------------------------------

Vlan Mac Address Type Ports

---- ----------- ---- -----

1 000C.8680.3682 DYNAMIC Fa0/1

1 000C.2390.2013 DYNAMIC Fa0/12

Total Mac Addresses for this criterion: 2

2950sw4#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

На свитче 4 конфигурируем защиту порта для faO/9.

2950sw4(config)#interface fa0/9

2950sw4(config-if)#switchport port-security

2950sw4(config-if)#switch port-security maximum 1

Свитч 3:

Входим в привилегированный режим и затем в режим конфигураций. Назначаем для свитча 3 имя хоста 2950sw3.

Switch#

%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to up

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname 2950sw3

2950sw3(config)#exit

На свитче 3 вводим команду показа текущей конфигурации.

2950sw3#show running-config

!

Version 12.1

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname 2950sw3

!

!

!

ip subnet-zero

spanning-tree extend system-id

!

!

!

!

!

!

!

!

interface FastEthernet0/1

!

interface FastEthernet0/2

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

vtp domain bigdomain

!

interface Vlan 1

no ip address

no ip route-cache

!

!

ip classless

no ip http server

!

!

!

!

line con 0

transport input none

line aux 0

line vty 0 15

!

no scheduler allocate

end

На свитче 3 печатаем конфигурацию запуска выполнения копии, чтобы сохранить активную конфигурацию в NVRAM. Отображаем сохраненную конфигурацию вNVRAMс командой конфигурации запуска показа.

2950sw3#

2950sw3#

2950sw3#

2950sw3#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

[OK]

2950sw3#show startup-config

Current configuration : 677 bytes

!

Version 12.1

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname 2950sw3

!

!

!

ip subnet-zero

spanning-tree extend system-id

!

!

!

!

!

!

!

!

interface FastEthernet0/1

На свитче 3 стираем сохраненную конфигурацию и перезагружаем блок.

2950sw3#erase startup-config

Erasing the nvram filesystem will remove all files! Continue? [confirm]

2950sw3#erase startup-config

Erasing the nvram filesystem will remove all files! Continue? [confirm]

[OK]

Erase of nvram: complete

2950sw3#

2950sw3#reload#

2950sw3>

Входим в привилегированный режим и затем в глобальный режим конфигурации. Повторно назначаем свитчу имя хоста of2950sw3 и пароль cisco. Назначаем свитчу ip197.10.1.99 с маской подсети 255.255.255.0. Назначаем шлюз 197.10.1.1.

2950sw3>enable

2950sw3#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

2950sw3(config)#hostname 2950sw3

2950sw3(config)#enable password cisco

На свитче 3 запускаем команду показа интерфейса vlan1. Это делается для того, чтобы убедиться, что введенные адреса и другие данные введены правильно.

2950sw3(config)#interface vlan1

2950sw3(config-if)#ip address 197.10.1.99 255.255.255.0

2950sw3(config-if)#no shutdown

2950sw3(config-if)#exit

2950sw3(config)#ip default-gateway 197.10.1.1

2950sw3(config)#^Z

%SYS-5-CONFIG_I: Configured from console by console

2950sw3#show interface vlan1

Vlan 1 is up, line protocol is up

Hardware is CPU Interface, address is 000C.4915.188-1 (bia 000C.4915.188-1)

Internet address is 197.10.1.99 /24

MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,

reliability 255/255, txload 1/255, rxload 1/255

Auto-duplex, Auto-speed

Encapsulation ARPA, loopback not set

ARP type: ARPA, ARP Timeout 04:00:00

Last input 02:29:44, output never, output hang never

Last clearing of "show interface" counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: fifo

Output queue :0/40 (size/max)

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

269 packets input, 71059 bytes, 0 no buffer

Received 6 broadcasts, 0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

7290 packets output, 429075 bytes, 0 underruns

0 output errors, 3 interface resets

0 output buffer failures, 0 output buffers swapped out

На свитче 3 запускаем команду показа интерфейса.

2950sw3#show interfaces

Vlan 1 is up, line protocol is up

Hardware is CPU Interface, address is 000C.4915.188-1 (bia 000C.4915.188-1)

Internet address is 197.10.1.99 /24

MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,

reliability 255/255, txload 1/255, rxload 1/255

Auto-duplex, Auto-speed

Encapsulation ARPA, loopback not set

ARP type: ARPA, ARP Timeout 04:00:00

Last input 02:29:44, output never, output hang never

Last clearing of "show interface" counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: fifo

Output queue :0/40 (size/max)

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

269 packets input, 71059 bytes, 0 no buffer

Received 6 broadcasts, 0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

7290 packets output, 429075 bytes, 0 underruns

0 output errors, 3 interface resets

0 output buffer failures, 0 output buffers swapped out

Соседние файлы в папке docx56