-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cisco 3745 + 2 NM-16ESW modules breaks IP routing #243
Comments
This may be a bug in either Dynamips or IOS itself. It could be worth trying with another IOS image, like the c3660. |
According to this post https://www.gns3.com/community/featured/cant-get-nm-16esw-module-to-work The NM-16ESW modules must be in slot 0 and slot 1. |
Hello, I will give it a shot tomorrow
Even if it is true, I wanted to expand to 4 modules and have a 64 ports "switch", and the slot 0 is locked anyway... I do not have access to the paid switch Cisco images, so I use this router-as-a-switch setup. |
Correct, slot 0 is taken for c3725, c3745 and c3660. I think it is available for 3620 and 3640 though. However, you cannot 64 ports anyway because the maximum is 2 NM-16ESW modules per router:
|
Hello @grossmj, sorry for the delay. I switched to a 3640 image, and I can put an NM-16ESW in slot 0. However, adding another one in the slot 1 raises the same "encapsulation failed" error as before. |
Looking at the arp table, between working and not working, there definitely is a problem at this layer. I enabled arp debugging, and I think the problem comes from here. Maybe adding another module, makes a sort of loop or overlapping. I will try to debug more. edit : looks like https://community.cisco.com/t5/switching/3745-nm-esw-16-issues/m-p/649599/highlight/true#M6037 + https://community.cisco.com/t5/other-network-architecture-subjects/nm-16esw-switching-problem/m-p/837398/highlight/true#M181651 |
Ok, so thanks to the link you sent and additional doc (https://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/nm/hardware/installation/guide/connswh.html#:~:text=If%20two%20Ethernet%20switch%20network,configuration%20requirements%20must%20be%20met%3A&text=Both%20Ethernet%20switch%20network%20modules,Gigabit%20Ethernet%20expansion%20board%20installed.) : The two Gigabit interfaces of each module need to be connected. However, I do not see this port in the module... I will now try to debug the dynamips source code to see if there are mention of it. edit : GE-DCARD-ESW https://community.cisco.com/t5/networking-knowledge-base/unable-to-configure-both-nm-16esw-switch-modules-on-a-3600-or/ta-p/3131532 daughterboard would be needed |
Hello again @grossmj, sorry for the ping. I would like to add a sub module to the NM-16ESW slot, typically inside the I saw references to sub slots in the code, but maybe you have a similar example in mind that could help me ? Thank you in advance ! |
I don't see an example of a subslot card in the code.
|
Hello ! I modified the EEPROM field, and I'm figuring out what needs to be done to create a card to insert in the sub_slots list (which fields to set), and if initializing this sub card is needed or automatically done. Do I have to set edit : after some tries, I can't get the kind of wanted inheritance :/ I am not sure that WIC are necessary, as 3600 series support these additional daughter cards. edit2: I think I figured out how to declare a port, and make it "inherit" from a parent card. Found a sample output of
I tried adding my card as a subslot of the NM-16ESW one, for which I gave a custom EEPROM with driver final edit: I tried adding a device to the same PCI slot as the NM-16ESW, but it won't get detected. I think it needs to be bound to a "DaughterCard slot", which might need specific additional hooks :/ |
This daughtercard stuff is interesting to me, but I can't comment on your approach without seeing the code. There is The cards/slots/subslots are an IOS concept that dynamips mimics, but the actual functionality is in the chip devices. Since NM-16ESW uses the BCM5605 chip and BCM chips are mostly "system-on-a-chip", then the original gigabit port is probably a part of it. |
Thanks for the detailed answer ! My code is a bit messy right now, and I don't think making a fork would really help you. I've been trying to insert a generic 1-FE-TX card inside a sub slot of the NM-16ESW card, but I think it is not possible, as it is an I set the sub slot card on the same pci bus and device, but it won't show anywhere. However, I can see some available daughter card slots on the chassis, not related to the NM-16ESW card :
So, my guess is that I need to add a "DaughterCard" type of slot in the bcm functions, similarly to the way the 16 Fa ports are created. This way, the 3745 might detect that this card has this kind of slot available (see https://pastebin.com/5B57icJw for reference). I am currently analysing the 3745 image binary to find where the router queries a card for any daughter card slot existence, and also searching for any documentation on BCM5605 or BCM5618. |
Since you are analyzing the image binary, you might want to check how it distinguishes between NM-16ESW and NM-16ESW-1GIG. The IOS code might be something simple like this or equivalent:
|
By looking at the code, I am not sure there is a if ( v8 == 0x2B1 )
{
v9 = &unk_6340486C;
*(a3 + 4) = 0x469;
*(a3 + 8) = "36 Port 10BaseT/100BaseTX EtherSwitch";
}
else // // 0x2a9, see https://github.com/GNS3/dynamips/blob/master/common/cisco_eeprom.c#L45
{
*(a3 + 4) = 0x468;
*(a3 + 8) = "16 Port 10BaseT/100BaseTX EtherSwitch";
v9 = &unk_634048A0;
} And then, a logic handles sub slots (in a separate function, not related to the previous one apparently) : v11 = check_bcm5605_or_bcm5618(a2, a3, v6 + 0x2C);
v7 = 0;
if ( v11 )
{
// [...] *INTERMEDIATE LOGIC* [...]
if ( v22 ) // number of ports == 36 check
{
v25 = *(v6 + 0x54);
if ( v25 && eeprom_v4_parser(v25, 0x80, 0x40, v65) && v65[0] == 0x2B4 )// nmd-36esw powercard
*(v6 + 0x24) = 1;
v26 = *(v6 + 0x4C);
if ( v26 )
{
if ( eeprom_v4_parser(v26, 0x80, 0x40, v65) )
{
v20 = 0x2B2;
if ( v65[0] == 0x2B2 ) // ge-dcard-esw (for nmd-36esw)
{
v27 = *(v6 + 0x40) | 0x1000000;
++*(v6 + 0x60);
*(v6 + 0x40) = v27;
}
}
}
v24 = *(v6 + 0x50);
}
else
{
v23 = *(v6 + 0x54);
if ( v23 && eeprom_v4_parser(v23, 0x80, 0x40, v65) && v65[0] == 0x2B3 )// nm-16esw powercard
*(v6 + 0x24) = 1;
v24 = *(v6 + 0x4C);
}
if ( v24 && eeprom_v4_parser(v24, 0x80, 0x40, v65) && v65[0] == 0x2B2 )// ge-dcard-esw (for nm-16esw)
{
v28 = *(v6 + 0x30) | 0x1000000;
++*(v6 + 0x60);
*(v6 + 0x30) = v28;
}
} If I insert the |
Looks like it uses the EEPROM field "40 XX XX(product id)" to distinguish the cards:
Seems like the correct way to do this is to implement a GE-DCARD-ESW card with whatever is needed. |
I agree, but the problem is that I don't really know what type of card should be GE-DCARD-ESW, even though I think it should be bound to the same PCI device and bus as the master. I tried adding some ports binding in the BCM definitions : dynamips/common/dev_nm_16esw.c Lines 448 to 450 in 804ae0c
But this doesn't really change anything, so maybe the card actually sends a BCM READ REQUEST (?) to check if there are any """DaughterCard""" slots on the chip. But that's the part to figure out, and I can't find the needed documentation (or how the original dev figured out those values). For now, I am trying to edit |
The original dev clearly did trial and error + whatever datasheets were available. Since the cards are identified by the product_id in EEPROM then making sure IOS reads the subslot EEPROM is required. |
Hi, I won't have much time to allow into this subject, for a few weeks. I still want to dive back into it later though ! |
No worries, thanks for the links 👍 |
Hello,
I am running a Cisco 3745 12.4(25d) in a GNS 3 topology. Inserting a single NM-16ESW works fine, but adding another one in slot 2 breaks the IP layer setup in my administration VLAN interface :
However, the switching still works fine, as hosts are able to communicate with Internet. Removing the second module and rebooting makes everything back to normal. Could someone help me ? Thanks !
The text was updated successfully, but these errors were encountered: