Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Sunday, January 18, 2009

Using Cursor at DB2

After Stored Procedure, we will learn about how to use Cursor. Output with Cursor or without Cursor will be the same. The differences is just a the process. With Cursor we lock at 1 row only, without cursor we will lock all record.

The advantage of using Cursor
- only lock 1 row
- there are an operation that must use Cursor

The disadvantage of using Cursor
- it become more complex

For example if we want to make a Stored Procedure to update salary depends on job. There are 2 ways that we can do, Stored Procedure with an without Cursor.

This is the Stored Procedure without Cursor, the easier way.

------------------------------------------------------------
create procedure proc_2(in bonus double,in work varchar(10))
dynamic result sets 1
p1: begin
update staff set salary = salary + bonus where job= work;
end p1
------------------------------------------------------------

This is the screen shoot
Free Image Hosting at www.ImageShack.us


This is the Stored Procedure without Cursor, more complicated query.

------------------------------------------------------------
create procedure proc_1(in bonus double,in work varchar(10))
dynamic result sets 1
p1: begin
declare now_salary double;
declare c1 cursor with return for
select salary from staff where job=work;
open c1;
fetch from c1 into now_salary;
close c1;
set now_salary = now_salary + bonus;
update staff set salary = now_salary where job= work;
end p1
------------------------------------------------------------

This is the screen shoot
Free Image Hosting at www.ImageShack.us

You can run this Stored Procedure at DB2cmd. Just write this command.
"db2 call proc_2(100.0,'Mgr')", but don't forget to connect to the DBMS first.

Saturday, January 17, 2009

Make Stored Procedure at DB2

To make a Stored Procedure with IBM Data Studio, you can follow this step by step tutorial
1. Open IBM Data Studio
2. Choose file -> new -> data development project
3. Give a project name, for example Project2
4. Choose "Use an existing connection". Click Finish
5. At Data Project Explorer will show Project2
6. Right click at Proejct2 -> new -> Stored Procedure
7. Give a Stored Procedure name, for example PROC_3. Choose next
8. At statement detail, change with the query that you want. Click next
9. Click next
10. Choose the specific name. This is an alias name for Stored Procedure.
11. Click Finish

This is the query generated by IBM Data Studio
CREATE PROCEDURE PROC_3 ( )
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
-- Declare cursor
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT *
FROM EMPLOYEE;

-- Cursor left open for client application
OPEN cursor1;
END P1


If you want to run it. First right click the Stored Procedure, then choose Deploy, after that choose run. You can see the output at the right below corner.

This is the screenshot

Free Image Hosting at www.ImageShack.us

Or you can run it from DB2cmd. Just write this command.
"db2 connect to sample" then "db2 call proc_3()"

Best regards,

Deny Sutani

How to Install IBM Data Studio

This is the step by step to install IBM data studio
1. Open drive:\Installer\DB installer2_Install\IBM Data Studio\Windows
2. Extract IBM_data_studio_v111_win file
3. Click setup.exe.
4. Choose Install IBM Data Studio.
5. Tick all checkbox then click next.
6. Choose I accept the aggrement then click next
7. Choose create a new package group then choose your preferred path, then click next
8. If you have alreday had Eclipse, try yo use Extend and existing Eclipse.
9. Choose your preferred language.
10. Choose feature that you want to be installed.
11. IBM instalation manager will install IBM data studio to your computer, just sit relax
12. Finish and you can use IBM data studio right now.

Best regards,

Deny Sutani

Saturday, December 27, 2008

Tips On Buying A Cisco CCNA / CCNP Home Lab Kit

Buying a CCNA / CCNP home lab is the best way to be totally prepared for your Cisco exams. Most home labs are put together one router or switch at a time, but many CCNA / CCNP candidates prefer to buy kits where you get multiple routers and switches, along with all the cables and other connection devices you'll need.

While this is a good idea, keep a few things in mind when purchasing Cisco home lab kits.

Don't buy anything you don't need. The problem is that when you're first starting out with your Cisco home lab, you don't know everything that you need. (I sure didn't!) Keep in mind that you only need one transceiver per AUI port on a Cisco router, so if you're getting routers with two AUI ports in all, you don't need five transceivers in the kit. It doesn't hurt to have one spare, but three is a little too much.

More importantly, don't buy kits with old CCNA or CCNP study guides included. I've seen kits with books that were three years old and were of no use to the candidate. If you see a kit that looks good but includes books or manuals you just don't want, ask the vendor for a price that doesn't include the books. It never hurts to ask.

Watch the IOS version. Unless you've got access to IOS upgrades, you'll be working with the IOS version that's on the routers and switches when you buy the kit for a while. You don't necessarily need the latest and greatest IOS version for CCNA study, but don't buy routers with IOS versions beginning with "10" unless you have an IOS to upgrade them with. (And make sure the routers have enough memory to handle the IOS you plan on putting on them.)

Purchasing a Cisco CCNA / CCNP Home Lab is one of the best investments in your career that you will ever make. Exercise just a bit of caution when purchasing your kit, and you'll be on your way to true Cisco success, in the exam room and on your network!

Passing The CCNA and CCNP Exams: Setup Mode

CCNA and CCNP candidates need to know all about Setup Mode, why a router goes into that mode, and as you'll see, how to get out of that mode. Practicing Setup Mode at work is a good way to get fired, though, so you need to practice this on your CCNA / CCNP home lab or rack rental. In this article, we'll take a look at a Cisco 2500 router going into setup mode and a few tips that will help you pass the exams and excel at your job.

First, why does a router go into Setup Mode in the first place? When a Cisco router boots up, the router looks into Non-Volatile RAM (NVRAM) for the startup configuration file. If such a file is not found, and the router has not been programmed to look to a TFTP server for this file, the router enters setup mode.

The most common reason for a router not to have a startup configuration file is that the file's been erased. We will now erase this file on our 2500 router. As you'll see, the Cisco router warns us about erasing NVRAM and makes us confirm this choice, which it acknowledges with the OK message.

R1#write erase

Erasing the nvram filesystem will remove all files! Continue? [confirm]

[OK]

Erase of nvram: complete

R1#

The router will now be reloaded. There is a slightly misleading message displayed during reboot:

R1#reload

Proceed with reload? [confirm]

00:15:21: %SYS-5-RELOAD: Reload requested

System Bootstrap, Version 11.0(10c)XB1, PLATFORM SPECIFIC RELEASE SOFTWARE (fc1)

Copyright (c) 1986-1997 by cisco Systems

2500 processor with 14336 Kbytes of main memory

Notice: NVRAM invalid, possibly due to write erase.

That notice doesn't mean the NVRAM is corrupt or unusable; this message means the NVRAM doesn't have a startup configuration file.

The router will continue to boot and finally present you with this prompt:


--- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]:

Almost every WAN engineer I know answers "no" to this question, because Setup Mode is a long, clumsy way to set up a router (in my humble opinion). We will answer "yes" in order to see this mode in action.


--- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: y

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Basic management setup configures only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: y

Configuring global parameters:

Enter host name [Router]: R1

The enable secret is a password used to protect access to

privileged EXEC and configuration modes. This password, after

entered, becomes encrypted in the configuration.

Enter enable secret:

% No defaulting allowed

Enter enable secret:

Already, there's something about Setup Mode that you might not like. This mode forces you to set an enable password and an enable secret password. As you continue in this mode, you'll see this mode ask you questions about every single interface on the router, even if you're not planning to use that interface. Using Setup Mode really does get quite old after a while, again in my opinion.

One of the most important things about Setup Mode is knowing how to get out of it without saving the configuration. One way is at the very end of this mode, where you can answer "no" to "Do you want to save this configuration?" I personally never make it that far! Instead of waiting until the end of Setup Mode, we can use the CTRL-C key combination to abort this mode and ignore the changes.

Configuration aborted, no changes made.


Press RETURN to get started!

Setup Mode is not a mode that CCNA and CCNP candidates get a great deal of practice with, but you will be tested on your knowledge about it both in the exam room and on the job. And once you start configuring a router with this mode, you'll be glad you know how to get out of it!

Friday, December 26, 2008

Passing Cisco's CCNA and CCNP Exams: Five Tips For Exam Day Success

As you get ready to pass the CCNA or CCNP exams, you can feel quite a bit of stress as you enter your last week of study. Let's take a look at a few ways to reduce that stress.

1. Do not stay up late cramming. The CCNA and CCNP are not exams you're going to pass by cramming. "Cramming" is a study technique best left behind in junior high school. The CCNA can't be passed by memorization - you've got to know how Cisco technologies work. That leads us to the second point...

2. Get lots of rest. By far, this is the most overlooked factor on exam day. The CCNA and CCNP exams are going to demand your best. You're going to be performing subnetting, binary and hex conversions, analyzing network diagrams for troubleshooting, and much more. You've got to be mentally sharp. You can add 100 points to your exam score just by showing up well-rested. And let's be realistic - if you don't know something at 11 PM the night before your exam, you're not going to learn it overnight. Get some sleep!

3. Get everything together the night before the exam. You don't want to be running around the house the morning of the exam looking for your keys. Make sure you have your keys and your ID the night before the exam.

4. Know where the testing center is. If you've never been to the center you'll be passing the CCNA in before, go there before the morning of the exam. Do not rely on Mapquest or a friend's directions. You don't want to be late for your exam.

5. Allow for traffic. Many CCNA and CCNP candidates prefer to take their exams in the morning. Again, if you haven't been to the exam center before, you should drive there during morning rush hour traffic before your exam date to make sure you have enough time to get there. You don't want to be sitting in traffic when you should be sitting in the exam room!

Microsoft Certification: Farewell To The MCSE

Microsoft is in the middle of a major push to overhaul its certification program. Last year, they announced the new Microsoft Certified Architect (MCA) certification, which is not a written exam but rather a practical exam that will be graded by a board of examiners. Just applying for the certification will require 10 years' experience in IT as well as three years of practical experience as a network architect.

For those of us not quite ready for that, Microsoft has announced that it's also going to revise other certifications. The MCSE that we've all come to know and love is going to be a thing of the past. In its place will be a series of specialization exams and IP Professional certification tracks.

If you're currently an MCSE or working it, don't worry, you have plenty of time to adapt to the new tracks. Microsoft's official word is that the new certification structure will be implemented when the next Windows server/client version is released. For those holding MCDBAs, your current certification will remain valid and you'll have a chance to upgrade to the new certification with SQL Server 2005.

Those of us who have been on the certification track for a while remember the outcry when Microsoft planned to phase out the much-maligned NT 4.0 certification in the move to Windows 2000. There was quite an outcry from many certified individuals who felt MS was being unreasonable in their timetable and planned lack of support for the 4.0 certification. Whether you agree with Microsoft's planned changes, I urge you to visit Microsoft's certification site regularly to keep up with these changes.

Whether you choose to pursue any of these new tracks is your decision, but you owe it to yourself and your career to know about the new tracks. Change is inevitable in IT and the IT certification world, and you must be aware of these changes!

Microsoft Certification: The New MCTS Tracks And Exams

Microsoft is revamping its certification tracks, and will eventually retire the familiar MCSE certificatons. The new certification setup is much like Cisco's, where there are specialist certifications to go along with the more general CCNA, then mid-level certifications such as the CCNP, and then a more-advanced practical exam modeled somewhat after the coveted CCIE certification.

Microsoft's new specialist exams are the Microsoft Certified Technology Specialist (MCTS) exams. As of March 2006, there were five separate MCTS Tracks. Three of them deal with .NET Framework 2.0; these are the Web Application, Windows Applications, and Distributed Applications certifications. Each of these separate certifications requires the candidate to pass two exams. There is also a one-exam SQL Server 2005 certification, as well as a BizTalk Server 2006 single-exam certification.

The initial question is "Why is Microsoft doing this?" According to their website, MS feels that IT hiring managers today have a tough time deciding which computer certifications best identify job candidates who best meet their needs. I know it's easy to take verbal shots at Microsoft (it'll be an Olympic sport one day), but this new series of certs does have appeal for hiring managers, which can only help qualified candidates. Instead of the more-general MCSE, which does still suffer from the overcertification of NT 4.0 MCSEs back in the day, these more-specific certifications will make it easier for the job candidate to prove that they can do the job - and easier for the hiring manager to make an informed decision.

Microsoft hasn't announced the track that will eventually replace the MCSE, but this track will be revealed with the next client-server Windows release. It's up to you to stay informed of these changes, so I recommend you visit Microsoft's certification website often. "I didn't know" isn't much help once a certification expires!

Cisco Certification: Recertifying Your CCNA and CCNP

Once you get your CCNA and CCNP, you can't just rest on your accomplishment. You've got to continue to study and add to your skill set - and then prove to Cisco you've been doing just that by recertifying.

Recertification sounds like a pain, but it's actually one of the best things to ever happen to computer certification, and it helps your career as well. One trap many LAN and WAN personnel fall into is that they fail to keep up with changes in technology, and if they happen to be laid off or want to change jobs, they're unable to because they didn't keep their skill set up.

Cisco's recertification policies ensure that if you want to keep your CCNA, CCNP, or one of the other valuable Cisco certifications, you've got to take a recertification exam.

As of November 2005, to recertify as a CCNA, you need to pass either the current CCNA exam, ICND exam, or any 642 professional level or Cisco Qualified Specialist exam. (This does not include Sales Specialist exams.) Passing a CCIE written qualification exam also recertifies you as a CCNA. CCNAs are valid for three years.

For the CCNP, you need to pass the 642-891 Composite exam, a CCIE written qualification exam, or BOTH the BSCI and BCMSN exams (642-801 and 642-811, respectively.) CCNP certifications are valid for three years.

