Tuesday, May 25, 2010

Commands on Server Switch

Switch#vlan database
Switch(vlan)#vtp domain cisco
Switch(vlan)#vtp password cisco
Switch(vlan)#vtp server


Commands on Client Switch

Switch#vlan database
Switch(vlan)#vtp domain cisco
Switch(vlan)#vtp password cisco
Switch(vlan)#vtp client

Monday, May 17, 2010

RIP AUTHENTICATION

VCL#config t
VCL(config)#key chain virtual
VCL(config)#key 1
VCL(config)#key-string 12345
VCL(config)#interface serial 0/0
VCL(config-if)#ip rip authentication key-chain virtual
VCL(config-if)#ip rip authentication mode md5

Tuesday, May 11, 2010

KEYBOARD SHORTCUTS IN CISCO

Delete: Removes the character to the right of the cursor

Backspace: Removes the character to the left of the cursor

Up Arrow: Allows you to scroll forward through previous commands

Down Arrow: Allows you to scroll backwards through previous commands

Ctrl+A: Moves the cursor to the beginning of line

Ctrl+B: Moves one character backwards

Esc+B: Moves one word backwards

Ctrl+E: Moves the cursor to the end of the line

Ctrl+F: Moves one character forward

Esc+F: Moves one word forward

Ctrl+N (or down arrow): Displays previous commands entered

Ctrl+P (or up arrow): Displays the last command entered

Ctrl+R: Redisplays a line

Ctrl+U: Erase current a line

Ctrl+W: Erases current word

Ctrl+Z: Exits configuration mode to privileged EXEC mode


Monday, May 10, 2010

Dynamic Host Configuration Protocol (DHCP)

Dynamic Host Configuration Protocol (DHCP)

DHCP Description:

• DHCP works in a client/server mode. DHCP enables DHCP clients on an IP network to obtain their configurations from a DHCP server.

• DHCP is not intended for configuring routers, switches, and servers. These type of hosts need to have static IP addresses.

• DHCP works by providing a process for a server to allocate IP information to clients. Clients lease the information from the server for an administratively defined period. When the lease expires the client must ask for another address, although the client is typically reassigned the same address. Administrators typically prefer a network server to offer DHCP services because these solutions are scalable and relatively easy to manage. Cisco routers can use a Cisco IOS feature set, Easy IP, to offer an optional, full-featured DHCP server.

• Administrators set up DHCP servers to assign addresses from predefined pools. DHCP servers can also offer other information, such as DNS server addresses, WINS server addresses, and domain names. Most DHCP servers also allow the administrator to define specifically what client MAC addresses can be serviced and automatically assign them the same IP address each time. DHCP uses User Datagram Protocol (UDP) as its transport protocol. The client sends messages to the server on port 67. The server sends messages to the client on port 68.
What can DHCP offer to clients:
• IP address
• Gateway address
• Subnet mask
• DNS server address
• WINS server address
• Domain name and address
• And many other parameters

Camparing BOOTP and DHCP:

BOOTP and DHCP share some operational characteristics. Both protocols are client/server based and use UDP ports 67 and 68. Those ports are still known as BOOTP ports.
The four basic IP parameters that BOOTP offer:
• IP address
• Gateway address
• Subnet mask
• DNS server address

