Thursday, May 6, 2010



OSPF versus RIP
The rapid growth and expansion of today's networks has pushed RIP to its limits. RIP has certain limitations that can cause problems in large networks:
• RIP has a limit of 15 hops. A RIP network that spans more than 15 hops (15 routers) is considered unreachable.
• RIP cannot handle Variable Length Subnet Masks (VLSM). Given the shortage of IP addresses and the flexibility VLSM gives in the efficient assignment of IP addresses, this is considered a major flaw.
• Periodic broadcasts of the full routing table consume a large amount of bandwidth. This is a major problem with large networks especially on slow links and WAN clouds.
• RIP converges slower than OSPF. In large networks convergence gets to be in the order of minutes. RIP routers go through a period of a hold-down and garbage collection and slowly time-out information that has not been received recently. This is inappropriate in large environments and could cause routing inconsistencies.
• RIP has no concept of network delays and link costs. Routing decisions are based on hop counts. The path with the lowest hop count to the destination is always preferred even if the longer path has a better aggregate link bandwidth and less delays.
• RIP networks are flat networks. There is no concept of areas or boundaries. With the introduction of classless routing and the intelligent use of aggregation and summarization, RIP networks seem to have fallen behind.
Some enhancements were introduced in a new version of RIP called RIP2. RIP2 addresses the issues of VLSM, authentication, and multicast routing updates. RIP2 is not a big improvement over RIP (now called RIP 1) because it still has the limitations of hop counts and slow convergence which are essential in todays large networks.
OSPF, on the other hand, addresses most of the issues previously presented:
• With OSPF, there is no limitation on the hop count.
• The intelligent use of VLSM is very useful in IP address allocation.
• OSPF uses IP multicast to send link-state updates. This ensures less processing on routers that are not listening to OSPF packets. Also, updates are only sent in case routing changes occur instead of periodically. This ensures a better use of bandwidth.
• OSPF has better convergence than RIP. This is because routing changes are propagated instantaneously and not periodically.
• OSPF allows for better load balancing.
• OSPF allows for a logical definition of networks where routers can be divided into areas. This limits the explosion of link state updates over the whole network. This also provides a mechanism for aggregating routes and cutting down on the unnecessary propagation of subnet information.
• OSPF allows for routing authentication by using different methods of password authentication.
• OSPF allows for the transfer and tagging of external routes injected into an Autonomous System. This keeps track of external routes injected by exterior protocols such as BGP.

NETWORK ADDRESS TRANSLATION IN ROUTER

1. Label Interfaces
2. Identify Internal IP addresses to be translated
3. Enable NAT Overload

CONFIGURING STATIC NAT

Router(config)# interface ethernet 0
Router(config-if)# ip nat inside
Router(config-if)# exit

Router(config)# interface serial 0
Router(config-if)# ip nat outside

Router(config)# ip nat inside source static 192.168.1.1 200.200.200.1


CONFIGURING Dynamic NAT

Router(config)# interface ethernet 0
Router(config-if)# ip nat inside
Router(config-if)# exit

Router(config)# interface serial 0
Router(config-if)# ip nat outside


Router(config)# access-list 1 permit host 192.168.1.10
Router(config)# access-list 1 permit host 192.168.1.11
Router(config)# ip nat pool nat-pool 200.200.200.2 200.200.200.3 netmask 255.255.255.0
Router(config)# ip nat inside source list 1 pool nat-pool

PAT Configuration

Router(config)# interface ethernet 0
Router(config-if)# ip nat inside
Router(config-if)# exit

Router(config)# interface serial 0
Router(config-if)# ip nat outside

Router(config)# access-list 1 permit host 192.168.1.10
Router(config)# access-list 1 permit host 192.168.1.11

Router(config)# ip nat pool nat-pool 200.200.200.2 200.200.200.2 netmask 255.255.255.0

Router(config)# ip nat inside source list 1 pool nat-pool overload


Router# clear ip nat translation

Wednesday, May 5, 2010

OSPF

OSPF (OPEN SHORTEST PATH FIRST) PROTOCOL
Open Shortest Path First (OSPF) is an open standards routing protocol that has been implemented by a wide variety of network vendors, including Cisco. This works by using the Dijkstra algorithm. First a shortest path tree is constructed, and then the routing table is populated with the resulting best paths. OSPF converges quickly, although perhaps not as quickly as EIGRP, and it supports multiple, equal-cost routes to the same destination. Like EIGRP, it does support both IP and IPv6 routed protocols.
OSPF provides the following features:
Consists of areas and autonomous systems
Minimizes routing update traffic
Allows scalability
Supports VLSM/CIDR
Has unlimited hop count
Allows multivendor deployment (open standard)

