Tuesday, 30 May 2017

IP Address

An IP address or internet protocol address is an identifying number for a network device or a network host. The IP address is similar to a home or business address supplying that specific physical location with a particular address. Devices on a network are differentiated from one another through IP addresses. Having an IP address allows a device to communicate with other devices over an IP-based network just like the internet.


There are two standards for IP addresses:



  • IP Version 4 (IPv4) – Each IPv4 address consists of a string of 32 bits, divided into four sections called octets. Each octet contains 8 bits separated by a dot. Because of working with a binary number is very difficult, so for ease of use, IPv4 addresses are commonly expressed in dotted decimal notation. For example, 192.168.0.1, 172.16.100.250 and 10.41.255.50 are IP addresses. We can convert these addresses to binary. For example binary of the above addresses is 11000000.10101000.00000000.00000001, 10101100.00010000.01100100.11111010, 00001010.00101001.11111111.00110010.

  • IP Version 6 (IPv6)- IPv6 is the upgrade of IPv4 address that uses 128 bits to create a single unique address. An IPv6 address is expressed by eight groups of hexadecimal (base-16) numbers separated by colons, for example 2001:0db8:0000:0000:0000:8a2e:0370:7231. Groups of numbers that contain all zeros are often omitted to save space, leaving a colon separator to mark the gap (as in 2001:0db8:: 8a2e:0370:7231).


All computers and devices with IP addresses have an IPv4 address, and many are starting to use the new version of IP addressing system as well. So both will be discussed in coming articles briefly.

Sunday, 28 May 2017

Lab-Configuring Router Interfaces and Verifying Configuration

Router Interfaces


 


 


 


 


 


 


 


 


Download the Topology from here   -   [ddownload id="1957"]


Addressing Table






























































































































Device



Interface



IP Address



Subnet Mask



Default Gateway



Remarks



Router1



G0/0



172.16.0.0



255.255.255.0



N/A


 
 

G0/1



172.16.1.0



255.255.255.0



N/A


 
 

S0/0/0



192.168.0.1



255.255.255.252



N/A



DCE



Router2



G0/0



172.16.2.1



255.255.255.0



N/A


 
 

G0/1



172.16.3.1



255.255.255.0



N/A


 
 

S0/1/0



192.168.0.2



255.255.255.252



N/A


 

PC1



NIC



172.16.0.2



255.255.255.0



172.16.0.1


 

PC2



NIC



172.16.0.3



255.255.255.0



172.16.0.1


 

PC3



NIC



172.16.1.2



255.255.255.0



172.16.1.1


 

PC4



NIC



172.16.1.3



255.255.255.0



172.16.1.1


 

PC5



NIC



172.16.2.2



255.255.255.0



172.16.2.1


 

PC6



NIC



172.16.2.3



255.255.255.0



172.16.2.1


 

PC7



NIC



172.16.3.2



255.255.255.0



172.16.3.1


 

PC8



NIC



172.16.3.3



255.255.255.0



172.16.3.1


 

Objectives


Part 1: Display Router Information


Part 2: Configure Router Interfaces


Part 3: Verify the Configuration


Background



In Part-1 you will use different show commands to know about the router hardware and its current state. After knowing about router hardware use the Addressing Table to configure router Ethernet interfaces. After configuration, it is necessary to verify and test your configurations



Part 1: Display Router Information


Open a device CLI tab to access the command line directly. All password on the router set to Cisco. Use different commands to answer the following questions.



  • Which command displays the statistics for all interfaces on the router?

  • Which command displays the information about a specific interface only?

  • Which command is used to display the IP address of a specific router interface?

  • What is the bandwidth on the Serial 0/0/0 interface of the router1?

  • What is the MAC address of the Gigabit Ethernet 0/1 interface on both router?

  • What is the bandwidth on the Gigabit Ethernet 0/1 interfaces on both router?

  • Which command displays a brief summary of the current interfaces, statuses, and IP addresses assigned to them?

  • How many serial interfaces are there on both routers?

  • How many Ethernet interfaces are there on both routers?

  • What command shows the content of the routing table?

  • How many are directly connected routes there with Router1?


Part 2: Configuring Router Interfaces


Step 1: Configure the Gigabit Ethernet 0/0 interface on R1.


