In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Configuration steps and ideas:
one。 Configure the ip of the PC
Pc1:
Ip 192.168.1.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc2:
Ip 192.168.2.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc3:
Ip 192.168.3.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
Pc4:
Ip 192.168.4.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.254
two。 Create a vlan and add the port to the setting trunk
Create a vlan and add the port to:
Vlan batch 10 20 30 40 create vlan10,20.30 40 interface GE0/0/1 entry port port link-type access sets access mode port default vlan10 joins vlan10 to interface GE0/0/2 Enter port port link-type access set access mode port default vlan20 add vlan20 to interface GE0/0/5 enter port Port link-type access set access mode port default vlan 10 join vlan30 into interface GE0/0/6 enter port port link-type access set access mode Port default vlan 20 adds vlan40 to the setting trunk: sw1: interface GE0/0/3 entry port port link-type trunk sets trunl mode Port trunk allow-pass vlan all allows all vlan to enter port port link-type trunk via interface GE0/0/4 to set trunl mode port trunk allow -pass vlan all allows all vlan to enter port port link-type trunk via sw2: interface GE0/0/1 to set trunl mode port trunk allow-pass vlan all Allow all vlan to enter port port link-type trunk via sw3: interface GE0/0/1 set trunl mode port trunk allow-pass vlan all allows all vlan to pass through three. Configure the gateway on sw2: interface vlan10 enters the virtual port of vlan10 ip address 192.168.1.254 255.255.255.0 configure ip interface vlan20 to enter the virtual port of vlan20 Ip address 192.168.2.254 255.255.255.0 configure ip interface vlan30 to enter vlan30's virtual port ip address 192.168.3.254 255.255.255.0 configure ip interface Vlan 40 enters vlan20's virtual port ip address 192.168.4.254 255.255.255.0 configure ip on sw3: configuring gateway on sw3 mainly acts as a backup Prevent link interruptions on sw2 interface vlan10 access to vlan10's virtual port ip address 192.168.1.253 255.255.255.0 configure ip interface vlan20 to enter vlan20's virtual port Ip address 192.168.2.253 255.255.255.0 configure ip interface vlan30 to enter vlan30's virtual port ip address 192.168.3.253 255.255.255.0 configure ip interface vlan 40 Enter vlan20's virtual port ip address 192.168.4.253 255.255.255.0 to configure ip IV. Configure VRRP (virtual gateway) on sw2: interface vlan10 enters vlan10's virtual port vrrp vrip 1 virtual-ip 192.168.1.250 configure virtual gateway vrrp vrip 1 priority 150 set priority Vrrp vrip 1 track interface GE0/0/2 reduces 100 tracks the port status of port GE0/0/2 If down is dropped, it will be reduced by 100. Change to 50 interface vlan20 virtual port vrrp vrip 1 virtual-ip 192.168.2.250 to enter vlan20 configure virtual gateway vrrp vrip 1 priority 150 set priority Vrrp vrip 1 track interface GE0/0/2 reduces 100 tracks the port status of port GE0/0/2 If down is dropped, it will be reduced by 100. Change to virtual port vrrp vrip 1 virtual-ip 192.168.3.250 for 50 interface vlan30 entry into vlan30 configure virtual gateway interface vlan40 to enter virtual port for vlan40 Vrrp vrip 1 virtual-ip 192.168.4.250 configure Virtual Gateway on sw3: interface vlan10 enters vlan10's virtual port vrrp vrip 1 virtual-ip 192.168.1.250 configure virtual gateway Interface vlan20 enters vlan20's virtual port vrrp vrip 1 virtual-ip 192.168.2.250 configure virtual gateway interface vlan30 enters vlan30's virtual port vrrp vrip 1 virtual-ip 192 .168.3.250 configure virtual gateway vrrp vrip 1 priority 150 set priority vrrp vrip 1 track interface GE0/0/2 reduces 100 trace
Port status of GE0/0/2. If down is dropped, it will decrease by 100 to 50.
Interface vlan40 enters the virtual port of vlan40
Vrrp vrip 1 virtual-ip 192.168.4.250 configure a virtual gateway
Vrrp vrip 1 priority 150 set priority
Vrrp vrip 1 track interface GE0/0/2 reduces 100 tracks the port status of GE0/0/2. If down is dropped, it decreases by 100 to 50.
If there is nothing wrong with both lines, v10PowerV20 goes from the left, and v30.v40 from the right can not only achieve backup function, but also reduce the pressure on a single server.
five。 Verification, test
1. Modify the gateway on the PC to a virtual gateway
Pc1:
Ip 192.168.1.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.250
Pc2:
Ip 192.168.2.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.250
Pc3:
Ip 192.168.3.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.250
Pc4:
Ip 192.168.4.1
Subnet mask: 255.255.255.0
Gateway: 192.168.1.250
two。 Ping your own virtual gateway on the command line
Ping 192.168.x.250 x represents different network segments
Then spell out other hosts to see if they can connect with the whole network.
Being able to spell successfully means that the experiment is successful.
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.