News Update :

Busines

Hiburan

Basic Router Configuration

When configuring a router, certain basic tasks are performed including:
Naming the router
Setting passwords
Configuring interfaces
Configuring a banner
Saving changes on a router
Verifying basic configuration and router operations

You should already be familiar with these configuration commands; however, we will do a brief review. We begin our review with the assumption that the router does not have a current startup-config file.

The first prompt appears at user mode. User mode allows you to view the state of the router, but does not allow you to modify its configuration. Do not confuse the term "user" as used in user mode with users of the network. User mode is intended for the network technicians, operators, and engineers who have the responsibility to configure network devices.

Router>

The enable command is used to enter the privileged EXEC mode. This mode allows the user to make configuration changes on the router. The router prompt will change from a ">" to a "#" in this mode.

Router>enable
Router#

Hostnames and Passwords

The figure shows the basic router configuration command syntax used to configure R1 in the following example. You can open Packet Tracer Activity 1.2.2 and follow along or wait until the end of this section to open it.

First, enter the global configuration mode.

Router#config t

Next, apply a unique hostname to the router.

Router(config)#hostname R1
R1(config)#

Now, configure a password that is to be used to enter privileged EXEC mode. In our lab environment, we will use the password class. However, in production environments, routers should have strong passwords. See the links at the end of this section for more information on creating and using strong passwords.

Router(config)#enable secret class

Next, configure the console and Telnet lines with the password cisco. Once again, the password cisco is used only in our lab environment. The command login enables password checking on the line. If you do not enter the command login on the console line, the user will be granted access to the line without entering a password.

R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login

Configuring a Banner

From the global configuration mode, configure the message-of-the-day (motd) banner. A delimiting character, such as a "#" is used at the beginning and at the end of the message. The delimiter allows you to configure a multiline banner, as shown here.

R1(config)#banner motd #
Enter TEXT message. End with the character '#'.
******************************************
WARNING!! Unauthorized Access Prohibited!!
******************************************
#

Configuring an appropriate banner is part of a good security plan. At a very minimum, a banner should warn against unauthorized access. Never configure a banner that "welcomes" an unauthorized user.

Links

For discussions about using strong passwords, see:

"Cisco Response to Dictionary Attacks on Cisco LEAP," at http://www.cisco.com/en/US/products/hw/wireless/ps430/prod_bulletin09186a00801cc901.html#wp1002291

"Strong passwords: How to create and use them," at http://www.microsoft.com/athome/security/privacy/password.mspx

Router Interface Configuration

You will now configure the individual router interfaces with IP addresses and other information. First, enter the interface configuration mode by specifying the interface type and number. Next, configure the IP address and subnet mask:

R1(config)#interface Serial0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0

It is good practice to configure a description on each interface to help document the network information. The description text is limited to 240 characters. On production networks a description can be helpful in troubleshooting by providing information about the type of network that the interface is connected to and if there are any other routers on that network. If the interface connects to an ISP or service carrier, it is helpful to enter the third party connection and contact information; for example:

Router(config-if)#description Ciruit#VBN32696-123 (help desk:1-800-555-1234)

In lab environments, enter a simple description that will help in troubleshooting situations; for example:

R1(config-if)#description Link to R2

After configuring the IP address and description, the interface must be activated with the no shutdown command. This is similar to powering on the interface. The interface must also be connected to another device (a hub, a switch, another router, etc.) for the Physical layer to be active.

Router(config-if)#no shutdown

Note: When cabling a point-to-point serial link in our lab environment, one end of the cable is marked DTE and the other end is marked DCE. The router that has the DCE end of the cable connected to its serial interface will need the additional clock rate command configured on that serial interface. This step is only necessary in a lab environment and will be explained in more detail in Chapter 2, "Static Routing."

R1(config-if)#clock rate 64000

Repeat the interface configuration commands on all other interfaces that need to be configured. In our topology example, the FastEthernet interface needs to be configured.

R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#description R1 LAN
R1(config-if)#no shutdown

Each Interface Belongs to a Different Network

At this point, note that each interface must belong to a different network. Although the IOS allows you to configure an IP address from the same network on two different interfaces, the router will not activate the second interface.

For example, what if you attempt to configure the FastEthernet 0/1 interface on R1 with an IP address on the 192.168.1.0/24 network? FastEthernet 0/0 has already been assigned an address on that same network. If you attempt to configure another interface, FastEthernet 0/1, with an IP address that belongs to the same network, you will get the following message:

R1(config)#interface FastEthernet0/1
R1(config-if)#ip address 192.168.1.2 255.255.255.0
192.168.1.0 overlaps with FastEthernet0/0

If there is an attempt to enable the interface with the no shutdown command, the following message will appear:

R1(config-if)#no shutdown
192.168.1.0 overlaps with FastEthernet0/0
FastEthernet0/1: incorrect IP address assignment

Notice that the output from the show ip interface brief command shows that the second interface configured for the 192.168.1.0/24 network, FastEthernet 0/1, is still down.

R1#show ip interface brief

FastEthernet0/1 192.168.1.2 YES manual administratively down down
Verifying Basic Router Configuration

Currently in the example, all of the previous basic router configuration commands have been entered and were immediately stored in the running configuration file of R1. The running-config file is stored in RAM and is the configuration file used by IOS. The next step is to verify the commands entered by displaying the running configuration with the following command:

