Cisco Layer 3 Switch Configuration

Network topology diagram:
Cisco Layer 3 Switch Configuration
Ideas: After adding the device, first configure the IP and subnet mask corresponding to the PC, and then only two VLANs are connected under Switch 1, so only vlan 2 and vlan 3 need to be set. The same Switch 2 also Only need to configure vlan 3 and vlan 4. All VLANs are not in the same network segment, so to achieve intercommunication, a router is required. Here, Switch 3 actually plays the role of a router. Different network segments communicate with each other. Each network segment needs a gateway, so Switch 3 needs to Include all VLANs and set IP addresses for each VLAN. In addition, Fa 0/3 ports on Switch 1 and Switch 2 need to be set to trunk mode. Otherwise, the data of the two vlans cannot find the outgoing port.

1) First add the required devices and connect them. As shown in the figure:
Cisco Layer 3 Switch Configuration
2) Configure the ip, subnet mask, and gateway of the PC, and identify the corresponding vlan, ip, and gateway. As shown in the figure:
Cisco Layer 3 Switch Configuration
3) For convenience, number the switches as 1, 2, and 3 as shown in the figure:
Cisco Layer 3 Switch Configuration
4) Enter the switch Switch 1 to configure the vlan, and the command is as follows:
enable //Enter the privileged mode
configure terminal //Enter the global configuration mode
vlan 2 / /Create vlan 2
vlan 3 //Create vlan 3
interface fastEthernet 0/1 //Enter the port Fa 0/1
no shutdown //Enable the port
switchport mode access //Configure the port as an access port
switchport access vlan 2 //Add the port to interface fastEthernet 0/2 in vlan 2
//Enter port Fa 0/2
no shutdown //Enable port
switchport mode access //Configure port as access port
switchport access vlan 3 //Add port to vlan 3
interface fastEthernet 0/3 //Enter the port Fa 0/3
no shutdown //Enable the port
switchport mode trunk //Configure the port as the trunk port
and enter the above command, identify the type of each port, as shown in the figure
Cisco Layer 3 Switch Configuration

5) Configure vlan 3, vlan 4 and trunk port on Switch 2 according to the method in step 4, and identify the port type as shown in the figure below:
Cisco Layer 3 Switch Configuration
6) Enter Switch 3 to configure vlan and vlan ip address, the command is as follows:
enable //Enter privileged mode
configure terminal //Enter the global configuration mode
ip routing //Enable the routing function of the switch
vlan 2 //Create vlan 2
vlan 3 //Create vlan 3
vlan 4 //Create vlan 4
vlan 5 //Create vlan 5
and then in the global configuration mode , configure the ip address for vlan, and configure the IP command as follows:
interface vlan 2 //Enter vlan 2
ip address 192.168.1.254 255.255.255.0 //Configure the ip address of vlan 2
no shutdown //Open the virtual port
Follow the above commands to configure vlan 3 in turn , vlan 4, vlan 5 ip address
6) Verification: whether PC0 and PC1 can ping each other
PC0 and PC2 can ping each other
Cisco Layer 3 Switch ConfigurationCisco Layer 3 Switch ConfigurationCisco Layer 3 Switch ConfigurationCisco Layer 3 Switch Configuration
The above results prove that different VLANs can communicate with each other through Layer 3 switches.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325488192&siteId=291194637
Recommended