Technical Posts
- BGP AS-Path Prepending
- BGP Attrib Categories
- BGP Best Path Selection
- BGP Confederation
- BGP eBGP Multihop
- BGP Local Preference
- BGP Local-AS
- BGP Maximum-Prefix
- BGP MED
- BGP Regular Expressions
- BGP Remove-Private-AS
- BGP Synchronization
- BGP Weight Attribute
- Broadcast/Network Ping
- Cisco Router as a DNS server
- Command Multiple Filtering
- Comparing Config Differences
- Dynamips as Internet Router
- Firewall Security-Level
- Fun with TCL
- HSRP Route Tracking
- HSRP with IP SLA
- IGMP Version 1
- IGMP Version 2
- IPSEC VPN Configuration
- MPLS Basics
- MPLS VPN VRF Source Selection
- Multicast MiniLab Prep
- NAT Stateful Failover
- Network Statement Shortcut
- Qos: Classification/Marking
- TCL Ping Script
- Using Aliases
- Using Parser View
- VRF and VRF-lite
- VRF Basics
- VRF Route Target
Categories
- BGP (17)
- CCDA (1)
- CCIE (4)
- CCIP (15)
- CCNP (4)
- CCSP (2)
- Certifications (5)
- Cheat Sheet (1)
- CLI (7)
- Core Topic (1)
- Dynamips (1)
- Firewall (1)
- How To (1)
- HSRP (2)
- ICMP (1)
- IGMP (2)
- IOS (3)
- IPSEC (1)
- Juniper (2)
- Lab Challenge (2)
- Management (9)
- Misc (1)
- MPLS (5)
- Multicast (4)
- My Thoughts (21)
- NAT (2)
- Notes (1)
- OSPF (1)
- PIX/ASA (1)
- PPPoE (1)
- QoS (1)
- Question of the Day (20)
- Routing (20)
- Security (1)
- Study Tips (2)
- TCL (3)
- Troubleshooting (1)
- Video Blog (1)
- VPN (2)
- VRF (4)
- WAN (3)
- Written (1)
Study References
Video Blogs
I am quite busy with my studies now that I don't have time to blog. I am thinking of using Camtasia and instead do a Video blog, saves a lot of time and the explanation will be real time. I want to get active in posting again as the visits in this site seems to be increasing.
Let me know if this is a good idea. Thanks!
Let me know if this is a good idea. Thanks!
Wednesday, June 15, 2011 | Filed Under CCIE, Video Blog | 6 Comments
Using TCL to Prepare Configuration
If you have worked as a network engineer for an enterprise or even a telco, you would notice that the best practice to have a standard configuration template. Sometimes, you are stuck in a situation wherein you need to prepare configuration let's say for around 20 routers and time is not on your side. My approach for this when I was starting my networking career was to get that standard template and start filing up the necessary configuration in notepad for the 20 routers and save one file after another. Believe me it was not an easy task and it was prone to having typo's.
It is for sure a tedious task but using TCL, it will pretty much make your life easier. I have researched for a way to automate the config preparation provided you have all the necessary data required. I am not a programmer but somehow I managed to find some TCL software and commands to make this possible. Before we begin we would need to have TCLKIT which can be downloaded here.
Now for this example, let us only try to create configs for 10 routers. Our standard config is as shown below. (not so long so make things easier)
The first step is to create our variables, quite much work required for this especially for long standard configs. We will create variables for those with () in the standard config above. These are the parts in the configuration wherein the data will be placed. Standard configuration with variables shown below.
Now we have created our variables. Let us use the multivariable "foreach" TCL command to create a looping script. We put in our variables next to the "foreach" statement. The "$" is not required. If you are not familiar with this, please visit this post.
The next line of this script will now contain the data. Prepare the data in excel spreadsheet and the sequence of the columns should be the same as the one listed in the "foreach" statement. Then add that to the second line of the script. Put an open { before the data and } after the data.
Add also the important commands below that will make auto text file generation for each config file. The final script will look like something below. Then save this as a text file.
Now its time to auto generate the configs. What this looping script does is take the first line on the data, do the variable substitution and then at the end it will save the text file with the hostname as the filename. It does this until the last line of the data. The files will be auto generated where the TCLKIT software is saved.

