

And check whether we can ping between them or not. Ok, now we change port of PC1 on switch from fa0/6 to fa0/4. Because these PCs are in different VLANs.ĥ. Now try to ping from PC0 to PC1 using ping 192.168.1.15 on your command line, you should not be able to ping. Assign IP address to your PCs given in the figure above.Ĥ. 3550 on the other hand is a more advanced switch which supports layer 2 to 4. Now you can see the output, you have two VLANs with their port numbers.ģ. No form of routing can be done, therefore no static routes. Switch(config-if-range)#switchport access vlan 20 Switch(config-if-range)#switchport access vlan 10 The command set that would create a subinterface for VLAN 10, set the trunking protocol for the. Configure an IP address on each subinterface. The syntax of the command is as follows: Switch(config-if) switchport mode trunk.

Switch(config-if-range)#switchport mode access The switchport mode trunk command is used on the Cisco Catalyst 2950 switch to configure a port as a VLAN trunk port. Then assign these interfaces to particular VLAN using Switchport access vlan command. And we want to connect it to switch or router then we have to make it Trunk mode. When we want to connect pc, laptop or printer with switch we have to change this mode to Access mode. Here we use the Switchport mode command because switch by default has Desirable mode. If you want to assign random port numbers then you can separate them using comma (,) separator. We use range keyword in this command because we have to assign multiple interface in one VLAN and this port numbers are in sequence. Interface is the command to select particular interface to have access on it. Now let’s assign port numbers to them using following configuration. Now you can see we created VLANs in the list with default VLAN1 and other VLANs.Ģ. First of all lets create configure switch and create VLANs. Then we will change the port number from one VLAN to port number of other VLAN and check whether we can ping between them or not.ġ.
#Set ip address of cisco 2950 switch how to#
Let’s see how to configure this scenario on the switch. After that, we will check whether these two PCs can ping each other or not. Now we have to assign ports fa0/1 to fa0/5 to VLAN10 and ports fa0/6 to fa0/10 to VLAN20.

PC0 belongs to VLAN10 and PC1 belongs to VLAN20. We can see from figure that we have created 2 VLANs (VLAN 10 named Sales and VLAN 20 as Marketing). That is, PC0 is connected on port fa0/1 and PC1 is connected on fa0/6. Here in figure we can see that CISCO 2950 switch is connected with two PCs on different ports.