BOOTP does not dynamically allocate IP addresses to a host. When a client requests an IP address, the BOOTP server searches a predefined table for an entry that matches the MAC address for the client. If an entry exists, then the corresponding IP address for that entry is returned to the client. This means that the binding between the MAC address and the IP address must have already been configured in the BOOTP server.
DHCP operation:
The DHCP client configuration process uses the following steps:
1. A client must have DHCP configured when starting the network membership process. The client sends a request to a server requesting an IP configuration. Sometimes the client may suggest the IP address it wants, such as when requesting an extension to a DHCP lease. The client locates a DHCP server by sending a broadcast called a DHCPDISCOVER.
2. When the server receives the broadcast, it determines whether it can service the request from its own database. If it cannot, the server may forward the request on to another DHCP server. If it can, the DHCP server offers the client IP configuration information in the form of a unicast DHCPOFFER. The DHCPOFFER is a proposed configuration that may include IP address, DNS server address, and lease time.
3. If the client finds the offer agreeable, it will send another broadcast, a DHCPREQUEST, specifically requesting those particular IP parameters. Why does the client broadcast the request instead of unicasting it to the server? A broadcast is used because the first message, the DHCPDISCOVER, may have reached more than one DHCP server. If more than one server makes an offer, the broadcasted DHCPREQUEST allows the other servers to know which offer was accepted. The offer accepted is usually the first offer received.
4. The server that receives the DHCPREQUEST makes the configuration official by sending a unicast acknowledgment, the DHCPACK. It is possible, but highly unlikely, that the server will not send the DHCPACK. This may happen because the server may have leased that information to another client in the interim. Receipt of the DHCPACK message enables the client to begin using the assigned address immediately.
5. If the client detects that the address is already in use on the local segment it will send a DHCPDECLINE message and the process starts again. If the client received a DHCPNACK from the server after sending the DHCPREQUEST, then it will restart the process again.
6. If the client no longer needs the IP address, the client sends a DHCPRELEASE message to the server.
Depending on an organization's policies, it may be possible for an end user or an administrator to statically assign a host an IP address that belongs in the DHCP servers

address pool. Just in case, the Cisco IOS DHCP server always checks to make sure that an address is not in use before the server offers it to a client. The server will issue an ICMP echo request, or will ping, to a pool address before sending the DHCPOFFER to a client. Although configurable, the default number of pings used to check for a potential IP address conflict is two.
DHCP Relay:
DHCP clients use IP broadcasts to find the DHCP server on the segment. What happens when the server and the client are not on the same segment and are separated by a router? Routers do not forward these broadcasts.
However, routers, by default, will not forward client broadcasts beyond their subnet.
Because some clients are useless without services such as DHCP, one of two choices must be implemented. The administrator will need to place servers on all subnets or use the Cisco IOS helper address feature. Running services such as DHCP or DNS on several computers creates overhead and administrative difficulties making the first option inefficient. When possible, administrators should use the ip helper-address command to relay broadcast requests for these key UDP services.
By using the helper address feature, a router can be configured to accept a broadcast request for a UDP service and then forward it as a unicast to a specific IP address. By default, the ip helper-address command forwards the following eight UDP services:
• Time
• TACACS
• DNS
• BOOTP/DHCP Server
• BOOTP/DHCP Client
• TFTP
• NetBIOS Name Service
• NetBIOS datagram Service

Configuring DHCP
The DHCP service is enabled by default on versions of Cisco IOS that support it. To disable the service, use the no service dhcp command. Use the service dhcp global configuration command to re-enable the DHCP server process.
Below is an example for DHCP configuration.
DHCPRouter(config)#ip dhcp pool LAN1 * LAN1 is pool name
DHCPRouter(dhcp-config)#network 172.16.12.0 255.255.255.0
DHCPRouter(dhcp-config)#default-router 172.16.12.1 *Gateway
DHCPRouter(dhcp-config)#dns-server 172.16.1.2
DHCPRouter(dhcp-config)#domain-name cisco.com
DHCPRouter(dhcp-config)#netbios-name-server 172.16.12.10
DHCPRouter(dhcp-config)#exit
DHCPRouter(config)#ip dhcp excluded-address 172.16.12.1 172.16.12.10
Note: The excluded-address is a range or a single IP address that you don’t want to be assigned by DHCP, such as router interface address, servers addresses,..etc.
Verifying DHCP operation
Router#show ip dhcp binding
Router#show ip dhcp server statistics

DHCP Relay Configration:
RouterA(config)#int e0
RouterA(config-if)#ip helper-address 172.24.1.9
OR
RouterA(config)#int e1
RouterA(config-if)#ip directed-broadcast
RouterA(config)#int e0
RouterA(config-if)#ip helper-address 172.24.1.255

Reference - Eng. Mohammed Alani by certificationist.com

Sunday, May 9, 2010

CABLE CONNECTION

Important Port Numbers

Some Important Port Numbers

Databases

3306 MySQL
1433 MS SQL Server
5432 PostgreSQL

Remote Access - Graphical

3389 MS Remote Desktop
5800 VNC-HTTP
5900 VNC

Remote Access - Console

22 SSH
23 Telnet
512 Rexec
513 Rlogin
514 RSH

Remote Data Transfer & Management

20 FTP Data
21 FTP
69 TFTP
2049 NFS

Directory Service

389 LDAP
636 LDAP Secure
Web
80 HTTP
443 HTTPS
3128 Squid Web Proxy

Mail & Chat

25 SMTP
110 POP3
995 POP3S
143 IMAP
993 IMAPS
5222 Jabber
5223 Jabber SSL

Infrastructure Management

53 DNS
1512 WINS
67 DHCP Server
68 DHCP Client
123/UDP NTP
161 SNMP

Thursday, May 6, 2010

OSI - OPEN SYSTEM INTERCONNECTION




• The Application, Presentation and Session layers of the OSI model map directly to the Application layer of the TCP/IP Model.
• The Transport Layer of the OSI maps directly to the Transport layer of the TCP/IP Model.
• The Network Layer of the OSI maps directly to the Internet Layer of the TCP/IP Model.
• The Data Link and Physical Layers of the OSI map directly to the Network Access Layer of the TCP/IP Model.
• Network Models help software vendors create products that are interoperable.
OSI – Layer 7 – Application
• End users themselves interact with the network.
• Authentication services (not encryption, which runs at layer 6).
• Ensures that remote communications partner is available.
• That the needed communication partner is available.
• Both ends of the communication agree on procedures including data integrity, privacy and error recovery.
• Anything that requires the end user to enter a request is an application layer protocol, including:
o Telnet
o HTTP
o FTP
o SNMP
OSI – Layer 6 – Presentation
• Can be described with a question, “How should this data be presented?”
• Encryption occurs at this layer.
• Primary tasks the presentation layer is concerned with:
o Compatibility with the Operating System.
o Proper encapsulation of data for network transmission.
o Data Formatting.
o Data Encryption and decryption, compression and translation.
• Some file types which are used at the presentation layer include:
o JPEG
o ASCII
o GIF
o MPEG
• Presents data to the Application layer and is responsible for data translation and code formatting. It is essentially a translator and provides coding and conversion functions.
OSI – Layer 5 – Session
• Layer 5 is the “manager” of the two-way communication between two remote hosts.
• Handles the creation, maintenance and teardown of communications between those two hosts.
• This overall communication itself is referred to as a session.
OSI – Layer 4 – Transport
• The Transport Layers purpose is to establish a logical end-to-end connection between two systems, segment data received from the upper layers of the OSI model, and to make sure data gets to the destination in the correct order and free of errors.
• There are two methods for transporting data at the Transport Layer:
o Connection-orientated, referring to TCP.
o Connectionless, referring to UDP.
OSI – Layer 3 – Network
• IP runs at this layer.
• Sometimes called “The routing layer”.
• Routing is a two-question process:
o What valid path exists from the local router to a given destination.
o What is the best path to take to get there.
OSI – Layer 2 – Data Link
• Devices which operate at the Data Link Layer:
o Switches.
o Wireless Access Points.
o Cable and DSL modems.
• Ethernet.
• High Data Link Control (HDLC).
• Point-to-Point Protocol (PPP).
• Frame Relay.
• Provides error detection, but not error recovery using Frame Check Sequence (FCS).
• Media Access Control (MAC) addresses are used at this layer.
OSI – Layer 1 – Physical
• The Physical layer does two things, it sends and receives bits. 100101011101010101101
• The Physical layer specifies the electrical, mechanical, procedural, and functional requirements for activating, maintaining, and deactivating a physical link between end systems.


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

RIP , DEFINITION & CONFIGURATION

Router(config)#router rip
Router(config-router)#distance 150

Classful vs. Classless Routing
Classful routing protocols do not send subnet mask information with their routing updates. A router running a classful routing protocol will react in one
of two ways when receiving a route: If the router has a directly connected interface belonging to the same major network, it will apply the same subnet mask as that interface. If the router does not have any interfaces belonging to the same major network, it will apply the classful subnet mask to the route.
Classless routing protocols do send the subnet mask with their updates.Thus, Variable Length Subnet Masks (VLSMs) are allowed when using
classless routing protocols. Examples of classful routing protocols include RIPv1 and IGRP.
Examples of classless routing protocols include RIPv2, EIGRP, OSPF, and IS-IS.

To configure your router in “classful” mode:
Router(config)# no ip classless

To configure your router in “classless” mode (this is default in IOS 12.0 and greater):
Router(config)# ip classless

