Tag Archives: amd

BGP Lab 5

Third and last BGP lab for today. This one mainly concerns peer-groups, though there is a bit of as_path access lists thrown in as well. Topology used is over here: http://mellowd.co.uk/ccie/?p=243

BGP Lab 5:

  • Create a peer group in AS950 so you don’t have to do the same configuration for R2, R9 and R8 all the time
  • Ensure R8, R9 and R2 all use R1 as the next hop when leaving the AS
  • Use loopbacks in AS950 for iBGP peerings
  • Create an AS_PATH access list so that AS60 and AS70 don’t use AS950 as transit, however all routers in AS950 should be able to ping all routers

Click on the thumbnail for the full size image

5 150x150 BGP Lab 5

Mad Dynamips/Dynagen Topology 1.1

I noticed a few mistakes in my previous topology. Namely I had no routers with more than 1 connection to each other. This is essential for a number of tests. I’ve re-done the topology now. Look closely at Router’s 7 and 14 – There is a new interface connecting them. This time I’ll upload my IP addressing scheme as well as my config files. You’ll need to customise the settings and idlepc values for yourself.

Once again you’ll need to click the picture for the full picture.

Topology 1.1 small Mad Dynamips/Dynagen Topology 1.1

This is my .net file:

#Topology created by Darren O'Connor
#www.mellowd.co.uk/ccie

[localhost:7200]
workingdir = /data/dynamips/working

[[3745]]
image = /data/dynamips/IOS_Images/3745/c3745-adventerprisek9-mz.124-25b.UNCOMPRESSED.bin
ram = 128
disk0 = 16
disk1 = 0
mmap = true
ghostios = true

###########################
#                         #
# Mad Topology            #
#                         #
###########################

[[Router R1]]
model = 3745
console = 2001
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 1
s1/1 = R6 s1/1
s1/2 = R8 s1/2
s1/3 = R2 s1/3
Fa0/0 = R9 F0/1
cnfg = /data/dynamips/Topology/Topology_Config/R1.cfg

[[Router R2]]
model = 3745
console = 2002
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 2
Fa0/1 = R8 Fa0/0
s1/2 = R9 s1/2
s1/1 = R3 s1/3
Fa0/0 = R10 Fa0/1
cnfg = /data/dynamips/Topology/Topology_Config/R2.cfg

[[Router R3]]
model = 3745
console = 2003
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 3
Fa0/1 = R9 Fa0/0
s1/2 = R10 s1/2
Fa0/0 = R11 Fa0/1
s1/1 = R4 s1/3
cnfg = /data/dynamips/Topology/Topology_Config/R3.cfg

[[Router R4]]
model = 3745
console = 2004
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 4
Fa0/1 = R10 Fa0/0
s1/2 = R11 s1/2
Fa0/0 = R12 Fa0/1
s1/1 = R5 s1/3
cnfg = /data/dynamips/Topology/Topology_Config/R4.cfg

[[Router R5]]
model = 3745
console = 2005
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 5
Fa0/1 = R11 Fa0/0
s1/2 = R12 s1/2
cnfg = /data/dynamips/Topology/Topology_Config/R5.cfg

[[Router R6]]
model = 3745
console = 2006
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/0 = F1 6
s1/2 = R13 s1/2
Fa0/0 = R14 Fa0/1
s1/3 = R7 s1/3
cnfg = /data/dynamips/Topology/Topology_Config/R6.cfg

[[Router R7]]
model = 3745
console = 2007
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
s1/0 = F1 7
Fa0/1 = R13 Fa0/0
s1/2 = R14 s1/2
Fa0/0 = SW2 Fa1/7
fa2/0 = R14 fa2/0
cnfg = /data/dynamips/Topology/Topology_Config/R7.cfg

[[Router R8]]
model = 3745
console = 2008
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
s1/3 = R9 s1/3
Fa2/0 = SW1 Fa1/8
cnfg = /data/dynamips/Topology/Topology_Config/R8.cfg

[[Router R9]]
model = 3745
console = 2009
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
s1/1 = R10 s1/3
Fa2/0 = SW1 Fa1/9
cnfg = /data/dynamips/Topology/Topology_Config/R9.cfg

[[Router R10]]
model = 3745
console = 2010
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
s1/1 = R11 s1/3
Fa2/0 = SW1 Fa1/10
cnfg = /data/dynamips/Topology/Topology_Config/R10.cfg

[[Router R11]]
model = 3745
console = 2011
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
s1/1 = R12 s1/3
Fa2/0 = SW1 Fa1/11
cnfg = /data/dynamips/Topology/Topology_Config/R11.cfg

