Home > other >  Two sets of three layers of huawei switch different vlans to communicate
Two sets of three layers of huawei switch different vlans to communicate

Time:12-15

Switch 1, 2 mouth to PC, 24 port switch, PC IP automatically access, consult how great god pc1 communicate pc3, and pc4
This is sw1 configuration, help to see what was wrong, static routing is with wrong
Vlan batch 10 20
#
DHCP enable
#
Interface Vlanif1
#
Interface Vlanif10
IP address 192.168.10.254 255.255.255.0
DHCP select interface
The DHCP server excluded - IP - address 192.168.10.1
The DHCP server lease 30 hour day 0 minute 0
DHCP server DNS - list 192.168.10.1 192.168.10.254
#
Interface MEth0/0/1
#
Interface GigabitEthernet0/0/1
The port link -type access
The port default vlan 10
#
Interface GigabitEthernet0/.two survivors
The port link -type access
The port default vlan 10
#
Interface GigabitEthernet0/0/24
The port link -type trunk
The port trunk allow - pass vlan 10 20
#
IP route -static 192.168.20.0 255.255.255.0 192.168.20.254

CodePudding user response:

You have a second switch configuration return route?

CodePudding user response:

One way: you create a on LSW1 VLAN20, connect with LSW2 physical interface to VLAN20, in LSW1 IP address for the VLAN configuration (such as: 192.168.20.254), so the gateway is 192.168.20.254 VLAN20, on LSW1 enable routing (some switch routing functions is to through the command enabled), and so on LSW1 VLAN10 (192.168.10.0/24) and VLAN20 (192.168.20.0, 24) is the two LSW1 directly connected network, automatically generates two direct route, don't need to configure static routes can communication,

CodePudding user response:

CodePudding user response:

This is the most simple configuration, all need routing data processing by SW1, if must use static routing, then use the trunk link is no good, want to add additional vlans (e.g., VLAN30), two switches will match VLAN30, and two switches VLAN30 to configure IP address (e.g., 192.168.30/24 subnet), then 192.168.30. The next hop address of X is the static routing,
This solution is not very detailed, find their own data configuration,

CodePudding user response:

You in SW1 and SW2 connected interface configuration two IP addresses, such as: SW1, SW2 192.168.30.1/24:192.168.30.2/24
Write a default route: SW1: IP route 0.0.0.0 0.0.0.0 192.168.30.2
SW2: IP route 0.0.0.0 0.0.0.0 192.168.30.1

I'm SW1 10.20.10.0/24 SW2:10.20.20.0/24

The hostname Switch
!
!
!
!
!
IP DHCP pool vlan10
The network 10.20.10.0 255.255.255.0
The default - the router 10.20.10.1
!
!
IP routing
!

!
Interface FastEthernet0/1
No switchport
IP address 10.20.60.1 255.255.255.0
Duplex auto
Speed auto
!
Interface FastEthernet0/2
Switchport access vlan 10
Switchport mode access
!
Interface FastEthernet0/3
Switchport access vlan 10
Switchport mode access
!

Interface Vlan10
IP address 10.20.10.1 255.255.255.0
!
IP classless
IP route 0.0.0.0 0.0.0.0 10.20.60.2

CodePudding user response:

The building Lord, you this is the layer 2 switches, layer 3 switches have vlanif

CodePudding user response:

refer to 6th floor Gu Hao 2 reply:
you should now is in the study of dim moonlight, as if each semester in the middle of math class, the teacher in the interpretation of the new knowledge a bit hazy, but one would not be at the end of the semester, for example when doing the final volume can answer all sorts of problems,
Regardless in front of the building Lord answered correctly or not, you may do what they say, by now the estimate or a face of meng,
Now according to recover your initial configuration on the first floor, and then to vlan20 deserve to address 192.168.20.254 on SW1, SW2 on to VLAN10 deserve to address 192.168.10.254, ping each other at this time, to see if, through this time of the two switches you to set up the static routing to delete, can also ping, can pass, then the static routing is redundant,
And then do the next experiment, using the static routing, the SW1, SW2 G0/0/24 closing layer interface undo portswitch, and give the two ports respectively with the IP address, the address how to match? Go with what network segment? And then want to static routing at this time?
This is to oneself step by step, and finally the experimental summary, combining to the related knowledge, such as the trunk interface packet unpack the packet, went out of the trunk opening data with the tag? Untag, pvid? Static routing in what what is the source address, destination address is what meaning, what is the gateway, the gateway to whom the word is said to be meaningful, what is the next jump, and what is the difference between the gateway and the DHCP based on global and based on the difference of the interface, and in the process of early experiments completely don't need to configure DNS, because don't understand still confuse myself, when access to the actual physical device function and how to understand the DNS Settings,

Thank you for the great god solutions, has been solved
  • Related