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

Huawei: floating static rout

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Experiment name: Huawei floating static Route

Topology Diagram:

# × × part simulates the enterprise intranet, while the gray part simulates the operator network.

3. Configuration idea 1:

# first configure the ip address of the PC, then create vlan10,vlan 20 and vlan 30 in lsw2,lsw1 to keep the vlan database consistent, configure virtual gateways in lsw1 to enable mutual access between vlan, use trunk link between lsw1 and lsw2, and then create vlan40. Huawei's physical interface can not be configured with ip address, so it is necessary to create vlan40, and add port ethernet 0 to vlan40, so that lsw1's ehernet 0 and AR2's

G0Accord 1 is in the same network segment, so get through the private network first:

4. Configuration steps:

# configure the ip address of client1 and client2,client3

# IP address 192.168.10.1 255.255.255.0

Gateway 192.168.10.254

The other two pc are available in the same way.

# configure on the switch lsw2, create vlan 10 Magi VLAN 20 Magi VLAN 30 respectively, add the port corresponding to client1,client2,clinet3 to vlan 10 Magi VLAN 20 Magi VLAN 30 respectively

# interface ethernet 0/0/1

Port link-type access

Port default vlan 10

The other two are available in the same way.

# configure the trunk link between lsw2 and lsw1

On lsw2

Interface ethernet 0/0/4

Port link-type trunk

Port trunk allow-pass vlan all

It's also available on lsw1.

# create vlan10,vlan20,vlan30 on lsw1 and configure virtual gateway

# interface vlan 10

Ip address 192.168.10.254 255.255.255.0

Undo shutdown

Interface vlan 20

Ip address 192.168.20.254 255.255.255.0

Undo shutdown

Interface vlan 30

Ip address 192.168.30.254 255.255.255.0

Undo shutdown

# next, verify and test whether the vlan can access each other, as shown in the figure below with ping 192.168.20.1:

It can be explained by ping that they can access each other.

# create vlan40 in lsw1, and configure virtual ip so that vlan40 and AR2 are on the same network segment

# vlan40

Quit

Intface vlan 40

Ip address 192.168.40.1 255.255.255.0

Undo shutdown

# configure the ip address on AR2 so that it is on the same network segment as vlan 40, and configure the ip address on g0Uniplet0

Interface g0/0/1

Ip address 192.168.40.2 255.255.255.0

Undo shutdown

Interface g0/0/0

Ip address 192.168.50.1 255.255.255.0

Undo shutdown

# to be able to access the public network, configure a default route on router AR2 and a static route to 192.168.5.0 on lsw1

# ip route-static 0.0.0.0 0.0.0.0 192.168.4.1 / the packet goes back and forth, which is configured by the return packet / / configured on router AR2

# ip route-static 192.168.5.0 255.255.255.0 192.168.4.2 / / this is the outgoing package / / configured on lsw1

# ping 192.168.50.1 for verification and testing is shown below:

# the above experiments show that the test is successful and you can access the Internet.

# configuration idea 2: next configure the operator network

# configure the ip addresses of interfaces g0swap 0 and g0apt 0 on AR3

IP address 192.168.50.2 255.255.255.0

Undo shutdown

IP address 192.168.60.254 255.255.255.0

Undo shutdown

# configure client4 with ip address

IP address 192.168.60.1 255.255.255.0

Gateway 192.168.60.254

Undo shutdown

# Let the whole network interwork first, continue to configure static routes on lsw1 to go to 192.168.60.0 network segment, and also configure to go to 192.168 on border breaker AR2. The static route of the 60.0 network segment, and then configure the static route to the intranet on the AR3, so that the whole network can be interconnected.

# ip route-static 192.168.60.0 255.255.255.0 192.168.40.2 / / configured on lsw

IP route-static 192.168.60.0 255.255.255.0 192.168.50.2 / / configured on router AR2

IP route-static 192.168.0.0 255.255.0.0 192.168.50.1 / / configured on router AR3

Verification and testing: test the following figure with the ping command in client1

# the above tests show that the test is successful and the whole network has been interconnected

# next configure a floating static route

# first, pull another line to link AR2 and AR3, and configure the port IP address respectively.

Interface g 0/0/2

IP address 192.168.70.1 255.255.255.0

Undo shutdown

Interface g0/0/2

IP address 192.168.70.2 255.255.255.0

Undo shutdown

# configure static rout

Ip route-static 192.168.60.0 255.255.255.0 192.168.70.2 preference 70 / / configured on AR2, Huawei's router default administrative distance is 60. If you are a little larger than it, it will become a backup. The smaller the administrative distance, the more reliable it is.

IP route-static 192.168.0.0 255.255.255.0 192.168.70.1 / / configured on AR3

Verification and testing: disply ip routing-table, as shown in the following figure

# now open all links:

# display IP routing-table

# as can be seen from the figure above, when the main link is opened, the default backup link disappears, playing the role of link backup

Summary: the advantage of configuring floating static routes is that if the administrative distance of the two static routes is the same, it plays the role of load balancing, and if the administrative distance of the backup link is large, it plays the role of link backup.

All in all: floating static routes can not only play the role of load balancing, but also play the role of backup

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

Servers

Wechat

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

12
Report