cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
856
Views
5
Helpful
3
Replies

Assigning VLAN to group of ports

steven.pw.lau
Level 1
Level 1

Hi,

Is there anyway to assign VLAN into a group of ports in a Catalyst switch?

For example, if i want to assign port 1-3 to VLAN admin,

vlan 2 name admin

interface vlan 2

ip address 10.1.1.1 255.255.255.0

interface e0/1

switchport access vlan 2

interface e0/2

switchport access vlan 2

interface e0/3

switchport access vlan 2

Compare to other switches which I've configured (e.g. Extreme Networks)..

There are only few commands to be typed:

create vlan admin

config admin ipaddress 10.1.1.1 /24

config admin add port 1-3

Thanks.

3 Replies 3

paddyxdoyle
Level 6
Level 6

Yes, however it depends on which model of switch you are running as the IOS range command is not supported on older switches:

e.g.

On CatOS you can issue the following which changes ports 2/1 to 2/24 inclusive into VLAN3

# set vlan 3 2/1-24

On IOS you can do similar by issuing:

# interface range fastethernet 2/1 - 24

# switchport access vlan 3

HTH

PJD

Thanks Paddy.

Just a note for Steven: take careful note of the spaces in the command interface range fastethernet 2/1 - 24

Kevin Dorrell

Luxembourg

Review Cisco Networking for a $25 gift card