As you can see, you've got quite a few options either way. The one classic mistake you must not make is waiting too long to begin preparing for the exams, and give yourself a little leeway just in case you don't recertify the first time around. Once the deadline passes, your certification is gone, and in the case of the CCNP that means taking all the exams again.

As a professional, it's your responsibility to keep up with changes in the Cisco certification world, and this includes changes in the recertification program. Make a point of visiting the "Learning And Events" section of Cisco's website regularly to look for changes in the certification program. And while you're there, you just might see another cert that catches your eye!

Thursday, December 25, 2008

Cisco CCNP Exam Tutorial: Defining Collision Domains

CCNA exam success depends on mastering the fundamentals, and two important fundamentals are knowing exactly what the terms "collision domain" and "broadcast domain" mean. In this free Cisco tutorial, we'll take a look at the term "collision domain" and how a collision domain is defined.

A collision domain is an area in which a collision can occur. Fair enough, but what "collision" are we talking about here? We're talking about collisions that occur on CSMA/CD segments, or Carrier Sense Multiple Access with Collision Detection. If two hosts on an Ethernet segment transmit data at exactly the same time, the data from the two hosts will collide on the shared segment. CSMA/CD exists to lessen the chances of this happening, but collisions can still occur. To lessen the chances of collisions occurring, we may decide to create multiple, smaller collision domains.

Let's say we have four hosts on a single Ethernet segment. The entire segment is a collision domain; any data sent by one of the hosts can collide with data sent by any of the other hosts. We have one collision domain containing four devices.

To create smaller collision domains, we'll need to introduce some type of networking device into this example. Hubs and repeaters have their place as far as extending the reach of a network segment and cutting down on attenuation, but these OSI Layer One devices do nothing to define collision domains. We could connect each host into a separate port on a hub (a hub is basically a multiport repeater) and we'd still have one single collision domain with four hosts in it.

The most common and most effective way to create multiple collision domains is to use a switch. If we connect each of these four hosts to their own separate switch port, we would now have four separate collision domains, each with one host; each switch port actually acts as a single collision domain, making collisions between these four hosts impossible.

Passing the CCNA is all about knowing the details of how things work, and knowing CSMA/CD theory and how to define collision domains is one of the many details you've got to master. In the next part of this CCNA tutorial, we'll take a look at broadcast domains, and how defining broadcast domains in the right places can dramatically cut down on unnecessary traffic on your network.

Cisco CCNP Certification: Using The BGP Command “Update-Source”

When you start preparing for your CCNP exam, particularly the BSCI exam, you're introduced to Border Gateway Protocol (BGP) configurations. BGP is unlike any protocol you learned during your CCNA studies, and even the similarities are a little bit different!

BGP forms neighbor relationships, much like EIGRP and OSPF do. The interesting thing with BGP is that potential neighbors, or "peers", do not need to be directly connected and can use their loopback interfaces to form the peer relationships.

It may well be to your advantage to use loopbacks to form peer relationships rather than the actual interface facing the potential neighbor. This can be done because BGP uses static neighbor statements rather than any kind of dynamic neighbor discovery process.

Consider a router that has two paths to a BGP speaker. The interfaces are numbered like this:

Router1: Serial0, 172.1.1.1 /24, Serial2, 179.1.1.1 /24, loopback0, 1.1.1.1 /32.

Router2: Serial0, 172.1.1.2/24, Serial2 179.1.1.2/24, loopback0, 2.2.2.2 /32.

We could configure Router1 like this:

router bgp 200

neighbor 172.1.1.2 remote-as 200

In this case, BGP would automatically use 172.1.1.1 as the source for the TCP connection that has to be set up with the neighbor before updates can be exchanged; this address is known as the best local address. However, if the remote peer's serial0 interface is shut down or goes down for another reason, the peer relationship would be lost even though Router2 is still available.

Instead of using one of the physical interfaces, we can use the loopbacks on each router to establish the TCP-based peer connection. The configurations would look like this:

Router1:

router bgp 200

neighbor 2.2.2.2 remote-as 200

neighbor 2.2.2.2 update-source loopback0

Router2:

router bgp 200

neighbor 1.1.1.1 remote-as 200

neighbor 1.1.1.1 update-source loopback0

In this case, losing one of the physical connections does not necessarily mean the BGP peering is lost; as long as the routers have a valid path to each other's loopback addresses, the BGP peer relationship will stay in place. And better yet, we avoid the dreaded “single point of failure

Cisco CCNP Certification / BSCI Exam Tutorial: Floating Static Routes