R1#show running-config

Now that the basic configuration commands have been entered, it is important to save the running-config to the nonvolatile memory, the NVRAM of the router. That way, in case of a power outage or an accidental reload, the router will be able to boot with the current configuration. After the router's configuration has been completed and tested, it is important to save the running-config to the startup-config as the permanent configuration file.

R1#copy running-config startup-config

After applying and saving the basic configuration, you can use several commands to verify that you have correctly configured the router. Click the appropriate button in the figure to see a listing of each command's output. All of these commands are discussed in detail in later chapters. For now, begin to become familiar with the output.

R1#show running-config

This command displays the current running configuration that is stored in RAM. With a few exceptions, all configuration commands that were used will be entered into the running-config and implemented immediately by the IOS.

R1#show startup-config

This command displays the startup configuration file stored in NVRAM. This is the configuration that the router will use on the next reboot. This configuration does not change unless the current running configuration is saved to NVRAM with the copy running-config startup-config command. Notice in the figure that the startup configuration and the running configuration are identical. They are identical because the running configuration has not changed since the last time it was saved. Also notice that the show startup-config command also displays how many bytes of NVRAM the saved configuration is using.

R1#show ip route

This command displays the routing table that the IOS is currently using to choose the best path to its destination networks. At this point, R1 only has routes for its directly connected networks via its own interfaces.

R1#show interfaces

This command displays all of the interface configuration parameters and statistics. Some of this information is discussed later in the curriculum and in CCNP.

R1#show ip interface brief

This command displays abbreviated interface configuration information, including IP address and interface status. This command is a useful tool for troubleshooting and a quick way to determine the status of all router interfaces.
Related Topic Router

Implementing Basic Addressing Schemes

When designing a new network or mapping an existing network, document the network. At a minimum, the documentation should include a topology diagram that indicates the physical connectivity and an addressing table that lists all of the following information:
Device names
Interfaces used in the design
IP addresses and subnet masks
Default gateway addresses for end devices, such as PCs

Populating an Address Table

The figure shows a network topology with the devices interconnected and configured with IP addresses. Under the topology is a table used to document the network. The table is partially populated with the data documenting the network (devices, IP addresses, subnet masks, and interfaces).

Router R1 and host PC1 are already documented. Finish populating the table and the blank spaces on the diagram dragging the pool of IP addresses shown below the table to the correct locations.

Routers and the Network Layer

The main purpose of a router is to connect multiple networks and forward packets destined either for its own networks or other networks. A router is considered a Layer 3 device because its primary forwarding decision is based on the information in the Layer 3 IP packet, specifically the destination IP address. This process is known as routing.

When a router receives a packet, it examines its destination IP address. If the destination IP address does not belong to any of the router's directly connected networks, the router must forward this packet to another router. In the figure, R1 examines the destination IP address of the packet. After searching the routing table, R1 forwards the packet onto R2. When R2 receives the packet, it also examines the packet's destination IP address. After searching its routing table, R2 forwards the packet out its directly connected Ethernet network to PC2.

When each router receives a packet, it searches its routing table to find the best match between the destination IP address of the packet and one of the network addresses in the routing table. Once a match is found, the packet is encapsulated in the layer 2 data link frame for that outgoing interface. The type of data link encapsulation depends on the type of interface, such as Ethernet or HDLC.

Eventually the packet reaches a router that is part of a network that matches the destination IP address of the packet. In this example, router R2 receives the packet from R1. R2 forwards the packet out its Ethernet interface, which belongs to the same network as the destination device, PC2.

This sequence of events is explained in more detail later in this chapter.
Routers Operate at Layers 1, 2, and 3

A router makes its primary forwarding decision at Layer 3, but as we saw earlier, it participates in Layer 1 and Layer 2 processes as well. After a router has examined the destination IP address of a packet and consulted its routing table to make its forwarding decision, it can forward that packet out the appropriate interface toward its destination. The router encapsulates the Layer 3 IP packet into the data portion of a Layer 2 data link frame appropriate for the exit interface. The type of frame can be an Ethernet, HDLC, or some other Layer 2 encapsulation - whatever encapsulation is used on that particular interface. The Layer 2 frame is encoded into the Layer 1 physical signals that are used to represent bits over the physical link.

To understand this process better, refer to the figure. Notice that PC1 operates at all seven layers, encapsulating the data and sending the frame out as a stream of encoded bits to R1, its default gateway.

R1 receives the stream of encoded bits on its interface. The bits are decoded and passed up to Layer 2, where R1 decapsulates the frame. The router examines the destination address of the data link frame to determine if it matches the receiving interface, including a broadcast or multicast address. If there is a match with the data portion of the frame, the IP packet is passed up to Layer 3, where R1 makes its routing decision. R1 then re-encapsulates the packet into a new Layer 2 data link frame and forwards it out the outbound interface as a stream of encoded bits.

R2 receives the stream of bits, and the process repeats itself. R2 decapsulates the frame and passes the data portion of the frame, the IP packet, to Layer 3 where R2 makes its routing decision. R2 then re-encapsulates the packet into a new Layer 2 data link frame and forwards it out the outbound interface as a stream of encoded bits.

This process is repeated once again by router R3, which forwards the IP packet, encapsulated inside a data link frame and encoded as bits, to PC2.

Each router in the path from source to destination performs this same process of decapsulation, searching the routing table, and then re-encapsulation. This process is important to your understanding of how routers participate in networks. Therefore, we will revisit this discussion in more depth in a later section.
Related Topic Router

Router Interface

Management Ports

Routers have physical connectors that are used to manage the router. These connectors are known as management ports. Unlike Ethernet and serial interfaces, management ports are not used for packet forwarding. The most common management port is the console port. The console port is used to connect a terminal, or most often a PC running terminal emulator software, to configure the router without the need for network access to that router. The console port must be used during initial configuration of the router.

Another management port is the auxiliary port. Not all routers have auxiliary ports. At times the auxiliary port can be used in ways similar to a console port. It can also be used to attach a modem. Auxiliary ports will not be used in this curriculum.

The figure shows the console and AUX ports on the router.

Router Interfaces

The term interface on Cisco routers refers to a physical connector on the router whose main purpose is to receive and forward packets. Routers have multiple interfaces that are used to connect to multiple networks. Typically, the interfaces connect to various types of networks, which means that different types of media and connectors are required. Often a router will need to have different types of interfaces. For example, a router usually has FastEthernet interfaces for connections to different LANs and various types of WAN interfaces to connect a variety of serial links including T1, DSL and ISDN. The figure shows the FastEthernet and serial interfaces on the router.

Like interfaces on a PC, the ports and interfaces on a router are located on the outside of the router. Their external location allows for convenient attachment to the appropriate network cables and connectors.

Note: A single interface on a router can be used to connect to multiple networks; however, this is beyond the scope of this course and is discussed in a later course.

Like most networking devices, Cisco routers use LED indicators to provide status information. An interface LED indicates the activity of the corresponding interface. If an LED is off when the interface is active and the interface is correctly connected, this may be an indication of a problem with that interface. If an interface is extremely busy, its LED will always be on. Depending on the type of router, there may be other LEDs as well. For more information on LED displays on the 1841, see the link below.

Links

"Troubleshooting Cisco 1800 Series Routers (Modular)," http://www.cisco.com/en/US/products/ps5853/products_installation_guide_chapter09186a00802c36b8.html
Interfaces Belong to Different Networks

As shown in the figure, every interface on the router is a member or host on a different IP network. Each interface must be configured with an IP address and subnet mask of a different network. Cisco IOS will not allow two active interfaces on the same router to belong to the same network.

Router interfaces can be divided into two major groups:
LAN interfaces - such as Ethernet and FastEthernet
WAN interfaces - such as serial, ISDN, and Frame Relay

LAN Interfaces

As the name indicates, LAN interfaces are used to connect the router to the LAN, similar to how a PC Ethernet NIC is used to connect the PC to the Ethernet LAN. Like a PC Ethernet NIC, a router Ethernet interface also has a Layer 2 MAC address and participates in the Ethernet LAN in the same way as any other hosts on that LAN. For example, a router Ethernet interface participates in the ARP process for that LAN. The router maintains an ARP cache for that interface, sends ARP requests when needed, and responds with ARP replies when required.

A router Ethernet interface usually uses an RJ-45 jack that supports unshielded twisted-pair (UTP) cabling. When a router is connected to a switch, a straight-through cable is used. When two routers are connected directly through the Ethernet interfaces, or when a PC NIC is connected directly to a router Ethernet interface, a crossover cable is used.

Use the Packet Tracer Activity later in this section to test your cabling skills.

WAN Interfaces

WAN interfaces are used to connect routers to external networks, usually over a larger geographical distance. The Layer 2 encapsulation can be of different types, such as PPP, Frame Relay, and HDLC (High-Level Data Link Control). Similar to LAN interfaces, each WAN interface has its own IP address and subnet mask, which identifies it as a member of a specific network.

Note: MAC addresses are used on LAN interfaces, such as Ethernet, and are not used on WAN interfaces. However, WAN interfaces use their own Layer 2 addresses depending on the technology. Layer 2 WAN encapsulation types and addresses are covered in a later course.

Router Interfaces

The router in the figure has four interfaces. Each interface has a Layer 3 IP address and subnet mask that configures it for a different network. The Ethernet interfaces also have Layer 2 Ethernet MAC addresses.

The WAN interfaces are using different Layer 2 encapsulations. Serial 0/0/0 is using HDLC and Serial 0/0/1 is using PPP. Both of these serial point-to-point protocols use a broadcast address for the Layer 2 destination address when encapsulating the IP packet into a data link frame.

In the lab environment, you are restricted as to how many LAN and WAN interfaces you can use to configure hands-on labs. With Packet Tracer, however, you have the flexibility to create more complex network designs.
Related Topic Router

Router Bootup Process

There are four major phases to the bootup process:

1. Performing the POST

2. Loading the bootstrap program

3. Locating and loading the Cisco IOS software

4. Locating and loading the startup configuration file or entering setup mode

1. Performing the POST

The Power-On Self Test (POST) is a common process that occurs on almost every computer during bootup. The POST process is used to test the router hardware. When the router is powered on, software on the ROM chip conducts the POST. During this self-test, the router executes diagnostics from ROM on several hardware components including the CPU, RAM, and NVRAM. After the POST has been completed, the router executes the bootstrap program.

2. Loading the Bootstrap Program