Open TCLKIT, two windows will appear big and small. Click on File -> Source ->Go to the directory where you saved the script as text file -> Change "Files of Type to "All Files" -> Select the Script. Then viola, your configurations appear and all variables substituted. It makes life easier for a network engineer.

It is for sure a tedious task but using TCL, it will pretty much make your life easier. I have researched for a way to automate the config preparation provided you have all the necessary data required. I am not a programmer but somehow I managed to find some TCL software and commands to make this possible. Before we begin we would need to have TCLKIT which can be downloaded here.
Now for this example, let us only try to create configs for 10 routers. Our standard config is as shown below. (not so long so make things easier)
hostname (hostname)
!
interface Serial1/1
ip address (ip address)(mask)
!
router ospf 1
network(network) (wildcard) area (ospf area)
The first step is to create our variables, quite much work required for this especially for long standard configs. We will create variables for those with () in the standard config above. These are the parts in the configuration wherein the data will be placed. Standard configuration with variables shown below.
hostname $hostname
!
interface Serial1/1
ip address $ipaddress $ipmask
!
router ospf 1
network $network $wildcard area $ospfarea
Now we have created our variables. Let us use the multivariable "foreach" TCL command to create a looping script. We put in our variables next to the "foreach" statement. The "$" is not required. If you are not familiar with this, please visit this post.
foreach {hostname ipaddress ipmask network wildcard ospfarea}
The next line of this script will now contain the data. Prepare the data in excel spreadsheet and the sequence of the columns should be the same as the one listed in the "foreach" statement. Then add that to the second line of the script. Put an open { before the data and } after the data.
Add also the important commands below that will make auto text file generation for each config file. The final script will look like something below. Then save this as a text file.
foreach {hostname ipaddress ipmask network wildcard ospfarea} {
Router1 1.1.1.1 255.255.255.0 1.1.1.1 0.0.0.0 1
Router2 1.1.1.2 255.255.255.0 1.1.1.2 0.0.0.0 2
Router3 1.1.1.3 255.255.255.0 1.1.1.3 0.0.0.0 3
Router4 1.1.1.4 255.255.255.0 1.1.1.4 0.0.0.0 4
Router5 1.1.1.5 255.255.255.0 1.1.1.5 0.0.0.0 5
Router6 1.1.1.6 255.255.255.0 1.1.1.6 0.0.0.0 6
Router7 1.1.1.7 255.255.255.0 1.1.1.7 0.0.0.0 7
Router8 1.1.1.8 255.255.255.0 1.1.1.8 0.0.0.0 8
Router9 1.1.1.9 255.255.255.0 1.1.1.9 0.0.0.0 9
Router10 1.1.1.10 255.255.255.0 1.1.1.10 0.0.0.0 10
} {set data "
hostname $hostname
!
interface Serial1/1
ip address $ipaddress $ipmask
!
router ospf 1
network $network $wildcard area $ospfarea
"
set filename "${hostname}.txt"
set fileId [open $filename "w"]
puts -nonewline $fileId $data
close $fileId
}
Now its time to auto generate the configs. What this looping script does is take the first line on the data, do the variable substitution and then at the end it will save the text file with the hostname as the filename. It does this until the last line of the data. The files will be auto generated where the TCLKIT software is saved.
Open TCLKIT, two windows will appear big and small. Click on File -> Source ->Go to the directory where you saved the script as text file -> Change "Files of Type to "All Files" -> Select the Script. Then viola, your configurations appear and all variables substituted. It makes life easier for a network engineer.
Tuesday, January 11, 2011 | Filed Under TCL | 7 Comments
Merry Christmas and a Happy New Year to All
It's been a while since I touched any materials and listened to Scott Morris' Audio bootcamp. My current job really demands a lot of my time. After 3 months of inactivity I promised myself that I will bounce back. I only have 11 months left to take the lab so I'll be studying full force when the new year arrives.
Anyways have a Merry Christmas and Happy New Year to be everybody. Let us overcome any hindrances that tries to stop us from getting our dreams fulfilled. Expect new posts coming when the new year comes. Enjoy!
Anyways have a Merry Christmas and Happy New Year to be everybody. Let us overcome any hindrances that tries to stop us from getting our dreams fulfilled. Expect new posts coming when the new year comes. Enjoy!
Monday, December 27, 2010 | Filed Under My Thoughts | 0 Comments
It's Been A While
Again, its been a while since I posted something here. I miss the technical stuff I was doing and I could say I was 70% ready for the CCIE exam now I am back to mere 1%. I have a lot more things to share and once again I'll try to find time. Whatever happens my dream to be a CCIE still stands. Hope to hear good news from guys reading my posts.
Thursday, October 21, 2010 | Filed Under My Thoughts | 2 Comments
New Job
It's just today that I have posted something here and the reason behind this is that I am moving to Singapore for a new job on first week of September. I have been very busy with employment passes and other things required for the transfer. My new job involves lesser technical job than what I did in Hewlett Packard but its around 50/50 similar to my current job in a bank. 50 percent for technical and 50 percent for network project management. Even though I lost the other half to project management :), its still related as I will be handling network projects specifically MPLS migrations. Will my pursuit for CCIE still continue? The answer is yes. I love the technical stuff and its still useful with my current job position. My studies for now is in a standstill though I have finished all the topics I need a round or two to go through again all of them.
I will be posting here topics from time to time since there are people who requested from me. I never thought there are people interested with my blog. :) I have created a Facebook page for those who view my blog entries and those who like to be my friends. Please join/like I WANT TO BE A CCIE in Facebook. See you there and keep in touch.
I will be posting here topics from time to time since there are people who requested from me. I never thought there are people interested with my blog. :) I have created a Facebook page for those who view my blog entries and those who like to be my friends. Please join/like I WANT TO BE A CCIE in Facebook. See you there and keep in touch.
Thursday, August 26, 2010 | Filed Under My Thoughts | 5 Comments
Answer: Reload Router By Telnet
Configure a default route from R1 pointing to R2's ip address. The challenge is to reboot R1
from a telnet command from R3 without typing the command "reload". R3 should not telnet
directly to 12.12.12.1 but instead it should telnet 23.23.23.2 port 3000 to get to 12.12.12.1
port 3005. R1 should automatically ask to proceed to reboot and not ask for username/password
once the telnet from R3 is executed.
Solution is pretty simple. First we need to configure NATing on R2 to translate 23.23.23.2 port 3000 to 12.12.12.1 port 3005.
R2#
!
ip nat inside source static tcp 12.12.12.1 3005 23.23.23.2 3000 extendable
!
interface Serial1/3
ip nat outside
interface Serial1/1
ip nat insideLets also configure telnet password in R2 for testing.
line vty 0 4
password cisco
loginNow we have solved the first problem. There are 3 issues left on R1, how to make telnet not ask for a password, how to use port 3005 for telnet and how to make the reload automatic. Here's how the configuration should look like.
R1#
!
line vty 0 4
privilege level 15
no login
rotary 5
autocommand reloadSetting the vty to "privilege level 15" and configuring "no login" by passes user authentication. By default if there is no password set the device will refuse connections. "Rotary 5" command lets you use port 2005, 3005, 4005 and so on for telnet. The "autocommand" feature executes whatever command after the telnet.
Let's test first telneting to 23.23.23.2 using default telnet port.
R3#telnet 23.23.23.2
Trying 23.23.23.2 ... Open
User Access Verification
Password:
R2>
We see it doesn't go to R1 but to R2 instead. Now to test using port 3000.
R3#telnet 23.23.23.2 3000
Trying 23.23.23.2, 3000 ... Open
System configuration has been modified. Save? [yes/no]:
Debug on R1
R1#debug ip packet
*Aug 26 15:47:43.299: IP: tableid=0, s=23.23.23.3 (Serial1/2), d=12.12.12.1 (Serial1/2), routed via RIB
*Aug 26 15:47:43.299: IP: s=23.23.23.3 (Serial1/2), d=12.12.12.1 (Serial1/2), len 44, rcvd 3
*Aug 26 15:47:43.307: IP: tableid=0, s=12.12.12.1 (local), d=23.23.23.3 (Serial1/2), routed via FIB
*Aug 26 15:47:43.307: IP: s=12.12.12.1 (local), d=23.23.23.3 (Serial1/2), len 44, sending
The debug clearly shows that the telnet came from R3. The telnet due to NAT redirected the traffic towards 12.12.12.1. Some people call this NAT redirection. Obviously this is not a practical way to reload routers but this is just for fun and to demonstrate how can be used to redirect traffic. I haven't seen any enterprise using this way to reload and will not see in the future. LOLS!
Thursday, August 26, 2010 | Filed Under Lab Challenge, NAT | 1 Comments
Lab Challenge: Reload Router By Telnet
Here's a little challenge, I thought of this during my train trip when I was going home this evening. This should be pretty easy. Consider the diagram below and the scenario.

