In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
VLAN configuration ideas:
1. Create a vlan
Sw1 (config) # vlan 12
Sw1 (config-vlan) # name CAIWU
2. Configure port mode
Sw1 (config) # interface fas0/1 | fas0/2
Sw1 (config-if) # no shutdown
Sw1 (config-if) # switchport mode access
3. Configure the vlan to which the port belongs
Sw1 (config) # interface fas0/1 | fas0/2
Sw1 (config-if) # switchport access vlan 12
4. Verification and testing
PC-1: 192.168.12.1 255.255.255.0
PC-2: 192.168.12.2 255.255.255.0
PC-1: ping 192.168.12.2
Follow the same procedure to complete the connectivity test between the configuration of VLAN 34 and the host
Delete VLAN:
1. Remove the member ports in VLAN
Interface fas0/1
No switchport access vlan 12
2. Delete vlan
No vlan 12
3. Verify (in practice-verify and save the configuration)
Huawei switch configuration VLAN:
1. Create a VLAN
[sw1] vlan 10 / / create a VLAN and enter VLAN 10
[sw1-vlan10] description AAA / / configure a name for vlan
2. Configure port mode
[sw1] interface gi0/0/1
[sw1-gi0/0/1] port link-type access / / designated port is in access mode
3. Put the port into the specified VLAN
[sw1] interface gi0/0/1
[sw1-gi0/0/1] port default vlan10 / / put the port into the vlan10
4. Verify, test, save
[sw1] display vlan
PC-1:
192.168.10.1 255.255.255.0
PC-2:
192.168.10.2 255.255.255.0
Delete VLAN:
After [sw1] undo vlan 10 / / is deleted, the member port will automatically return to vlan1.
Batch create / delete VLAN:
[sw1] vlan batch 10 20 30 40 50 Universe / create vlan 10 Leng 20 Jing 20 Jing 30 Jing 40 Ji 50
[sw1] vlan batch 10 to 20 / / create vlan 10, 11, 12, and 12.
[sw1] undo vlan batch 10 to 20 / / batch deletion of 10pc11 to 12meme 20
Trunk:
To be able to transmit multiple VLAN data on the same link at the same time
The mode of the link must be configured to trunk mode.
The data on this type of link needs to carry vlan tags. There are two ways to label the data: 1. ISL: inter-switch link, the link protocol between switches, Cisco's private protocol; now many switches no longer support it. The total length of the tag is 30 bytes, of which the ISL header is 26 bytes and the ISL tail is 4 bytes. 2. 802.1q: is a public standard, and devices of any manufacturer can use this protocol to tag layer 2 data. The label is 4 bytes long; it is commonly used to link "switch" devices.
Access:
This type of link can only belong to one VLAN at a time.
There is no label for the data transmitted.
Generally used to connect "non-switch" devices!
Configure Trunk links: (Huawei)
1. Configure the link type of the port
Interface gi0/0/24
Port link-type trunk
2. Set the VLAN allowed on the Trunk link
Interface gi0/0/24
Port trunk allow-pass vlan all
3. Verify, test, save
Display port vlan
Configure Trunk links: (Cisco)
1. Configure the trunk encapsulation protocol for the link (ISL or 802.1q) [optional]
Interface fas0/24
Switchport trunk encapsulation dot1q | isl
2. Configure the link mode as trunk interface fas0/24 switchport mode trunk 3. Verify, test and save show interface trunk / / View the trunk link on the Cisco switch
The process of Huawei switch processing data frames:
1. When the switch receives a data frame, it will label the data frame:
Display port vlan
It depends on the PVID parameter under the corresponding port in the display result
2. When the switch forwards a data frame, it looks at the following corresponding table:
Display vlan
In the corresponding VLAN (that is, the VLAN represented by the PVID of the ingress port of the data frame)
Subsequent member ports (these ports represent the egress port of the data frame)
At the same time, pay attention to whether these ports carry labels when sending out data
Sign (TG/UT)
Hybird configuration process:
1. Create VLAN 10
[sw] vlan 10
2. Configure the link type of the link PC as hybrid
[sw] interface gi0/0/1
[sw-gi0/0/1] port link-type hybrid
3. Configure the PVID on each port to be 10
[sw] interface gi0/0/1
[sw-gi0/0/1] port hybrid pvid vlan 10 [how to use the default value, whether it works]
4. Configure VLAN without encapsulating tags on each port
[sw] interface gi0/0/1
[sw-gi0/0/1] port hybrid untagged vlan 10
5. Configure the IP address of PC: 192.168.10.x/24
6. Verify, test, save
Display port vlan / / check gi0/0/1 | whether the PVID of 2 is 10
Display vlan / / check whether the vlan corresponds to gi0/0/1. | 2
Ping 192.168.10.2
Save
Case study:
1 case 1: configure VLAN
1.1 question
2) add the port to the VLAN
3) View VLAN information
1.2 scenario
Use eNSP to build the experimental environment, as shown in figure-1.
1.3 steps
To implement this case, you need to follow these steps.
System-view
[Huawei] vlan 10
[Huawei] vlan 20
[Huawei] vlan 30
[Huawei] interface Ethernet0/0/1
[Huawei-Ethernet0/0/1] port link-type access
[Huawei-Ethernet0/0/1] port default vlan 10
[Huawei] interface Ethernet0/0/2
[Huawei-Ethernet0/0/2] port link-type access
[Huawei-Ethernet0/0/2] port default vlan 10
[Huawei] interface Ethernet0/0/3
[Huawei-Ethernet0/0/3] port link-type access
[Huawei-Ethernet0/0/3] port default vlan 20
[Huawei] interface Ethernet0/0/4
[Huawei-Ethernet0/0/4] port link-type access
[Huawei-Ethernet0/0/4] port default vlan 20
[Huawei] interface Ethernet0/0/5
[Huawei-Ethernet0/0/5] port link-type access
[Huawei-Ethernet0/0/5] port default vlan 20
[Huawei] interface Ethernet0/0/6
[Huawei-Ethernet0/0/6] port link-type access
[Huawei-Ethernet0/0/6] port default vlan 30
[Huawei] interface Ethernet0/0/7
[Huawei-Ethernet0/0/7] port link-type access
[Huawei-Ethernet0/0/7] port default vlan 30
[Huawei] dis vlan
The total number of vlans is: 4U: Up; D: Down; TG: Tagged; UT: Untagged
MP: Vlan-mapping; ST: Vlan-stacking
#: ProtocolTransparent-vlan; *: Management-vlan;VID Type Ports1 common UT:Eth0/0/8 (D) Eth0/0/9 (D) Eth0/0/10 (D) Eth0/0/11 (D)
Eth0/0/12 (D) Eth0/0/13 (D) Eth0/0/14 (D) Eth0/0/15 (D)
Eth0/0/16 (D) Eth0/0/17 (D) Eth0/0/18 (D) Eth0/0/19 (D)
Eth0/0/20 (D) Eth0/0/21 (D) Eth0/0/22 (D) GE0/0/1 (D)
GE0/0/2 (D)
10 common UT:Eth0/0/1 (D) Eth0/0/2 (D)
20 common UT:Eth0/0/3 (D) Eth0/0/4 (D) Eth0/0/5 (D)
30 common UT:Eth0/0/6 (D) Eth0/0/7 (D)
VID Status Property MAC-LRN Statistics Description1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
30 enable default enable disable VLAN 0030
[Huawei] dis port vlan
Port Link Type PVID Trunk VLAN List
Ethernet0/0/1 access 10-
Ethernet0/0/2 access 10-
Ethernet0/0/3 access 20-
Ethernet0/0/4 access 20-
Ethernet0/0/5 access 20-
Ethernet0/0/6 access 30-
Ethernet0/0/7 access 30-
Ethernet0/0/8 hybrid 1-
Ethernet0/0/9 hybrid 1-
Ethernet0/0/10 hybrid 1-
Ethernet0/0/11 hybrid 1-
Ethernet0/0/12 hybrid 1-
Ethernet0/0/13 hybrid 1-
Ethernet0/0/14 hybrid 1-
Ethernet0/0/15 hybrid 1-
Ethernet0/0/16 hybrid 1-
Ethernet0/0/17 hybrid 1-
Ethernet0/0/18 hybrid 1-
Ethernet0/0/19 hybrid 1-
Ethernet0/0/20 hybrid 1-
Ethernet0/0/21 hybrid 1-
Ethernet0/0/22 hybrid 1-
GigabitEthernet0/0/1 hybrid 1-
GigabitEthernet0/0/2 hybrid 1-
2 case 2:VLAN and Trunk configuration
2.1 question
Refer to the following network topology to realize the communication of the same vlan across the switch.
2.2 scenario
Use eNSP to build the experimental environment, as shown in figure-2.
2.3 steps
To implement this case, you need to follow these steps.
[SW1] vlan 5
[SW1] vlan 10
[SW1] interface Ethernet0/0/1
[SW1-Ethernet0/0/1] port link-type access
[SW1-Ethernet0/0/1] port default vlan 5
[SW1] interface Ethernet0/0/2
[SW1-Ethernet0/0/2] port link-type access
[SW1-Ethernet0/0/2] port default vlan 10
[SW1] interface Ethernet0/0/24
[SW1-Ethernet0/0/24] port link-type trunk
[SW1-Ethernet0/0/24] port trunk allow-pass vlan 5 10
[SW2] vlan 5
[SW2] vlan 10
[SW2] interface Ethernet0/0/3
[SW2-Ethernet0/0/3] port link-type access
[SW2-Ethernet0/0/3] port default vlan 5
[SW2] interface Ethernet0/0/4
[SW2-Ethernet0/0/4] port link-type access
[SW2-Ethernet0/0/4] port default vlan 10
[SW2] interface Ethernet0/0/24
[SW2-Ethernet0/0/24] port link-type trunk
[SW2-Ethernet0/0/24] port trunk allow-pass vlan 5 10
Two hosts of VLAN 5 can communicate with each other, and two hosts of VLAN 10 can communicate with each other.
The two hosts of VLAN 5 and VLAN 10 cannot interwork.
3 case 3: configure Hybrid port
3.1 question
To achieve the special effect that the PC of different vlan can not access each other, and the PC of different vlan can access the server. The specific requirements are as follows.
Create the relevant vlan in the switch
Modify port mode and pvid
Modify the data frames allowed by the port
The results show that the pc of vlan5 and vlan10 cannot be interconnected, but both of them can communicate with the server.
3.2 scenario
Use eNSP to build the experimental environment, as shown in figure-3.
Figure-3
3.3 steps
To implement this case, you need to follow these steps.
[SW1] vlan batch 5 10 50
[SW1] interface Ethernet0/0/1
[SW1-Ethernet0/0/1] port hybrid untagged vlan 5 50
[SW1-Ethernet0/0/1] port hybrid pvid vlan 5
[SW1] interface Ethernet0/0/2
[SW1-Ethernet0/0/2] port hybrid untagged vlan 10 50
[SW1-Ethernet0/0/2] port hybrid pvid vlan 10
[SW1] interface Ethernet0/0/3
[SW1-Ethernet0/0/3] port hybrid tagged vlan 5 10 50
[SW1] dis vlan
The total number of vlans is: 4U: Up; D: Down; TG: Tagged; UT: Untagged
MP: Vlan-mapping; ST: Vlan-stacking
#: ProtocolTransparent-vlan; *: Management-vlan;VID Type Ports1 common UT:Eth0/0/1 (U) Eth0/0/2 (U) Eth0/0/3 (U) Eth0/0/4 (D)
Eth0/0/5 (D) Eth0/0/6 (D) Eth0/0/7 (D) Eth0/0/8 (D)
Eth0/0/9 (D) Eth0/0/10 (D) Eth0/0/11 (D) Eth0/0/12 (D)
Eth0/0/13 (D) Eth0/0/14 (D) Eth0/0/15 (D) Eth0/0/16 (D)
Eth0/0/17 (D) Eth0/0/18 (D) Eth0/0/19 (D) Eth0/0/20 (D)
Eth0/0/21 (D) Eth0/0/22 (D) GE0/0/1 (D) GE0/0/2 (D)
5 common UT:Eth0/0/1 (U)
TG:Eth0/0/3 (U)
10 common UT:Eth0/0/2 (U)
TG:Eth0/0/3 (U)
50 common UT:Eth0/0/1 (U) Eth0/0/2 (U)
TG:Eth0/0/3 (U)
VID Status Property MAC-LRN Statistics Description1 enable default enable disable VLAN 0001
5 enable default enable disable VLAN 0005
10 enable default enable disable VLAN 0010
50 enable default enable disable VLAN 0050
[SW1] dis port vlan
Port Link Type PVID Trunk VLAN ListEthernet0/0/1 hybrid 5-
Ethernet0/0/2 hybrid 10-
Ethernet0/0/3 hybrid 1 5 10 50
Ethernet0/0/4 hybrid 1-
Ethernet0/0/5 hybrid 1-
Ethernet0/0/6 hybrid 1-
Ethernet0/0/7 hybrid 1-
Ethernet0/0/8 hybrid 1-
Ethernet0/0/9 hybrid 1-
Ethernet0/0/10 hybrid 1-
Ethernet0/0/11 hybrid 1-
Ethernet0/0/12 hybrid 1-
Ethernet0/0/13 hybrid 1-
Ethernet0/0/14 hybrid 1-
Ethernet0/0/15 hybrid 1-
Ethernet0/0/16 hybrid 1-
Ethernet0/0/17 hybrid 1-
Ethernet0/0/18 hybrid 1-
Ethernet0/0/19 hybrid 1-
Ethernet0/0/20 hybrid 1-
Ethernet0/0/21 hybrid 1-
Ethernet0/0/22 hybrid 1-
GigabitEthernet0/0/1 hybrid 1-
GigabitEthernet0/0/2 hybrid 1-
[SW2] vlan batch 5 10 50
[SW2] interface Ethernet0/0/1
[SW2-Ethernet0/0/1] port hybrid tagged vlan 5 10 50
[SW2] interface Ethernet0/0/2
[SW2-Ethernet0/0/2] port hybrid untagged vlan 5 10 50
[SW2-Ethernet0/0/2] port hybrid pvid vlan 50
[SW2] dis vlan
The total number of vlans is: 4U: Up; D: Down; TG: Tagged; UT: Untagged
MP: Vlan-mapping; ST: Vlan-stacking
#: ProtocolTransparent-vlan; *: Management-vlan;VID Type Ports1 common UT:Eth0/0/1 (U) Eth0/0/2 (U) Eth0/0/3 (D) Eth0/0/4 (D)
Eth0/0/5 (D) Eth0/0/6 (D) Eth0/0/7 (D) Eth0/0/8 (D)
Eth0/0/9 (D) Eth0/0/10 (D) Eth0/0/11 (D) Eth0/0/12 (D)
Eth0/0/13 (D) Eth0/0/14 (D) Eth0/0/15 (D) Eth0/0/16 (D)
Eth0/0/17 (D) Eth0/0/18 (D) Eth0/0/19 (D) Eth0/0/20 (D)
Eth0/0/21 (D) Eth0/0/22 (D) GE0/0/1 (D) GE0/0/2 (D)
5 common UT:Eth0/0/2 (U)
TG:Eth0/0/1 (U)
10 common UT:Eth0/0/2 (U)
TG:Eth0/0/1 (U)
50 common UT:Eth0/0/2 (U)
TG:Eth0/0/1 (U)
VID Status Property MAC-LRN Statistics Description1 enable default enable disable VLAN 0001
5 enable default enable disable VLAN 0005
10 enable default enable disable VLAN 0010
50 enable default enable disable VLAN 0050
[SW2] dis port vlan
Port Link Type PVID Trunk VLAN List
Ethernet0/0/1 hybrid 1 5 10 50
Ethernet0/0/2 hybrid 50-
Ethernet0/0/3 hybrid 1-
Ethernet0/0/4 hybrid 1-
Ethernet0/0/5 hybrid 1-
Ethernet0/0/6 hybrid 1-
Ethernet0/0/7 hybrid 1-
Ethernet0/0/8 hybrid 1-
Ethernet0/0/9 hybrid 1-
Ethernet0/0/10 hybrid 1-
Ethernet0/0/11 hybrid 1-
Ethernet0/0/12 hybrid 1-
Ethernet0/0/13 hybrid 1-
Ethernet0/0/14 hybrid 1-
Ethernet0/0/15 hybrid 1-
Ethernet0/0/16 hybrid 1-
Ethernet0/0/17 hybrid 1-
Ethernet0/0/18 hybrid 1-
Ethernet0/0/19 hybrid 1-
Ethernet0/0/20 hybrid 1-
Ethernet0/0/21 hybrid 1-
Ethernet0/0/22 hybrid 1-
GigabitEthernet0/0/1 hybrid 1-
GigabitEthernet0/0/2 hybrid 1-
The pc of vlan5 and vlan10 are not interoperable, but both of them are interoperable with the server.
4 case 4: configure GVRP
4.1 question
1) SW1 creates static VLAN 10. SW2 and SW3 are not configured with VLAN.
2) by configuring the GVRP function, let SW2 and SW3 learn VLAN automatically
4.2 Plan
Use eNSP to build the experimental environment, as shown in figure-4.
Figure-4
4.3 steps
To implement this case, you need to follow these steps.
[sw1] gvrp
[sw1] interface Ethernet 0/0/2
[sw1-Ethernet0/0/2] port link-type trunk
[sw1-Ethernet0/0/2] port trunk allow-pass vlan all
[sw1-Ethernet0/0/2] gvrp
[sw2] gvrp
[sw2] interface Ethernet 0/0/1
[sw2-Ethernet0/0/1] port link-type trunk
[sw2-Ethernet0/0/1] port trunk allow-pass vlan all
[sw2-Ethernet0/0/1] gvrp
[sw2] interface Ethernet 0/0/3
[sw2-Ethernet0/0/3] port link-type trunk
[sw2-Ethernet0/0/3] port trunk allow-pass vlan all
[sw2-Ethernet0/0/3] gvrp
[sw3] gvrp
[sw3] interface Ethernet 0/0/2
[sw3-Ethernet0/0/2] port link-type trunk
[sw3-Ethernet0/0/2] port trunk allow-pass vlan all
[sw3-Ethernet0/0/2] gvrp
[sw1] vlan 10
[sw2] dis vlan summary
Static vlan:
Total 1 static vlan.
one
Dynamic vlan:
Total 1 dynamic vlan.
ten
Reserved vlan:
Total 0 reserved vlan.
[sw3] dis vlan summary
Static vlan:
Total 1 static vlan.
one
Dynamic vlan:
Total 1 dynamic vlan.
ten
Reserved vlan:
Total 0 reserved vlan.
PVLAN:
Private VLAN-Private VLAN
Ensure security between end devices while saving IP network segments
Isolated broadcast domain
Mux-vlan:
Multiplex VLAN, composite / hybrid VLAN
Configuration steps:
1. Make sure there is a VLAN
Vlan 100
Vlan 10
Vlan 20
Vlan 30
two。 Determine the dependency between VLAN
Vlan 100
Mux-vlan
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.