Passing the BSCI exam and earning your CCNP certification demands that you add greatly to the networking skills foundation you created when you studied for your CCNA certification. You learned quite a bit about static routing and default static routing when you passed the CCNA test, and it does seem like that should be all you need to know about static routing, right?

One thing you'll learn as you continue to earn Cisco certifications is that there's always something else to learn! You may have heard the term "floating static route", which does suggest some interesting mental pictures. "Floating"? Floating on what?

In a way, a floating static route is "floating" in your routing table. A floating static route is a route that will be used only if routes for the same destination but with a lower administrative distance are removed from the table. For example, you could be using an OSPF-discovered route as your primary route to a given destination, and the floating static route would serve as a backup route that would be used only if the OSPF route leaves the routing table.

Now, how can that happen? After all, OSPF has an administrative distance of 110 and static routes have ADs of one or zero, depending on whether it's configured with a next-hop IP address or a local exit interface. One way or the other, 1 and 0 are still less than 110!

When you want to configure a floating static route, you must assign the route an AD higher than that of the primary route. In this case, we've got to create a static route with an AD higher than 110. We do this by using the "distance" option at the end of the "ip route" command.

R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 ?

<1-255> Distance metric for this route

name Specify name of the next hop

permanent permanent route

tag Set tag for this route



R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 111

The number entered at the very end of the "ip route" command is the AD of that route. If there is an OSPF route for 110.1.1.0 /24, that will be the primary route, and the floating static route will not be used unless the OSPF route is taken out of the routing table.

Floating static routes aren't just a good thing to know for the BSCI exam and your CCNP certification pursuit - they're very practical in the real world as well.

Cisco CCNP Certification / BSCI Exam Tutorial: Comparing IRDP And HSRP

To pass the BSCI exam, you need to know the difference between IRDP and HSRP. While they have the same basic function, the operation and configuration of each are totally different.

The aim of both is to allow hosts to quickly discover a standby router when the primary router fails. IRDP is commonly used by Windows DHCP clients and several Unix variations, but you do see it in Cisco routers as well. IRDP is defined in RFC 1256.

IRDP routers will multicast Hello messages that host devices hear. If a host hears from more than one IRDP router, it will choose one as its primary and will start using the other router if the primary it's chosen goes down.

HSRP is a Cisco-proprietary protocol that is designed for quick cutover to a secondary router if the primary fails, but the host devices don't "see" either the primary or secondary router. The hosts use a virtual router as their default gateway. This virtual router has its own IP and MAC address! All the while, the router chosen as the primary is actually the one doing the routing. If the primary router goes down, the secondary router quickly takes over with no major interruption to network services.

The HSRP routers communicate by multicasting updates to 224.0.0.2, and its through these hellos that the HSRP routers decide which router is primary and which is secondary. HSRP is defined in RFC 2281.

The configuration of each of these will be covered in a future tutorial. In the meantime, I urge you to read the RFCs mentioned in this article, and visit www.cisco.com/univercd to read about the configurations and options available for both of these vital protocols.

Cisco CCNP / BSCI Tutorial: The Role Of The OSPF ASBR

To pass the BSCI exam and earn your CCNP certification, you've got to master the (many) details of OSPF. You might have thought there were quite a few OSPF details in your CCNA studies, but you'll now build on that foundation on the way to earning your CCNP.

One such detail is the role of the Autonomous System Border Router (ASBR) in OSPF. The name itself raises some eyebrows, since you learned in your CCNA studies that OSPF doesn't use autonomous systems! Just as an OSPF Area Border Router borders multiple OSPF areas, the ASBR borders the entire OSPF domain and another source of routes. This can be another dynamic routing protocol, or directly connected networks that are not being advertised into OSPF by the network command.

Let's say we have a router running both OSPF and RIP version 2. By default, the RIP process will not contain any OSPF-discovered routes, and vice versa. The two separate routing processes are just that - separate. If we want the other OSPF routers to know about the RIP routes, route redistribution must be configured. When the RIP routes are redistributed into OSPF, that router is then an ASBR.

In the below example, RIP subnets have been redistributed into OSPF. A seed metric is not necessary when redistributing routes into OSPF. The command "show ip ospf" confirms that this router is now an ASBR.

R1(config)#router ospf 1

R1(config-router)#redistribute rip subnets

R1#show ip ospf

Routing Process "ospf 1" with ID 1.1.1.1

Supports only single TOS(TOS0) routes

Supports opaque LSA

It is an autonomous system boundary router

The ASBR can also perform route summarization on the routes being injected into OSPF with the summary-address command. (To configure OSPF inter-area summarization, use the area range command.) By mastering route summarization and route redistribution, you're well on your way to passing the BSCI exam and earning your CCNP certification!