After the POST, the bootstrap program is copied from ROM into RAM. Once in RAM, the CPU executes the instructions in the bootstrap program. The main task of the bootstrap program is to locate the Cisco IOS and load it into RAM.

Note: At this point, if you have a console connection to the router, you will begin to see output on the screen.

3. Locating and Loading Cisco IOS

Locating the Cisco IOS software. The IOS is typically stored in flash memory, but can also be stored in other places such as a TFTP (Trivial File Transfer Protocol) server.

If a full IOS image can not be located, a scaled-down version of the IOS is copied from ROM into RAM. This version of IOS is used to help diagnose any problems and can be used to load a complete version of the IOS into RAM.

Note: A TFTP server is usually used as a backup server for IOS but it can also be used as a central point for storing and loading the IOS. IOS management and using the TFTP server is discussed in a later course.

Loading the IOS. Some of the older Cisco routers ran the IOS directly from flash, but current models copy the IOS into RAM for execution by the CPU.

Note: Once the IOS begins to load, you may see a string of pounds signs (#), as shown in the figure, while the image decompresses.

4. Locating and Loading the Configuration File

Locating the Startup Configuration File. After the IOS is loaded, the bootstrap program searches for the startup configuration file, known as startup-config, in NVRAM. This file has the previously saved configuration commands and parameters including:
interface addresses
routing information
passwords
any other configurations saved by the network administrator

If the startup configuration file, startup-config, is located in NVRAM, it is copied into RAM as the running configuration file, running-config.

Note: If the startup configuration file does not exist in NVRAM, the router may search for a TFTP server. If the router detects that it has an active link to another configured router, it sends a broadcast searching for a configuration file across the active link. This condition will cause the router to pause, but you will eventually see a console message like the following one:



%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)

Executing the Configuration File. If a startup configuration file is found in NVRAM, the IOS loads it into RAM as the running-config and executes the commands in the file, one line at a time. The running-config file contains interface addresses, starts routing processes, configures router passwords and defines other characteristics of the router.

Enter Setup Mode (Optional). If the startup configuration file can not be located, the router prompts the user to enter setup mode. Setup mode is a series of questions prompting the user for basic configuration information. Setup mode is not intended to be used to enter complex router configurations, and it is not commonly used by network administrators.

When booting a router that does not contain a startup configuration file, you will see the following question after the IOS has been loaded:

Would you like to enter the initial configuration dialog? [yes/no]: no

Setup mode will not be used in this course to configure the router. When prompted to enter setup mode, always answer no. If you answer yes and enter setup mode, you can press Ctrl-C at any time to terminate the setup process.

When setup mode is not used, the IOS creates a default running-config. The default running-config is a basic configuration file that includes the router interfaces, management interfaces, and certain default information. The default running-config does not contain any interface addresses, routing information, passwords, or other specific configuration information.

Command Line Interface

Depending on the platform and IOS, the router may ask the following question before displaying the prompt:

Would you like to terminate autoinstall? [yes]:
Press the Enter key to accept the default answer.
Router>

Note: If a startup configuration file was found, the running-config may contain a hostname and the prompt will display the hostname of the router.

Once the prompt displays, the router is now running the IOS with the current running configuration file. The network administrator can now begin using IOS commands on this router.

Note: The bootup process is discussed in more detail in a later course.
Verifying Router Bootup Process

The show version command can be used to help verify and troubleshoot some of the basic hardware and software components of the router. The show version command displays information about the version of the Cisco IOS software currently running on the router, the version of the bootstrap program, and information about the hardware configuration, including the amount of system memory.

The output from the show version command includes:

IOS version

Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)

This is the version of the Cisco IOS software in RAM and that is being used by the router.

ROM Bootstrap Program

ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)

This shows the version of the system bootstrap software, stored in ROM memory, that was initially used to boot up the router.

Location of IOS

System image file is "flash:c2600-i-mz.122-28.bin"

This shows where the boostrap program is located and loaded the Cisco IOS, and the complete filename of the IOS image.

CPU and Amount of RAM

cisco 2621 (MPC860) processor (revision 0x200) with 60416K/5120K bytes of memory

The first part of this line displays the type of CPU on this router. The last part of this line displays the amount of DRAM. Some series of routers, like the 2600, use a fraction of DRAM as packet memory. Packet memory is used for buffering packets.

To determine the total amount of DRAM on the router, add both numbers. In this example, the Cisco 2621 router has 60,416 KB (kilobytes) of free DRAM used for temporarily storing the Cisco IOS and other system processes. The other 5,120 KB is dedicated for packet memory. The sum of these numbers is 65,536K, or 64 megabytes (MB) of total DRAM.

Note: It may be necessary to upgrade the amount of RAM when upgrading the IOS.

Interfaces

2 FastEthernet/IEEE 802.3 interface(s)
2 Low-speed serial(sync/async) network interface(s)

This section of the output displays the physical interfaces on the router. In this example, the Cisco 2621 router has two FastEthernet interfaces and two low-speed serial interfaces.

Amount of NVRAM

32K bytes of non-volatile configuration memory.

This is the amount of NVRAM on the router. NVRAM is used to store the startup-config file.

Amount of Flash

16384K bytes of processor board System flash (Read/Write)

This is the amount of flash memory on the router. Flash is used to permanently store the Cisco IOS.