a. Enter the following commands to address and activate the GigabitEthernet 0/0 interface on Router1:


Router Interfaces


 


b. Router1 should now be able to ping PC3 and PC4.


Router Interfaces


 


Step 2: Configure the remaining Gigabit Ethernet Interfaces on on both router using the information in the addressing table. For each interface configure the IP Address and description.


Step 3: Back up the configurations to NVRAM:


Save the configuration files on both routers to NVRAM. Using the copy and wr commands.


Part 3: Verify the Configuration


Step 1: Use verification commands to check your interface configurations.



  • Use the show ip interface brief command on both routers verify that the interfaces are configured with the correct IP address and active.


How many interfaces on both routers are configured with IP addresses and in the “up” and “up” state?


What part of the interface configuration is NOT displayed in the command output?


What commands can you use to verify this part of the configuration?



  • Use the show ip route command on both router view the current routing tables.

  • How many directly connected routes on each router and what is the code of directly connected routes?

  • How many EIGRP routes on each router and what is the code of EIGRP Routers?

  • If the router knows all the routes in the network, then the number of connected routes and dynamically learned routes (EIGRP) should equal the total number of LANs and WANs.

  • Does this number match the number of C and D routes shown in the routing table?


Step 2: Test end-to-end connectivity across the network.


If all routes are equal to the total of LANs and WANs then You should now ping from any PC to any other PC on the topology.



  • From the command line on PC1, ping PC7.

  • From the command line on R3, ping PC6.

Wednesday, 10 May 2017

Router interface Configuration and Verify Configuration

For Ethernet interface configuration you need to make a physical connection to the router Ethernet Interface. After establishing a connection, you can proceed with the basic configuration of Ethernet, Fast Ethernet, or Gigabit Ethernet interfaces.


Connecting To Your Router


After connecting to a router you need to get into the Global Configuration Mode  of your router using the following commands:









Router>enable


Password:


Router#


Router#configure terminal


Enter configuration commands, one per line. End with CNTL/Z.


Router(config)

 


The next option is to choose the correct interface. There are many different types of interfaces available on Cisco routers such as Ethernet, Fast Ethernet, Gigabit Ethernet or serial interface. All devices in current IOS versions are numbered for example.



  • Gigabit Ethernet interfaces– GigabitEthernet 0/0 (G0/0) , GigabitEthernet 0/1 (G0/1)

  • A serial WAN interface card (WIC) interfaces- Serial 0/0/0 (S0/0/0) and Serial 0/0/1 (S0/0/1)


Interface Configuration


For example, we want to configure FastEthernt 0/0 interface. We should enter the interface mode of  FastEthernet 0/0 using the following command.








Router(config)#interface FastEthernet 0/0

 


Adding A Description To Ethernet Interface


This feature in not necessary, you may bypass this feature. This feature providing a description about the interface and it does not assist with the configuration. It just helps prevent human error.








Router(config-if)#description Internal Interface

Setting IP Address To Interface


Now you did all prerequisites before adding IP address. Now you can add IP address to this interface.








Router(config-if)#ip address 192.168.1.1 255.255.255.0

Enabling Your Interface


Before using the router interface you need to enable the router interface. You can enable the router interface by entering the following command.









Router(config-if)#no shutdown  


%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up



Verifying Router Interface Configuration


There are several commands that can verify interface configuration. The show IP interface brief is the most useful command for verifying interface configuration. The output of this command display all interfaces with their IPv4 address, and their current status. The configured and connected interfaces should display a Status “up” and Protocol  “up”. Any other statements would indicate a problem with either the configuration or the cabling. Remember that show command are working in “Privileged mode


You can also verify the configuration of interface from “show running-config”.  and Show startup-config.Another way to verify connectivity from the interface using the ping command. Ping command send five consecutive pings and measure minimal, average, and maximum round-trip times.Exclamation marks verify connectivity.


Following is the output of the show IP interface brief command, which show all three interfaces of the router. FastEthernet  0/0, status is up and protocol is up. its mean that this interface is connected to other network and protocol is up. FastEthernet status is up, it means that interface is configured and enabled with no shutdown command, its protocol is down, its mean that there is something wrong with the cable or some problem from another side. Serial 0/0/0 interface is not configured, not enabled and there is no IP address assigned to this interface.









Router#show ip interface brief


Interface                     IP-Address            OK?      Method                   Status                       Protocol


FastEthernet0/0     192.168.0.1            YES      manual                      up                              down


FastEthernet0/1     192.168.1.1            YES     manual                      up                                up


Serial0/0/0                unassigned            YES      unset          administratively down    down



Following are other commands that we can use to verify interface configuration.



  • show interfaces This command displays statistics for all interfaces on the device.

  • Ping - This command generated five exclamation marks verifying connectivity to the remote side.

  • show IP interface brief- Displays the IPv4 statistics for all interfaces on a router.

  • Show running-config-.This command display entire configuration of the router. Here we need to see the router section in the configuration file to verify the interface configuration.

  • Show startup-config:- When the configuration is saved with the write command, then configuration can be verified by the help of this command.

Monday, 8 May 2017

Cisco router different types of interfaces

The auxiliary and console ports are used for the router management. Routers also have ports for LAN and WAN connectivity. The LAN interfaces usually include Ethernet, Fast Ethernet, and GigaEthernet ports. Fiber Distributed Data Interface (FDDI), or Token Ring. Following is the detail of all types of interfaces of Cisco routers.


Ethernet


Ethernet is typically Ethernet IEEE 802.3 standard based physical interface. This port is operating at 10 Mbps speed. The media standard for this interface is 10BaseT.


Fast Ethernet


The Fast Ethernet is typically Ethernet IEEE 802.3u standard based physical interface. Fast Ethernet cards connect to networks at a rate of 100 Mbps. The media standard used for this interface is 100BaseT. Fast Ethernet is also called FE interfaces.


Gigabit Ethernet


Gigabit Ethernet is called GE interface. This ports standard is Ethernet IEEE 802.3ab. Gigabit network cards can connect at speeds up to 1000mb/s. The media standard used is1000BASE-T


Serial interfaces


A serial interface is a communication interface between two digital systems that transmit data as a series of voltage pulses down a wire.Serial interfaces are typically used for WAN connections from ISP  to host. serial interface provides connectivity types like Frame Relay, T1, T3, etc



FDDI


Fiber Distributed Data Interface is a set of ANSI and ISO standards for data transmission on fiber optic lines in a local area network (LAN). The range of FDDI can extend in range up to 200 km. FDDI networks operate at 100 Mbps speed and use a token-passing mechanism to prevent collisions.


Token Ring


A token ring network is a local area network (LAN) in which all computers are connected in a ring or star topology and pass one or more logical tokens from host to host. Only a host that holds a token can send data, and tokens are released when receipt of the data is confirmed. Token Ring interfaces can operate at either 4 Mbps or 16 Mbps.Token Ring networks missing from networking industry long way back. New Cisco routers do not have a Token Ring interface.


Loopback interface


A loopback interface is a logical, virtual interface in a Cisco Router. This type of interface is not a physical interface like Fast Ethernet interface or Gigabit Ethernet interface. A loopback interface has many uses. Loopback interface's IP Address determines a router's OSPF Router ID.


Null Interface


A null interface is a virtual interface that discards IP packets and is used to prevent routing loops from occurring in the network. We do not assign the IP address to a null interface.

Saturday, 6 May 2017

Cisco Router Basic Configuration Steps

Cisco router is a device that transfers data packets between different networks. Different IP network cannot communicate each other without a router. Routers do this job successfully by sending a packet from one IP network to another IP network. This process is called routing.The router needs some configurations before it can be used for routing. Here in this article, we will explain the initial configuration of the router.


I explain packet tracer in one of my previous article and its available for download. here in this article, we will use packet tracer for demonstration. You can also use any other network simulator software such as Boson, GNS. You may use a real Cisco device in place of simulators.


When a new Cisco router boots up for the first time or a time when there is no configuration on the router,  it asks the user if they want to run through a list of prompts to configure the router; Most Cisco professional ignore this initial setup wizard because of the lack of a better word.  They like to configure the router manually. The initial setup mode screen is shown in Figure 1:


configuration_setup_mode


When a Cisco router is initially booted there are nothing configured, the only thing that is needed to configure the router is a console cable. Once a connection is established the basic configuration of the device can be made, all initial configuration will be covered next in this article. The first prompt, if the user says “no” to the setup wizard, the user will see is a user exec mode prompt, as shown below:


Router>


