HSRP Configuration

Figure 6-13 shows an example for the use of HSRP. Host A is configured with a default gateway of 192.168.1.1. Router A and Router B are configured for HSRP. Router A is configured with a higher priority than Router B, and the default priority is 100. The default timers are hellotime = 3 seconds and holdtime = 10 seconds. Authentication is used for the HSRP group, and the password is "secret." The routers are also configured to preempt, so if Router A fails or the serial interface in Router A fails, Router B becomes active. After Router A becomes available, Router A preempts and becomes the HSRP active router again, even if Router B has not failed.

Figure 6-13 HSRP Example

Router A Ethernet 0

Virtual IP: 192.168.1.1/24

Network B

Router B Ethernet 0

The configuration for Routers A and B for HSRP group #1 are displayed in Example 6-3.

Example 6-3 Example of HSRP Configuration hostname RouterA

interface ethernet 0 ip address 192.168.1.2 255.255.255.0 standby 1 ip 192.168.1.1 standby 1 preempt standby 1 priority 105 standby 1 authentication secret standby 1 track serial 0

hostname RouterB

interface ethernet 0 ip address 192.168.1.3 255.255.255.0 standby 1 ip 192.168.1.1 standby 1 preempt standby 1 authentication secret standby 1 track serial 0

To verify HSRP, use the show standby command.

The local state is active for the active router, as shown in Example 6-4. From the router output, you can determine that Router A is the active HSRP router with a priority of 105 and that it can preempt. Router A also tracks serial 0.

Example 6-4 show standby Command on Router A

routerA#show standby Ethernet0 - Group 1

Local state is Active, priority 105, may preempt

Hellotime 3 holdtime 10 configured hellotime 3 sec holdtime 10 sec

Next hello sent in 00:00:02.500

Hot standby IP address is 192.168.1.1 configured

Active router is local

Standby router is 192.168.1.3 expires in 00:00:11 Standby virtual mac address is 0000.0c07.ac01 1 state changes, last state change 00:13:10 Tracking interface states for 1 interface, 1 up: Up Serial0

The second router has a local state of standby, as shown in Example 6-5. From the router output, you can determine that Router B is the HSRP standby router with a priority of 100. Router B also tracks its interface serial 0. The output also shows that the default hellotime is 3 seconds and the holdtime is 10 seconds.

Example 6-5 show standby Command on Router B

routerB6#show standby

Ethernet0 - Group 1

Local state is Standby,

priority 100, may preempt

Hellotime 3 holdtime 10

configured hellotime 3 sec holdtime 10 sec

Next hello sent in 00:0

0:00.028

Hot standby IP address

is 192.168.1.1 configured

Active router is 192.168.1.2 expires in 00:00:12, priority 105

Standby router is local

4 state changes, last state change 00:13:32

Tracking interface states for 1 interface, 1 up:

Up Serial0

ICMP is defined by RFC 792. ICMP operates in the network layer and communicates error messages between hosts and routers. ICMP uses several messages for different situations, for example, when a packet cannot reach a destination, when the router cannot forward the packet, or when the destination host cannot be reached. ICMP uses IP protocol number 1. ICMP returns several message types, each with particular codes. The different message types are described in Table 6-16.

Table 6-16 ICMP Message Types

ICMP Type Number

Type Name

Description

0

Echo Reply

Used by the ping application to test connectivity. The station receiving each message replies with an echo reply message.

3

Destination Unreachable

The following codes are used: 0—Destination network unreachable.

1 —Destination host unreachable.

2 —Destination protocol unreachable.

3—Destination port unreachable.

4—Fragmentation needed and DF set.

5—Source route failed.

Codes 0, 1, 4, and 5 are received from a router. Codes 2 and 3 are received from the destination host.

4

Source Quench

Used if a router discards a packet because it does not have the buffer space needed to queue the packets for output. A source quench message is sent, which is a request to the host to cut back the rate at which it is sending traffic to the destination.

5

Redirect

Tells the sending host to send its traffic for the destination network directly to another gateway.

8

Echo

Used by the ping application to test connectivity. The station testing connectivity sends the echo message.

11

Time Exceeded

The following codes are used:

0—Time to live exceeded in transit

1 —Fragment reassembly time exceeded

Code 0 can be received from a router. Code 1 is received from the destination host.

12

Parameter Problem

Used if problems are in the header of the IP packet.

13

Timestamp

Contains the original timestamp in the ICMP message.

14

Timestamp Reply

Adds the received timestamp and transmit timestamp in the ICMP message.

15

Information Request

Used by a host to find out what network it is on.

16

Information Reply

Received by the host with information on which network it is on.

Using Ping on Cisco Routers

Ping can verify IP connectivity to a destination address. On Cisco routers, you can verify connectivity by entering in the terminal the command ping ip-address. Example 6-6 shows that the successful reply destination is represented with exclamation points. By default, five echo messages are sent. The success rate of replies and the time to send and receive the reply is also returned.

Example 6-6 Example of the Basic Ping Application router5>ping 10.1.3.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.3.1, timeout is 2 seconds: !!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 4/7/20 ms

In router enable mode, you can perform more advanced testing. Enter ping and press Enter. Here, you can change the number of echos and the size of the datagram. By pressing y at the Extended Commands prompt, you can change the ToS, set the Don't fragment bit, record route, and so on. Example 6-7 shows an extended ping where the repeat count is 10, the datagram size is changed to 500 bytes, and the data pattern is all 1s.

Example 6-7 Advanced Ping Options

router3#ping

Protocol [ip]:

Target IP address: 10.1.3.2

Repeat count [5]: 10

Datagram size [100]: 500

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

Type of service [0]:

Set DF bit in IP header? [no]: y

Validate reply data? [no]: y

Data pattern [0xABCD]: 0xffff

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 10, 500-byte ICMP Echos to 1

3.1.3.2, timeout is 2 seconds:

Packet has data pattern 0xFFFF !!!!!!!!!!

Success rate is 100 percent (10/10),

round-trip min/avg/max = 4/6/24 ms

Although these examples have successful returns, other test characters can be returned. Table 6-17 shows those characters.

Table 6-17 Ping Test Characters

Character

Description

! Receipt of a reply.

. The network server timed out while waiting for a reply.

U

A destination unreachable error message was received.

Q

Source quench (destination too busy).

M

Could not fragment.

?

Unknown packet type.

&

Packet lifetime exceeded.

Telnet

Telnet is a TCP/IP application-layer protocol that provides remote terminal access. RFC 854 is the current Telnet protocol specification. Telnet runs over TCP, by using TCP port 23 to connect to the Telnet server. The remote terminal is text based; by default, it uses 128 ASCII codes.

FTP is a TCP/IP application-layer protocol that provides file transfer capabilities. FTP was first specified by RFC 114 and has been updated several times, but the standard RFC is 959. The objectives of the FTP protocol are to provide sharing of files, shield users from variations in file storage systems among hosts, and transfer data reliably and efficiently.

FTP uses two different connections: One is a control connection between the user and the FTP server, and the second is a data transfer connection. The data connection might not exist until the commands to transfer the files are executed. The FTP control connection is established through a TCP process, and the server port is TCP 21. The data connection uses TCP port 20.

You can use FTP on any Windows system, Unix system, and others.

TFTP

TFTP is a simpler type of FTP. Instead of using TCP as FTP does, it uses UDP as a transport protocol. TFTP does not use a control connection, it cannot list directories, nor does it have user authentication. It reads or writes files from/to a remote TFTP server. TFTP (version 2) is defined in RFC 1350 and uses UDP port 69. An example of the use of TFTP is the transfer of IOS and configuration files to a router. Chapter 3, "Cisco Equipment Operations," covers the methods that you can use to transfer IOS and configuration files from and to a router by using a TFTP server.

DNS is a method to manage Internet names in a distributed fashion. DNS servers return the destination IP addresses given the domain name. DNS was first specified by RFCs 882 and 883. The current specifications are RFCs 1034 and 1035.

DNS is a distributed database, where separate organizations administer domain name space and can then break the domain into several subdomains. DNS follows a reversed-tree structure for domain name space. The Internet Name Registration Authority manages the root of the tree. The DNS tree is shown in Figure 6-14.

0 0

Responses

  • raymond
    Why use primpt command in hsrp?
    5 months ago

Post a comment