OSPF is supposed to be designed in a hierarchical fashion, which basically means you can separate the larger internetwork into smaller internetworks called areas. This is the best design for OSPF.
The reasons for creating OSPF in a hierarchical design include the following:
_ To decrease routing overhead
_ To speed up convergence
_ To confine network instability to single areas of the network
Dijkstra's algorithm, conceived by Dutch computer scientist Edsger Dijkstra in 1959, is a graph search algorithm that solves the single-source shortest path problem for a graph with nonnegative edge path costs, producing a shortest path tree. This algorithm is often used in routing. An equivalent algorithm was developed by Edward F. Moore in 1957.
For a given source vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest path) between that vertex and every other vertex. It can also be used for finding costs of shortest paths from a single vertex to a single destination vertex by stopping the algorithm once the shortest path to the destination vertex has been determined. For example, if the vertices of the graph represent cities and edge path costs represent driving distances between pairs of cities connected by a direct road, Dijkstra's algorithm can be used to find the shortest route between one city and all other cities. As a result, the shortest path first is widely used in network routing protocols, most notably IS-IS and OSPF (Open Shortest Path First).

Describes The Characteristics Of The RIP And OSPF Protocols Discussed Thus Far.
TABLE 4 . 9 Protocol Characteristics
Characteristic OSPF RIPv2 RIPv1
Type of protocol Link-state Distance Vector Distance-vector
Classless support Yes Yes No
VLSM support Yes Yes No
Auto summarization No Yes Yes
Manual summarization Yes No No
Discontiguous support Yes Yes No
Route propagation Multicast on change Periodic multicast Periodic broadcast
Path metric Bandwidth Hops Hops
Hop count limit None 15 15
Convergence Fast Slow Slow
Peer authentication Yes Yes No
Hierarchical network Yes (using areas) No (flat only) No (flat only)
Updates Event triggered Route table updates Route table updates
Route computation Dijkstra Bellman-Ford Bellman-Ford

CONFIGURING OSPF

Router(config)#router ospf ?
<1-65535> A value in the range 1–65,535 identifies the OSPF process ID. It’s a unique number on this router that groups a series of OSPF configuration commands under a specific running process. Different OSPF routers don’t have to use the same process ID in order to communicate. It’s purely a local value that essentially has little meaning, but it cannot start at 0. It has to start at a minimum of 1.
Lab_A(config)#router ospf 1
Lab_A(config-router)#network 10.0.0.0 0.255.255.255 area ? <0-4294967295> OSPF area ID as a decimal value/ A.B.C.D OSPF area ID in IP address format

SHOW OSPF COMMAND
show ip route Displays the router’s routing table
show ip ospf Displays OSPF information for one or all OSPF processes running on the router
show ip ospf database Shows the topological database used in OSPF
show ip ospf interface Displays all interface-related OSPF information
show ip ospf neighbor Summarizes the pertinent OSPF information regarding neighbors and the adjacency state
show ip ospf protocols Shows routing protocol information

Debugging OSPF Command
dubug ip ospf packet Shows hello packets being sent and received on your router.
debug ip ospf hello Shows hello packets being sent and received on your router.Shows more detail than the debug ip ospf packet output.
debug ip ospf adj Shows DR and DBR elections on a broadcast and nonbroadcast multiaccess network.

Router ID
Router(config)#router ospf 1 Starts OSPF process 1.
Router(config-router)#router-id 10.1.1.1 Sets the router ID to 10.1.1.1. If this command is used on an OSPF router process that is already active (has neighbors), the new router ID is used at the next reload or at a manual OSPF process restart.
Router(config-router)#no router-id 10.1.1.1 Removes the static router ID from the configuration. If this command is used on an OSPF router process that is already active (has neighbors), the old router ID behavior is used at the next reload
or at a manual OSPF process restart.

DR/BDR ELECTIONS
Router(config)#interface serial 0/0 Changes the router to interface configuration mode.
Router(config-if)#ip ospf priority 50 Changes the OSPF interface priority to 50.

NOTE: The assigned priority can be between 0 and 255. A priority of 0 makes the router ineligible to become a designated router (DR)
or backup designated router BDR). The highest priority wins the election. A priority of 255 guarantees a tie in the election. If all routers have the same priority, regardless of the priority number, they tie. Ties are broken by the highest router ID.

