🚀

14

VLAN-, , . VLAN Cisco.

Merion Academy


   VLAN

VLAN Catalyst

, Cisco VLAN. VLAN . , Cisco Catalyst 2960 3650 4000 . VLAN 1 1005, 1006 4094. VLAN Cisco Catalyst 2960 Cisco IOS 15 .

Switch# show vlan brief

VLAN Name              Status   Ports
---- ----------------- -------  --------------------
1    default           active   Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                Gi0/1, Gi0/2
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN

:

  • , ;
  • 1 1005;
  • 1002 1005 (Token Ring, FDDI);
  • 1002 1005 ;
  • VLAN VLAN, vlan.dat;
  • VTP, , VLAN .

VLAN:

  • ;
  • 1006 4094;
  • , running-config;
  • , VLAN;
  • VLAN VTP transparent.
: VLAN 802.1Q. VLAN ID 802.1Q IEEE 12 , 4096 -- VLAN Catalyst. , VXLAN.

VLAN

VLAN , , vlan.dat, copy running-config startup-config write memory. , VLAN, .

, VLAN . VLAN , .

IOS

Switch# configure terminal

VLAN ID

Switch(config)# vlan vlan-id

VLAN

Switch(config-vlan)# name vlan-name

EXEC

Switch(config-vlan)# end


VLAN

, Stundent, VLAN, IP 172.17.20.22, VLAN 20.

 1

VLAN 20 student S1.

S1# configure terminal
S1(config)# vlan 20
S1(config-vlan)# name student
S1(config-vlan)# end
: VLAN- , , . , vlan 100,102,105-107 5 VLAN- 100, 102, 105, 106, 107

VLAN

VLAN, VLAN.

access VLAN. switchport mode access , , access, VLAN Hopping.

IOS

Switch# configure terminal

Switch(config)# interface interface-id

access

Switch(config-if)# switchport mode access

VLAN'.

Switch(config-if)# switchport access vlan vlan-id

EXEC

Switch(config-if)# end

: interface range.

VLAN

F0/6 S1 access VLAN 20. , , 20- VLAN-, 2 .

 2

.

S1# configure terminal
S1(config)# interface fa0/6
S1(config-if)# switchport mode access
S1(config-if)# switchport access vlan 20
S1(config-if)# end

VLAN , . 2 IP , VLAN 20, . VLAN 20 , , 2 (172.17.20.0/24).


VLAN VLAN

access VLAN- . , VLAN. , IP , VLAN-, - VLAN- .

, , 5 IP , F0/18 S3. VLAN VLAN.

 3

VLAN VLAN

VLAN switchport voice vlan [vlan-id] .

, , QoS. , . , , mls qos trust [cos | device cisco-phone | dscp | ip-precedence] .

VLAN- F0/18 S3 VLAN 20, VLAN 150 QoS, CoS.

S3(config)# vlan 20
S3(config-vlan)# name student
S3(config-vlan)# vlan 150
S3(config-vlan)# name VOICE
S3(config-vlan)# exit
S3(config)# interface fa0/18
S3(config-if)# switchport mode access
S3(config-if)# switchport access vlan 20
S3(config-if)# mls qos trust cos
S3(config-if)# switchport voice vlan 150
S3(config-if)# end

VLAN switchport access vlan . , VLAN 30 switchport vlan brief. switchport access vlan 30 :

% Access VLAN does not exist. Creating vlan 30

VLAN

VLAN, show .

show vlan VLAN. . : show vlan [brief | id vlan-id | name vlan-name | summary].

show vlan.

, VLAN VLAN

brief

VLAN ID. vlan-id 1 4094

id vlan-id

VLAN. Vlan-name - ASCII 1 32 .

name vlan-name

VLAN

summary

show vlan summary VLAN :

S1# show vlan summary
Number of existing VLANs              : 7
Number of existing VTP VLANs          : 7
Number of existing extended VLANS     : 0

show interfaces interface-id switchport show interfaces vlan vlan-id. , show interfaces fa0/18 switchport F0/18 VLAN VLAN .

S1# show interfaces fa0/18 switchport
Name: Fa0/18
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (student) 
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: 150
Administrative private-vlan host-association: none
(Output omitted)

VLAN

VLAN-.

VLAN , switchport access vlan vlan-id VLAN. , F0/18 VLAN VLAN 1. VLAN 20, switchport access vlan 20.

VLAN no switchport access vlan.

, 18- VLAN .

S1(config)# interface fa0/18
S1(config-if)# no switchport access vlan
S1(config-if)# end
S1#
S1# show vlan brief
VLAN Name                 Status    Ports
---- ------------------ --------- -------------------------------
1    default            active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                  Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                  Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                  Fa0/13, Fa0/14, Fa0/15, Fa0/16
                                  Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                  Fa0/21, Fa0/22, Fa0/23, Fa0/24
                                  Gi0/1, Gi0/2
20   student            active    
1002 fddi-default       act/unsup 
1003 token-ring-default act/unsup 
1004 fddinet-default    act/unsup 
1005 trnet-default      act/unsup
 ,  20- VLAN   ,   ,      .
 ,   18-   VLAN 1,    show interfaces f0/18 switchport:
S1# show interfaces fa0/18 switchport
Name: Fa0/18
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)

VLAN

VLAN no vlan vlan-id .

: VLAN , VLAN .

vlan.dat delete flash:vlan.dat EXEC. VLAN .

: Catalyst , . erase startup-config delete vlan.dat. .

Trunk

VLAN, Trunk . Trunk OSI , VLAN ( VLAN ).

Trunk , :

IOS

Switch# configure terminal

Switch(config)# interface interface-id

Switch(config-if)# switchport mode trunk

native VLAN , VLAN 1

Switch(config-if)# switchport trunk native vlan vlan-id

VLAN,

Switch(config-if)# switchport trunk allowed vlan vlan-list

EXEC

Switch(config-if)# end


Trunk

VLAN 10, 20 30 Faculty, Student Guest. F0/1 S1 Trunk VLAN- 10, 20, 30. VLAN 99 native (VLAN ).

 4

trunk, VLAN VLAN.

S1(config)# interface fastEthernet 0/1
S1(config-if)# switchport mode trunk
S1(config-if)# switchport trunk native vlan 99
S1(config-if)# switchport trunk allowed vlan 10,20,30,99
S1(config-if)# end
: , Cisco Catalyst 2960, 802.1Q. . VLAN , .

Trunk

Fa0/1 S1. show interfaces interface-ID switchport:

S1# show interfaces fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 99 (VLAN0099)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none 
Administrative private-vlan mapping: none 
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
(output omitted)

VLAN.


trunk

no switchport trunk allowed vlan no switchport trunk native vlan. VLAN- VLAN- VLAN 1.

S1(config)# interface fa0/1
S1(config-if)# no switchport trunk allowed vlan
S1(config-if)# no switchport trunk native vlan
S1(config-if)# end

show interfaces f0/1 switchport , :

S1# show interfaces fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default) 
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none 
Administrative private-vlan mapping: none 
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
(output omitted)

, trunk access.

S1(config)# interface fa0/1
S1(config-if)# switchport mode access
S1(config-if)# end
S1# show interfaces fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
(output omitted)

>