Cisco CCNP / BSCI Tutorial: Comparing OSPF and ISIS Hellos

While studying to pass the BSCI exam and preparing to earn your CCNP certification, you'll quickly notice that while OSPF and ISIS are both link-state protocols, there are a lot of differences between the two. One major difference is the way the two protocols handle hello packets.

Hello packets are imperative to keeping OSPF and ISIS adjacencies alive. Since they are both link-state protocols, neither of them will send updates at any specified time. Hello packets are the only method by which routers running OSPF and ISIS can see that a neighboring router is still available.

OSPF gives us some great options when it comes to keeping routing table size down via the use of stub and total stub areas, but to OSPF, a hello packet is a hello packet. ISIS routers are capable of sending two different types of hellos - Level 1 and Level 2.

ISIS routers are classified as Level 1 (L1), Level 2 (L2), and Level 1-2 (L1-L2). By default, Cisco routers are L1-L2 routers; this means that every ISIS-enabled interface will send out both L1 and L2 hellos.

If one of the interfaces is forming only an L1 or L2 adjacency, there's no reason to send out hellos for the other adjacency type. For example, if R1 is forming an L1 adjacency with R2 via its ethernet0 interface, there is no reason to allow the router to transmit L2 hellos. To hardcode a router interface to send only L1 or L2 hellos, use the isis circuit-type command.

R1(config)#interface ethernet0

R1(config-if)#isis circuit-type level-1

Note: To configure this interface to send only L2 hellos, the full command is "isis circuit-type level-2-only", not just "level-2".

This configuration would prevent L2 hellos from being transmitted out ethernet0. While this does save router resources and prevents unnecessary bandwidth usage, there is also no way an L2 adjacency can be formed - so double-check your network topology before using this command!

Cisco CCNP / BSCI Exam Tutorial: Using The OSPF Command “Area Range”

Your BSCI and CCNP exam success depends on knowing the details, and one such detail is knowing the proper way to summarize routes in OSPF. Route summarization is not just a test of your binary conversion abilities, but knowing where and when to summarize routes. It will not surprise any CCNA or CCNP certification candidate that OSPF gives us the most options for route summarization, and therefore more details to know!

OSPF offers us two options for route summarization configurations. In a previous tutorial, we looked at the "summary-address" command, and today we'll look at the proper use of the "area range" command.

The "area range" command should be used on an Area Border Router (ABR) to summarize routes being advertised from one OSPF area to another. In this tutorial, R1 is acting as an ABR, with interfaces in both Area 0 and Area 1. Four loopbacks have been placed into R1's Area 1.

R1(config)#router ospf 1

R1(config-router)#network 12.0.0.0 0.255.255.255 a 1

R1(config-router)#network 13.0.0.0 0.255.255.255 a 1

R1(config-router)#network 14.0.0.0 0.255.255.255 a 1

R1(config-router)#network 15.0.0.0 0.255.255.255 a 1

The routing table of an OSPF neighbor, R2, shows all four routes.

R2#show ip route ospf

12.0.0.0/32 is subnetted, 1 subnets

O IA 12.12.12.12 [110/65] via 172.12.123.1, 00:18:52, Serial0

13.0.0.0/32 is subnetted, 1 subnets

O IA 13.13.13.13 [110/65] via 172.12.123.1, 00:18:42, Serial0

14.0.0.0/32 is subnetted, 1 subnets

O IA 14.14.14.14 [110/65] via 172.12.123.1, 00:18:32, Serial0

15.0.0.0/32 is subnetted, 1 subnets

O IA 15.15.15.15 [110/65] via 172.12.123.1, 00:18:32, Serial0

To keep the routing tables of downstream routers smaller but still have the desired IP connectivity, we can use the area range command on R1 to summarize these four routes. The key to keep in mind with the area range command is that the area number given in the command is the area containing the destinations, NOT the area that will receive the summary route.

R1(config)#router ospf 1

R1(config-router)#area 1 range 12.0.0.0 252.0.0.0

R2 now shows a single summary route that can be used to reach all four remote networks.

R2#show ip route ospf

O IA 12.0.0.0/6 [110/65] via 172.12.123.1, 00:00:21, Serial0

Interestingly enough, there's now an additional route in R1's routing table.

R1#show ip route ospf
O 12.0.0.0/6 is a summary, 00:07:53, Null0


When you configure summary routes in OSPF, a route to null0 will be installed into the OSPF routing table of the router performing the summarization. This helps to prevent routing loops. Any packets destined for the routes that have been summarized will have a longer match in the routing table, and packets that do not match one of the summarized routes but do match the summary route will be dropped.

Cisco CCNP / BSCI Exam Tutorial: Using OSPF's "Summary-Address" Command

