Router Setup and Configuration Guide for Home or Office Routers

Step-by-step Guide to Configure and Setup Home or Office Routers:

In our previous tutorials, we have studied the basic features, working operation, and application of Routers in the computer networking Systems.

But in this tutorial, we will explore the basic configuration commands that are used in making the routers operational in any of the network and set-up of routers and switches in a networking system.

Based on the make and use of a Router, there are hundreds of configuration commands.

Here, we will discuss some of the important commands which a software tester and engineer should know to have a basic understanding of Configuration and operation of routers and switches with some examples.

Configuration and Set-up of Routers

Default Router Configuration

Whenever we boot our Router first, there is always some default configuration that exists into it.

The show running-config command is used to see the starting configuration of the router.

The details are very lengthy. Here, I have given an example of a few of the important lines shown by the router, when we enter the show running-config command into the router with the help of two screenshots.

Router# show running-config

Default Router configuration Output-1

Default Router configuration Output-1

[image source]

Default Router configuration Output-2

Default Router configuration Output-2

[image source]

In the above default configuration details, we can see that all the interfaces are down and there are no IP addresses and not any route are allocated to any port or interface of the router.

#1) Now we need to configure the router with some basic parameters like enabling hostname, password and enabling the terminal for configuration.

#2) For performing configuration on the router from the remote end using the console port we need to enable the configure terminal mode.

#3) By using telnet, we can login into the router with the username and password from the remote end system.

telnet router name or IP address

Example:
Telnet 10.180.196.42
Login: Router1 (specify login id, here login id is Router1)
Password: ********
Router> enable

#4) The understanding will become better with the help of the following.

Example:
Router> enable
Router#  configure terminal
Router(config)# <—— Now router is in configuration mode. The configuration can be done.

#5) Now define the hostname ( router name ) and password.
Router(config)# hostname Router X
Router(config)# exit

#6) To find out from the remote end if the far end IP of the router, switch or any other host is reachable or not, we use “Ping” command. It is one of the important commands and can be used locally on your PC as well to check the IP reachability.

RouterX# ping 10.10.100.1

Ping Command Output

Ping command Output

[image source]

The above output shows that the ping is successful and the IP is reachable. It is also used to check the loopback interface.

If in case we don’t get any response then it means that we are not reaching up to the IP due to some reason.

Configuration of Gigabit Ethernet Interfaces

The next task is to configure those ports and interfaces on which the connection with other network devices has been physically made. There are various types of interfaces like fast Ethernet, Ethernet and Gigabit Ethernet that are available on the router.

In WAN connectivity or WLAN, the gigabit interface is used, as it is of high bandwidth and high-speed link.

Thus understanding the configuration of this interface is very crucial. Please find below some points, which we should keep in mind while configuring the gigabit interfaces.

1) The first step is to go to the config mode of the router and then enter on which port or slot of gigabit Ethernet you are going to perform the configuration.

RouterX (config)# interface gigabitethernet 0/1

RouterX (config-if)# Now the user is at the gigabit interface 0/1 and it can further configure the IP address and subnet mask etc.

2) Ideally, in the router, all the interface ports are in the downstate i.e inactive. To make them in an active state or “up” the following command is used.

RouterX (config-if)# no shutdown

3) Similarly, we can define the IP address and subnet mask to other gigabit and fast Ethernet ports as well by following the above steps, one by one.

4) To check our configuration on interfaces, we can run one show command as given below:

RouterX# show up in brief

5) To save our configuration we use the write command.

RouterX# write then enter will save the configuration.

The below figure represents the configuration in the command line on a Gigabit Ethernet interface:

gigabit interface config

[image source]

Configuration of Loopback Interface

Defining the loopback IP address is very crucial as it provides default routing statistics.

1) The first step is to go to the configuration mode and add the interface with the type number on which you are going to define the address.

Example: 

RouterX (config)# interface loopback 1
While (1 denotes the type number)

2) Now assign the IP address and subnet mask for loopback.
RouterX (config-if)# ip address 172.148.1.1 255.255.255.240

3) Now the next command is
RouterX (config-if)# exit —–> the configuration has been saved and by using the exit command we step out from the loopback interface.
RouterX (config)# —–> Returns to the simple configuration mode.

Configuration of Command-Line Access

The commands under this category are used to provide only limited access of Routers to the users or we can say that the access of routers is managed by a remote user or administrator.

#1) The first command is line console| tty | vty ] line number.

This command denotes the type of the line and console terminal used for accessing the Router.

Example: 
RouterX (config)# line console 0
RouterX (config-line) #

#2) The next step is to assign a password for access.

Example:
RouterX (config-line)# password abc123!