MODIFYING COST METRICS
Router(config)#interface serial 0/0 Changes the router to interface configuration mode.
Router(config-if)#bandwidth 128 If you change the bandwidth, OSPF recalculates the cost of the link.
OR
Router(config-if)#ip ospf cost 1564 Changes the cost to a value of 1564.

NOTE: The cost of a link is determined by dividing the reference bandwidth by the interface bandwidth. The bandwidth of the interface is a number between 1 and 10,000,000. The unit of measurement is kilobits. The cost is a number between 1 and 65,535. The cost has no unit of measurement—it is just a number.

TIMERS
Router(config-if)#ip ospf hellointerval timer 20 Changes the Hello Interval timer to 20 seconds.
Router(config-if)#ip ospf deadinterval 80 Changes the Dead Interval timer to 80 seconds.

NOTE: Hello and Dead Interval timers must match for routers to become neighbors.

PROPAGATING A DEFAULT ROUTE
Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0 Creates a default route.
Router(config)#router ospf 1 Starts OSPF process 1.
Router(config-router)#default-information originate Sets the default route to be propagated to all OSPF routers.
Router(config-router)#default-information originate always The always option propagates a default “quad-zero” route even if one is not
configured on this router.

NOTE: The default-information originate command or the defaultinformation originate always command is usually only to be configured on your “entrance” or “gateway” router, the router that connects your network to the outside world—the Autonomous System
Boundary Router (ASBR).

Verifying SHOW OSPF Command

Router#show ip protocol Displays parameters for all protocols running on the router
Router#show ip route Displays a complete IP routing table
Router#show ip ospf Displays basic information about OSPF routing processes
Router#show ip ospf interface Displays OSPF info as it relates to all interfaces
Router#show ip ospf interface fe 0/0 Displays OSPF information for interface fastethernet 0/0
Router#show ip ospf border-routers Displays border and boundary router information
Router#show ip ospf neighbor Lists all OSPF neighbors and their states
Router#show ip ospf neighbor detail Displays a detailed list of neighbors
Router#show ip ospf database Displays contents of the OSPF database
Router#show ip ospf database nssa-external Displays NSSA external link states

Troubleshooting OSPF

Router#clear ip route * Clears entire routing table, forcing it to rebuild
Router#clear ip route a.b.c.d Clears specific route to network a.b.c.d
Router#clear ip opsf counters Resets OSPF counters
Router#clear ip ospf process Resets entire OSPF process, forcing OSPF to re-create neighbors, database,
and routing table
Router#debug ip ospf events Displays all OSPF events
Router#debug ip ospf adjacency Displays various OSPF states and DR/BDR election between adjacent routers
Router#debug ip ospf packets Displays OPSF packets

ROUTE AUTHENTICATION WITH EIGRP

Using Route Authentication with EIGRP

Corp#config t
Corp(config)#int s0/0/1
Corp(config-if)#ip authentication mode eigrp 10 md5
Corp(config-if)#ip authentication key-chain eigrp 10 todd
Corp(config-if)#exit
Corp(config)#key chain todd
Corp(config-keychain)#key 1
Corp(config-keychain-key)#key-string 1234567890
Corp(config-keychain-key)#accept-lifetime 04:00:00 Jan 14 2008 infinite
Corp(config)#send-lifetime 04:00:00 Jan 14 2008 04:50:00 Jan 14 2008

interface interface configure an interface type and enter interface configuration mode
ip authentication mode eigrp AS md5 enable MD5 authentication in EIGRP route update packets
ip authentication key-chain eigrp as key-chain enable authentication of EIGRP packets
key chain name identify the key chain
key number In key chain configuration mode, identify the key number
key-string text In key chain key configure mode, identify the key string
accept-lifetime start-time (optional) specify the time period during which the key can be received
send-lifetime start-time (optional) specify the time period during which the key can be sent

IMPORTANT - EIGRP automatically summarizes networks at the classful boundary.A poorly designed network with discontiguous subnets could have problems with connectivity if the summarization feature is left on. For instance, youcould have two routers advertise the same network—172.16.0.0/16—when in fact they wanted to advertise two different networks—172.16.10.0/24 and 172.16.20.0/24. Recommended practice is that you turn off automatic summarization if necessary, use the ip summary-address command, and summarize manually what you need to.

