static mac question
gojericho0
Member Posts: 1,059 ■■■□□□□□□□
in CCNA & CCENT
Does anybody know why when I try to assign this mac address to fa 0/2 it instead assigns to fa 0/1??? Below is the running config along with what I typed in attempt to assign the mac to fa 0/2
I am using a 2924XL enterprise switch with IOS c2900XL-h2s-mz-120_5_1-XP.bin
run config
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
!
interface VLAN1
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
mac-address-table static 0000.00b0.0ce7 FastEthernet0/2 vlan 1
!
line con 0
logging synchronous
transport input none
stopbits 1
line vty 0 4
login
line vty 5 9
login
!
end
Default mac table
Switch#sh mac
Dynamic Address Count: 2
Secure Address Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 47
Total MAC addresses: 49
Maximum MAC addresses: 2048
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
----
0000.00b0.0ce7 Dynamic 1 FastEthernet0/2
0001.42cc.c320 Dynamic 1 FastEthernet0/1
My attempt to configure a static route
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#mac static 0000.00b0.0ce7 fa0/2 vlan 1
Switch#sh mac
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
----
0001.42cc.c320 Dynamic 1 FastEthernet0/1
Static Address Table:
Destination Address VLAN Input Port Output Ports
----
0000.00b0.0ce7 1 Fa0/1
1 Fa0/2
1 Fa0/3
I am using a 2924XL enterprise switch with IOS c2900XL-h2s-mz-120_5_1-XP.bin
run config
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
!
interface VLAN1
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
mac-address-table static 0000.00b0.0ce7 FastEthernet0/2 vlan 1
!
line con 0
logging synchronous
transport input none
stopbits 1
line vty 0 4
login
line vty 5 9
login
!
end
Default mac table
Switch#sh mac
Dynamic Address Count: 2
Secure Address Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 47
Total MAC addresses: 49
Maximum MAC addresses: 2048
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
----
0000.00b0.0ce7 Dynamic 1 FastEthernet0/2
0001.42cc.c320 Dynamic 1 FastEthernet0/1
My attempt to configure a static route
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#mac static 0000.00b0.0ce7 fa0/2 vlan 1
Switch#sh mac
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
----
0001.42cc.c320 Dynamic 1 FastEthernet0/1
Static Address Table:
Destination Address VLAN Input Port Output Ports
----
0000.00b0.0ce7 1 Fa0/1
1 Fa0/2
1 Fa0/3
Comments
-
gojericho0 Member Posts: 1,059 ■■■□□□□□□□Does anyone have any ideas why i can not configure a static mac address to an interface? I checked on cisco's website to make sure my commands are right.
-
johnnynodough Member Posts: 634OK, I have gone through a couple of variations of this scenario, and this is what I have found -
WHen I apply a "mac static 0000.0033.0000 fa0/3 vlan 1"- The same thing happens on my switches (both, same as yours), mac table shows Fa0/1
reload
When I apply a "mac static 0000.0033.0000 fa0/3 vlan 2" - The mac shows static on Vlan 2, FA0/3
reload
When I apply a "mac secure 0000.0033.0000 fa0/3 vlan 1 - The mac shows static on vlan 1, FA0/3
reload
When I configure port FA0/1 to be in VLAN003, and I apply the same "mac static 0000.0033.0000 fa0/3 vlan 1" The mac address shows fa0/2, which also happens to be the first port available in VLAN001.
Which leads me to a theory (probably wrong ), with a plain mac static command, when assigning ports to the default vlan, it will appear in the first port assignable in the vlan, since a plain ol mac static implies no swithport security (like mac sticky or secure), it only applies to the VLAN.Go Hawks - 7 and 2
2 games againts San Fran coming up, oh yeah baby, why even play? just put then in the win category and call it good