[[Router R12]]
model = 3745
console = 2012
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
Fa2/0 = SW1 Fa1/12
cnfg = /data/dynamips/Topology/Topology_Config/R12.cfg

[[Router R13]]
model = 3745
console = 2013
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
s1/3 = R14 s1/3
cnfg = /data/dynamips/Topology/Topology_Config/R13.cfg

[[Router R14]]
model = 3745
console = 2014
autostart = false
idlepc = 0x61239894
slot1 = NM-4T
slot2 = NM-1FE-TX
Fa0/0 = SW2 Fa1/14
cnfg = /data/dynamips/Topology/Topology_Config/R14.cfg

[[Router SW1]]
model = 3745
console = 2021
autostart = false
idlepc = 0x61239894
slot1 = NM-16ESW
Fa0/0 = SW2 Fa0/0
cnfg = /data/dynamips/Topology/Topology_Config/SW1.cfg

[[Router SW2]]
model = 3745
console = 2022
autostart = false
idlepc = 0x61239894
slot1 = NM-16ESW
cnfg = /data/dynamips/Topology/Topology_Config/SW2.cfg

[[FRSW F1]]
1:102 = 2:201
1:103 = 3:301
1:104 = 4:401
1:105 = 5:501
1:106 = 6:601
1:107 = 7:701
2:203 = 3:302
2:204 = 4:402
2:205 = 5:502
2:206 = 6:602
2:207 = 7:702
3:304 = 4:403
3:305 = 5:503
3:306 = 6:603
3:307 = 7:703
4:405 = 5:504
4:406 = 6:604
4:407 = 7:704
5:506 = 6:605
5:507 = 7:705
6:607 = 7:706

Here is my .pdf file which contains my IP addressing scheme. You can see that most links are /30 point to point links, but there are a few /24′s as well where more than 2 routers connect in the same broadcast domain. Click here for the topology

Thankfully you won’t have to put this info in every time, as it’s already saved in my configuration files which are auto loaded. Download the configuration files here

Now it’s up to you to create labs based on this topology. I’ve got a number of ideas for BGP as that’s what I’m studying now, so stay tuned!

My mad Dynamips/Dynagen Topology

This has taken me absolutely hours to finally finish. I wanted to create a topology that I’ll be able to run all kind of different labs on. i.e. the topology is extremely complex. I’ve configured all the connections through my .net file as well as saving base configs (hostname and IP addresses) so I don’t have to put these in each time I load up my .net file.

This is the topology itself. You need to click the picture to get the full picture.

Topology small My mad Dynamips/Dynagen Topology

My .net file is pretty much configured like so:

#Topology created by Darren O'Connor
#www.mellowd.co.uk/ccie

[localhost:7200]
workingdir = /data/dynamips/working

[[3745]]
 image = /data/dynamips/IOS_Images/3745/c3745-adventerprisek9-mz.124-25b.UNCOMPRESSED.bin
 ram = 128
 disk0 = 16
 disk1 = 0
 mmap = true
 ghostios = true
###########################
#                         #
# Mad Topology            #
#                         #
###########################

 [[Router R1]]
  model = 3745
  console = 2001
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 1
  s1/1 = R6 s1/1
  s1/2 = R8 s1/2
  s1/3 = R2 s1/3
  Fa0/0 = R9 F0/1
  cnfg = /data/dynamips/Topology/Topology_Config/R1.cfg

[[Router R2]]
  model = 3745
  console = 2002
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 2
  Fa0/1 = R8 Fa0/0
  s1/2 = R9 s1/2
  s1/1 = R3 s1/3
  Fa0/0 = R10 Fa0/1
  cnfg = /data/dynamips/Topology/Topology_Config/R2.cfg

[[Router R3]]
  model = 3745
  console = 2003
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 3
  Fa0/1 = R9 Fa0/0
  s1/2 = R10 s1/2
  Fa0/0 = R11 Fa0/1
  s1/1 = R4 s1/3
  cnfg = /data/dynamips/Topology/Topology_Config/R3.cfg

[[Router R4]]
  model = 3745
  console = 2004
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 4
  Fa0/1 = R10 Fa0/0
  s1/2 = R11 s1/2
  Fa0/0 = R12 Fa0/1
  s1/1 = R5 s1/3
  cnfg = /data/dynamips/Topology/Topology_Config/R4.cfg

[[Router R5]]
  model = 3745
  console = 2005
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 5
  Fa0/1 = R11 Fa0/0
  s1/2 = R12 s1/2
  cnfg = /data/dynamips/Topology/Topology_Config/R5.cfg