As we learn in the previous article that Cisco IOS supports various command line interface modes, among those followings, are the main command modes.



  • User EXEC Mode

  • Privileged EXEC Mode

  • Global Configuration Mode

  • Interface Configuration Mode

  • Sub-Interface Configuration Mode

  • Setup Mode

  • ROM Monitor Mode


To navigate between these modes we need to execute specific commands:






















































Mode



Prompt



Command to enter



Command to exit



User EXEC



Router >



Default mode after booting. Log in with the password, if configured. 



Use exit command



Privileged EXEC



Router #



Use enable command from user exec mode



Use exit command



Global Configuration



Router(config)#



Use configure terminal or config t command from privileged exec mode



Use exit command



Interface Configuration



Router(config-if)#



Use interface type number command from global configuration mode



Use exit command to return to global configuration mode



Sub-Interface Configuration



Router(config-subif)



Use interface type subinterface number command from global configuration mode or interface configures mode



exit command to return the previous mode. Use end command to return to privileged exec mode.



Setup



Parameter [Parameter value]:


 



Router will automatically insert in this mode if running configuration is not present



Press CTRL+C to abort. Type yes to save the configuration, or no to exit without saving when asked at the end of setup.



ROMMON



ROMMON>



Enter reload command from privileged exec mode. Press CTRL + C key combination or break key during the first 60 seconds of booting process



Use exit command.



Change Default Router Name


This changes the router prompt and helps differentiate the device from others. By default, "Router" name is configured on each router. We can configure any name on the router. To do this hostname command will be used in global configuration mode. For example!


 









Router>


Router>enable


Router#configure terminal


Router(config)#hostname Rawalpindi


Rawalpindi(config)



Configure password on Cisco router


The router is an important device of any network. It supports multiple networks and can connect multiple lines for management. We need to secure each management line.


Secure console port


Console and Telnet are the most commonly used line types on a Cisco router. The console line allows a local user to access the router when physically connected to the console port. By default, console port has not configured with any password so any user with physical access can connect.  To block this access, a password can be configured on the console line. To configure a password the user must access the console line configuration mode using the ‘line console 0' command and issue the ‘password password' command, as shown below on Rawalpindi router:


 









Rawalpindi(config)#line console 0


Rawalpindi(config-line)#password cisco


Rawalpindi(config-line)#login


Rawalpindi(config-line)#exit


Rawalpindi(config)# 



Enable telnet access on Cisco router


Telnet is used to connect remotely when a router has configured at least one interface and also configured the password for telnet. Depending on the model number and IOS software version router may support the various number of VTY connections. VTY is the name for telnet and SSH connection. By default only first five VTYs connections are enabled. But when you try to connect them remotely you will get following message “Password required but none set” This message give warning that password is not set on VTY lines.


On most Cisco routers the VTY lines that are used for Telnet connections are labeled from 0 through 4 total of 5 lines. To gain access to this mode the ‘line vty 0 4' command is used. Following is the procedure to configure telnet access to the router.


 









Rawalpindi(config)#line vty 0 4


Rawalpindi(config-line)#password cisco


Rawalpindi(config-line)#login


Rawalpindi(config-line)#exit


Rawalpindi(config)# 



Secure the privileged EXEC mode and encrypt all password

The enable secret is the command which secures the user privileged mode. And by the help of service password encryption, we can encrypt all password which is saved in the configuration file. The method to secure privileged EXEC mode is following:









Rawalpindi(config)#enable secret cisco


Rawalpindi(config)service password-encryption



 


Configure Login banner

We can configure two types of the banner on Cisco routers “MOTD” and “Exec” banner. banner exec command is not available in packet tracer. In packet tracer, we can practice only with banner MOTD command. Both commands work in same way. Only the place of a display is different between both commands. An EXEC banner will display after login and MOTD banner will display before the login. Following is the procedure to configure MOTD banner.









Rawalpindi(config)#banner motd #


Enter TEXT message. End with the character '#'.


Warning: Unauthorized access is prohibited! # 



Save the configuration


Configuration can be saved from user privileged mode and it can be also saved from global configuration mode using following commands.


 Saving in user privileged mode









Rawalpindi#write


Building configuration...


[OK]


Rawalpindi#wr


Building configuration...


[OK]