#3) The login command is used to verify if the password is enabled or not to login into the Router.
RouterX (config-line)# login

#4) For denoting the virtual terminal for remote access, the following command is used – line console vty  line number.

Example:
RouterX (config-line)# line vty 0 6 (6 denotes that 6 virtual telnet options are available)

#5) To exit from this command-line access the end command is used.

Example:
RouterX (config-line)# end
Router#

Configuration of Static Routes

Routing the data packets from the source to the destination end is the basic feature of Routers. The static route provisions the predefined set of routes to reach the destination in the network.

The procedure to configure static routes is as follows:

  1. ip route {destination host IP address | subnet mask | source interface IP address}
  2. end
  3. Show ip route will show the routes defined in the router and we can also verify this command from our routing configuration.

Example of defining static IP route is:

RouterX (config)# ip route 10.180.146.4 255.255.255.252 10.180.146.29

RouterX (config)# ip route 10.180.146.28 255.255.255.252 10.180.146.5

RouterX (config)# end

The above example of defining IP route explains that the router will float all the IP packets of the destination address 10.180.146.4 and of subnet mask 255.255.255.252 on the Gigabit Ethernet interface 0/1 to a destined device with the IP address 10.180.146.29.

In reverse routing, all the IP packets with the destination address 10.180.146.28 will be destined to the device having interface IP 10.180.146.5.

Configuration of Dynamic Routes

In this type of routing protocol, the routers will gather the routing information dynamically. Thus the routes can be changed on the basis of the kind of service, topology and network traffic.

The Cisco and ZTE routers use various kinds of dynamic routing protocols, but the most popularly ones are Routing Information Protocol (RIP), Enhanced Interior Gateway Routing Protocol (EIGRP).

RIP Configuration

The steps of configuring RIP on routers are as follows:

1) Firstly go to the configure terminal mode.

Router> configure terminal
RouterX (config)#

2) Now enable the RIP protocol on the router.
For this, the command is as below:
RouterX (config)# router rip

3) Now the RIP protocol on the router is enabled. Thus we can assign the IP address range and version to the router for those network addresses which are using RIP routing as shown below.

4) Next for disabling the routes of the subnet used for automatic summation, we use the following commands:
RouterX (config-router)# no auto-summary

5) The last step is to save the configuration and exit from the router configuration mode.

To verify the configuration, we use the show running-config command and the output will appear similar to as shown in the below figure.

RouterX# show running-config

RIP Configuration

rip configuration

[image source]

EIGRP Protocol Configuration

The process is as follows:

#1) Firstly, go to router configuration mode and enable the EIGRP on the router.

The command is as shown below:
RouterX (config)# router eigrp 203 —–> The number here specifies the auto-generated system number which locates the router to the other EIGRP using routers.

2) Now assign the range of the network IP’s on which EIGRP is applied as follows:

3) The last step is to save the configuration and exit from the router configuration mode.

To verify the configuration, we use show running-config command and the output will appear similar to as how it is shown in the below figure:

Router# show running-config

eigrp config

[image source]

Thus from the above set of examples, we have learned various commands that are commonly used for basic configuration and show configuration purposes in the routers.

Now let’s make our understanding better with the help of an example of a simple router network and software configuration in them.

Router Connectivity Diagram

Sample router connectivity diagram

Addressing Table:

Device nameInterfaceIP addressSubnet mask
R1Fa0/0172.148.1.1255.255.255.224
R1S0/0/0172.148.2.1255.255.255.224
R2Fa0/1172.148.3.1255.255.255.224
R2S0/0/0172.148.2.2255.255.255.224
PC1NA172.148.1.10255.255.255.224
PC2na172.148.3.10255.255.255.224

For any network to be operational, it is very important to do the IP planning of the network properly. Thus we are prepared with the IP addresses to be allocated to the interfaces on Router1 and Router2. All the physical network cabling should be done in accordance with the plan.

The steps of the configuration are as follows:

1) Firstly set up a hyper terminal connection with Router1 and enable the execution mode.
Router> enable
Router#

2) Next is to go to the configure terminal mode.
Router# configure terminal
Router (config)#

3) Next step is to assign a hostname to the router.
Router (config)# hostname R1
R1 (config)# Now configuration will take place on Router1.

4) Disable the DNS loopback.
R1 config)# no ip domain-loopback

5) Now configure the password to the router.

6) Also, configure a password for virtual terminals.

7) Next is the configuration of interfaces with the Network IP addresses.

8) When we configure the serial interface, we will also set the clock rate to 64000.

Here, please make a mark that the serial interface will not come in up state until the serial interface on Router2 is also configured and made up.

Now save the configuration that has been done on Router1.
R1# write running-config startup-config
Building configuration…..
[OK]
R1#