Router(config)#interface fastethernet 0/0 Enters interface configuration mode.
Router(config-if)#ip summary-address eigrp 100 10.10.0.0 255.255.0.0 75 Enables manual summarization for EIGRP autonomous system 100 on this specific interface for the given address and mask. An administrative distance of 75 is assigned to this summary route. The administrative-distance argument is optional in this command.Without it, an administrative distance of 5 is automatically applied to the summary route.

LOAD BALANCING WITH EIGRP

Load Balancing with EIGRP
By default EIGRP can load balance up to four equal-cost links. But did you know that you can configure EIGRP to load balance across up to six equal/ unequal-cost links to a remote network?

Router(config)#router eigrp 100 Creates routing process 100
Router(config-router)#network 10.0.0.0 Specifies which network to advertise in EIGRP
Router(config-router)#variance n Instructs the router to include routes with a metric less than or equal to n times the minimum metric route for that destination, where n is the number specified by the variance command , If a path is not a feasible successor, it is not used in load balancing.

For the route to be a feasible successor, its advertised distance must be less than the feasible distance of the successor route. You need to remember that even though both routes to network are in the topology table, only the successor route (the one with the lowest metrics) will be copied and placed into the routing table. EIGRP will load balance across both links automatically when they are of equal variance (equal cost), but EIGRP can also load balance across unequal cost links if you use the variance command. Changing a variance value enables EIGRP to install multiple, loop-free routes with unequal cost in a local routing table.

Bandwidth Use
NOTE: By default, EIGRP is set to use only up to 50 percent of the bandwidth of an interface to exchange routing information. Values greater than 100 percent can be configured. This configuration option might prove useful if the bandwidth is set artificially low for other reasons, such as manipulation of the routing metric or to accommodate an oversubscribed multipoint Frame Relay configuration.
NOTE: The ip bandwidth-percent command relies on the value set by the bandwidth command.

Bandwidth Authentication
Router(config)#interface serial 0/0 Enters interface configuration mode.
Router(config-if)#bandwidth 256 Sets the bandwidth to 256 kilobits to allow EIGRP to make a better metric calculation.
Router(config-if)#ip bandwidth-percent eigrp 50 100 Configures the percentage of bandwidth that may be used by EIGRP on an interface.
50 is the EIGRP autonomous system number. 100 is the percentage value.
100% * 256 = 256 kbps.

REDISTRIBUTION BETWEEN RIP & EIGRP

USING REDISTRIBUTION COMMANDS

R3# config t
R3(config)#router eigrp 10
R3(config-router)#redistribute rip metric 1 subnets
R3(config)#router rip
R3(config-router)# redistribute eigrp 10 metric 1

Configuring Discontiguous networks.
A discontiguous network comprises a major net that separates another major net. In figure a subnet of network 172.20.0.0 separates network 172.16.0.0. 172.16.0.0 is a discontiguous network. RIPv1 and IGRP do not support discontiguous networks.

By using the no auto-summary command, EIGRP will advertise all the subnets between the two routers. If the networks were larger, you could then provide manual summarization on these same boundaries.

EIGRP CONFIGURATION

EIGRP (ENHANCED INTERIOR GATEWAY ROUTING PROTOCOL)
EIGRP Basics - A number of powerful features make EIGRP a real standout from IGRP and other protocols. The main ones are listed here:
Support for IP and IPv6 (and some other useless routed protocols) via protocol-dependent modules
Considered classless (same as RIPv2 and OSPF)
Support for VLSM/CIDR
Support for summaries and discontiguous networks
Efficient neighbor discovery
Communication via Reliable Transport Protocol (RTP)
Best path selection via Diffusing Update Algorithm (DUAL)

EIGRP CONFIGURATION
Router# config t
Router(config)# router eigrp 20 Here 20 Indicates autonomous system
Router(config-router)# network 172.16.0.0
Router(config-router)# network 10.0.0.0
R3(config-router)#no autosummary Turns off the auto-summarization feature.

Command passive-interface - Configuring in EIGRP prevents the interface from participating in the routing process by preventing the sending and receiving of hello packets.
Router(config)# router eigrp 20
Router(config-router)# passive-interface serial 0/1

Setting Maximum Paths and Hop Count - EIGRP has a maximum hop count of 100 but can be set up to 255. Chances are you wouldn’t want to ever change this, but if you did, here is how you would do it:
Router(config)# router eigrp 10
Router(config-router)# maximum-paths ? <1-6> Number of paths

Router(config)#router eigrp 10
Router(config-router)# metric maximum-hops ? <1-255> Hop count