Rawalpindi# copy running-config startup-config Destination filename [startup-config]?


Building configuration...


[OK]



Apply the same command with “do” followed by the above mention commands in global configuration mode to save the configuration. For example “ do write or do copy  running-config startup-config

Thursday, 4 May 2017

Cisco IOS Modes-Config, Privileged and User EXEC Mode

Cisco IOS has a Command Line Interface (CLI). CLI is the primary user interface for Cisco router and switches. Command line interface(CLI) supports various command modes. The Cisco router and switch has following different modes.



  • User EXEC Mode

  • Privileged EXEC Mode

  • Global Configuration Mode

  • Setup Mode

  • ROM Monitor Mode


Furthermore, Global configuration mode has a Specific Configuration Modes. These specific configuration modes will be explained under Global Configuration Mode. Figure 1 Illustrate some specific configuration modes with their prompt.



User mode


User Mode is also known is User EXEC mode. This mode is the first mode a user has access to the router after logging in. The user mode can be recognized by the > prompt following the name of the routerUser EXEC Mode/switch. Router default name is Router and switch default name is Switch. Default host name can be changed from Global configuration mode by the help of hostname command. Command will be explained in coming articles.


The user mode is usually password protected. You need a valid username and password to access this mode. This mode allows the user to execute only the basic commands, such as those that show the system's status. The router cannot be configured or restarted from this mode. The figure-2 illustrate the user mode at CLI. 


 Privileged Mode


This mode is also known is enable mode or a privileged exec mode. Privileged exec mode is the main exec mode. This mode allows a user to view extensive info about the router’s configuration, and also allows a user to change some of the configuration parameters. The Privileged mode is also password protected. The user should enter the password to access this mode. 


In the lab environment, it's usually unprotected. You can access this mode by executing enable command at user exec mode. We can list all available commands of this mode by entering at command line interface (CLI). Most commands of this mode are one-time commands. Which show the result and current status and clear counters on interfaces respectively. Common commands can be entered both from user exec mode or privileged exec mode. Exec mode commands are not saved across the reboot of the device. The figure-3 illustrate the Privileged mode of the router.


Global Configuration Mode


The config mode is actually only a temporary gateway mode to get to extended configuration modes (specific configuration mode).  Very little can be done in the configuration mode. The figure-4 illustrate the global configuration mode. This mode is used to configure device globally, or to enter in the element like interface, protocols specific configuration mode. Use configure terminal command at privileged exec mode to access global configuration mode.


Global configuration mode and extended (specific) configuration mode allowing you to make a change in running configuration. By default running configuration is not stored across the reboot, but you can save the running configuration to preserve it across the reboot. To save running configuration use copy running-config startup-config from privileged EXEC mode commands. To return in privileged exec mode from global configuration mode or specific configuration mode we have used three commands.



  1. Ctrl + Z

  2. exit

  3. end


Ctrl+Z key combination will work in all mode.


exit command only works in global configuration mode.


end command is the safest way to exit from global configuration mode or interface specific mode.


Some of the extended configuration or specific configuration modes are listed below in figue-4 with their prompt.


Setup Mode


As I described in the previous article that when a Cisco router is powered up, it will first run a POST test to ensure all hardware is working fine, and then router tries to locate running configuration. If the router finds the configuration it would load that. If it fails to locate configuration, it would initiate the setup mode. The setup mode is a step-by-step process which helps you configure basic aspects of the router. In this mode, the router will ask you questions about the initial settings in a sequence for basic configuration values. Depending on answers provided by you, the router will automatically build initial configuration.


ROMMON Mode


This mode is also called ROM Monitor Mode. During the boot process, if the router does not find a valid IOS image and failed to load IOS in RAM, it would enter in ROMMON mode. This mode also accessible manually. This mode is the diagnostic mode just like safe mode in windows. By default, the router does not enter in this mode unless it fails to locate the IOS image. To enter manually in ROMMON mode, execute reload command from privileged exec mode and then press CTRL + C  key combination or break during the first 60 seconds of startup. This mode can also be used for password recovery. Prompt for this mode is rommon>

Monday, 1 May 2017

Router boot process steps

There are three major steps to the boot-up process. As illustrate in Figure 1, which are:


Step-1. Perform the POST and load the bootstrap program.


Step-2. Locate and load the Cisco IOS software.


