Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration of VLAN for cisco

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In larger networks, if all users are in the same broadcast domain, the data of broadcast packets will increase sharply. When the number of broadcast packets reaches a certain extent, the transmission efficiency of the network will be greatly reduced, especially when the network equipment fails, it will keep sending broadcasts, resulting in a broadcast storm and paralyzing the network. Therefore, we can solve the problem by dividing the broadcast domain, and there are usually two ways:

Physical separation: physically divides the network into several small networks, such as routing devices

Logical separation: logically divides the network into several small virtual networks, such as using VLAN

VLAN is scalable and flexible, and has the following main benefits:

1 Control broadcasting, each VLAN is an independent broadcast domain, which reduces the bandwidth occupied by broadcasting and improves the transmission efficiency of the network.

(2) increase the security of the network.

3 simplify the management of the network

A VLAN (virtual local area network) configuration

Create a VLAN:

J2 (config) # vlan 100

J2 (config-vlan) # name vlan100

J2 (config-vlan) # vlan 99

J2 (config-vlan) # name vlan99

View VLAN:

J2#sh vlan-switch

Delete VLAN:

J2 (config) # no vlan 99

Add the port to the vlan:

J2 (config) # int range f1max 1-12

J2 (config-if-range) # switchport mode access

J2 (config-if-range) # switchport access vlan 100

View a specific vlan

J2#show vlan-switch id 100

VLAN Name Status Ports

100 vlan100 active Fa1/1, Fa1/2, Fa1/3, Fa1/4

Fa1/5, Fa1/6, Fa1/7, Fa1/8

Fa1/9, Fa1/10, Fa1/11, Fa1/12

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

Two Trunk: in a switched network, there are two types of links, access links (usually belonging to one VLAN, such as the link between the host and the switch) and trunk links (Trunk: can carry multiple VLAN to enable the same VLAN to communicate across switches)

1 enter the interface mode and select the encapsulation type:

J2 (config) # int range f1max 1, f1max 3

J2 (config-if-range) # switchport trunk encapsulation dot1q

2 configure the port as Trunk

J2 (config-if-range) # switchport mode trunk

Add VLAN to Trunk:

J2 (config-if-range) # switchport trunk allowed vlan add 50

J2 (config-if-range) # switchport trunk allowed vlan add 60

Remove VLAN from Trunk:

J2 (config-if-range) # switchport trunk allowed vlan remove 50

View the interface mode:

J2#sh int f1/1 switchport

Name: Fa1/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: Disabled

Access Mode VLAN: 0 ((Inactive))

Trunking Native Mode VLAN: 1 (default)

Trunking VLANs Enabled: 1-49, 51-1005

Trunking VLANs Active: 1,60100

Priority for untagged frames: 0

Override vlan tag priority: FALSE

Voice VLAN: none

Appliance trust: none

Verify the Trunk configuration of the interface:

J2#show int f1/1 trunk

Port Mode Encapsulation Status Native vlan

Fa1/1 on 802.1q trunking 1

Port Vlans allowed on trunk

Fa1/1 1-49, 51-1005

Port Vlans allowed and active in management domain

Fa1/1 1,60100

Port Vlans in spanning tree forwarding state and not pruned

Fa1/1 1,60100

Three Ethernet channel configuration:

Premise:

The ports participating in the bundling belong to the same VLAN, or they are all configured as trunk ports

All ports participating in the bundling should have the same physical parameters, such as the same rate and duplex mode

Configuration:

J2 (config) # int range f1max 3-4

J2 (config-if-range) # channel-group 1 mode on

J2#sh etherchannel 1 summary

Flags: d-down P-in port-channel

I-stand-alone s-suspended

R-Layer3 S-Layer2

U-in use

Group Port-channel Ports

-+-

1 Po1 (SD) Fa1/3 (D) Fa1/4 (D)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report