ROUTING METRICS – Routing protocols use their own rules and metrics to build and update routing tables automatically. Routing metrics are measures of path desirability. Different protocols use different metrics. Some common metrics are as follows:
Bandwidth The link data capacity.
Delay The time required to move the packet from the current router to the destination. This depends on bandwidth, Port delays, Congestion, and distance.
Load The amount of activity on the interface.
Reliability The error rate of each network link.
Hop count The number of routers the packet must travel through before reaching the destination.
Cost An arbitrary value based on bandwidth, expense, and other metrics assigned by the administrator.

Techniques to eliminate Routing Loops.
split-horizon route advertisement is a method of preventing routing loops in distance-vector routing protocols by prohibiting a router from advertising a route back onto the interface from which it was learned.
In short, split horizon is to prohibit a router from advertising a route back out the interface from which it was learned. Why we need to introduce this approach? Let’s see the following example first.
Distance-Vector routing protocol like RIPv1 and RIPv2 have slow convergence and count-to-infinity issues. We assume the network is: A — B — C. A, B and C are three routers running RIP routing protocol. In the convergence status, B knows there is one hop to C and A knows there are two hops to C via B. If the link is broken between B and C, since B get advertisement from A that there are 2 hops can get to C from A. Then, B updates its routing table to set hop to 3. A get advertisement from B. Then A updates its routing table to set hop to 4, so on and so on until count to infinity. The network will never be convergence status.
Split horizon is useful in this situation. Following the definition, A will not send advertisement to B since A learned route to C from B. It effectively reduces the count-to-infinity problem. To speed up convergent in RIP network, it introduce the maximum hop number is 15. In the case above, when the link between B and C is broken, B sends advertisement to A that the hop to go to C is 16, which is called split horizon with poison reverse. Then, A knows that C is unreachable and updates its routing table.
However, split horizon with poison reverse does have disadvantages.
First, it increases the size of the routing messages. In a hub-spoke network, hub is as backbone router and each spoke is as gateway router. “If split horizon with poisoned reverse is used, the gateway must mention all routes that it learns from the backbone, with metrics of 16. If the system is large, this can result in a large update message, almost all of whose entries indicate unreachable networks.”
Second, it will prevent any routing loops that involve only two gateways engaged in mutual deception. It is highly possible that three or more gateways in this situation. So, RFC 1058 introduces “Triggered updates” approach. In short, it is required to send update messages almost immediately whenever a gateway changes the metric for a route. Split horizon processing is done when generating triggered updates as well as normal updates.
Since this is nature born characters of distance-vector routing protocol, more sophisticated routing protocols are applied in the industry such as OSPF.

Hold Down timers -

Route Poison - Route poisoning is a method of preventing a network from sending packets through a route that has become invalid. When the routing protocol detects an invalid route (such as can be caused by a severed cable or the failure of a network node), all of the routers in the network are informed that the bad route has a hop count of 16, which stands for infinity. This makes all nodes on the invalid route appear infinitely distant, thereby preventing any of the routers from sending packets over the invalid route. When the path between two routers in a network goes bad, all the routers in the network are informed immediately. However, it is possible for this information to be lost, causing some routers to once again attempt to send packets over the bad route. This requires that they be informed again that the route is invalid, and again, this information can be lost. The resulting problem is known as a routing loop. Route poisoning is used in conjunction with hold downs. A hold down keeps update messages from falsely reinstating the validity of a bad route. This prevents routing loops, improving the overall efficiency of the network.
Poison reverse - In a computer network that uses the Routing Information Protocol (RIP) or other distance vector routing protocols, a poison reverse
is a way in which a gateway node tells its neighbor gateways that one of the gateways is no longer connected. To do this, the notifying gateway sets the number of
hops to the unconnected gateway to a number that indicates "infinite" (meaning "You can't get there"). Since RIP allows up to 15 hops to another gateway, setting
the hop count to 16 would mean "infinite."

Triggered Updates -

RIP PROTOCOL

Routing Information Protocol (RIP) is a true distance-vector routing protocol. RIP sends the complete routing table to all active interfaces every 30 seconds. RIP uses the hop count only to determine the best way to a remote network, but it has a maximum allowable hop count
of 15 by default, meaning that 16 is deemed unreachable. RIP works well in small networks, but it’s inefficient on large networks with slow WAN links or on networks with a large number of routers installed. There are two version of RIP. V1 & V2

