Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to assign MAC address to port

Status
Not open for further replies.

debcu

Technical User
Joined
Sep 3, 2004
Messages
48
Location
PL
Hello,
I have one Cisco 2950 switch (24 ports) and I would like to assign only 3 ports to 3 diffirent MAC address's (other ports should be deactivated). How can I do it. I don't know IOS command so if some one help me or give link to Cisco site I'll be very gratefull. Tkanks.
 
Do you want to

1) manipulate the MAC table on the switch, or
2) restrict a certain device with a certain MAC to connect to certain ports only?

For 1), do this:

!
conf t
mac-address-table static aaaa.aaaa.aaaa vlan 1 interface f0/1
!

For 2), do this:

!
conf t
interface f0/1
switchport port-security mac-address aaaa.aaaa.aaaa
switchport port-security maximum 1
switchport port-security violation shutdown
!

If you want to "deactivate" the port, you can simply shutdown the port with the following command:

!
conf t
interface f0/4
shut
!
interface range f0/5 - 24
shut
!

You may want to read the entire configuration guide for 2950 switch:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top