I believe this should be pretty easy for everyone. Let me know your thoughts on how to solve this challenge. I will post a blog entry regarding this for the next post. For now I need to get back to the belly of the IOS beast. Cheers!

Configure a default route from R1 pointing to R2's ip address. The challenge is to reboot R1
from a telnet command from R3 without typing the command "reload". R3 should not telnet
directly to 12.12.12.1 but instead it should telnet 23.23.23.2 port 3000 to get to 12.12.12.1
port 3005. R1 should automatically ask to proceed to reboot and not ask for username/password
once the telnet from R3 is executed.
I believe this should be pretty easy for everyone. Let me know your thoughts on how to solve this challenge. I will post a blog entry regarding this for the next post. For now I need to get back to the belly of the IOS beast. Cheers!
Wednesday, June 02, 2010 | Filed Under Lab Challenge | 5 Comments
Broadcast/Network Ping
If there is a need to ping several devices in one same subnet and broadcast domain, you can do several commands or ping like the one below.
You can also do a single ping command to check if all links in the routers are up or not. You can the following below. This works on all kinds of WAN interfaces connected to the router.
This command can be helpful during the CCIE lab exam to verify if interfaces are working. I assume that all who read this already knew this from their CCNA studies but I guess there are exceptions. Even the smartest Cisco Engineers forget basic commands sometimes. Let me know if you are one of those who didn't know this one.
R1#ping 10.1.1.255
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.255, timeout is 2 seconds:
Reply to request 0 from 10.1.1.2, 80 ms
Reply to request 0 from 10.1.1.3, 80 ms
Reply to request 0 from 10.1.1.4, 80 ms
Reply to request 1 from 10.1.1.4, 52 ms
Reply to request 1 from 10.1.1.2, 52 ms
Reply to request 1 from 10.1.1.3, 52 ms
Reply to request 2 from 10.1.1.3, 84 ms
Reply to request 2 from 10.1.1.4, 84 ms
Reply to request 2 from 10.1.1.2, 84 ms
Reply to request 3 from 10.1.1.2, 20 ms
Reply to request 3 from 10.1.1.4, 20 ms
Reply to request 3 from 10.1.1.3, 20 ms
Reply to request 4 from 10.1.1.3, 16 ms
Reply to request 4 from 10.1.1.4, 16 ms
Reply to request 4 from 10.1.1.2, 16 ms
You can also use the Network Address.
R1#ping 10.1.1.0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.0, timeout is 2 seconds:
Reply to request 0 from 10.1.1.4, 84 ms
Reply to request 0 from 10.1.1.2, 112 ms
Reply to request 0 from 10.1.1.3, 84 ms
Reply to request 1 from 10.1.1.2, 72 ms
Reply to request 1 from 10.1.1.3, 72 ms
Reply to request 1 from 10.1.1.4, 72 ms
Reply to request 2 from 10.1.1.4, 68 ms
Reply to request 2 from 10.1.1.2, 68 ms
Reply to request 2 from 10.1.1.3, 68 ms
Reply to request 3 from 10.1.1.3, 64 ms
Reply to request 3 from 10.1.1.4, 64 ms
Reply to request 3 from 10.1.1.2, 64 ms
Reply to request 4 from 10.1.1.4, 72 ms
Reply to request 4 from 10.1.1.3, 72 ms
Reply to request 4 from 10.1.1.2, 72 ms
You can also do a single ping command to check if all links in the routers are up or not. You can the following below. This works on all kinds of WAN interfaces connected to the router.
R1#ping 255.255.255.255 rep 1
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 255.255.255.255, timeout is 2 seconds:
Reply to request 0 from 15.15.15.5, 16 ms
Reply to request 0 from 10.1.1.4, 16 ms
Reply to request 0 from 10.1.1.3, 16 ms
Reply to request 0 from 10.1.1.2, 16 ms
This command can be helpful during the CCIE lab exam to verify if interfaces are working. I assume that all who read this already knew this from their CCNA studies but I guess there are exceptions. Even the smartest Cisco Engineers forget basic commands sometimes. Let me know if you are one of those who didn't know this one.
Saturday, May 29, 2010 | Filed Under ICMP | 8 Comments
Free Troubleshooting Lab
If you want to check out Narbik's troubleshooting workbook and want to get an idea of it, you can visit Dan's blog. This contains around 12 trouble tickets and 1 full TS lab challenge consisting of 10 trouble tickets. Good news is that these are Dynamips ready for those who don't have a real home labs.
If I am not mistaken, Dan is Narbik's partner in creating the Micronics Troubleshooting Workbooks. You can also find a free Narbik troubleshooting workbook in this link. Go check it out and have some fun!
If I am not mistaken, Dan is Narbik's partner in creating the Micronics Troubleshooting Workbooks. You can also find a free Narbik troubleshooting workbook in this link. Go check it out and have some fun!
Saturday, May 29, 2010 | Filed Under My Thoughts, Troubleshooting | 0 Comments
Flag Counter
I have added a flag counter. I haven't realize I need to track from which countries readers are coming from. It's only after I got 25,000 visits based on the counter below the blog, I realized this. Thanks for the people who are visiting this blog.
If you have any topics you wish to request, please do. Despite of my busy schedules for work and study, I'll find time to blog the request.
If you have any topics you wish to request, please do. Despite of my busy schedules for work and study, I'll find time to blog the request.
Saturday, May 29, 2010 | Filed Under My Thoughts | 0 Comments
The Dreamer
- Pete
- A fun loving person who aspires to become CCIE someday, enjoys learning new things. Currently working as a Network Engineer supporting the global network of a Fortune 500 company. This blog serves as my notes for the labs I created for my CCIE journey. I can guarantee there are errors in my posts. If you spot them, please let me know.
Join my Facebook Page I WANT TO BE A CCIE
Donate to the Cause
My aim is to create materials for free and possibly a free lab. If you wish to help out, please send any amount. Thanks.
Posts Storage
- June 2011 (1)
- January 2011 (1)
- December 2010 (1)
- October 2010 (1)
- August 2010 (2)
- June 2010 (1)
- May 2010 (6)
- February 2010 (1)
- January 2010 (2)
- December 2009 (1)
- November 2009 (2)
- October 2009 (8)
- September 2009 (5)
- August 2009 (10)
- July 2009 (28)
- June 2009 (1)
- May 2009 (5)
- April 2009 (1)
- March 2009 (1)
- February 2009 (5)
- January 2009 (1)
Blogs that I Read
-
Temporary Post Used For Theme Detection (cb22f33b-95df-4e03-93ea-b5609affc379 – 3bfe001a-32de-4114-a6b4-4005b770f6d7) - This is a temporary post that was not deleted. Please delete this manually. (41e9034a-2397-4f5f-912c-0023b94e8339 – 3bfe001a-32de-4114-a6b4-4005b770f6d7)1 month ago
-
Tutorial: Shape Average Vs. Shape Peak - CB-Shaping can be done in two different ways: Shape average and Shape Peak. Shape average limits the transmission rate to CIR, whereas, with Shape peak the...1 year ago
-
IPexpert Updates - Hey everyone! The past few months have really been pretty hectic around here at IPexpert. Most of our products are nearing completion and are shipping out...3 years ago
-
You have to make the right balance between the convergence time and MTU - Lately i'm getting the impression that Cisco is getting new products out without the proper internal testing. I'm going to talk about two recent examples, A...6 months ago
-
Internetwork Expert Volume IV (Troubleshooting) Workbook Review: Part 3 - Once you get the initial configurations loaded you’re ready to begin the lab. This is when the “fun” begins. Those of us who are used to starting labs wi...3 years ago
-
-
Hiatus. Respite. Sabbatical. - Not that I’ve been blogging here much anyway, but I’m taking a break from any sort of technical blogging for a while. My only active blog right now is Los...3 years ago
-
When Tech Meets Business - "I have had the pleasure of having Himawan as part of my team for a total of 3 years, first two years in the Carrier Ethernet practice as an NCE, and lat...1 week ago
-
INE’s Cisco Live 2013 Party at the Hard Rock Cafe - I would like to thank the over 600 people who RSVP’d for INE’s 2013 Party at the Hard Rock Cafe in Orlando during Cisco Live. Registration is closed as of ...3 days ago
-
Multi-Vendor OpenFlow – Myth or Reality? - NEC demonstrated multi-vendor OpenFlow network @ Interop Las Vegas, linking physical switches from Arista, Brocade, Centec, Dell, Extreme, Intel and NEC,...18 hours ago
-
-
Rebuilding Computers: HWInfo32 - Ever notice that explaining to people that you are a Cisco engineer gets quickly translated to "computer guy" to family and friends? I have rebuilt countless...3 years ago
-
My Experiences with IPv6 - I finally cleared enough time on my calendar to start thinking about IPv6 for my corporate network. It’s been quite a while since I last considered impleme...2 weeks ago
-
Network Engineering Stack Exchange Beta Live! - A couple months ago, I announced a proposal to start a Stack Exchange site dedicated to answering questions concerning network engineering, similar to ho...1 day ago
-
HA with Two DMVPNs Lab - Since I need to deploy DMVPN for one of my customers, I'm going to draw and test as usual. It took me 3Apr2013 20:30hrs - 4Apr2013 02:30hrs. First Problem ...1 month ago
-
Join One of IPexpert’s Industry-Recognized Instructors for FREE Online CCIE Training This Week - Have you ever wanted to attend one of IPexpert’s industry-leading CCIE classes? Have you ever had problems really understanding a specific technical topic?...3 years ago
-
-
Status update- long overdue! - I’ve been quite busy lately at the new job. Consulting has been keeping me very busy which has been taking up a lot of my free time during the week. The jo...3 years ago
-
Congratulations to IPexpert’s Latest CCIE Success Stories!!! - Join us in congratulating the following CCIE on their great achievement; Adil Shaikh CCIE #29945 (Voice) Rachit Gupta CCIE #29824 (R&S) Rachit Gupta CCIE #...1 year ago