Adding a Switch Port Interface to a VLAN

Posted on Updated on

In an internet data centre, clients can set up a colocation where they can run their servers for access with the internet. In my job, what I would do is configure the Cisco Catalyst switch 3750 for new colocation clients. It is pretty simple. I check for a free port, assign this to the client, then assign them to a VLAN.

Here’s a configuration sample of how it would go:

————————-

colo.switch>en

colo.switch>password:

colo.switch#show run int fa 1/0/11

Building configuration…

Current configuration : 36 bytes

!

interface FastEthernet1/0/11

end

colo.switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

colo.switch(config)#int fa 1/0/11

colo.switch(config-if)#desc ClientNum – ClientName – VLAN 311

colo.switch(config-if)#switchport access vlan 311

% Access VLAN does not exist. Creating vlan 311

colo.switch(config-if)#dup full

colo.switch(config-if)#speed 100

colo.switch(config-if)#storm-control broadcast level pps 10k 9k

colo.switch(config-if)#storm-control multicast level pps 10k 9k

colo.switch(config-if)#storm-control unicast level pps 10k 9k

colo.switch(config-if)#switchport mode access

colo.switch(config-if)#no shut

colo.switch(config-if)#^Z

colo.switch#show run int fa 1/0/11

Building configuration…

Current configuration : 298 bytes

!

interface FastEthernet1/0/11

description ClientNum – ClientName – VLAN 311

switchport access vlan 311

switchport mode access

speed 100

duplex full

storm-control broadcast level pps 10k 9k

storm-control multicast level pps 10k 9k

storm-control unicast level pps 10k 9k

end

colo.switch#copy run start

Destination filename [startup-config]?

Building configuration…

[OK]

colo.switch#

————————-

Always keep in mind when configuring a switch port that there are no existing configurations there that you would be overwriting by mistake. This is why the show run int fa 1/0/xx is important as it would display the existing running-configuration.

When you’re done with your configurations and have verified them correct, be sure to save them to the memory by using the command copy run start.

This post just shows a sample of configuring a switch port to a VLAN. Of course, this is not all that needs to be done for the client as they wouldn’t have access yet to and from the internet. The next step would be assigning them IP addresses and configuring the routes. More of that in another post.

Advertisement

One thought on “Adding a Switch Port Interface to a VLAN

    Anton said:
    November 22, 2011 at 5:35 am

    Nice article. Just a few questions :). How do you route the vlan to the Internet Port so that i can access the internet. And how do you restrict the assigned IPs to this port ?

    Thanks in Advance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s