Home Solutions White papers
White papers

Layer 3 Switch Realizes Communication between Different VLANs

Time:2019-07-04 Source:UTEPO

Last time, we talked about the basics about VLAN, including the way of VLAN segmentation and how to set up VLAN between switches. In this article, we are going to show you how to achieve the communication between different VLANs through configuration of layer 3 switch.



1.Case Requirement

In case of there are 2 departments involved. sales dept and technical support dept with IP in the different network segments. Meanwhile, the PC of sales department connect with 2 switches dispersedly. Now we need to achieve the communication between these two departments through switch configuration.


Here is the details of plan, in this case

1.We connect PC1 to Port G0/5 of Switch A, PC3 to Port G0/5 of Switch B, and set them to VLAN 10.

2.Connect PC2 to Port G0/15 of Switch A and set to VLAN 20.

3.Connect Switch A & B through their respective Port G0/24.

We need to configure in layer 3 switch in order to achieve communication between PC 1, PC2, and PC3.



2.Topology

* UTP7624GE-POE-L3 (Layer 3 switch): 1pc

* SG24-M: 1pc

* PC: 3pcs


layer 3 poe switch


Configuration Steps

1.Connect the above devices according to the topology. And set the IP address of PC as shown in the topology. Make sure the the network segments of PC1 and PC3 are same, but different with PC2’s. That is to say, PC 1 and PC 3 (Sales Dept) could communicate with each other, while can not communicate with PC 2 (Technical Support Dept).



2.Set up VLAN 10 in switch A, and set Port F0/5 to VLAN 10.

SwitchA(config)#vlan 10              //Set up VLAN 10

SwitchA (config-vlan)#name sales      //Name the VLAN 10 as sales

SwitchA (config)#interface G0/5        //Configure mode of port G0/5

SwitchA (config-if)#switchport access vlan10     //Set G0/5 to VLAN 10

SwitchA #show vlan id 10             //Verify and test above configuration



3.Set up VLAN 20 in switch A, and set Port G0/15 to VLAN 20.

SwitchA(config)#vlan20              //Set up VLAN 20

SwitchA(config-vlan)#name technical      //Name the VLAN 20 as technical

SwitchA(config)#interface G0/15        //Configure mode of port G0/15

SwitchA(config-if)#switchport access vlan 20     //Set G0/15 to VLAN 20

SwitchA #showvlan id 20             //Verify and test above configuration



4.Set the mode of Port (G0/24) as tag VLAN, which is connecting the switch A and switch B.

SwitchA (config)#interface G0/24         //Configure mode of port G0/24

SwitchA (config-if)#switchport mode trunk     //Set the mode of Port (G0/24) as tag VLAN

SwitchA (config)#show interfaces G0/24 switch   //Verify and test above configuration



5.Set up VLAN 10 in switch B, and set Port G0/5 to VLAN 10.

SwitchB(config)#vlan 10     //Set up VLAN 10

SwitchB (config-vlan)#name sales    //Name the VLAN 10 as sales

SwitchB (config)#interface G0/5      //Configure mode of port G0/5

SwitchB (config-if)#switchport access vlan10   //Set G0/5 to VLAN 10

SwitchB #show vlan id 10      //Verify and test above configuration



6.Set the Port (G0/24) as tag VLAN, which is connecting the switch A and switch B.

SwitchB (config)#interface G0/24     //Configure mode of port G0/24

SwitchB (config-if)#switchport mode trunk    //Set the mode of Port (G0/24) as tag VLAN

SwitchB (config)#show interfaces G0/24 switch  //Verify and test above configuration



7.Configure communication between VLANs in layer 3 switch.

Enable routing function of layer 3 switch.

SwitchA>enable

SwitchA#configure terminal

SwitchA(config)#ip routing              //Enable routing function of layer 3 switch

SwitchA(config) #interface vlan 10       //Create the virtual interface vlan10

SwitchA(config-if) #ip address 192.168.10.254 255.255.255.0     //Configure vlan10's virtual interface IP address

SwitchA(config) #interface vlan 20  //Create the virtual interface vlan20

SwitchA(config-if) #ip address 192.168.20.254 255.255.255.0    //Configure vlan20's virtual interface IP address


8.Set the default gateway for PC1 and PC3 to 192.168.10.254, and the default gateway for PC2 to 192.168.20.254.



9.Verify that PC1, PC2 and PC3 can ping each other

C:\ >ping 192.168.20.1         //Ping PC2 through PC1

C:\ >ping 192.168.20.1         //Ping PC2 through PC3

C:\>ping 192.168.10.2         //Ping PC3 through PC2



Basic configuration of layer 3 switch:

1.Enable routing function of layer 3 switch.

SwitchA>enable

SwitchA#configure terminal

SwitchA(config)#ip routing      //Enable routing function of the layer 3 switch


2.Configure routing function of the layer 3 switch ports

SwitchA(config)# interface fastethernet0/5

SwitchA(config-if)#noswitchport    //Enable routing function of the layer 3 switch ports

SwitchA(config-if)#ip address 192.168.1.5255.255.255.0  //Configure the IP address for the port

SwitchA(config-if)#no shutdown      //Check status information of port (Operstatus is up)

SwitchA(config-if)#end


3.Verify & test the configuration

SwitchA#show ip interface

SwitchA#show interface G0/5     //Check status information of port (Adminstatus is up)

Return>
Share:
info@utepo.net

+86-755-83898016-863

Shenzhen brand website construction:Ctmon