6 Replies Latest reply: Apr 28, 2012 6:41 PM by Matt RSS

    QinQ with dynamips


      Has anyone done this? eg have routers in dynamips linked to your real switches and lab up a customer / service provider setup? I've wasted a whole day with scratching my head. After watching an INE video on the matter it seemed very easy but cant get it to work for the life of me.


      I ended up getting sniffers out and found that on my ubuntu machine I WAS seeing the dynamips routers dot1q tag. Then put a sniffer on my real switches with the SPAN feature and could see the arp packets but they didnt have any dot1q tags in them at all. Additionally the debugs on the dynamips routers when trying to ping each other yielded encapsulation fail. ( i am pretty sure that is not a good thing but cant seem to rectify it ) - is there suppose to be a dot1q tag in the arp packets?


      Not sure whatelse to try other than make all the real switches have a high system mtu - I did try pinging with a low size but didnt work either.

      Additionally I just wiped everything and just had a blank config and pinged from router to router and it did work. Just happens to be as soon as I go placing switchport trunk commands on nothing works.


      My dynamips routers have IP addresses and the main interface unshut and all links between real switches are trunking.


      I did read a few issues with people not getting it to work so may be its just a dynamips bug?

        • 1. Re: QinQ with dynamips

          Hi Matt.


          I have not tried this with Dynamips.  This might very well be a Dynamips issue.  I have only tried this with real equipment and it worked fine.


          So if you didn't set the system MTU on your switches to 1504 and reload, make sure you do that to account for the extra 4 bytes of encapsulation.


          When you sniff the traffic with SPAN, are you using the encapsulation replicate keyword in your configuration?  By default the SPAN session will relicate all frames as untagged packets to the SPAN destination port.  In order to see the dot1q tag, you will need to use the encapsulation replicate keyword.


          As a side note, you should tag your native VLAN traffic and make sure that the provider native VLAN doesn't match customer native VLAN.


          I know there a some folks on CLN that have a similar set up.  Maybe they can give it a test run for you.


          Good luck!

          • 2. Re: QinQ with dynamips

            hey, thanks for the thoughts. Ah I think I got caught out with span there. I was doing it on a 2950 and I dont think it has the replicate feature. I will try it on my 3750 and see what the results are.


            I will have another go and set all switches to 1504 and reload and see what happens. If anyone has any  other ideas id love to hear of working setups.


            I shall report back if I get this to work.

            • 3. Re: QinQ with dynamips

              It does work on gns3.  With gns3, i find that you have to start all routers up before entering any config, or you have buggy interfaces. Here is what i did:



              • 4. Re: QinQ with dynamips

                Nice blog post there! very informative. How would you go about doing that in dynamips?

                Would you make cpe1.3560 and cpe2.3560 a router in gns3 with subinterfaces running dot1q and trunk it to each of the virgin edge switches?. I have tried doing that but to no avail. It is all good but I guess just having proof of concept is nice but not to worry.

                • 5. Re: QinQ with dynamips

                  Hmm, when I did it in gns3 you have to add a switchport module so that the router can be a switch as well.  If you add a router, right click > configure > click on the hostname > slots tab > slot 1 > NM-16ESW.


                  Then connect each of the routers together using only the ports from that module (which for me is usually anything begining f1/0 or above.  The routed ports are usually fa0/0 or fa0/1 (dont use these). If you need to make a routed port using the switchport module, just use #no switchport on the interface.

                  • 6. Re: QinQ with dynamips

                    Ok so I have solved my problem. It is not a bug with dynamips at all. It was a bug with me trying to do some crazy stuff.


                    I got another 2 NIC's for my pc so I could use the one dynamips process. Basically what I was doing before was I had my laptop running dynamips in windows then on my linux box I had dynamips running on that also. ( I tested that this does work but only if you want to do basic pings on the same vlan with windows firewall disabled  but qinq stuff never worked. )


                    So now I have R1 and R2 running on the same machine on seperate nics.


                    connectivty is 100% between R1 and R2 now.

                    The thing is I have a SPAN session setup on my 3750 but I only see the 1 vlan tag for vlan 30. I am not sure how accurate span is but I did do encapsulation replicate.


                    I am confident qinq is working as it should as a ping from R1 to R2 with a size of 1497 or higher is failing but 1496 works proving that the extra metro tag of 101 is being added


                    So my advice is create your virtual dynamips topology on 1 computer and map everything to your NIC's on that same computer. Dont mix and match!


                    After a week of stuffing around I am happy I got this to work now