[[Router R6]]
  model = 3745
  console = 2006
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 6
  s1/2 = R13 s1/2
  Fa0/0 = R14 Fa0/1
  s1/3 = R7 s1/3
  cnfg = /data/dynamips/Topology/Topology_Config/R6.cfg

[[Router R7]]
  model = 3745
  console = 2007
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/0 = F1 7
  Fa0/1 = R13 Fa0/0
  s1/2 = R14 s1/2
  Fa0/0 = SW2 Fa1/7
  cnfg = /data/dynamips/Topology/Topology_Config/R7.cfg

[[Router R8]]
  model = 3745
  console = 2008
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  slot2 = NM-1FE-TX
  s1/3 = R9 s1/3
  Fa2/0 = SW1 Fa1/8
  cnfg = /data/dynamips/Topology/Topology_Config/R8.cfg

[[Router R9]]
  model = 3745
  console = 2009
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  slot2 = NM-1FE-TX
  s1/1 = R10 s1/3
  Fa2/0 = SW1 Fa1/9
  cnfg = /data/dynamips/Topology/Topology_Config/R9.cfg

[[Router R10]]
  model = 3745
  console = 2010
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  slot2 = NM-1FE-TX
  s1/1 = R11 s1/3
  Fa2/0 = SW1 Fa1/10
  cnfg = /data/dynamips/Topology/Topology_Config/R10.cfg

[[Router R11]]
  model = 3745
  console = 2011
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  slot2 = NM-1FE-TX
  s1/1 = R12 s1/3
  Fa2/0 = SW1 Fa1/11
  cnfg = /data/dynamips/Topology/Topology_Config/R11.cfg

[[Router R12]]
  model = 3745
  console = 2012
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  slot2 = NM-1FE-TX
  Fa2/0 = SW1 Fa1/12
  cnfg = /data/dynamips/Topology/Topology_Config/R12.cfg

[[Router R13]]
  model = 3745
  console = 2013
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  s1/3 = R14 s1/3
  cnfg = /data/dynamips/Topology/Topology_Config/R13.cfg

[[Router R14]]
  model = 3745
  console = 2014
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-4T
  Fa0/0 = SW2 Fa1/14
  cnfg = /data/dynamips/Topology/Topology_Config/R14.cfg

[[Router SW1]]
  model = 3745
  console = 2021
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-16ESW
  Fa0/0 = SW2 Fa0/0
  cnfg = /data/dynamips/Topology/Topology_Config/SW1.cfg

[[Router SW2]]
  model = 3745
  console = 2022
  autostart = false
  idlepc = 0x61239894
  slot1 = NM-16ESW
  cnfg = /data/dynamips/Topology/Topology_Config/SW2.cfg

[[FRSW F1]]
 1:102 = 2:201
 1:103 = 3:301
 1:104 = 4:401
 1:105 = 5:501
 1:106 = 6:601
 1:107 = 7:701
 2:203 = 3:302
 2:204 = 4:402
 2:205 = 5:502
 2:206 = 6:602
 2:207 = 7:702
 3:304 = 4:403
 3:305 = 5:503
 3:306 = 6:603
 3:307 = 7:703
 4:405 = 5:504
 4:406 = 6:604
 4:407 = 7:704
 5:506 = 6:605
 5:507 = 7:705
 6:607 = 7:706

The actual IP config files are separate. If you want them feel free to ask

Getting idlepc values for dynamips/dynagen in Linux

Now tht I’ve got my basic configuration up, we now need to set idlepc values for dynamips. If you load up even just 1 router without doing this, you’ll end up with 100% CPU usage. As an added bonus I’ve measured power draw from the wall just to see exactly how much power this set up pulls.

At idle my server pulls exactly 75watts.

I’ve now loaded up dynamips/dynagen with 20 router instances with NO idlepc values set and this is the result:

$top
Tasks: 109 total,   2 running, 106 sleeping,   1 stopped,   0 zombie
Cpu(s): 99.8%us,  0.2%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3996956k total,  3014956k used,   982000k free,     5576k buffers
Swap:  7960168k total,        0k used,  7960168k free,  1563492k cached

As you can see I’m sitting on 99.8% CPU usage. These are the routers running:

=> list
Name       Type       State      Server          Console   
R1         3745       running    localhost:7200  2001      
R2         3745       running    localhost:7200  2002      
R3         3745       running    localhost:7200  2003      
R4         3745       running    localhost:7200  2004      
R5         3745       running    localhost:7200  2005      
R6         3745       running    localhost:7200  2006      
R7         3745       running    localhost:7200  2007      
R8         3745       running    localhost:7200  2008      
R9         3745       running    localhost:7200  2009      
R10        3745       running    localhost:7200  2010      
R11        3745       running    localhost:7200  2011      
R12        3745       running    localhost:7200  2012      
R13        3745       running    localhost:7200  2013      
R14        3745       running    localhost:7200  2014      
R15        3745       running    localhost:7200  2015      
R16        3745       running    localhost:7200  2016      
R17        3745       running    localhost:7200  2017      
R18        3745       running    localhost:7200  2018      
R19        3745       running    localhost:7200  2019      
R20        3745       running    localhost:7200  2020

