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 > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Explain in detail several examples of Huawei switch configuration
The configuration of switch is the basic skill of network administrator. Taking Huawei S5700 switch as an example, combined with sNSP simulator, this paper describes in detail VLAN configuration, communication between VLAN, cross-switch VLAN configuration, cross-switch VLAN communication and so on. (note: the following configurations are based on switch interface VLAN)
1. VLAN configuration under a single switch
1. Configure a single VLAN
Huawei S5700 itself has a VLAN by default. If it is not configured separately, the terminals that directly access the switch belong to the default VLAN, whose number is 1. To manually configure a VLAN with the specified number 10, you can use eNSP to create the following topology.
Among them, LSW1 is Huawei S5700 Magi VLAN10-01 and VLAN10-02 are two terminal computers with the IP address of 192.168.10.11 and 24192.168.10.12 respectively. The configuration process of LSW1 is as follows:
System-view
VLAN 10
Quit
Interface GigabitEthernet 0/0/1
Port link-type access
Port default VLAN 10
Quit
Interface GigabitEthernet 0/0/2
Port link-type access
Port default VLAN 10
After configuration, open the command line of VLAN10-01 to ping VLAN10-02, and the result is shown in the following figure.
2. Configure multiple VLAN
On the basis of the above configuration, two more terminal computers, VLAN20-01 and VLAN20-02, are added to the eNSP simulator to connect interfaces 3 and 4 of the switch, respectively. The topology diagram is as follows:
The IP addresses of VLAN20-01 and VLAN20-02 are configured as 192.168.20.21 and 192.168.20.22, respectively. The switch configuration is based on the original configuration and runs the following configuration command:
System-view
VLAN 20
Quit
Interface GigabitEthernet 0/0/3
Port link-type access
Port default VLAN 20
Quit
Interface GigabitEthernet 0/0/4
Port link-type access
Port default VLAN 20
At this point, the computers within VLAN10 and VLAN20 can access each other, but the machines between VLAN10 and VLAN20 cannot communicate with each other. To realize the interworking between VLAN, it is necessary to configure the network management on the computer and the corresponding VLAN IP address on the switch. Configure the gateways of VLAN10-01 and VLAN10-02 to 192.168.10.1, the gateways of VLAN20-01 and VLAN20-02 to 192.168.20.1, and then configure them on the switch:
Interface VLANif 10
Ip address 192.168.10.1 255.255.255.0
Quit
Interface VLANif 20
Ip address 192.168.20.1 255.255.255.0
Quit
2. Configure VLAN across switches
Add a switch and a computer terminal to the original topology, the new computer is proposed to join VLAN 10, the computer IP address is configured as 192.168.10.13 server 24, and the gateway is configured as 192.168.10.1. The port 24 of the two switches is connected and needs to be configured as follows:
The original switch LSW1 needs to configure port 24 into trunk mode and allow all VLAN labels to pass through, as follows:
Interface GigabitEthernet 0/0/24
Port link-type trunk
Port trunk allow-pass VLAN all
Quit
The new switch LSW2 should also configure port 24 into trunk mode, and configure port 1 connected to VLAN10-03 as follows:
Interface GigabitEthernet 0/0/24
Port link-type trunk
Port trunk allow-pass VLAN all
Quit
VLAN 10
Quit
Interface GigabitEthernet 0/0/1
Port link-type access
Port default VLAN 10
Quit
After completing the above configuration, VLAN10-03 is able to communicate with VLAN10-01 and VLAN10-02, but cannot communicate with VLAN20's machine because LSW2 cannot determine the route to VLAN20. To solve this problem, see below.
III. Communication between VLAN across switches
Because there is no routing information on LSW1 and LSW2, machines without the same VLAN cannot access each other. The ideas to solve this problem are as follows:
1. Create a VLAN 2 dedicated to routing in LSW1 and LSW2
2. Configure VLAN IP to 10.0.0.1 and 10.0.0.2 on LSW1 and LSW2, respectively.
3. Create static routes on LSW1 and LSW2 to point to each other.
The configuration on LSW1 is as follows:
VLAN 2
Quit
Interface VLANif 2
Ip address 10.0.0.1 255.255.255.0
Quit
Ip route-static 0.0.0.0 0.0.0.0 10.0.0.2
The configuration on LSW2 is as follows:
VLAN 2
Quit
Interface VLANif 2
Ip address 10.0.0.2 255.255.255.0
Quit
Ip route-static 0.0.0.0 0.0.0.0 10.0.0.1
After configuration, VLAN10-03 will be able to access the VLAN20 machine, as verified in the following figure.
IV. Scalability verification
Suppose you add a VLAN 30 and connect a computer to each of the two switches, as shown in the following figure to see if the machines under VLAN 30 can communicate with other machines under VLAN.
For VLAN30-01, the IP is 192.168.30.31, the gateway is 192.168.30.1, the gateway is VLAN30-02, and the IP is 192.168.30.32, and the network management is 192.168.30.1. Based on the original configuration, the switches LSW1 and LSW2 are configured as follows:
LSW1:
System-view
VLAN 30
Quit
Interface VLANif 30
Ip address 192.168.30.1 255.255.255.0
Quit
Interface GigabitEthernet 0/0/5
Port link-type access
Port default VLAN 30
Quit
LSW2:
System-view
VLAN 30
Quit
Interface GigabitEthernet 0/0/2
Port link-type access
Port default VLAN 30
Quit
After the above configuration, the newly added VLAN30 can communicate with other VLAN without modifying the routing information, which verifies that the configuration has good scalability.
Attachment: http://down.51cto.com/data/2366991
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.