Note: It may be necessary to upgrade the amount of flash when upgrading the IOS.

Configuration Register

Configuration register is 0x2102

The last line of the show version command displays the current configured value of the software configuration register in hexadecimal. If there is a second value displayed in parentheses, it denotes the configuration register value that will be used during the next reload.

The configuration register has several uses, including password recovery. The factory default setting for the configuration register is 0x2102. This value indicates that the router will attempt to load a Cisco IOS software image from flash memory and load the startup configuration file from NVRAM.

Note: The configuration register is discussed in more detail in a later course.

Internetwork Operating System

The operating system software used in Cisco routers is known as Cisco Internetwork Operating System (IOS). Like any operating system on any computer, Cisco IOS manages the hardware and software resources of the router, including memory allocation, processes, security, and file systems. Cisco IOS is a multitasking operating system that is integrated with routing, switching, internetworking, and telecommunications functions.

Although the Cisco IOS may appear to be the same on many routers, there are many different IOS images. An IOS image is a file that contains the entire IOS for that router. Cisco creates many different types of IOS images, depending upon the model of the router and the features within the IOS. Typically the more features in the IOS, the larger the IOS image, and therefore, the more flash and RAM that is required to store and load the IOS. For example, some features include the ability to run IPv6 or the ability for the router to perform NAT (Network Address Translation).

As with other operating systems Cisco IOS has its own user interface. Although some routers provide a graphical user interface (GUI), the command line interface (CLI) is a much more common method of configuring Cisco routers. The CLI is used throughout this curriculum.

Upon bootup, the startup-config file in NVRAM is copied into RAM and stored as the running-config file. IOS executes the configuration commands in the running-config. Any changes entered by the network administrator are stored in the running-config and are immediately implemented by the IOS. In this chapter, we will review some of the basic IOS commands used to configure a Cisco router. In later chapters, we will learn the commands used to configure, verify, and troubleshoot static routing and various routing protocols such as RIP, EIGRP, and OSPF.

Note: Cisco IOS and the bootup process is discussed in more detail in a later course.

Router CPU And Memory

Router Components and their Functions

Like a PC, a router also includes:
Central Processing Unit (CPU)
Random-Access Memory (RAM)
Read-Only Memory (ROM)

Roll over components in the figure to see a brief description of each.

CPU

The CPU executes operating system instructions, such as system initialization, routing functions, and switching functions.

RAM

RAM stores the instructions and data needed to be executed by the CPU. RAM is used to store these components:
Operating System: The Cisco IOS (Internetwork Operating System) is copied into RAM during bootup.
Running Configuration File: This is the configuration file that stores the configuration commands that the router IOS is currently using. With few exceptions, all commands configured on the router are stored in the running configuration file, known as running-config.
IP Routing Table: This file stores information about directly connected and remote networks. It is used to determine the best path to forward the packet.
ARP Cache: This cache contains the IPv4 address to MAC address mappings, similar to the ARP cache on a PC. The ARP cache is used on routers that have LAN interfaces such as Ethernet interfaces.
Packet Buffer: Packets are temporarily stored in a buffer when received on an interface or before they exit an interface.

RAM is volatile memory and loses its content when the router is powered down or restarted. However, the router also contains permanent storage areas, such as ROM, flash and NVRAM.

ROM

ROM is a form of permanent storage. Cisco devices use ROM to store:
The bootstrap instructions
Basic diagnostic software
Scaled-down version of IOS.

ROM uses firmware, which is software that is embedded inside the integrated circuit. Firmware includes the software that does not normally need to be modified or upgraded, such as the bootup instructions. Many of these features, including ROM monitor software, will be discussed in a later course. ROM does not lose its contents when the router loses power or is restarted.

Flash Memory

Flash memory is nonvolatile computer memory that can be electrically stored and erased. Flash is used as permanent storage for the operating system, Cisco IOS. In most models of Cisco routers, the IOS is permanently stored in flash memory and copied into RAM during the bootup process, where it is then executed by the CPU. Some older models of Cisco routers run the IOS directly from flash. Flash consists of SIMMs or PCMCIA cards, which can be upgraded to increase the amount of flash memory.

Flash memory does not lose its contents when the router loses power or is restarted.

NVRAM

NVRAM (Nonvolatile RAM) does not lose its information when power is turned off. This is in contrast to the most common forms of RAM, such as DRAM, that requires continual power to maintain its information. NVRAM is used by the Cisco IOS as permanent storage for the startup configuration file (startup-config). All configuration changes are stored in the running-config file in RAM, and with few exceptions, are implemented immediately by the IOS. To save those changes in case the router is restarted or loses power, the running-config must be copied to NVRAM, where it is stored as the startup-config file. NVRAM retains its contents even when the router reloads or is powered off.

ROM, RAM, NVRAM, and flash are discussed in the following section which introduces the IOS and the bootup process. They are also discussed in more detail in a later course relative to managing the IOS.

It is more important for a networking professional to understand the function of the main internal components of a router than the exact location of those components inside a specific router. The internal physical architecture will differ from model to model.

Links

View the "Cisco 1800 Series Portfolio Multimedia Demo," http://www.cisco.com/en/US/products/ps5875/index.html

Inside Routing

Routers are Computers

