Friday, March 28, 2008

IP Default-Gateway X IP Route 0.0.0.0 0.0.0.0

A common question of anybody configuring a Cisco Multilayer Switch (like 3560, 3750, and others), is the difference between the ip default-gateway and the ip route 0.0.0.0 0.0.0.0 commands.

Before starting, let´s talk a little bit about a Layer 2 Switch only... What is the purpose of an IP Address and Default-Gateway in a machine that speaks only L2 ?! Well... the answer is simple! Management! You assign an IP Address and Default-Gateway to a L2 Switch so you can access it, configure remotely, and so on! That is, the IP Configuration is setted ONLY for Management. It´ll not affect HOW the user traffic is handled or not! L2 will take care about that!

On the other hand in a Multilayer Switch, where you can run Layer 3, you can use IP ROUTE, or Routing Protocols to direct the user traffic to where you want it to go to. In this kind of Switch when you set the command ip route 0.0.0.0 0.0.0.0 <address> the destination address you just configured with this command will be used as a Gateway of last resort. That means, User Traffic and Management Traffic to destinations NOT LISTED in the Routing Table, will be directed to the Gateway of last resort.

When you set your switch to route with IP, you do not need to use the command ip default-gateway . Only when your switch act as a Layer 2 equipment only.

Thursday, March 27, 2008

RIPv1

I was just starting my IEWB Vol. 1 RIP section... well... not the most advanced IP Routing Protocol, but it has it still in the CCIE R&S Lab BluePrint . In fact, the BluePrint shows RIPv2, and I just started RIPv1 section (just 4 small labs), but very good ones to understand the technology (which is the purpose of IEWB Vol. 1).

I´ve always learned that RIPv1 and IGRP are Classfull Protocols that doesn´t support VLSM, Discontiguous Networks... ok! This is WHAT RIPv1 and IGRP are capable and not-capable to do... and no more! But now I was able to check how it does that.

Let´s see an example:

RIPv1

In this example, R1 has 3 networks:

- 10.1.0.0/16

- 10.2.0.0/30

- 10.3.0.0/30

It´s also configured for RIPv1, with the following commands:

router rip
version 1
network 10.0.0.0

 

Just before R1 sends it´s RIPv1 Updates to R2, it perform these checks:

- R1 checks to see if 10.1.0.0/16 is part of the same major net of 10.3.0.0/30 (the source interface for the connection with R2). It is in the same major network (Class A);

- R1 now checks if 10.1.0.0/16 has the same subnet-mask of 10.3.0.0/30. The masks are different, so the network 10.1.0.0/16 will NOT be advertised  to R2;

- Finally R1 checks if the network 10.2.0.0/30 is in the same major network (Class A), it is, and also it checks if the subnet-mask if the same as the 10.3.0.0/30 which is also! Good! So Router R1 will advertise ONLY the network 10.2.0.0/30 to R2.

R2 process is the same, but as far as ALL the subnet-mask doesn´t match with the subnet-mask of the advertising interface, it´ll not advertise any networks to R1.

Let´s take a look at the Routing Table of R1 and R2:

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.2.0.0/30 is directly connected, Loopback1
C       10.3.0.0/30 is directly connected, Serial1/0
C       10.1.0.0/16 is directly connected, Loopback0

 

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
R       10.2.0.0/30 [120/1] via 10.3.0.1, 00:00:15, Serial1/0
C       10.3.0.0/30 is directly connected, Serial1/0
C       10.4.0.0/24 is directly connected, Loopback0
C       10.5.0.0/16 is directly connected, Loopback1

 

As you can see, R2´s networks are not listed in R1´s routing table, and only the R1´s 10.2.0.0/30 network is listed in R2´s routing table because it has the same subnet-mask as the source interface through it was advertised!

More info on this can be found in the following Cisco´s Webpage:

http://www.cisco.com/en/US/tech/tk364/technologies_tech_note09186a0080093f1e.shtml

Wednesday, March 26, 2008

VTP Version

When configuring VTP, be carrefull to use the CORRECT VTP Version... You can check it using the command show vtp status it´ll show you the Supported Version (VTP Version) and the Configured Version (VTP V2 Mode).

If the VTP V2 Mode field = Enable than you´re running VTP Version 2.

Or... if the field VTP V2 Mode = Disable, you´re running VTP Version 1 mode.

Once again, do not confuse the VTP Version and the VTP V2 Mode fields, the first shows you which VTP Mode your switch is capable, and the second which VTP Version is actually configured.

See the example bellow:

switch#sh vtp status
VTP Version                     : 2
Configuration Revision          : 175
Maximum VLANs supported locally : 1005
Number of existing VLANs        : 71
VTP Operating Mode              : Client
VTP Domain Name                 : lab-02
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Enabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x42 0x9F 0x9A 0xF2 0x61 0x74 0x0A 0xAC
Configuration last modified by 13.191.31.230 at 1-25-08 22:34:22

 

It´s always good to "CLEAR" the VTP Configuration Revision number of your Switch before adding a new switch to the network.

The easist way to do that is to change the VTP Domain Name -vtp domain <new domain name> (example: vtp domain lab01) in the switch configuration, and then, changing it back to the original one. That will clear your configuration revision number. DO NOT FORGET to change the switch back to the desirable VTP Domain Name, and use the correct password if needed to have it working properly!

Also... set the switch mode to client - vtp mode client before attaching it to the network, so it learns "all" the VLANs from other operational switch, and then, if needed just change it to server - vtp mode server .

Cisco Emulators

Getting Hands-On in Cisco IOS is getting cheaper, now we have Dynamips, Dynagen, PEMU and GNS3 all Freeware utilities that uses real IOS to emulate Routers in our Computer.

You can create real world scenarios using those softwares, it´s REALLY COOL! I´m using it in my studies with and it´s working great so far!

Of course, you´ll need a good machine, LOT´s of RAM, but, it still cheaper than renting a rack for doing just small labs.

For full scale labs I suggest you to either use 2 PC´s or renting a Rack.

Dynamips (Cisco Router Emulator):

http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator

Dynagen (Front End to be used with Dynamips - It includes Dynamips in it´s package):

http://www.dynagen.org/

PEMU (Pix Emulator):

http://7200emu.hacki.at/viewtopic.php?t=3075

GNS3 (Graphical Network Simulator - It works with Dynamips, Dynagem and PEMU):

http://www.gns3.net/

Off course, those softwares does not include IOS and Cisco Software, you need to get it on your own!

Monday, March 24, 2008

CCIE Rack Rental

Well... at least some good news in the "world" of Rack Rental...

CCOnlineLabs.com is charging a fairly price than others:

11.5 Hours = USD 25,00 (+3% taxes for international buyers)

5.5 Hours = USD 15,00 (+3% taxes for international buyers)

Those prices will be applied if you buy just a single 5.5 hours session, or 10 sessions, or 30 sessions (they do have a special for 50x 11.5 hours session).

While others give you advantage if you get a LOT sessions at once, they´re giving this opportunity of a low price to guys like me who needs to buy all sessions one by one.

Well now I think I can start my rental, I´m planning to do as much as in as I can, and when it comes to Switching (which Dynamips cannot help you that much) and more advanced topics, I can get a Rack to perform it in real equipments, great!

Here follows CCOnlinelabs Website:

http://www.cconlinelabs.com/index.shtml

Oh yeah! Before anybody start asking, I have nothing to do with CCOnlinelabs, I do not work or speak for them, and if they want, they can change the prices at anytime. I just thought that could be usefull to someone else like me starting the CCIE Studies and wanting to have a good deal in Rack Rentals.

You can check their policy at CCOnlinelabs.com website.

If I found others doing that I´ll publish here for sure!

Wednesday, March 19, 2008

IPv4: Binary to Decimal Conversion

How to find the Subnet Mask, Network Address, Broadcast, First and Last Host addresses:

Despite this is a very basic topic, I get ALOT of questions from peaple with CCNA and even CCNP certification asking me HOW to find a Subnet, Broadcast address and so on! Oh my! I wonder which book they´ve used for their studies! Or even more, if they´ve used a book at all! :)

So let´s get a little brief...

The IPv4 used in a Workstation, any Router Interface (running IPv4) is composed of 32 bits, in 4 fields of 8 bits, like this:

XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX

There are 5 Classes of IPv4 Addresses, known as Class A, B, C, D (Multicast) and E (Research).

Convert an IP Address in Decimal to it´s Binary "source" it´s really simple, just follow the instructions here, and you´ll master it faster than you think!


Classes of IP Address:

IP - Classes

Addressing Basics:

In the following picture you can see that ANY Class A Address starts with 0 followed by 7 bits that can be either 0 or 1, that gives us a range from 0 to 127.

Class B starts with 10 + 6 bits of any value (0 or 1) and Class C starts with 110 + 5 bits (1 or 0).

Multicast and Research are reserved and cannot be used in a workstation, or a router interface.

IP - Address

Reserved Addresses:

Inside each class (A, B and C), we do have some Reserved Address that we can use for example, to configure our office network, without publishing those address to the internet, think of those address live Private Addressing, that you (your company) and only your company will be able to see and share it among other offices, but not an external customer for instance.

IP - Reserved

Examples:

Here follows some examples so you can pratice a bit how to convert an IP Address:

IP - Examples

If you have any doubt, just let me know! I´ll be glad to clear things out!

Tuesday, March 18, 2008

OSPF - LSA Types

 

OSPF

OSPF - LSA Types:

Type 1 - Sent by routers within the Area, including the list of directly attached links. Does not cross the ABR or ASBR.

Type 2 - Generated for every “transit network” within an area. A transit network has at least two directly attached OSPF routers. Ethernet is an example of a Transit Network. A Type 2 LSA lists each of the attached routers that make up the transit network and is generated by the DR.

Type 3 - The ABR sends Type 3 Summary LSAs. A Type 3 LSA advertises any networks owned by an area to the rest of the areas in the OSPF AS. By default, OSPF advertises Type 3 LSAs for every subnet defined in the originating area, which can cause flooding problems, so it´s a good idea to use a manual summarization at the ABR.

Type 4 - It announces the ASBR address, it shows “where” the ASBR is located, announcing it´s address instead of it´s routing table. It works +/- like a Default-Gateway.

Type 5 - Announces the Routes learned through the ASBR

If we do not have any ASBR, there´s no LSA Types 4 and 5 in the network.

A good (and free) document for OSPF is the Cisco´s OSPF Design Guide, which can be found at:

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml