Introduction: CCNA Lab Setup
I recently started studying for the CCNA exam and though that it would be cool to have some physical gear to play with as well. It turns out there are quite a few affordable (relatively) options to do this.
This instructable outlines the purchase, construction, and setup of my lab.
There are many options and configurations, you should build only what you need and can afford. There are also much richer simulators available online; Packet tracer from Cisco and NetSim from Boson to name but a few. I just really wanted to get my hands on some real "iron", thus my lab was born.
Step 1: Marshal the Networking Equipment Needed
My base was a kit from eBay, for around $300 it contained 3 routers, 2 switches, rack, and cables. Just search "CCNA Lab" on eBay and you can find many options.
Mine was similar to this one: Cisco Premium CCENT CCNA CCNP R&S SECURITY Home Lab KIT BONUS 12U Rack & DVD
There is a lot of variability in the descriptions, and many conflicting descriptions, so use care when picking your kit.
I received from the eBay kit:
- 3 Cisco 1841 Routers
- 2 Cisco 2950 Layer 2 Switches
- 4 T1 Modules
- 2 T1 Cables
- 3 Ethernet cables
- 1 Crossover cable
- 1 Console cable
- 5 Power Cables
- 1 DVD (no idea what's on it, never looked at it)
- 12U Desktop Rack, with screws and washers
I also added the following (all optional but I tend to go a little overboard):
- One switchable power strip, rack mounted (link)
- One USB Console Cable (link)
- One rack mounted shelf (link)
- Five cross-over adapters (I like to just use straight through cables everywhere and use the cross over adapter when a cross over is needed) (link)
- One Cisco 4-port Ethernet card (link) I may order more of these, as I got a lot of congestion on the T1 links (1.5Mbps)
I also purchased a number of flat network cables, I like the flat cables for shorter runs, I also bought mostly CAT6 cable so I can used them for other uses around the house. For this gear, CAT5e is perfectly fine (and even overkill) since that is cheaper and easier to find. But I must say that flat cable rock!
Step 2: Marshal the Compute Equipment Needed (Optional)
I have my existing windows 10 PC that I'm using for console access, but I also wanted to have some hosts on the network to test pings, sniff traffic, etc. I decided to use Raspberry Pi 2's as they are a capable, relatively inexpensive platform.
My purchases for the compute side of the lab were this:
- Four Raspberry Pi 2 Model B (link)
- Four Micro SD Cards (8Gb is the minimum, I usually use 16Gb for no good reason) (link)
- One 4-layer Raspberry Pi case (link)
- One HDMI KVM (link)
- Four 18-inch USB A to B cables (link)
- Four 18-inch super think HDMI cables (link)
- Six 12-inch Micro USB cables (link)
- One 5-port USB power supply (link)
- A keyboard/mouse (link)
Note:I bought an IOGear KVM, but it sucks with the Pi, so caveat emptor. I currently use it to switch the video, but I have to move the wireless keyboard/mouse dongle manually. Also, the KVM cables were super bulky and way too long, so I bought shorter and thinner HDMI and USB cables.
And finally to hold all the pieces, parts, cables, adapters, and a few tools, I purchased a storage box:
- Plano Molding 1363 Stow-N-Go (link)
Step 3: Putting the Physical Equipment Together
Some notes on putting this together:
- The rack doesn't need to be perfectly straight (I had one corner that wouldn't stay on the table). Once the weight of the gear is in the rack, all the corners will be flush with the surface and stable.
- I had to mount the power supply one hole up from the very bottom as the rack is angled and I wanted to ensure that I had room to add and remove power cords easily.
- For most devices, I used the bottom hole of the bracket (or ear) of the device. The due to the angle of the rack, the weight of the device is counterbalanced against the top of the bracket, so thus far a single screw at the bottom of the bracket has worked for me.
- For each screw into the rack I had this order: 1) Rack 2) Washer 3) Device bracket 4) Screw
- The base rack is the first to be put together. It's pretty simple, although I waited to fully tighten the screws to try and get the frame as square as possible. Once the rack is totally assembled, fully hand tighten the screws.
- Now it's time to start adding gear. You should think about the order you want to mount your gear. I knew I wanted my shelf on top, and decided to place the power strip at the very bottom (well, one hole up from the very bottom). I recommend mounting that first and ensure you have enough room for power cables and power adapters. Get this one right first, changing it later will be a pain.
- I put the routers next. Ensure you leave gaps between equipment for cable management where needed. The routers will actually go in "backwards" so that the majority of the ports are facing the front of the rack. With the routers you should see the port for the power cable.
- Next the switches can be mounted. My switches didn't have the rack mounting brackets (ears) attached. The kit came with some generic metal brackets and screws that were fairly easy to mount on the switches and then mount the switches. With the switches you mount them "front facing" so you see the Ethernet ports to the front of the rack. With the switches, you should NOT see the console or power cable ports (they will be facing the back of the rack).
- The last rack mount in my lab was the shelf. This one was a little tricky given that the rack is angled. If the shelf is mounted (normally) anything round would roll of the shelf behind the rack and the gear. Since I wanted to put the raspberry pi's there and the occasional screwdriver, I needed a flat shelf. This was accomplished with the remaining washers.
- I first screwed in the bottom bolt just enough for the threads to grab.
- I then added five washers to the top screw as show in the picture and screwed in the bolt just enough for the threads to grab.
- I then tightened the bottom screw in most of the way.
- I then tighened the top screw in all the way.
- By balancing the tension with the top and bottom screw you can get the shelf pretty level.
Step 4: Adding the Compute Hardware
Once all the network gear is racked and the shelf in place.
- Put the Raspberry Pi's into the cases, in my instance i used a stackable 4-layer case to keep everything as compresses as possible.
- Use the USB A to B, and HDMI Cables to connect each Pi's Video and one USB port to the HDMI KVM.
- Use a wire wrap to secure the USB Power Supply (optional)
- Run 18-inch micro USB cables from the USB power supply to each Raspberry Pi's power connection.
Step 5: Decide on a Network Design to Build
I decided on a design that wasn't too complex, but incorporated many of the things I've learned so far with the first half of the CCNA Routing and Switching course I've been taking online (thanks PuralSight!).
My Network has the following:
- 3 VLANs: 10, 20, and 30 (plus the default VLAN 1 which I move off of)
- The following networks:
- 10.10.0.0/16 associated with VLAN 10
- 10.20.0.0/16 associated with VLAN 20
- 10.30.0.0/16 associated with VLAN 30
- 10.100.0.0 carved out with /30's for point to point ranges
Note: To reach this network structure from your home network you'll need to add a static route on each PC, or configure your NAT device (your wireless access point or your cable modem) to use a static route. My home wireless access point (WAP) allows static routes, so this was the path of least resistance and also allows the Pi's to get to the internet (to be totally accurate, it allows the return packets to make their way back to the initiating Pi).
I wanted to have a single 10.0.0.0/8 route, but my WAP would only accept /16 routes, so I added the above mentioned four routes 10.10, 10.20, 10.30, 10.100 all /16's with a next hop of 192.168.0.12 (the address of Router 1 that's connected to the unmanaged switch for my home network.)
If you don't need to get to the internet with the Pi's you can add a static route to each PC you need to talk to your lab. This can be done on Windows 10 like this:
- Open an elevated command prompt
- route -p add 10.0.0.0 mask 255.0.0.0 192.168.0.12
- Ping 10.100.0.1 (once Router 1 is configured) to see if you're up any running
Step 6: Get the Needed Software
You'll need some or all of the following software.
These can be installed on the PC you'll be accessing the network devices from:
- PuTTY - The universal standard for Serial, Telnet, and SSH access.
- Tftpd64 - A light weight syslog server and tftp client.
- Wireshark - A nice sniffer for network traffic debuging and analysis, also available for the Pi's.
- SD Formatter 4.0 - A basic formatter for your SD Cards.
- NOOBS - The OS bits for the Raspberry Pi
Step 7: Configure the Network Hardware
Wire all devices as shown in the Design diagram.
From the top:
- Pi01 plugged into Switch2 switchport 3
- Pi02 plugged into Switch2 switchport 9
- Pi03 plugged into Switch2 switchport 18
- Pi04 plugged into Switch1 switchport 18
- Switch2 switchport 17 plugged into Switch1 switchport 17 - crossover cable or crossover adapter required!
- Switch2 switchport 1 plugged into Router3 interface F0/0
- Switch1 switchport 1 plugged into Router2 interface F0/0
- Router3 interface F0/1 plugged into Router2 interface F0/1 - crossover cable or crossover adapter required!
- Router3 interface S0/1/0 plugged into Router1 interface S0/1/0 - use T1 cable
- Router2 interface S0/1/0 plugged into Router1 interface S0/0/0 - use T1 cable
- Router1 interface F0/0 plugged into unmanaged home network switch, any port.
The files associated with this step can configure the routers and switches as depicted in the Design diagram.
In the file anything in the file with ******* must be replaced with a user name, password, or domain name.
Make sure you ping test as you build these out, it's better to find mistakes as you're building each device than to configure all and then start troubleshooting.
Step 8: Setting Up Each Raspberry Pi
Prerequisites:
- Download the software mentioned on the Software step.
- Review the setup video on raspberrypi.org (link)
- Prep the SD Cards
- On a PCformat the SD card using the SD Formatter utility
- Copy all the files from the Noobs download to the SD Card (no imaging utilities, just plain old file copy)
- Repeat for four SD Cards
- Install Noobs on each Raspberry Pi
- Power on all Pi's
- Connect using the KVM to the first Raspberry Pi
- Change the Host Name:
- Open a Terminal window
- sudo raspi-config
- Select "Boot Options"
- Select "Desktop Autologin"
- Advanced Menu
- Change Hostname
- Pick a name, I used "Pi01"
- Select Finish
- Say yes to reboot
- Change the Host Name:
- After reboot, add static IP address:
- Open a Terminal window
- sudo nano /etc/network/interfaces
- Update the eth0 line and the follow lines so it looks like this:
- iface eth0 inet static
- address 10.10.0.10
- netmask 255.255.0.0
- network 10.10.0.0
- broadcast 10.10.255.255
- gateway 10.10.01
- Save the file:
- CRTL+X
- Yes
- Update the DNS server:
- sudo nano /etc/resolv.conf
- replace or add the following lines to signify your DNS server. If you don't have a local DNS server you can use 8.8.4.4 for Google's secondary public DNS server address.
- nameserver
- nameserver 8.8.8.8
- CRTL+X
- Yes
- Reboot the Pi for changes to take effect:
- sudo reboot
- Validate the config:
- From a terminal prompt run "ifconfig" to verify IP address
- Ping local gateway
- Ping 8.8.8.8
- Ping yahoo.com
- If all return a ping you're good to go
- Repeat on remaining Pi's using new host name, IP address, and network settings as appropriate.
sudo apt-get update (Update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. An update should always be performed before an upgrade or dist-upgrade.)
sudo apt-get upgrade (Upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. An update must be performed first so that apt-get knows that new versions of packages are available.)
sudo apt-get install dnsutils (Installs basic DNS tools like NSLookUp)
If you want to install wireshark, a good tutorial can be found at http://donsthinktank.blogspot.com/2015/07/wireshark-raspberry-pi.html
8 Comments
6 years ago
Hi Tracsman,
Your kit is well built, am on my way I have 2 C2811 router, 2 Catalyst 2960 switches and Catalyst 3560G as my L3 switch am hoping to get a C1841 router soon. Regarding grounding the rack can I hook a ground wire from the rack to one of router's chassis as the routers are grounded already will that work? or I have one free socket on my power extension can I use the ground port on that socket and run a ground wire to the rack? Please advise.
Thank you
Barajaa
7 years ago
I like your set-up, but there is one point I would like to clarify: I see none of these switches have been grounded properly or at least not from the dedicated ground screws on the front of the switches. E.g. it's the bottom screw slightly to the left of the power input on your 1841 switches. Is there a practical reason for this omission?
I see no mention of the safety implications of running this set-up with or without grounding. But, from my understanding this is extremely important... As important, if not more important than the network cabling (due to the safety concerns).
Besides the risk to the equipment, it may also put persons at risk if they were to touch any part of your rack when something goes wrong with your power set-up. Perhaps I am over-thinking this or I have overlooked something? I have a similar set-up to yours and this issue gives me chills just thinking about how much I don't know... Maybe someone can recommend some literature that explains this clearly for the layperson.
For what it's worth, I have grounded all my gear to the rack chassis, but I am getting an electrician to take a look over what I have done to give it the final go-ahead. This probably isn't an option for many people, hence my desire for clarification.
Perhaps I am just being overly paranoid?
Reply 7 years ago
This is a great point to bring up, I think it's a personal decision.
Given that I'm dealing with 110v household voltage at less than 15 amps and I've survived the 60Hz shuffle before, I felt, personally, for me, that this isn't an issue.
With everything in life, you need to weigh the risk/cost/benefit. I also have the rack sitting on an Ikea table that is only rated for 55lbs of load, so I've got a high personal risk tolerance. :)
If you do feel that grounding is needed, make sure your rack is also grounded. If you just ground your gear to the rack and the rack is on a wooden table as mine is, the grounding won't do you any good as the rack is isolated. So make sure you ground back to something truly grounded, like your electrical system ground.
So for me I think it's overkill, but there's never anything wrong with being safe.
Reply 7 years ago
Thank-you for your reply!
Never heard the term 60Hz shuffle but if it's what I think it is, I too have danced that dance. I try not to make a habit of it!
I have my rack set up on a carpeted floor over concrete, with a large plastic floor protector (for office chairs) under the wheels to protect the floor, so your point about grounding the rack itself is something I have overlooked... I'll be sure to bring this up when I talk to my electrical guy.
I will endeavour to collect as much info as I can and compile it in a guide here for others in future. Depends how confident I feel once my rack is rebuilt and running smooth.
And because I didn't say it before: thanks for the guide! I did my CCNA exam not too long ago, this guide is detailed enough to have been a real asset, I was cobbling together from many guides at the time. For anyone wanting a nice play-around lab, this is a good bet for sharpening skills.
7 years ago
Very nicely done! Thanks for sharing your setup.
Reply 7 years ago
Thanks, I had a lot of fun building it!
7 years ago
well thought out. make sure you get into eigrp and ospf, abrs blah blah... good luck! you seem to have learned a lot from your online class. kinda looks like you took your network right from a packet tracer lab :p
Reply 7 years ago
I just scratched the surface with this design, I wanted something basic enough to build easy, but hit many of the points from the CCNA (CCENT really at this point) class. Now that I have the base equipment setup, I want to get AAA working and a better syslog server, then dig into more dynamic routing. My goal is to get my foundational knowledge good enough to build up to BGP. I actually work with BGP every day at work, but that's where my networking experience stated, the CCNA work is to fill in all the gaps underneath my current internetworking knowledge to build a solid foundation under it! :)