A router is a computer, just like any other computer including a PC. The very first router, used for the Advanced Research Projects Agency Network (ARPANET), was the Interface Message Processor (IMP). The IMP was a Honeywell 316 minicomputer; this computer brought the ARPANET to life on August 30, 1969.

Note: The ARPANET was developed by Advanced Research Projects Agency (ARPA) of the United States Department of Defense. The ARPANET was the world's first operational packet switching network and the predecessor of today's Internet.

Routers have many of the same hardware and software components that are found in other computers including:
  • CPU
  • RAM
  • ROM
  • Operating System
Typical users may be unaware of the presence of numerous routers in their own network or in the Internet. Users expect to be able to access web pages, send e-mails, and download music - whether the server they are accessing is on their own network or on another network half-way around the world. However, networking professionals know it is the router that is responsible for forwarding packets from network-to-network, from the original source to the final destination.

A router connects multiple networks. This means that it has multiple interfaces that each belong to a different IP network. When a router receives an IP packet on one interface, it determines which interface to use to forward the packet onto its destination. The interface that the router uses to forward the packet may be the network of the final destination of the packet (the network with the destination IP address of this packet), or it may be a network connected to another router that is used to reach the destination network.

Each network that a router connects to typically requires a separate interface. These interfaces are used to connect a combination of both Local Area Networks (LANs) and Wide Area Networks (WANs). LANs are commonly Ethernet networks that contain devices such as PCs, printers, and servers. WANs are used to connect networks over a large geographical area. For example, a WAN connection is commonly used to connect a LAN to the Internet Service Provider (ISP) network.

In the figure, we see that routers R1 and R2 are responsible for receiving the packet on one network and forwarding the packet out another network toward the destination network.
The primary responsibility of a router is to direct packets destined for local and remote networks by:
Determining the best path to send packets
Forwarding packets toward their destination

The router uses its routing table to determine the best path to forward the packet. When the router receives a packet, it examines its destination IP address and searches for the best match with a network address in the router's routing table. The routing table also includes the interface to be used to forward the packet. Once a match is found, the router encapsulates the IP packet into the data link frame of the outgoing or exit interface, and the packet is then forwarded toward its destination.

It is very likely that a router will receive a packet that is encapsulated in one type of data link frame, such as an Ethernet frame and when forwarding the packet, the router will encapsulate it in a different type of data link frame, such as Point-to-Point Protocol (PPP). The data link encapsulation depends on the type of interface on the router and the type of medium it connects to. The different data link technologies that a router connects to can include LAN technologies, such as Ethernet, and WAN serial connections, such as T1 connection using PPP, Frame Relay, and Asynchronous Transfer Mode (ATM).

In the figure, we can follow a packet from the source PC to the destination PC. Notice that it is the responsibility of the router to find the destination network in its routing table and forward the packet on toward its destination. In this example, router R1 receives the packet encapsulated in an Ethernet frame. After decapsulating the packet, R1 uses the destination IP address of the packet to search its routing table for a matching network address. After a destination network address is found in the routing table, R1 encapsulates the packet inside a PPP frame and forwards the packet to R2. A similar process is performed by R2.

Static routes and dynamic routing protocols are used by routers to learn about remote networks and build their routing tables. These routes and protocols are the primary focus of the course and will be discussed in detail in later chapters along with the process that routers use in searching their routing tables and forwarding the packets.

Introducing Routing And Packet Forwading

Today's networks have a significant impact on our lives - changing the way we live, work, and play. Computer networks - and in a larger context the Internet - allow people to communicate, collaborate, and interact in ways they never did before. We use the network in a variety of ways, including web applications, IP telephony, video conferencing, interactive gaming, electronic commerce, education, and more.

At the center of the network is the router. Stated simply, a router connects one network to another network. Therefore, the router is responsible for the delivery of packets across different networks. The destination of the IP packet might be a web server in another country or an e-mail server on the local area network. It is the responsibility of the routers to deliver those packets in a timely manner. The effectiveness of internetwork communications depends, to a large degree, on the ability of routers to forward packets in the most efficient way possible.

Routers are now being added to satellites in space. These routers will have the ability to route IP traffic between satellites in space in much the same way that packets are moved on Earth, thereby reducing delays and offering greater networking flexibility.

In addition to packet forwarding, a router provides other services as well. To meet the demands on today's networks, routers are also used to:
Ensure 24x7 (24 hours a day, 7 days a week) availability. To help guarantee network reachability, routers use alternate paths in case the primary path fails.
Provide integrated services of data, video, and voice over wired and wireless networks. Routers use Quality of service (QoS) prioritization of IP packets to ensure that real-time traffic, such as voice, video and critical data are not dropped or delayed.
Mitigate the impact of worms, viruses, and other attacks on the network by permitting or denying the forwarding of packets.

All of these services are built around the router and its primary responsibility of forwarding packets from one network to the next. It is only because of the router's ability to route packets between networks that devices on different networks can communicate. This chapter will introduce you to the router, its role in the networks, its main hardware and software components, and the routing process itself.

Cable Access (Ethernet Interfaces)

Cable access can be deployed easily. The vast majority of providers deliver a CPE device (cable modem) that terminates the coax network frequency bands that carry data, TV, and telephony, and provide a standard Ethernet/POTS/ISDN interface as the demarcation point.


To get telephony out of the RF side, an additional termination unit is needed. In contrast to DSL architectures, no additional software or stack components (PPTP, PPPoA, PPPoE) are required on the attached end system or gateway. The cable modem connects via coaxial drop and trunk cables as well as signal repeaters to a carrier's cable head-end. Mixed architectures featuring optical-electrical converters for optical trunk cables are used, too. In contrast to DSL, this is a shared medium; therefore, VLAN architectures and MAC-based access control are commonly deployed and addresses delivered to the customer via Dynamic Host Configuration Protocol (DHCP).

DSL Access

Historically, DSL has been an asymmetric service (ADSL), evolving into a symmetric one (G.SHDSL) designed to replace E1 TDM circuits and provide voice, ATM, raw IP, and ISDN transport.

DSL copper cables are terminated at a central office (CO) DSLAM port (digital subscriber access line multiplexer). The DSLAM serves two purposes:

One is to physically terminate the subscriber line and separate the voice band from the data bands utilizing an integrated splitter device similar to the one on the customer end; the voice signal is delivered directly to the PSTN network on OSI Layer 1.

The second purpose is to relay the data traffic to an IP backbone, usually based on ATM or Ethernet. Aggregation and service-selection gateways constitute the distribution layer of modern DSL provider architectures.

Almost all open-source UNIX operating systems provide mature PPTP support required for the PPPoA architectures that are popular in some European countries. Linux, OpenBSD, and FreeBSD support native PPPoE. PPPoA or PPPoE support of your favorite operating system usually requires a modified/patched version of the PPP toolset. Discussion goes beyond the scope of this book, but you can find easily several cookbooks for setup via your favorite search engine or Linux repository. Several DSL NICs are also available (ATM25, splitterless operation). Some of their important characteristics are as follows:

DSL modes of operation: PPPoA, PPPoE, bridging mode

DSL flavors: ADSL, HDSL, SDSL, G.SHDSL, G.Lite, VDSL, and so on

Software requirements of DSL access: PPPoE or PPPoA stack support, PPTP (for example, via Netgraph/mpd daemon under FreeBSD)

Route Cloning

Cloned routes are a concept unique to BSD networks stacks. The concept refers to on-demand generation (cloning) of host routes (/32). In other words (quoted from the FreeBSD arp(4) manual page), "The ARP cache is stored in the system routing table as dynamically created host routes. The route to a directly attached Ethernet network is installed as a 'cloning' route (one with the RTF_CLONING flag set), causing routes to individual hosts on that network to be created on demand."[1] The actual cloning template (or parent) is marked with (C = generate new routes on use), the instantiated cloned host route (child) with (W = was cloned) in the system routing table. The associated ref_counter indicates how many existing connections use that particular entry, which is also correlated with an expire_timer (usually 3600 seconds). Cloned routes time out periodically after initial validation as long as they are not used.

Examples 8-3 through 8-5 show the differences in arp and netstat command output on OpenBSD, Linux, and FreeBSD operating systems to demonstrate the connection between next-hop/interface Media Access Control (MAC) resolution and similarities between route and netstat commands. In addition, interface statistics with netstat are presented, as are usage statistics of routing table entries. All routing tables present prefix entries, flags, a reference counter for the number of uses of a prefix, and a usage counter for the number of packets that were forwarded along that route out of the associated physical interface. Additional parameters of netstat output are system-specific.

Example 8-3. OpenBSD arp and netstat Output