RIP v1 AND v2 COMPARISONS

RIP v1 is a classful protocol, meaning that it does not send its subnet mask in routing updates. As a result , RIP v1 does not support VLSM (Variable Length Subnet Mask)
RIP v2 is a classless protocol that supports VLSM and sends its subnet mask in routing updates.
RIP v2 also send routing updates through multicast. RIP v1 broadcasts updates. RIP v2 supports manual route summarization and authentication. RIP v1 does not.

RIP TIMERS - RIP uses four timers to regulate performance and route updates.

Route update timer : The time between router updates. Default is 30 seconds.
Route Invalid Timer : The time that must expire before a route becomes invalid. Default is 180 seconds.
Route Hold Down Timer :If RIP receives an update with a hop count higher than the metric recording in the routing table, RIP goes into a hold down for 180 seconds.
Route flush Timer : The time from when a route becomes invalid to when it is removed from the routing table. Default is 240 seconds.

CONFIGURATION OF RIP

Router#config t
Router(config)#router rip
Router(config-router)#network 10.0.0.0 advertise own network
Router(config-router)#version 2 Convert to version 2
Router(config-router)#no auto-summary Turns off auto-summarization

OTHER COMMANDS
Router#show ip route Displays the routers routing table
Router#show ip protocols Displays the routing protocols and interfaces used with all routing protocols
Router#debug ip rip Show rip updates being sent and received on your router

ROUTING FIRST STEP

ROUTING. - Routing is the process of moving packets across a network from one host to another. It is usually performed by dedicated devices called routers.

Classes of Routing Protocols.
Distance Vector
Link State
Advanced distance vector
Routed vs. Routing Protocols
A routing protocol sends and receives routing information packets to and from other routers.
A routed protocol can be routed by a router, which means that it can be forwarded from one router to another.
A routed protocol contains the data elements required for a packet to be sent outside of its host network or network segment. In other words, a routed protocol can be routed.
Protocols used to communicate routing information between routers within an autonomous system are Interior Gateway Protocols (IGP), which are routing protocols, but not routed protocols.
Examples of routed protocols are IP and IPX, and examples of routing protocols are RIP and IGRP.

• Static routes - are fixed routes that are manually entered by the administrator into the router's configuration.
• Dynamic routing - is the process by which a network adapts automatically to the changes in topology or traffic as those changes occur.
• Default routes - are very much like static route. The administrator enters the default route, and it becomes the default path the router uses to forward packets for which it knows no other route to use. Without a default route, packets with unknown destinations are dripped.




Overview
"Distance Vector" and "Link State" are terms used to describe routing protocols which are used by routers to forward packets between networks. The purpose of any routing protocol is to dynamically communicate information about all network paths used to reach a destination and to select the from those paths, the best path to reach a destination network. The terms distance vector and link state are used to group routing protocols into two broad categories based on whether the routing protocol selects the best routing path based on a distance metric (the distance) and an interface (the vector), or selects the best routing path by calculating the state of each link in a path and finding the path that has the lowest total metric to reach the destination.
DISTANCE VECTOR
Distance
Distance is the cost of reaching a destination, usually based on the number of hosts the path passes through, or the total of all the administrative metrics assigned to the links in the path.
Vector
From the standpoint of routing protocols, the vector is the interface traffic will be forwarded out in order to reach an given destination network along a route or path selected by the routing protocol as the best path to the destination network.
Distance vector protocols use a distance calculation plus an outgoing network interface (a vector) to choose the best path to a destination network. The network protocol (IPX, SPX, IP, Appletalk, DECnet etc.) will forward data using the best paths selected.
Common distance vector routing protocols include:
• Appletalk RTMP
• IPX RIP
• IP RIP
• IGRP
Advantages of Distance Vector Protocols
Well Supported
Protocols such as RIP have been around a long time and most, if not all devices that perform routing will understand RIP.

LINK STATE
Link State protocols track the status and connection type of each link and produces a calculated metric based on these and other factors, including some set by the network administrator. Link state protocols know whether a link is up or down and how fast it is and calculates a cost to 'get there'. Since routers run routing protocols to figure out how to get to a destination, you can think of the 'link states' as being the status of the interfaces on the router. Link State protocols will take a path which has more hops, but that uses a faster medium over a path using a slower medium with fewer hops.
Because of their awareness of media types and other factors, link state protocols require more processing power (more circuit logic in the case of ASICs) and memory. Distance vector algorithms being simpler require simpler hardware.

