cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
422
Views
0
Helpful
7
Replies

Loading config from file doesn't import MAC address table.

ben-b-wetherill
Level 1
Level 1

I'm using a 9200 device running IOS 17.9.

I use a script and spreadsheet to generate my config file, which I then copy onto my devices via TFTP and then copy to the running config. Nothing unusual there. However, if I then ask the device to show me the mac address-table, it's empty. Double, triple check the the config file contains the MAC table, it does. There are no errors or warnings reported by the device when applying the settings to the running config.

If I manually apply the mac table settings, by copy/pasting them from the generated config file into the console, everything works OK. Ask the device to show me the mac address-table, there are my entries.

Below is an example of the mac address-table config from the generated file. Again, copy/paste this into the console and it's fine. Any ideas why I can't load a mac address-table from a file? Needing the copy/paste step is a pain.

mac address-table static 0300.0000.3714 vlan 101 interface g1/0/41 g2/0/24 g1/0/45
mac address-table static 0300.0000.3715 vlan 101 interface g1/0/41 g2/0/24 g1/0/45
mac address-table static 0300.0000.3716 vlan 101 interface g1/0/41 g2/0/24 g1/0/45

7 Replies 7

Hello,

not sure how exactly you generate these scripts, but make sure that there is a LF (line feed) at the end of each of these lines (LF is typically created by pressing <<ENTER>> at the end of the line...

Thanks for the suggestion. I can confirm "CRLF" is at the end of every line
in the generated file, including the mac address section. HOWEVER.... That
did make me notice something in my generated config. there was an extra
'end' in it. So the ACLs and mac tables appeared after an 'end'. Makes
sense why the device didn't see the macs, but not sure why it still
processed the ACLs.

Either way, making sure 'end' was only declared at the actual end of the
script fixed the issue.

Thanks for helping me out

(FYI: The config is generated by a Matlab script.)

Glad you got it figured out...

Do show mac address table 

Match what you see in text file you use.

As I see you use multi interface in one line' 

That not same as mac table use 

It add mac to vlan to single interface 

MHM

I case anyone is reading this in the future and wondering what on earth I was doing and why, my switches are not being used in a 'traditional' networking environment. I'm using them to route aircraft AFDX data. If you want to know more about AFDX and its rules there is plenty on Google, but in reply to MHM's comment; I use multicast MAC routing (routing on the destination MAC of each packet). Multicast MACs have their 8th bit set to 1 - the 0300 in my MACs above. So defining multiple interfaces on a single line is valid. If there is a better way of doing this then I'm open to suggestion, but as this is AFDX traffic, it must be layer 2 routing.

mac address-table static 0300.0000.3714 vlan 101 interface gigabitethernet 1/0/41 gigabitethernet 1/0/45

Do in this way'

Sometimes the SW not accept the copy paste command becuase missing exact name and/or there is no space between command 

MHM

Interesting nuance. Thanks MHM.

Review Cisco Networking for a $25 gift card