cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1349
Views
0
Helpful
4
Replies

New to CLI - Configuring a VLAN and adding ports

SJNIII
Level 1
Level 1

I am new to CLI.

I have a 3560 24 port switch and I need to create a VLAN 10 and include ports 12-24 at 1 GB.

The 3560 shows the 24 port and the last two opening do not have a port.

I was reading the guide, and the examples show using example of FastEthernet and GigEthernet.

I am wondering if the below is correct to set up 12-24 in VLAN 10 and so that I can connect port 5 off of the Cisco switch to a port on a Dell Switch configure in VLAN 10.

 

#### create VLAN 10

Switch# configure terminal

Switch(config)# vlan 10
Switch(config-vlan)# name mdsan
Switch(config-vlan)# exit
Switch#


#### assign ports 12-24 to VLAN 10


Switch# configure terminal

Switch(config)interface range fastethernet0/12 – 24
Switch(config-if-range) switchport mode access
Switch(config-if-range) switchport access vlan 10
Switch(config-if-range) no shutdown
Switch(config-if-range) end
Switch#

#### assign port 5 as access port


Switch#
Switch# configure terminal
Switch(config)interface fastethernet0/5
Switch(config-if) switchport mode access
Switch(config-if) switchport access vlan 10
Switch(config-if-range) no shutdown
Switch(config-if-range) end

 

4 Replies 4

Leo Laohoo
Hall of Fame
Hall of Fame

Yes, this is one method.  Another method is to add port 5 to your "interface range" command with the others, like this: 

 

interface range fastethernet0/5, fastethernet0/12 - 24

Switch(config-if) switchport mode access
Switch(config-if) switchport access vlan 10

Switch(config-if-range) spanning-tree portfast
Switch(config-if-range) no shutdown
Switch(config-if-range) end

 

Thanks

As,, a followup, are the last two ports (SFP) on the switch always set as

Gigabit Ethernet port - GigabitEthernet0/1,GigabitEthernet0/2,  for Fiber?

Same thing.  It'll work.  If the configurations are the same, just add the ports to your interface range command.

ok,

 

I checked and the last two ports can not be used as there are no physical ports in place, only two empty slots.

so, i will only be using ports 1-12 on VLAN1 12-24 on VLAN2

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: