Базовые команды vlan, trunk
За этим портом – конечный абонент, кадры которого нужно теггировать:
conf t int fa0/1 sw mode access
По умолчанию порт находиться в vlan 1. Что бы изменить поведение конкретного порта:
sw access vlan 2 int fa0/2 sw mode access sw access vlan 3
Также можно изменить vlan 2 на 5:
int fa0/1 sw access vlan 5
Смотрим:
sh vlan sh vlan brief
По умолчанию все порты находятся в режиме acccess.
Назначить транковый порт:
Switch#conf t Switch(config)#int fa0/24 Switch(config-if)#sw mode trunk
Смотрим состояние:
Switch#sh int fa0/24 status Port Name Status Vlan Duplex Speed Type Fa0/24 TRUNK connected trunk a-full a-100 10/100BaseTX
Посмотреть транковые порты:
Switch#sh int trunk Port Mode Encapsulation Status Native vlan Fa0/24 on 802.1q trunking 1 Port Vlans allowed on trunk Fa0/24 1-4094 Port Vlans allowed and active in management domain Fa0/24 1,5,10,50,150 Port Vlans in spanning tree forwarding state and not pruned Fa0/24 1,5,10,50,150
Информация по конкретному порту:
Switch#sh int fa0/1 FastEthernet0/1 is down, line protocol is down (notconnect) Hardware is Fast Ethernet, address is 000d.bd01.3bc1 (bia 000d.bd01.3bc1) MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Auto-duplex, Auto-speed input flow-control is off, output flow-control is off ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output 1d17h, 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 ouxtput rate 0 bits/sec, 0 packets/sec 1 packets input, 64 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog, 0 multicast, 0 pause input 0 input packets with dribble condition detected 1 packets output, 64 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier, 0 PAUSE output 0 output buffer failures, 0 output buffers swapped out
Вывод информации о порте с точки зрения vlan-ов:
Switch#sh int fa0/7 sw Name: Fa0/7 Switchport: Enabled Administrative Mode: static access Operational Mode: down Administrative Trunking Encapsulation: dot1q Negotiation of Trunking: Off Access Mode VLAN: 10 (VLAN0010) Trunking Native Mode VLAN: 1 (default) Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Voice VLAN: none (Inactive) Appliance trust: none
Создать vlan но не вешать на порты:
conf t# vlan 2 conf t# vlan 3
Назначить портам с 4 по 8 одинаковое имя/описание:
(config)#interface range Fa0/4 - 8 (config-if-range)#description DEP_44