9) Now the steps for configuration of Router2 for assigning hostname, configuring a password for the router and virtual terminals and disabling the DNS loop are same as in the case of Router1.

See below as how the output of the above commands will appear on the command line with the help of a similar example:

clock rate and fast-ethernet port config

10) The next step is to manually configure the host device PC1 and PC2 with the IP’s 172.148.1.10 and 172.148.3.10 and with the subnet mask 255.255.255.224 respectively.

11) Now finally it’s time to validate our configuration by using the show ip route command and show ip interface brief command in router 1 and router 2.

Show IP route output

R1# show ip route

The output will appear in the command line as much similar as shown in the below screenshot:

show ip route..

Show IP interface brief command output

R1# show ip int brief

If you want to see how it will appear in the command line, then please take a look at the below screenshot:

show ip int brf

[image source]

From the above-detailed output of show commands, our configuration has been checked and found OK.

Home Router Configuration Vs Company Set-up Routers

Enlisted below is the comparison between home routers and business purpose routers.

Home Routers

The routers which are used for home purposes are less expensive than the business purpose routers. The installation of routers for home use is easy and the maintenance cost is also less as they only need to cover a limited area for operation, and not the WAN regions.

The trend of using routers for home purposes like accessing the Internet for multiple users at a time, entertainment like watching online movies, gaming, and controlling the settings at home like light, temperature, on and off operations of home appliances etc. when we are not at the home is very common these days.

Thus it is essential for us to understand the process of configuration of home usable routers. The steps are not as long as that is of Business purpose routers.

Please find below the generic process of installation and configuration:

#1) Setting the hardware: We need a desktop PC to make a connection with the router and two network cables. By using the first network cable, connect the WAN port of the router to the modem or DSL through which the Internet connection is going to be provided. Now by using the second network cable, connect the LAN port of the router to the PC’s network port.

Now, switch on the power supply of router, PC and the modem by using the power adapter. This sums up the hardware installation part.

#2) To access the Web Interface: For accessing the router’s web interface we need to know the router’s login IP address, password, and the router’s URL. This information can be extracted from the manual of the router.

Usually, the default IP address is the default URL for accessing the router, and it will be like 192.168.x.1 where x can be 0,1,2,10 0r 11. For D-link routers, it will use the default IP as 192.168.0.1 or 198.168.1.1. Mostly the default username is admin and the default password is admin, password or 1234.

With all these data, in the address browser of the PC from which the router is connected, type the default IP of the router and then the login ID and password, and now you will enter into the web interface of the router.

#3) Basic Router Settings: Through the web interface we can make the basic settings in the router. Though there are different types of parameters based on the type of router, some of the generic parameters are explained here in short.

The first parameter is the Wizard, here we can set the Wi-Fi network name and password and can modify the default password that is used to log in the device to make it a more secure one for personal use.

Next are the router’s wireless settings, where we can make the settings for the network. In the LAN settings part, we will assign the IP to the router and also allocate the IP address and subnet mask to the client’s connected with the router.

In case, if the router’s settings get deleted or if altered by chance or by some virus, then we can restore the default settings or the basic settings by going to system tool of the router. Here, we can keep the backup of the router’s configuration and save it in a file format.

#4) Router’s hard Reset option: If in case the router is malfunctioning or if it is hung for a long time or if unable to login into it, then we can use the hard reset button of the router that is found at the bottom portion of the router.

As the reset button is very tiny, we can use a small pin to push the button for about 10-15 seconds to do the hard reset. By doing this action, the router will go back to its default settings in the way in which it was while purchasing it.

In this way, the configuration of a home router is concluded and now it is ready to use to access the internet or share the Internet services among the users present at home.

Business Routers

The installation, configuration and use of the home purpose routers are very easy. The hardware is also very small and portable and can be installed anywhere easily.

On the other hand, the hardware of the business purpose router is very bulky and the quantity of hardware required depends upon the traffic load that it has to carry within it.

As discussed above, the configuration is very complex and for each and every interface, routing method or loopback and even login ID and password settings we need to follow a very lengthy process.

The business purpose routers are very expensive, whereas the home usable routers are cheap.

But for WAN, the business purpose routers will provision the best output as it can function smoothly with heavy traffic and works very fast too. Thus it is deployed worldwide in spite of it's complex and long configuration processes.

Conclusion

In this tutorial, we explored the various configuration parameters, syntax, and commands of the Routers with the help of examples.

We also learned how we can assign port and allocate IP addresses to the routers for routing operations, along with enabling hostname and password and saving the configuration with the help of snapshots.

Meanwhile, we also compared the installation, configuration and use of home routers and business purpose routers.

PREV Tutorial | NEXT Tutorial