I’m now pulling a total of 160watts from the wall.

In order to get my idlepc value I do this:

=> idlepc get R2
Please wait while gathering statistics...

Please wait while gathering statistics...
Done. Suggested idling PC:
   0x61239894 (count=55)
   0x604ebf00 (count=31)
   0x60aacff8 (count=41)
   0x60aad000 (count=23)
   0x6123552c (count=72)
   0x6123558c (count=65)
   0x612355d4 (count=22)
   0x60aa6490 (count=34)
   0x60aa64c0 (count=29)
   0x60aa6694 (count=33)
Restart the emulator with "--idle-pc=0x61239894" (for example)
*  1: 0x61239894 [55]
   2: 0x604ebf00 [31]
   3: 0x60aacff8 [41]
   4: 0x60aad000 [23]
   5: 0x6123552c [72]
   6: 0x6123558c [65]
   7: 0x612355d4 [22]
   8: 0x60aa6490 [34]
   9: 0x60aa64c0 [29]
  10: 0x60aa6694 [33]
Potentially better idlepc values marked with "*"
Enter the number of the idlepc value to apply [1-10] or ENTER for no change: 1
Applied idlepc value 0x61239894 to R2

I’ve now applied an idlepc value to R2, but I need this replicated across all routers. This isn’t a problem as all my routers are the same type. All I need to do is this:

=> idlepc copy R2 /all
R4: idlepc set to 0x61239894
R5: idlepc set to 0x61239894
R6: idlepc set to 0x61239894
R7: idlepc set to 0x61239894
R12: idlepc set to 0x61239894
R1: idlepc set to 0x61239894
R3: idlepc set to 0x61239894
R20: idlepc set to 0x61239894
R11: idlepc set to 0x61239894
R8: idlepc set to 0x61239894
R9: idlepc set to 0x61239894
R18: idlepc set to 0x61239894
R10: idlepc set to 0x61239894
R15: idlepc set to 0x61239894
R14: idlepc set to 0x61239894
R17: idlepc set to 0x61239894
R16: idlepc set to 0x61239894
R19: idlepc set to 0x61239894
R13: idlepc set to 0x61239894

You can do this for every router type. In other words, if I had 2 different router types, I’d have to do these commands for each type and then copy the values.

My CPU usage has now jumped down, while still running 20 routers:

Tasks: 109 total,   2 running, 106 sleeping,   1 stopped,   0 zombie
Cpu(s): 64.8%us,  0.0%sy,  0.0%ni, 35.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3996956k total,  3053568k used,   943388k free,     7524k buffers
Swap:  7960168k total,        0k used,  7960168k free,  1591900k cached

Power draw at the wall has jumped down to 94Watts. Quite a big saving on juice!

In order to save yourself from having to do this each time, you can just save the idlepc values in your .net file. This means that when you load up your routers, it’ll apply the idlepc value straight away. Do it like so in your .net file:

 [[Router R1]]
  model = 3745
  console = 2001
  autostart = false
  idlepc = 0x61239894

[[Router R2]]
  model = 3745
  console = 2002
  autostart = false
  idlepc = 0x61239894

Note. Do NOT use my values. See what works for you. Use a few different ones and see what happens. Once I’ve actually got protocols running in my lab I’m sure I’ll need to change these values, so please do this for yourself as well.

Case and RAM arrived

So now the case and 4GB ram I ordered has arrived. It’s pretty late now and I’m off tomorrow so I’ll be building this box tomorrow. I’ve got to say, these RAM chips are the shortest I’ve seen yet excluding SODIMM’s. I almost thought I had the wrong type.

Tomorrow I’ll put it together and install CentOS 5.3 I then have the fun of trying to get this wireless card working and then dynamips and dynagen installed and working.

I’ll also spend a bit of time configuring dynamips to run over all 4 CPU’s. I wonder how it’ll all run.

I’ll update this post as well with a few pictures tomorrow

*tomorrow*

I didn’t want to create a new post just for this. I’ve put it al together and thought I had a spare video card lying around. Turns out I don’t. I just need it so I can install linux, it’ll come out straight after. I’ve ordered an old ati x300 on ebay, let’s hope it gets here quick!