Wednesday, January 30, 2013

Understanding RIP, IGRP and Static Route Configuration



ip route[address][subnet mask][next hop IP]
Routers can only forward packets to subnets in its routing table
ip route[address][subnet mask][next hop IP]
the new routes can be verified with
ip route [address][subnet mask][interface]
show ip route (displays all of router’s ip routes)
-> Disadvantage to doing this is that static routing works one-way
(add route on Router A to Router B, but Router B still doesn’t have route to Router A)
Extended Ping Command: Simulates a ping from ethernet host, but actually comes from router itself. When a ping from a router works, but a ping from a host does not, the extended ping could help you re-create the problem without needing to work with the end user on the phone.
1. ping
2. Target Address (IP)
3. Extended Commands = y
4. Source Address (IP)

Distance Vector Concepts
Advertise entire routing table (subnet number and metric) to directly connected neighbors.
Key Points:
  • Updates are sent to all neighboring routers through active interfaces, once every so many seconds.
  • If a router learns multiple routes to the same subnet, it chooses the best route based on the metric (number of hops).
  • Failure to receive updates after x amount of time results in removal of that route
  • Routers add directly connected subnets to their routing tables, even without a routing protocol
Distance Vector Loop Avoidance Features eliminate roundabout "ghost" routes to failed or cyclically-linked routers.
Route Poisoning: Router notices link is down, continues to advertise the route, but with very large metric (view as infinite and invalid). Other routers remove their routes to the downed subnet.
RIP uses 16 as the infinite metric

:
Split Horizon:If 2 routers advertise tables at about the same time, with one link down, they would continually exchange incorrect routing metrics (counting to infinity). Split horizon doesn't allow this because all routes with outgoing interface x are not included in updates sent out that same interface x.
In other words, if route to subnet comes in through interface 1, don’t send update of the same route out interface 1
Ex) Router A’s Ethernet goes down, set metric to 16 and send to neighbor. At the same time, Router B sends update to Router A, using the old metric that the cost is 2. Now Router A = 2, Router B = 16. After x amount of time, the two routers exchange routing table and in turn switch the metrics. This process would repeat indefinitely.

*Split Horizon with Poison Reverse (or Poison Reverse):Cisco’s proprietary distance vector routing protocols use this (used by default). Spit horizon used when network links up, but when link fails, allows broadcast of infinite metric (including previously blocked port from Split Horizon).

*Hold-Down Timer:Defeats the counting-to-infinity problem when multiple/redundant links exist between routers. Routers must wait the duration of the hold-down timer before believing any "good" information about that route.

Triggered/Flash Updates: Sends new update as soon as route fails.

Summary
Issue
Solution
Multiple routes to the same subnet have equal metrics
Either use the first route learned or put multiple routes to the same subnet in the
routing table.
Routing loops occur due to updates passing each other over a single link
Split horizon—The routing protocol advertises routes out an
interface only if they were not learned from updates entering
that interface.

Split horizon with poison reverse—The routing protocol uses
split-horizon rules unless a route fails. In that case, the route is
advertised out all interfaces, including the interface in which
the route was learned, but with an infinite-distance metric.
Routing loops occur because routing information loops
through alternative paths
Route poisoning—When a route to a subnet fails, the subnet is
advertised with an infinite-distance metric. This term
specifically applies to routes that are advertised when the
route is valid. Poison reverse refers to routes that normally are
not advertised because of split horizon but that are advertised
with an infinite metric when the route fails.
Counting to infinity
Hold-down timer—After finding out that a route to a subnet
has failed, a router waits a certain period of time before
believing any other routing information about that subnet.

Triggered updates—When a route fails, an update is sent
immediately rather than waiting on the update timer to expire.
Used in conjunction with route poisoning, this ensures that all
routers know of failed routes before any hold-down timers
can expire.

Comparing RIP and IGRP
Feature
RIP
IGRP
Update Timer
30 seconds
90 seconds
Metric
Hop count
Bandwidth/delay (also, reliability, MTU, and load)
Hold-Down Timer
180
280
Flash Updates
Yes
Yes
VLSM
No
No
Infinite-Metric Value
16
4,294,967,295

