Bridging the gap between CCIE RS and SP

May 7, 2009

Dynamips to real switches with QinQ support

Filed under: CCIE, CCIE SP, dynagen, dynamips — Tags: , , — 21500 @ 3:41 pm

There is an unbelievable amount of junk on the net that can send one in all the wrong directions. When it comes to dynamips it is no different and it seems everyone has a different opinion on what works and what does not. It probably depends on the OS dynamips runs on and the alignment of the moon and the stars. For me the best solution thus far was to run Dynamips on Ubuntu Linux server edition. The reasons for this is due to the 100Mb memory Ubuntu server consumes to run the OS as well as the stability and responsiveness of Dynamips on linux. It has worked well.

To break out to real switches I started with the multiple USB adapter approach. Basically you map each USB to Ethernet adapter to a router ethernet port in the dynagen net file. Sounds simple, and while it is, the USB approach for me turned out to be unreliable. It would work, then it would not. This plus the hassle with using USB adapters from different vendors and drivers just becomes messy.

After more research I tried the “switch in the middle” method. This is by far the easiest, quickest, cleanest and most reliable route:

Overview:
So you are probably already using dynamips to run the routers. To break out the first thing is to create a trunk between your linux server and a breakout switch. Then create a bunch of vlans on the linux server. One for every port that will connect to real switches e.g. if R2 needs to connect to the real switches with Fa0/0 and Fa0/1, create two vlans for this router. In the dynagen net file map each ethernet port to the vlan ’sub interfaces’ which were created when the vlans were created. Create the same vlans on the breakout switch that were created on the server. Assign each access port that will link to the real switches into a different vlan. Each access port on the breakout switch now represents a router port e.g. fa0/6 in vlan 106 on the breakout switch represents router R6 fa0/0 interface which connects to Sw2 fa0/6.

Requirements:
1) A second network card
2) The vconfig utility.

apt-get install vlan

3) Kernel that will support Dot1q

modprobe 8021q

4) A breakout switch. Try to stick with a Cisco switch.
5) If you want to support QinQ / dot1q-tunnel, the breakout switch needs to support QinQ tunneling

Steps:
1) Create a trunk between your linux server and another switch that will become the switch in the middle or breakout switch.
2) Create the required vlans on the server. Or use the following script to do steps 1 and 2.

#!/bin/bash
#############
# vlansetup.sh
# http://21500.net
#############

#### Enable Dot1q support
modprobe 8021q

#### Set the ethernet MTU
ifconfig eth1 mtu 1536

#### Create the Vlans
vconfig add eth1 101
vconfig add eth1 102
vconfig add eth1 103
vconfig add eth1 104
vconfig add eth1 105
vconfig add eth1 106
vconfig add eth1 107
vconfig add eth1 108
vconfig add eth1 109
vconfig add eth1 110
vconfig add eth1 111
vconfig add eth1 112
vconfig add eth1 113
vconfig add eth1 114
vconfig add eth1 115
vconfig add eth1 116
vconfig add eth1 117
vconfig add eth1 118
vconfig add eth1 119
vconfig add eth1 120
vconfig add eth1 121
vconfig add eth1 122
vconfig add eth1 123

#### Bounce the interface
ifconfig eth1 down
ifconfig eth1 up

3) Configure the trunk on the breakout switch

interface fastethernet 0/24
switchport trunk encapsulation dot1q
switchport mode trunk

4) Assign the Access ports their vlans

!
interface fastethernet 0/1
switchport access vlan 101
switchport mode access
!
interface fastethernet 0/2
switchport access vlan 102
switchport mode access
!
interface fastethernet 0/3
switchport access vlan 103
switchport mode access
!
interface fastethernet 0/4
switchport access vlan 104
switchport mode access
! …
! …
! …
interface fastethernet 0/23
switchport access vlan 123
switchport mode access
!

5) If you want to support QinQ and CDP between the virtual routers and the real switchs, your breakout switch needs to support QinQ. Enable a dot1q tunnel on each interface.

interface range fastethernet 0/1 – 23
switchport mode dot1q-tunnel
l2protocol-tunnel cdp

6) Map the ports in the dynagen .net file

[[ROUTER R1]]
f0/0 = NIO_linux_eth:eth1.101
f0/1 = NIO_linux_eth:eth1.103
[[ROUTER R2]]
f1/0 = NIO_linux_eth:eth1.102

7) Connect the switches to the breakout switch with crossover cables. In this example Port fa0/1 on the breakout switch represents Fa0/0 on R1 and connects to Sw1 Fa0/1.

R1 Fa0/0 -> BSw Fa0/1 -> SW1 Fa0/1
R2 Fa1/0 -> BSw Fa0/2 -> SW1 Fa0/2
R1 Fa0/1 -> BSw Fa0/3 -> SW2 Fa0/1

Once I got this working I found that someone already did the hard work. Wish I saw this much earlier. The only difference between the two methods is that I used one breakout switch while MrPaul’s method uses the Dynamips switches and the breakout switch.

HOWTO Connect Real Switches Using One NIC & QinQ

This is the image MrPaul made:

Breakout Switch

January 26, 2009

Dynamips vs Rack Rental vs Home lab

Filed under: CCIE, CCIE SP, dynagen, dynamips — Tags: , — 21500 @ 7:15 pm

When I set up my initial rack for RS with real switches and routers, I spent over 40 hours cabling, rack mounting and installing IOS’s on the devices. Configuring remote access and troubleshooting the odd anomaly took a few more hours. This might not sound like much but in real terms this took me a whole month. While the home rack is the ultimate tool to use for ccie lab prep it does take up time setting up. My main motivation for going for the live rack was my lack of faith in the other options. The fact that the live rack is always available is what makes the home/live rack the ultimate choice. If you have a $10000 budget for lab equipment, this is the option. Even if you sell at a 10% loss, it is still a good deal.

Personally I think rack rental is the fastest and easiest way to prepare for the lab. Obviously if you use many hours on the rack it can become an expensive exercise. 600 hours on rack rental could set you back as much as $3000. The pros of using rack rental is that your setup time is almost zero and if you run into any hardware issues, it is not your problem. The cons are that you can not use it when you want to and have to use it when dont want to.

Dynamips on the other hand, is flexible like a home rack. The major drawback, is that it takes many hours to get the hang of. To give an example, I burnt two days setting up the Ipexpert SP topologies. If you have very limited time to prepare for the lab and have not worked extensively with dynamips, I would say give it a pass. Not that this option should not be explored, it is definitely a fantastic tool, but it does have its cons. If you have ample time to first learn the app and maybe an operating system then it is a winner.

Some comments from a ccie candidate starting to prepare for his lab date due in less than three months time:

Jay says (11:49 AM):
battling with this frame relay switch grrr
Antonie – Work says (11:55 AM):
hehe, the dynamips built in frame switch?

Jay says (11:56 AM):
yes

Almost three hours later

Jay says (02:39 PM):
ok i got dynagen going but I have 2 questsions!
Antonie – Work says (02:39 PM):
shoot, will try to help if i can

Jay says (02:39 PM):
first..i watched the IE vid on it..and they use the extracted IOS but i cant seem to get the extracted version to work only the IOS in its downloaded form boots
Jay says (02:40 PM):
i tried two diff IOS’s same thing
Antonie – Work says (02:41 PM):
i’ve used winrar and on linux unzip
Antonie – Work says (02:41 PM):
ok, so it takes long to boot :)

Jay says (02:42 PM):
I guess that cant be help ;/
Antonie – Work says (02:48 PM):
are u running MS or linux?

Jay says (02:49 PM):
this is on ms at the mo..should be getting another copy of linux on the weekend to try give that an install
Jay says (02:50 PM):
hope it wont take to long to get used to it
Jay says (03:42 PM):
such a nightmare of a program .downloaded IOS from cisco they dont want to load zipped or unzipped..can only seem to get one ios to work..and for some reason when i have a terminal window open i cant type in dynagen so I cant calculate the idle pc…about to throw my pc against the wall lol
Antonie – Work says (03:44 PM):
lol

Jay says (03:50 PM):
its tough so many issues spend more time on the trouble shooting forums then anything today

December 24, 2008

Excellent free Service Provider resource

Filed under: CCIE SP — Tags: , , , , — 21500 @ 3:13 pm

While Antonio Soares’s site is not quite a blog, I added it to the blogroll anyway. The majority of the free resources are under the Mini-scenario section. This is practically a base to fire technology focused labs from. I plan to use these for SP lab prep. The configs are included in the form of the nvram files. The other valuable resource is the virtual-rack.

Update  28/12/08: Forgot about the videos. Another great free resource.

Since it is Christmas and in the spirit of giving, I opened up my dynamips box running Antonio’s virtual-rack. So if you are unfamiliar to dynamips or you are in the early stages of SP lab prep, this might be of use.

The details are as follow:

R1: telnet://vrack.homeip.net:2001
R2: telnet://vrack.homeip.net:2002
R3: telnet://vrack.homeip.net:2003
R4: telnet://vrack.homeip.net:2004
R5: telnet://vrack.homeip.net:2005
R6: telnet://vrack.homeip.net:2006
R7: telnet://vrack.homeip.net:2007
R8: telnet://vrack.homeip.net:2008

SW1: telnet://vrack.homeip.net:2009
SW2: telnet://vrack.homeip.net:2010

BB1: telnet://vrack.homeip.net:2011
BB2: telnet://vrack.homeip.net:2012
BB3: telnet://vrack.homeip.net:2013

Username: giving
Password: giving

For most people clicking on the link should open the session with your default telnet application. Of course only one person can use it at a time, but im working on it. Watch this space.

Topology Diagram:

Click to go to original

Powered by WordPress