BSCI exam success, not to mention earning your CCNP, can come down to your OSPF route summarization skills. There are a few different commands and situations you need to be ready for, and one of these situations is the proper use of the "summary-address" command.

The summary-address command should be used on an ASBR in order to summarize routes that are being injected into the OSPF domain via redistribution. In the following example, four routes are being redisitributed into OSPF on R1, making R1 an ASBR.

interface Loopback16

ip address 16.16.16.16 255.0.0.0

!

interface Loopback17

ip address 17.17.17.17 255.0.0.0

!

interface Loopback18

ip address 18.18.18.18 255.0.0.0

!

interface Loopback19

ip address 19.19.19.19 255.0.0.0

R1(config)#router ospf 1

R1(config-router)#redistribute connected subnets

These four routes are seen on downstream router R2 as External Type-2, the default for routes redistributed into OSPF.

R2#show ip route ospf

O E2 17.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 16.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 19.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 18.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

To summarize networks learned by redistribution, use the OSPF command summary-address. You can probably do this summarization in your head, but do so before continuing with the lab.

R1(config)#router ospf 1

R1(config-router)#summary-address 16.0.0.0 252.0.0.0

Look at the change in R2's OSPF table.

R2#show ip route ospf

O E2 16.0.0.0/6 [110/20] via 172.12.123.1, 00:00:05, Serial0

The external routes have been successfully summarized. Note that the summary route is still marked as an E2 route.

There's an interesting route installed into R1's OSPF table as well.

R1#show ip route ospf


O 16.0.0.0/6 is a summary, 00:01:51, Null0

When you configure summary routes in OSPF, a route to null0 will be installed into the OSPF routing table. This helps to prevent routing loops. Any packets destined for the routes that have been summarized will have a longer match in the routing table....

C 17.0.0.0/8 is directly connected, Loopback17

C 16.0.0.0/8 is directly connected, Loopback16

C 19.0.0.0/8 is directly connected, Loopback19

C 18.0.0.0/8 is directly connected, Loopback18


O 16.0.0.0/6 is a summary, 00:03:10, Null0

O 12.0.0.0/6 is a summary, 00:07:53, Null0

.. and packets that do not match one of the summarized routes but do match the summary route will be dropped.

Cisco CCNP / BSCI Exam Tutorial: Using Distribute Lists

To be successful on the BSCI exam and in earning your CCNP, you've got to master route redistribution. This isn't as easy as it sounds, because configuring route redistribution is only half the battle. Whether it's on an exam or in a real-world production network, you've got to identify possible points of trouble before you configure route redistribution - and you need to be able to control redistribution as well. You may have an OSPF domain with 100 routes, but only need to redistribute 10 of them into a neighboring RIPv2 domain. You've got to know how to do that, and one method is the use of a distribute-list.

A distribute-list is an access-list that is used to determine what routes can and cannot be redistributed. Distribute-lists let you specify what routes will be filtered from the process. You can use standard or extended ACLs, and you can filter routes that are coming into a routing process or being injected into another process.

In the following example, R1 is redistributing RIP routes into OSPF, but only wants to advertise network 150.1.1.0 /24 to other OSPF routers. An ACL will be written to match that particular network, and then the distribute-list will be written under the routing process. I'm going to show you the IOS Help output for the distribute-list command, and please note that routing updates can be controlled at the interface level or protocol level.

R1(config)#access-list 24 permit 150.1.1.0 0.0.0.255

R1(config)#router ospf 1

R1(config-router)#redistribute rip subnets

R1(config-router)#distribute-list 24 ?

in Filter incoming routing updates

out Filter outgoing routing updates

R1(config-router)#distribute-list 11 out ?

Async Async interface

BRI ISDN Basic Rate Interface

BVI Bridge-Group Virtual Interface

CTunnel CTunnel interface

Dialer Dialer interface

Ethernet IEEE 802.3

Lex Lex interface

Loopback Loopback interface

Multilink Multilink-group interface

Null Null interface

Serial Serial

Tunnel Tunnel interface

Vif PGM Multicast Host interface

Virtual-Template Virtual Template interface

Virtual-TokenRing Virtual TokenRing

bgp Border Gateway Protocol (BGP)

connected Connected

egp Exterior Gateway Protocol (EGP)

eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)

igrp Interior Gateway Routing Protocol (IGRP)

ospf Open Shortest Path First (OSPF)

rip Routing Information Protocol (RIP)

static Static routes

R1(config-router)#distribute-list 11 out rip