Configuring RIP and IGRP
Command
Configuration Mode
router rip
Global
router igrp [as number]
Global
router igrp [as number]
Global
enable IGRP for the AS and enter (config-router) mode.
network [net number]
Router subcommand
advertise to other routers that this router has a path to the given network.
passive-interface[default]
{interface type interface number}
Router subcommand
don't send routing updates out through the given interface.
maximum-pathsnumber
Router subcommand
keep at most number'''different routes to the same destination in the routing table.
traffic-share {balanced | min}
Router subcommand

traffic-share {balanced | min}
Router subcommand
share traffic between routes, either proportionally or just between those of the minimum metric value.

EXEC Commands
Command
Description
show ip route
Shows the entire routing table, or a subset if parameters are entered.
show ip protocols
Shows routing protocol parameters and current timer values.
debug ip rip
Issues log messages for each RIP update.
debug ip igrp transactions [ip address]
Issues log messages with details of the IGRP updates.
debug ip igrp transactions [ip address]
Issues log messages with details of the IGRP updates.
debug ip igrp events [ip address]
Issues log messages for each IGRP packet.
trace
Sends a series of ICMP echoes with increasing TTL values to verify the current route to a host.
RIP Configuration
router rip
network [network address1] -> Use network number (address w/ normal class address)
network [network address2]

IGRP ConfigurationIGRP Configuration
router igrp [as number] -> Note: All routers should use the same AS number
network [network address1]
network [network address2]
show running-config -> I = address found by IGRP, C = directly connected
Example
I 10.1.4.0 [100/8539] via 10.1.2.14, 00:00:50, Ethernet0
-> The [100/8359] can be broken into two separate parts:
  • 100 = administrative distance
  • 8539 = metric (function of bandwidth and delay)
  • The higher the bandwidth, the lower the metric
  • The lower the cumulative delay, the lower the metric

Bandwidth Defaults
LAN Interfaces = default reflects the correct bandwidth
Serial Interfaces = defaults to 1544 kbps (T1 speed)
-> Configure using the bandwidth [kbps] interface command

To migrate from RIP to IGRP (Commands)
  • no router rip
  • router igrp [as number]
  • network [network ID]

Debug/show commands include
  • debug ip rip
  • show ip route
  • debug ip igrp transactions (detailed info on updates)
  • debug ip igrp events (summary that states updates received)
  • show ip protocol (Update timer, elapsed time since update received)

Additional Notes
- If multiple route exist, router chooses best metric route
- If routes tie, keep the first/pre-existing route


Command: maximum-paths 1 (default is maximum-paths 4)




- When RIP places multiple routes, router balances traffic


Command to use lowest-cost: traffic-share min



variance allows metrics to be considered equal, since IGRP/EIGRP metrics are calculated through formula and often won’t be exactly the same.
Example: metric = 100, variance = 2, If value > (lowest metric * variance), add route
Administrative Distance: In order to compare metrics between different routing protocols, use administrative distance to denote how believable an entire routing protocol is on a single router.
-> The lower the number, the better

Default Administrative Distances
Route Type
Administrative Distance
Connected
0
Static
1
EIGRP summary route
5
EBGP
20
EIGRP (internal)
90
IGRP
100
OSPF
110
IS-IS
115
RIP
120
EIGRP (external)
170
iBGP (external)
200

Reference from
http://www.proprofs.com/mwiki/index.php/RIP%2C_IGRP%2C_and_Static_Route_Concepts_and_Configuration
More Related Topics:

Monday, January 21, 2013

Configure IPv6 Address on Cisco Routers



IP version 6 (IPv6) is a new version of the Internet Protocol (IP), intended to replace the older IPv4 which is still employed on the vast majority of Internet hosts. IPv6 increases the IP address size from 32 bits to 128 bits to support a much greater number of addressable hosts. IPv4 can support 232 = 4,294,967,296 or over four billion unique addresses but this address space has almost exhausted due to immense expansion in the size of the Internet over the years. IPv6 on the other hand can support 2128 = 3.4 * 1038 addresses, a number so large that it would solve the scarcity of IP address space once and for ever.

IPv6 conventions write the 128 bit IPv6 address as 8 quartets of hex digits, separated by colons, for example:
2001:2222:BBBB:0003:1234:5678:9ABC:0012

As you can see, IPv6 addresses are lengthy even in hexadecimal. Two conventions are used to shorten what must be typed for an IPv6 address:
  • Omit the leading 0s in any given quartet. However you must leave at least one number in any quartet.
  • Represent consecutive quartets of all 0s with double colon (or :: ) but only for one such occurrence in a given address.

In order to see these conventions in action, consider the following IPv6 address:
FE00:0000:0000:0000:0012:0000:0000:0043

The leftmost consecutive quartets of all 0s can be represented with double colon (::). Even if we have more consecutive zeros later on, only one time is allowed to have the double colon notation in the IP. So we have the following valid abbreviation for the above IPv6 address.
FE00::12:0:0:43

There are three general types of IPv6 addresses: unicast, multicast, and anycast. There are further categories in unicast addresses one of which is IPv6 global unicast addresses. An IPv6 global unicast address is similar to a public IP address in IPv4, that is, an IP address that can be routed across the public Internet.
Figure 1 – IPv6 Global Unicast Address

There are two options for static configuration of IPv6 addresses on Cisco routers. For one option, you configure the entire 128-bit IPv6 address, and for the other, you just configure the 64-bit prefix and tell the device to use an EUI-64 calculation for the interface ID portion of the address. Extended Unique Identifier or EUI-64 format allows a host to automatically assign itself a unique 64-bit IPv6 interface identifier without manual configuration. Both options result in the router interface learning its full 128-bit IPv6 address and prefix-length, one way or the other.

Let’s now configure IPv6 addresses for the network shown in Figure 2. The figure shows two IPv6 subnet numbers with the two links.

Figure 2 – IPv6 Configuration

Let’s first configure interfaces Fa0/0 and S0/0 of R1:
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface FastEthernet0/0
R1(config-if)#ipv6 address 2000:0:0:D::/64 eui-64
R1(config-if)#interface Serial0/0
R1(config-if)#ipv6 address 2000:0:0:C::1/64
R1(config-if)#end

Let’s now verify if IPv6 addresses have been correctly configured using commands show ipv6 interface brief and show ipv6 interface as show below.
R1#show ipv6 interface brief
FastEthernet0/0            [up/up]
FE80::C000:17FF:FE7C:0
2000::D:C000:17FF:FE7C:0
Serial0/0                  [up/up]
FE80::C000:17FF:FE7C:0
2000:0:0:C::1

R1#show ipv6 interface FastEthernet0/0
FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C000:17FF:FE7C:0
No Virtual link-local address(es):
Global unicast address(es):
2000::D:C000:17FF:FE7C:0, subnet is 2000:0:0:D::/64 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF7C:0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds

Let’s now proceed to configure IPv6 addresses on R2 and R3 as well.
R2>enable
R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface Serial0/0
R2(config-if)#ipv6 address 2000:0:0:C::2/64
R2(config-if)#end
R2#

R3>enable
R3#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface FastEthernet0/0
R3(config-if)#ipv6 address 2000:0:0:D::/64 eui-64
R3(config-if)#end
R3#

Let’s now go back to R1 and verify if we can ping the IPv6 address 2000:0:0:C::2 on interface S0/0 of R2.
R1#ping 2000:0:0:C::2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2000:0:0:C::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/8/28 ms

Reference from http://www.networkstraining.com

More Related Networking Tips:

Wednesday, January 16, 2013

Cisco IOS, Five Interface Commands You Should Know



When working with routers and switches, you usually don't have to configure an interface using the Cisco IOS every day, and it's easy to become a little rusty on the necessary commands. Whether you're a seasoned admin or a newbie, it's important to review from time to time. Let's look at five Cisco IOS Interface Configuration Mode commands everyone should know.

To begin, here's what Interface Configuration Mode looks like in the Cisco IOS:
Router(config-if)#

As the name suggests, you use this mode to configure an interface on a router or switch. To get to this mode, you need to specify the interface you want to configure. Here's an example:
Router(config)# interface FastEthernet0/0 Router(config-if)#

Alternatively, you can configure a group of interfaces at the same time by using the interface range command. Here's an example:
Router(config)# interface range FastEthernet0/0 – 10 Router(config-if-range)#

Once you're in Interface Configuration Mode, you can always enter help to view a list of commands. But that's a long list—how do you know which ones are the most important? Let's look at five commands you should definitely know.

no shutdown

By default, a Cisco router or switch shuts down all ports, meaning the ports aren't operational. However, this is different from a device such as a Linksys router; by default, all ports of one of these devices are operational when you turn on the device.

To enable ports for use, you can use the no shutdown command. This reverses the shutdown state and enables the port. Here's an example:
Router(config-if)# no shutdown

In addition to using this command the first time you use the ports, you can also use it whenever you're having trouble with the port to "bounce" it. You would also use it after making extensive configuration changes to the port.

ip address

To put an IP address on a port, use the ip address command. When using this command, you must provide the IP address and subnet mask. Here's an example:
Router(config-if)# ip address 1.1.1.1 255.255.255.0

Alternatively, you can make the port broadcast and request a DHCP IP address by using the following command:
Router(config-if)# ip address dhcp

description

While adding a description to a port is optional, it offers a great benefit. For example, if you come back to a router a year after configuring it, you may not remember which port goes to the HR LAN and which port goes to the MRK LAN.

By adding details using the description command, anyone working on the router will know, which saves time and could even prevent outages. Here's an example:
Router(config-if)# description HR LAN

You can add even more information. For example:
Router(config-if)# description Sprint T1 to Internet Circuit ID GH.2343  call 800-555-5555 for support

bandwidth

Like the description command, the bandwidth command is also optional. However, keep in mind that you use the bandwidth command only to tell routing protocols the preferred interface—it doesn't dictate the actual bandwidth of the port. (For more information, see "Clarifying the Cisco IOS bandwidth command." at techrepublic.com)

I also like to use this command for documentation purposes. For example, I might use it to make sure I know the port speed of a fractional T1 circuit.

Below is an example. Note that the specified bandwidth value is in Kb, so 512 is a 512-Kb circuit.
Router(config-if)# bandwidth 512

ip access-group

It's a common practice to apply an access list to an interface to control traffic coming in or going out. Using an access list, you can filter traffic in just about any way you choose.

For example, let's say you created an access list called NOHTTPOUT. Here's how you would apply it to the interface:
Router(config-if)# ip access-group NOHTTPOUT out

Some special-purpose
commands

Let's look at a couple of commands that you may not use on a daily basis—but that are still handy to know.

duplex and speed

These typically aren't commands you use every day. In fact, you only use the duplex and speed commands when connecting a router or switch to another device for the first time.

However, these commands are very important because the duplex and speed of an Ethernet interface must match the interface on the other side. I've experienced problems with performance or interfaces going down in the past, only to discover that the speed or duplex didn't match on each side of the connection.

Here's an example of setting an Ethernet port to 100Mb Full duplex:
Router(config-if)# speed 100 Router(config-if)# duplex full

By default, these should autonegotiate. This usually works—but not always. If the autonegotiation doesn't work or doesn't work consistently, you may end up using these commands.
switchport

You only use the switchport command on switches—not routers. It can put a port into trunk mode, into a certain VLAN, or even to set port security.

Its most common use is to configure an interface to connect to an access device (e.g., workstation, server, printer, etc.). Here's an example:
Switch(config-if)# switchport mode access

You can also use this command to put a port in a certain VLAN:
Switch(config-if)# switchport access vlan 101

Which Interface Configuration Mode commands do you use the most? Which ones did I miss? Share your comments in this article's discussion.

---Original reading from http://www.techrepublic.com

More Related Cisco IOS Commands Tips:

Thursday, January 10, 2013

Cisco Layer 3 Switches Review: Cisco 3750-X

The Cisco 3750 range has been around for many years now, and has a vast following. The Cisco 3750-X is the new kid on the Cisco block, and it combines plenty of stuff that will be familiar to users of its predecessors with some funky new features that are clearly a step forward.

Cisco 3750 switch comes in a number of flavors – between 24 and 48 ports, with or without Power over Ethernet. Cisco 3750 with 48P is the PoE variant of the 48-port device. Now, the traditional Cisco 3750 had four 1Gbit/s SFP ports in addition to the 48 10/100/1000 copper ports; the Cisco 3750-X instead has a slot into which you can slot either a four-port 1Gbit/s SFP daughter-board or a two-port 10Gbit/s alternative.

Alongside the port combinations, there are three software installs. The LAN Base software is a layer-2 only software image, and quite frankly I wouldn't ever expect to buy one of these if I only wanted layer-2 functionality. More sensible is the IP Base image which makes the device a proper Layer-3 routing switch, albeit with a limited selection of routing protocols. At the top is the IP Services image, which makes the unit a full-blown router (just like its ancestors – two of my BGP-shouting WAN routers are actually 3750Gs, in fact). The main market will of course be for the IP Base version.

The rear panel is interesting too, of course. As with the older 3750s the rear panel has a pair of “stack” ports. Each stack port provides a 16Gbit/s backplane connection, and by stacking your devices in a loop you end up with a resilient 32Gbit/s backplane. From a management and configuration point of view a stack is a single virtual switch – you manage it rather like a chassis product with a number of blades. So port 1 of switch 1 is Gi1/0/1, port 3 of switch 2 is Gi2/0/3, and so on.

The important rear-panel innovation with the new CISCO 3750-X model is the provision for redundant power supplies. In the old model you had a single, non-removable power supply along with an RPS (Redundant Power Supply) connection; to use the latter and give yourself some resilience you had to buy something like an RPS2300 – an external device that was a stupid shape that didn't fit into a rack very well, had buttons on the front whose only purpose seemed to be to make things break, and on a brighter note provided up to six switches with resilient power. The new model has dual slots for removable PSUs, of which one is populated by default; it's a ten-second job to slip a second one in beside it. One of the downsides of the old 3750 was the bloody awful reliability of the internal (fixed) PSU, and I've spent rather too many hours swapping out units with duff power units, so the removable units in the -X are most welcome.

Along with the redundant PSU facility is the power stacking capability. Just as you have your data stack cables, you also now have a pair of power-stack cables on each unit, so that the total power available via all the PSUs in the stack is available for negotiated use across the whole stack, for switch power and PoE.

As with the older devices, you can add and remove stack devices on the fly. Adding a switch to a stack is a simple case of settings its ID, telling the stack to expect a new member, and plumbing it in (although in theory the stack will deal with firmware mismatches in the new member, I prefer not to tempt fate so I always pre-install the right version). If a unit fails the stack will keep on humming while you pull out the duff one and stick in the replacement, and the config will be automatically migrated to the new unit.

The only downside I've found so far, in fact, is with trying to get the new -X model to co-exist in a stack with the old 3750-G (in short, I've not persuaded it to actually work yet) but I've no doubt I'll persuade it to play before long.

The Cisco 3750-X is a really sensible evolution in an already popular family of switches in the Cisco family. Being an IOS device there's really not a great deal of difference management-wise between the old and the new, so you get new functionality with almost zero additional training requirements. I've recently added seven 48-port non-PoE versions in three of my server installations, and have just received two new pairs of the PoE variant in a couple of offices, and I'm pretty happy thus far.

Pro
New power stacking capability is an excellent evolution.
32Gbit/s backplane should be sufficient for most modest installations.
10Gbit/s Ethernet support for uplinking or connecting to blade servers.

More Cisco 3750 Info: