Static Routing configuration instance between Huawei switches, Huawei Static Routing
Topology
Switch configuration on the left:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
<Huawei>dis cu # sysname Huawei # vlan batch 10 100 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 # interface Vlanif10 ip address 172.16 . 10.254 255.255 . 255.0 # interface Vlanif100 ip address 172.16 . 100.1 255.255 . 255.0 # interface MEth0/ 0 / 1 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 4094 # interface GigabitEthernet0/ 0 / 1 port link-type access port default vlan 10 # interface GigabitEthernet0/ 0 / 2 # ......................... # interface GigabitEthernet0/ 0 / 21 eth-trunk 1 # interface GigabitEthernet0/ 0 / 22 shutdown eth-trunk 1 # interface GigabitEthernet0/ 0 / 23 eth-trunk 1 # interface GigabitEthernet0/ 0 / 24 eth-trunk 1 # interface NULL0 # ip route- static 172.16 . 20.0 255.255 . 255.0 172.16 . 100.254 # user- interface con 0 user- interface vty 0 4 # return <Huawei> |
Switch configuration on the right:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
<Huawei>dis cu # sysname Huawei # vlan batch 20 100 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 # interface Vlanif20 ip address 172.16 . 20.254 255.255 . 255.0 # interface Vlanif100 ip address 172.16 . 100.254 255.255 . 255.0 # interface MEth0/ 0 / 1 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 4094 # interface GigabitEthernet0/ 0 / 1 port link-type access port default vlan 20 # interface GigabitEthernet0/ 0 / 2 # ....................... # interface GigabitEthernet0/ 0 / 21 eth-trunk 1 # interface GigabitEthernet0/ 0 / 22 eth-trunk 1 # interface GigabitEthernet0/ 0 / 23 eth-trunk 1 # interface GigabitEthernet0/ 0 / 24 eth-trunk 1 # interface NULL0 # ip route- static 172.16 . 10.0 255.255 . 255.0 172.16 . 100.1 # user- interface con 0 user- interface vty 0 4 # return <Huawei> |
Switch configuration steps on the left (Switch configuration on the right is similar)
1. Create VLANs in batches
[Huawei] vlan, batch, 10, 100
2. Configure the vlanif address
[Huawei] interface Vlanif 100
[Huawei-Vlanif100] ip address 172.16.100.1 24
[Huawei-Vlanif100] q
[Huawei] interface Vlanif 10
[Huawei-Vlanif10] ip address 172.16.10.254 24
3. Configure port GE0/0/1 and Add vlan 10
[Huawei-GigabitEthernet0/0/1] port link-type access
[Huawei-GigabitEthernet0/0/1] port default vlan 10
4. Configure eth-trunk (increase bandwidth and implement link backup) and Properties
[Huawei] interface Eth-Trunk 1
[Huawei-Eth-Trunk1] trunkport GigabitEthernet 0/0/21 to 0/0/24
# Adding port to eth-trunk 1
[Huawei-Eth-Trunk1] mode manual load-balance
# Manual load mode
A [Huawei-Eth-Trunk1] port link-type trunk
[Huawei-Eth-Trunk1] port trunk allow-pass vlan all
# Configure the eth-trunk port to trunk mode and allow all VLANs to pass through
5. Static route Configuration
[Huawei] ip route-static 172.16.20.0 24 172.16.100.254
# Configure the next hop address of the network that reaches 172.16.20.0 to 172.16.100.254.