Using distribute-lists does guard against routing loops, but they have other purposes. You may have a network segment that should be kept secret from the rest of your company; a distribute-list can filter that segment's network number from the redistribution process. In this way, distribute-lists serve as a basic form of network security. (Very basic. I wouldn't sell that firewall on ebay if I were you.)

Keeping such networks out of routing updates and routing tables throughout the network has the side effect of reducing routing update overhead as well.

Cisco CCNP / BSCI Exam Tutorial: The Passive Interface Command And OSPF

To pass the BSCI exam and become a CCNP, you have to be aware of the proper use of passive interfaces. You learned about passive interfaces in your CCNA studies, but here we’ll review the basic concept and clear up one misconception regarding passive interfaces and OSPF.

Configuring an interface as passive will still allow the interface to receive routing updates, but the interface will no longer transmit them. While the command itself would make you think this command will be applied at the interface level, that is not the case. Below, we’ll configure ethernet0 as a RIP passive interface.

R1(config)#router rip

R1(config-router)#passive-interface ethernet0

Ethernet0 will no longer send RIP routing updates, but will accept them.

The passive interface concept is clear enough with RIP, IGRP, and EIGRP – all protocols that send routing update packets. But OSPF doesn’t send routing update packets – OSPF sends link state advertisements. It’s the inability of the passive interface command to stop LSAs that lead many to think that passive interfaces cannot be used with OSPF.

Even though OSPF does not sent "routing updates" in the form that RIP, IGRP, and EIGRP do, you can still configure an OSPF-enabled interface as passive in order to prevent OSPF traffic from exiting or entering that interface. No OSPF adjacency can be formed if one of the interfaces involved is a passive interface, and if you configure an OSPF-enabled interface as passive where an adjacency already exists, the adjacency will drop almost immediately.

Let's see that in action. R1 and R2 have an existing OSPF adjacency over their Ethernet interfaces. In an effort to reduce routing traffic, R1's e0 interface is configured as passive. The adjacency drops right away.

R1(config)#router ospf 1

R1(config-router)#passive-interface ethernet0

18:31:11: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0 from FULL to DOWN, Neighbor Down: Interface down or detached

Knowing how to use the passive interface command is a vital part of being a CCNP, and of being a master networker. Good luck to you in both of these pursuits!

Cisco CCNP / BSCI Exam Tutorial: The BGP Attribute MED

Your BSCI exam and CCNP certification success depend on mastering BGP, and a big part of that is knowing how and when to use the many BGP attributes. And for those of you with an eye on the CCIE, believe me - you've got to know BGP attributes like the back of your hand. One such BGP attribute is the Multi-Exit Discriminator, or MED.

The MED attribute is sent from a router or routers in one AS to another AS to indicate what path the remote AS should use to send data to the local AS.

That sounds a little confusing on paper, so let's walk through an example. R1 is in AS 1, and R2, R3, and R4 are in AS 234. R4 is advertising a loopback into BGP, and R1 has two possible next-hops to get to that loopback - R2 (172.12.123.2) and R3 (172.12.123.3). Let's see which of the two paths R1 is using.

R1#show ip bgp 4.4.4.4

BGP routing table entry for 4.4.4.4/32, version 8

Paths: (2 available, best #2, table Default-IP-Routing-Table)

Flag: 0x208

Advertised to non peer-group peers:

172.12.123.3

234

172.12.123.3 from 172.12.123.3 (3.3.3.3)

Origin IGP, localpref 100, valid, external

234

172.12.123.2 from 172.12.123.2 (2.2.2.2)

Origin IGP, localpref 100, valid, external, best

R1 is using 172.12.123.2 as the next-hop to enter AS 234. If all values are left at their default, we could have 100 routes being advertised from AS 234 to AS 1 and the next-hop would remain the same.

We can configure R2 and R3 to send different MED values to R1, and the router sending the lowest MED would be the preferred next-hop. (The MED is a metric, and the lowest metric is always preferred.) We'll configure the MED attribute on both R2 and R3, sending a MED of 200 from R2 and 100 from R3.

R2(config)#route-map SET_MED_200 permit 10

R2(config-route-map)#set metric 200

R2(config-route-map)#router bgp 234

R2(config-router)#neighbor 172.12.123.1 route-map SET_MED_200 out

R3(config)#route-map SET_MED_100 permit 10

R3(config-route-map)#set metric 100

R3(config-route-map)#router bgp 234

R3(config-router)#neighbor 172.12.123.1 route-map SET_MED_100 out

After clearing the BGP table on R1, R1 will still see both next-hop addresses and will still consider both to be valid, but the path through R3 will be selected due to its lower metric.

Just keep in mind that the MED is actually a metric, and lower metrics are more desirable in path selection. That will put you one step closer to passing the BSCI and earning your CCNP Certification!