[root@ganymed:~#] arp -an

? (192.168.1.1) at 52:54:05:e3:51:87

? (192.168.1.2) at 08:00:46:64:74:1b

? (192.168.2.7) at 00:10:5a:c4:2c:04

? (111.11.117.1) at 00:05:9a:5b:23:fc



[root@ganymed:~#] netstat -rna -f inet

Routing tables

Internet:

Destination Gateway Flags Refs Use Mtu Interface

default 111.11.117.1 UGS 3 11991 1500 ne5

127/8 127.0.0.1 UGRS 0 0 33224 lo0

127.0.0.1 127.0.0.1 UH 2 0 33224 lo0

192.168.1/24 link#1 UC 0 0 1500 ne3

192.168.1.1 52:54:5:e3:51:87 UHL 0 8801 1500 ne3

192.168.1.2 8:0:46:64:74:1b UHL 1 4451 1500 ne3

192.168.1.254 127.0.0.1 UGHS 0 0 33224 lo0

192.168.2/24 link#2 UC 0 0 1500 ne4

192.168.2.7 0:10:5a:c4:2c:4 UHL 0 2111 1500 ne4

192.168.44.1 192.168.44.1 UH 0 0 33224 lo1

192.168.45/24 link#1 UC 0 0 1500 ne3

111.11.117/24 link#3 UC 0 0 1500 ne5

111.11.117.1 0:5:9a:5b:23:fc UHL 1 0 1500 ne5



[root@ganymed:~#] netstat -in -f inet

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls

lo0 33224 0 0 0 0 0

lo0 33224 fe80::/64 fe80::1 0 0 0 0 0

lo0 33224 ::1/128 ::1 0 0 0 0 0

lo0 33224 127/8 127.0.0.1 0 0 0 0 0

lo1 33224 0 0 0 0 0

lo1 33224 192.168.44/ 192.168.44.1 0 0 0 0 0

lo1 33224 fe80::/64 fe80::1 0 0 0 0 0

lo1 33224 ::1/128 ::1 0 0 0 0 0

ne3 1500 48:54:e8:8c:0a:3f 17263 0 13427 0 329

ne3 1500 192.168.1/2 192.168.1.254 17263 0 13427 0 329

ne3 1500 fe80::/64 fe80::4a54:e8ff:f 17263 0 13427 0 329

ne3 1500 192.168.45/ 192.168.45.254 17263 0 13427 0 329

ne4 1500 52:54:05:e3:e4:2f 2503 234 2247 0 0

ne4 1500 192.168.2/2 192.168.2.254 2503 234 2247 0 0

ne4 1500 fe80::/64 fe80::5054:5ff:fe 2503 234 2247 0 0

ne5 1500 52:54:05:e3:51:87 11531 1253 12040 0 0

ne5 1500 111.11.117/ 111.11.117.206 11531 1253 12040 0 0

ne5 1500 fe80::/64 fe80::5054:5ff:fe 11531 1253 12040 0 0



[root@ganymed:~#] netstat -rs

routing:

0 bad routing redirects

0 dynamically created routes

0 new gateways due to redirects

10 destinations found unreachable

0 uses of a wildcard route




Example 8-4 also demonstrates an advanced feature of Linux: TCP parameters such as the TCP Maximum Segment Size (MSS) and the TCP Window Size, which can be altered on a per-prefix basis (shaded text). For a better understanding, consider the following technical details quoted from the Linux route(8) manual page:

mss M:

set the TCP Maximum Segment Size (MSS) for connections over this route to M bytes. The default is the device MTU minus headers, or a lower MTU when path mtu discovery occurred [sic]. This setting can be used to force smaller TCP packets on the other end when path mtu discovery does not work (usually because of misconfigured firewalls that block ICMP Fragmentation Needed)

window W:

set the TCP window size for connections over this route to W bytes. This is typically only used on AX.25 networks and with drivers unable to handle back to back frames.[2]

Example 8-4. Linux arp and netstat Output

[root@callisto:~#] arp -an

? (192.168.1.2) at 08:00:46:64:74:1B [ether] on eth1

? (192.168.1.254) at 48:54:E8:8C:0A:3F [ether] on eth1



[root@callisto:~#] netstat -rnva

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth1

192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 ipsec0

192.168.14.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0

127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo

0.0.0.0 192.168.1.254 0.0.0.0 UG 40 0 0 eth1



[root@callisto:~#] netstat -i

Kernel Interface table

Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg

eth0 1500 0 276 0 0 0 166 0 0 0 BMRU

eth1 1500 0 14889 0 0 0 9260 0 0 0 BMRU

ipsec 16260 0 0 0 0 0 0 0 0 0 ORU

lo 16436 0 64 0 0 0 64 0 0 0 LRU



[root@callisto:~#] route -nee

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt

192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 40 0 0

192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 ipsec0 40 0 0

192.168.14.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 40 0 0

127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 40 0 0

0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth1 40 0 0




The highlighted text in Example 8-5 emphasizes the timer correlation of ARP cache entries and the forwarding table on FreeBSD for cloned routes (ARP neighbors). On BSD systems, you can manually adjust the route_expire sysctl parameter net.inet.ip.rtexpire, which defaults to 3600 seconds. Connected routes are created for each interface attached to the local host. Examples of the ip Linux facility are left to the lab because it is specific only to Linux, whereas netstat and route are generic tools of all Unices.

Example 8-5. FreeBSD arp and netstat Output

[root@castor:~#] arp -an

? (192.168.2.254) at 52:54:05:e3:e4:2f on xl0 [ethernet]

? (192.168.7.254) at 00:00:0c:1a:a9:a8 on ed0 [ethernet]



[root@castor:~#] netstat -rnaW -f inet

Routing tables

Internet:

Destination Gateway Flags Refs Use Mtu Netif Expire

default 192.168.2.254 UGSc 4 6 1500 xl0

127.0.0.1 127.0.0.1 UH 0 0 16384 lo0

192.53.103.103 192.168.2.254 UGHW3 0 63 1500 xl0 3314

192.53.103.104 192.168.2.254 UGHW 1 64 1500 xl0

192.168.1.2 192.168.2.254 UGHW 1 1207 1500 xl0

192.168.2 link#1 UC 2 0 1500 xl0

192.168.2.254 52:54:05:e3:e4:2f UHLW 3 3 1500 xl0 1028

192.168.7 link#2 UC 1 0 1500 ed0

192.168.7.254 00:00:0c:1a:a9:a8 UHLW 1 5 1500 ed0 1038

195.34.133.10 192.168.2.254 UGHW3 0 14 1500 xl0 3440



[root@castor:~#] netstat -i -f inet

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll

xl0 1500 192.168.2 192.168.2.7 2260 - 3303 - -

ed0 1500 192.168.7 castor 260 - 1214 - -

lo0 16384 your-net localhost 0 - 0 - -



[root@castor:~#] netstat -rs

routing:

0 bad routing redirects

0 dynamically created routes

0 new gateways due to redirects

3 destinations found unreachable

0 uses of a wildcard route

1 route not in table but not freed


Related Topic Router

Kesehatan

 

© Copyright Cisco elearning 2010 -2011 | Design by Herdiansyah Hamzah | Published by Borneo Templates | Powered by Blogger.com.