Master CCNA

How to Master CCNA Ebook

 

 Start your networking career and Master CCNA

Master CCNP SWITCH

How to master CCNP SWITCH ebook

 

 Become a switching guru and Master CCNP SWITCH

Master CCNP ROUTE

How to master CCNP ROUTE Ebook

 

 Dominate routing protocols and Master CCNP ROUTE

Master CCNP TSHOOT

How to Master CCNP TSHOOT

 

 Complete your CCNP R&S journey and Master CCNP TSHOOT

Print

Connect real switches to GNS3 using a Cheap USB NICs

Written by Rene Molenaar on . Posted in FAQ

 There are three options to connect your real switches to GNS3:

  • The Quad NIC solution.
  • The breakout switch solution.
  • The cheap USB NIC solution.

I don't really like the breakout switch solution because I've had way too many issues with it. Ports going into err-disabled mode without really understanding why, MAC addresses flapping and other nasty stuff. I spent more time fixing the breakout switch than doing actual labs.

The quad NIC solution works very well and as a result many people are looking for the D-Link DFE-580TX card that is working very well. The downside of this card is that you'll find them for $150 - $200 on Ebay and for the CCIE lab you'll need 3 of them. You also need a motherboard that supports 3x PCI slots so most people end up buying a seperate "GNS3 Server" for the Quad NIC solution.

I wanted to see if I could buy some cheap USB NICs and use those instead of my Quad NICS, Here's what I bought:

usbnic

These USB NICs from Dealextreme cost $4.80 a piece at the moment and I bought 12 of them. They support FastEthernet and they can do trunking (802.1Q encapsulation).

usbhubnic

I also bought some USB HUBs from Dealextreme. This one only has 7 USB ports but I found some others on Dealextreme that have 10+ USB ports.

To see if these cheap USB NICs would work I installed Ubuntu to test 802.1Q encapsulation.

renemolenaar@RMCSLP003:~$ sudo apt-get install vlan

First I have to install VLAN support because it is not enabled by default.

renemolenaar@RMCSLP003:~$ modprobe 8021q

Secondly I load the 802.1Q module.

renemolenaar@RMCSLP003:~$ vconfig add eth2 200

I create VLAN 200 for my eth2 interface (one of the USB NICs).

renemolenaar@RMCSLP003:~$ sudo ifconfig eth2.200 1.1.1.1 netmask 255.255.255.0

I configure an IP address on this interface so I can generate some traffic from this interface.

8021qtagwireshark

You can see that 802.1Q encapsulation is working. I just sent a ping to the broadcast address to generate traffic. All frames are being tagged with VLAN 200 using 802.1Q encapsulation.

For less than $ 100 you can buy 12 USB NICs and a decent USB HUB. This is all that you need for the CCIE R&S lab (besides 2x 3560 and 2x 3550 switches). Another advantage of this solution is that you can connect it to your laptop so you don't have to think about a compatible motherboard for your Quad NICs.

If you are thinking about implementing this solution, let me know. I'm looking forward to hear your experience with these USB NICs.

Happy labbing!

Only registered users can write comments!

Comments (11)

  • avatar
    phish

    Hello,

    I am interested in building the "Connect real switches to GNS3 using a Cheap USB NICs"

    Although, I am new at this and was wondering if you have a more detail plan/manual on how to get this working?

    Example, would 2x3750 work? Do I need to purchase a USB card for my PC?

    Also, I am not that strong on ubuntu ...

    Any addition info on how to build the GNS3 lab with real switches would be much appreciated,

    Thanks Mike

  • avatar
    profit311

    Rene, aside from the obvious cost difference, have you noticed any labbing differences from the usb vs the quad nic solution?

  • avatar
    ReneMolenaar

    So far not, however one thing that you need to fix is making sure that whenever you boot your computer each USB adapter gets the same interface number. If the interface numbers change than suddenly an interface might be connected to the wrong router.

    In Linux this is something we can do, I haven't tried it yet though.

  • avatar
    qsyed

    Hi Rene,http://gns3vault.com/index.php?option=com_users&task=registration.activate&token=eeaa04b17a26a0c1ea552f4be3413415

    I am currently in preparation for my CCIE, and renting racks can get quite pricy.

    I used your thought of buying usb-eth adapters as well as 4 3560 switches and need your help.

    I am using ubuntu as a OS, and i created one router one GNS3 confirued a IP and then made a routed port on SW1 - tested basic ping - worked great.

    Since linux does not strip dot1Q tags, will it be possible to run router on a stick on Linux. any way to do it? coz it didnt work for me...

    p.s am new to linux, like REALLY NEW, so learning as i go along...


    thanks
    Q

  • avatar
    ReneMolenaar

    Hi Q,

    I think this should work, but it's best to test it. Do something simple like this:

    1) GNS3 Router connected to your USB NIC. Configure a sub-interface with "encapsulation dot1q 10".
    2) Create a SVI interface on the switch for VLAN 10.

    See if you can ping from your GNS3 router to your SVI interface.

    Rene

  • avatar
    bibhushit123

    To - RENE MOLENAAR

    Hi, i have built my lab as you have mentioned here with usb nics .So ,i have tested whether those nics has vlan capability or not on my ubuntu box 12.04 lts .But i have found that when i am doing router-on-a stick config,the captured file is showing vlan id in the ethernet frame but when i am configuring switch as an access mode ,the vlan id is getting stripped off from the frame.I need to know ,Suppose i have two devices attatched to a switch with same vlan id as access mode ,in this scenario if i ping from one device to another device and capture the frame then the vlan tag will be there or not .

  • avatar
    ReneMolenaar

    You will only see the VLAN tag on Trunk links, never on access ports.

  • avatar
    adimaden

    Hi Rene,

    This looks really like a cost effective solution to those who wants to learn including me. But does this really work for everything that we need to do to pass ccnp and ccie? Any issues so far that you have come across? Cheers.

  • avatar
    clrowe721

    Hello Rene,

    can you specify the model for the USB ethernet adapter and USB hub?

    Regards,

    Comrie

  • avatar
    mikep2169

    Hello Rene I've purchased the same USB adapters using windows Vista. I'm unable to ping through the cloud. I can ping the my computer from the switch and router but can't ping router to switch. Are there any special settings for windows? Thanks

  • avatar
    Veridor

    I'm going with this option for my CCIE home lab on Mac OS X (Mountain Lion, 10.8). I am running GNS3.app as root via sudo command script, and I can bind the ethernet adapter to the cloud I create to represent to SW1, but when I then link that to the virtual R1 in my topolgy, it appears dynamips crashes, and I get an error about "unabel to connect to 127.0.0.1 7200". Has anyone else run into this? I'm going to try the 0.8.4 RC2 release tonight to see if that makes a difference.

feedback