A Comparison: Link State vs. Distance Vector
See Fig. 1-1 below. If all routers were running a Distance Vector protocol, the path or 'route' chosen would be from A B directly over the ISDN serial link, even though that link is about 10 times slower than the indirect route from A C D B.
A Link State protocol would choose the A C D B path because it's using a faster medium (100 Mb ethernet). In this example, it would be better to run a Link State routing protocol, but if all the links in the network are the same speed, then a Distance Vector protocol is better.
FIG. 1-1



IGP vs EGP
An Interior gateway protocol (IGP) is one which exchanges reachability information for destinations inside its AS. E.g. RIP, EIGRP, OSPF , IS-IS
An Exterior gateway protocol (EGP) is one which exchanges reachability information for destinations outside its AS. E.g. BGP
• Interior Gateway Protocols
o within a single autonomous system
 single network administration
 unique routing policy
 make best use of network resources
• Exterior Gateway Protocols
o among different autonomous systems
 independent administrative entities
 communication between independent network infrastructures
Default Administrative Distance Value Table
This table lists the administrative distance default values of the protocols that Cisco supports:
Route Source Default Distance Values
Connected interface 0
Static route 1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5
External Border Gateway Protocol (BGP) 20
Internal EIGRP 90
IGRP 100
OSPF 110
Intermediate System-to-Intermediate System (IS-IS) 115
Routing Information Protocol (RIP) 120
Exterior Gateway Protocol (EGP) 140
On Demand Routing (ODR) 160
External EIGRP 170
Internal BGP 200
Unknown* 255
If the administrative distance is 255, the router does not believe the source of that route and does not install the route in the routing table.
Each routing protocol has a default AD; you can, however, change the AD for specific routes or for a routing protocol. Earlier when I added 150 to the end of the static route entry, I changed the AD for that specific route. If I want to change the AD for a routing protocol, I must use the distance command.

Welcome to Virtual Cisco Labs - INITIAL STARTUP IN CISCO

CLOCK SET COMMAND - Router# clock set 13:32:00 12 May 2001

DESCRIPTION COMMAND - To add a description to an interface configuration, use the description interface configuration command. Use the no form of this command to remove the description. The description command is meant solely as a comment to be put in the configuration to help you remember what certain interfaces are used for. The following example shows how to add a description on interface:
Router (Config-if) # Description this interface connected to e0/0 of router 3.

TERMINAL HISTORY COMMAND - Sets the number of commands in the buffer that can be recalled by the router (maximum 256)
Router# terminal history size 25 (25 number of command to recall)

SETTING PASSWORD ON LINES
Console Password - Console password is needed when logging into router at user EXEC mode from console.
Router(config)# line console 0
Router(config-line)# password Cisco
Router(config-line)# Login

vty lines password - Virtual terminal lines (vty) are used to allow remote access to the router (by telneting through its interfaces). The router has five virtual terminal lines by default.
Router(config)# line vty 0 4
Router(config-line)# password Cisco
Router(config-line)# login

Setting Privileged Access Password - To set a local password to control access to various privilege levels, use the enable password global configuration command. Use the no form of this command to remove the password requirement.
An enable password is defined as follows:
• Must contain from 1 to 25 uppercase and lowercase alphanumeric characters.
• Must not have a number as the first character.
• Can have leading spaces, but they are ignored. However, intermediate and trailing spaces are recognized.
Router (config) # enable password CISCO@123

Setting Secret (Encrypted) Password - To set an encrypted local password to control access to various privilege levels, use the enable secret global configuration command. Use the no form of this command to remove the password requirement.
Router(config)# enable secret cisco

Message-of-the-Day Banner Command
Router(config)#banner motd # Building Power will be interrupted next Tuesday evening from 8 – 10 PM. #
Router(config)#

Login Banner Command
Router(config)#banner login # Authorized Personnel Only! Please enter your username and password. #
Router(config)#

Assigning a Local Host Name to an IP Address Command
Router(config)# ip host london 172.16.1.3

no ip domain-lookup Command - Ever type in a command incorrectly and are left having to wait for a minute or two as the router tries to translate your command to a domain server of 255.255.255.255? The router is set by default to try to resolve any word that is not a command to a Domain Name System (DNS) server at address 255.255.255.255. If you are not going to set up DNS, turn off this feature to save you time as you
type, especially if you are a poor typist.
Router(config)# no ip domain-lookup
Router(config)#

The logging synchronous Command - Turns on synchronous logging. Information items sent to the console will not interrupt the command you are typing. The command will be moved to a new line.
Router(config)#line console 0
Router(config-line)#logging synchronous

The exec-timeout Command - Sets the time limit when the console automatically logs off. Set to 0 0 (minutes seconds) means the console never logs off. The command exec-timeout 0 0 is great for a lab environment because the console never logs out. This is considered to be bad security and is dangerous in the real world. The default for the exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0).
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0

Cisco Command Aliases
Alias command allows you to define aliases for long commands. Alias command breaks down into three modes:
Alias Exec for Privileged Mode/Alias Configure for Global Configuration Mode/Alias Interface for Interface Configuration Mode.
Let say that you want to shorten Show Running-Configuration command to just two keystrokes, you could define it as follow:

Router(Config)# alias exec sr Show Running-config
Or if you want to use ns to perform No Shut command on an interface you could define it as:
Router(Config)# alias interface ns no shutdown

So now instead of typing out all those long commands you could type sr for show run or ns for no shut down and still achieve the same desired effects. Cisco IOS includes some built-in command aliases. You can view these aliases by using the "show alias" command. Here are the default command aliases:
• h - help
• lo - logout
• p - ping
• r - resume
• s - show
• u - undebug
• un - undebug
• w - where
The Alias Command reminds me of the .bat files back in the DOS days when we used it to combine multiple commands together and shorten the filename to just a few keystrokes. If used effectively, this could save you a lot of time and typing.

Verifying the Current Configuration - To verify the configuration in DRAM, use the show running-config command
Router#show running-config
Building configuration...
Current configuration : 776 bytes
!
version 12.4
Verifying the Stored Configuration - Next, you should check the configuration stored in NVRAM. To see this, use the show
startup-config command (sh start for short)

Router#show startup-config
Using 776 out of 245752 bytes
!
version 12.4

Copying the Current Configuration to NVRAM - You’ll then need to copy the current configuration to NVRAM:
Router#copy running-config startup-config
Destination filename [startup-config]?[enter]
Building configuration...
[OK]

Copying the Configuration to a TFTP Server - Once the file is copied to NVRAM, you can make a second backup to a TFTP server by using the copy running-config tftp command (copy run tftp for short)
Router#copy running-config tftp
Address or name of remote host []?1.1.1.2
Destination filename [router-confg]?todd-confg
!!
776 bytes copied in 0.800 secs (970 bytes/sec)
Router#

Restoring the Cisco Router Configuration – If you did copy the router’s configuration to a TFTP server as a second backup, you can restore the configuration using the copy tftp running-config command (copy tftp run for short) or the copy tftp startup-config command (copy tftp start for short)

Router#copy tftp running-config
Address or name of remote host []?1.1.1.2
Source filename []?todd-confg
Destination filename[running-config]?[enter]
Accessing tftp://1.1.1.2/todd-confg...
Loading todd-confg from 1.1.1.2 (via FastEthernet0/0): !
[OK - 776 bytes]
776 bytes copied in 9.212 secs (84 bytes/sec)
Router#

show Commands
Router#show ? Lists all show commands available.
Router#show interfaces Displays statistics for all interfaces.
Router#show interface serial 0/0/0 Displays statistics for a specific interface (in this case, serial 0/0/0).
Router#show ip interface brief Displays a summary of all interfaces, including status and IP address assigned.
Router#show controllers serial 0/0/0 Displays statistics for interface hardware. Statistics display if the clock rate is set and if the cable is
DCE, DTE, or not attached.
Router#show clock Displays time set on device.
Router#show hosts Displays local host-to-IP address cache. These are the names and addresses of hosts on the network to which you can connect.
Router#show users Displays all users connected to device.
Router#show history Displays the history of commands used at this edit level.
Router#show arp Displays the Address Resolution Protocol (ARP) table.
Router#show protocols Displays status of configured Layer 3 protocols.