Cisco – Configuring Ports on a Cisco Switch

ciscocisco-catalystcisco-commandscisco-iosswitch

I am very new to Cisco networking (haven't done any course either). I have been trying to learn a bit of networking myself and had no trouble in doing some of the basic stuff which i needed for my personal work. But i am planning to buy a new Cisco switch(a gigabit switch) and configure it to 2 different networks (1 being an internet and other being a private network for a specific job). I want to configure the ports in such a way that the first few slots for normal internet and the rest for my other network. For example if its a Cisco 2950 48 port switch, the first 1-16 port for my local internet network and the ports from 17-32 for my other network. Can somebody give me a run down on how to achieve this? Sorry for such a long but basic question, i am just trying to save few $$ and learning something new. Any help would be appreciated. Cheers

Best Answer

A best way create two VLANS in switch initially .

**Assuming two Vlans are Vlan10 & Vlan20 **

Switch1(config)# Vlan10 Switch1(config)# name internet

Switch1(config)#Vlan 20 Switch1(config)#name LAN`

Now assign Vlan 10 for range of switch ports from 1-16

Switch(config)#int gigabit range 1/1-16

Switch(config)#switchport mode access

Switch(config)#Switchport access Vlan 10

Switch(config)#no shutdown

Similarly assign Vlan 20 for remaining ports

Switch(config)#int gigabit range 1/17-32

Switch(config)#switchport mode access

Switch(config)#switch access vlan 20

Switch (config)# no shutdown