Step-3. Locate and load the startup configuration file or enter setup mode.



Step-1- Performing POST and Load Bootstrap Program



  1. When the router is powered on it first runs Power-On Self Test (POST)

  2. During to POST, the router executes diagnostics from ROM on several hardware components, including the CPU, RAM, and NVRAM.

  3. After the Post, the bootstrap program is copied from ROM into RAM. The bootstrap function is to locate the Cisco IOS and load it into RAM. Its checks the Configuration Register value to specify where to load the IOS. The bootstrap default value is 2102, in hexadecimal.


Step-2. Locating and Loading Cisco IOS



  1. The IOS typically store location is flash memory. The router first looks for “boot system” commands in the startup-config file. If it finds these commands, it will run boot system commands in the order they appear in startup-config to locate the IOS. If not, the IOS image is loaded from Flash.

  2. And If the IOS is not found in Flash, the bootstrap can try to load the IOS from Trivial File Transfer Protocol (TFTP) server

  3. If full image is not located in Flash or TFTP then router copied limited IOS from ROM into RAM. This limited IOS can be used to diagnose problems and transfer a full IOS into Flash memory.

  4. After the IOS is found, it is loaded into RAM.


Step-3. Locating and Loading the Configuration File



  1. The IOS attempts to load the configuration file (startup-config) from NVRAM to RAM. This becomes the running configuration.

  2. If the startup-config is not found in NVRAM, the IOS attempts to load a configuration file from TFTP.

  3. If no TFTP server responds, the router enters Setup Mode (Initial Configuration Mode).

  4. At this point, if we have a console connection to the router, we can check the output on the screen and can configure the router from here.

  5. When router prompted to enter setup mode, give the answer no. If you answer yes and enter setup mode, press Ctrl+C at any time to terminate the setup process. Setup is the wizard for router configuration. Which we will discuss later.

Connect to a Router

There are several types of port available to connect a Cisco router. We can group these types of a port in the following categories:


In-band interfaces and ports - In-band router interfaces are the LAN (i.e. Gigabit Ethernet, Fast Ethernet, and Ethernet ) and WAN (i.e., eHWICs) interfaces configured with IP addressing to carry user traffic. Ethernet is the most common LAN connections. DSL  and serial ports are the common WAN connections.


Out-of-Band Interfaces and Ports- All Management ports including console and AUX ports are the types of out-of-band access interfaces. Out-of-band access refers to access using a dedicated management channel that is used for configuration and management. The Console and AUX ports are used to configure, manage, and troubleshoot the router. These ports are not used for user traffic.


Establishing a connection to Cisco router


There are several ways to make a connection and access a user EXEC mode in the CLI environment on the Cisco routers.


Console


Consol port provides Out-of-band access to Cisco router. This is a physical management access port to a Cisco device.  This port is the most important port in Cisco devices, therefore; each Cisco router and switch must have a console port. The console port is used to connect a computer directly to a router or switch. The console cable must be necessary for initial configuration of a Cisco device. Because there is no more SSH, HTTP, HTTPS and telnet configured initially to connect the router.


console


console


The console cable is used to connect a computer to the router via the console port. Figure 1 show the console port and Figure 2 show the console cable. A console cable is a special cable. One end of the cable is the RJ49 type and a DB9 to the RJ45 converter is molded on the other end.


Secure Socket Shell (SSH)


SSH is a network protocol that provides remotely establishing a secure CLI connection through a virtual interface, over a network.SSH provides strong authentication and secures encrypted communication. Many network administrator uses SSH for managing systems remotely. SSH connections require active networking services on the device including an active interface configured with an IP address so SSH required in-band connection method


Telnet


A Telnet is another remote access method just like SSH but it is an insecure method. telnet establishing a CLI session through a virtual interface, over a network. Telnet does not provide a securely encrypted connection. User authentication, passwords, and commands are sent over the network in plaintext. Telenet is also in-band connection method.


Aux port


Some routers may also support a legacy auxiliary port that was used to establish a CLI session remotely using a modem. Similar to a console connection, the AUX port is out-of-band and does not require networking services to be configured or available.


Generally, putty software is used to make a connection over different protocol and different way. Putty is a third party software which is download here


Putty.exe 32 bit


Putty.exe 64 bit


Putty can also download from its website  www.putty.org/