Friday, 26 August 2016

Router Basic Commands Description




ROUTER MODES


User mode is also known as look only mode because it works only for show commands at most 80%.
In the Privilege mode, 100% show commands work and some little config commands.
In the Global mode, we work on 100% config commands.

Here are some common types of show commands.
In the user type "enable" and press enter to go to privilege mode 

Router> enable

now write these commands in the privilege mode

Router#Show interface
or
Router#Show interface serial 0
or
Router#Show interface ethernet 0
or
Router#Show version
or
Router#Show flash
or
Router#Show running-flash
or
Router#Show Startup-config

Changing the Hostname of a Router 

Router>enable
Router#configure terminal
Router(config)#Hostname Shahzeb
Shahzeb(config) #exit

As you can see in the global mode I write the command hostname and i use my name to change the name of the router.

Copying Flash into Backup of a Router

Router>enable
Router#Copy flash tftp

Copying Backup into Flash of a Router

Router>enable
Router#Copy tftp flash

How to move to a serial interface of a Router

Router>enable
Router#configure terminal
Router(config)#interface serial 0
Router(config-if)#ip address 15.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

The word "config-if" shows the mode of the interface

How to show serial interface of a Router

Router>enable
Router#show interface serial 0


Note: You will understand more about interface commands in the future posts
   


 


 


 

Thursday, 25 August 2016

Router Modes Description

Modes of Router

 

There are three modes of a router 

1 Full Name : User Executive Mode 
   Short Name : User Mode
   Symbol : Router>

2 Full Name : Privilege Executive Mode 
   Short Name : Privilege Mode
   Symbol : Router#

3 Full Name : Global Config Mode 
   Short Name : Global Mode
   Symbol : Router(config)#

Note: The word "Router" in all the symbols is the name of the router which you will learn in the next post.

How to switch from one mode to another mode

1 User mode to Privelege mode

 Now to go from User Mode to Privilege mode you must write "enable" in the Router> and press enter and it will take you to Router#.

2 Privilege mode to Global mode 

Now to go from Privilege Mode to Global mode you must write "config t" in the Router# and press enter and it will take you to Router(config).

3 Privelege mode to User mode 

Now to go from Privilege Mode to user mode you must write "disable" in the Router# and press enter and it will take you to Router>.

4 Global mode to Privilege mode

Now to go from Global Mode to privilege mode you must write "exit" in the Router(config) and press enter and it will take you to  Router#.
 

5 Global mode to User mode

Now to go from Global Mode to user mode you must write "ctrl +z" in the Router(config) and press enter and it will take you to Router>.   

Note: The modes are note case-sensitive so it is not a problem if you write in capital or small letters.

Problems in Router Booting modes

1. If you find problem in config-register of the router, it goes to Rom-monitor mode(>).
2. If you find problem in IOS of the router, it goes to RX Boot  mode(<Boot>). 
3. If you find problem in startup-config of the router, it goes to setup mode.

 







Wednesday, 24 August 2016

Routers components and sequence Description

Router Components

Basically, there are four components in a router which are listed below:
  • ROM
  • RAM
  • NVRAM
  • FLASH

ROM: ROM stands for Read Only Memory. It is a non-volatile memory which means your memory will be saved permanently even when the router is powered off. In the older versions of routers it is used to store IOS memory which is not the case in the new routers so ROM is used for POST(Power On Self Test) and Bootstrap program. When we switch on the router, the ROM performs POST sequence which makes sure that all the components of the router is functioning correctly. The bootstrap helps to locate the IOS when the router is turned on.

RAM: RAM stands for Random Access memory.It is a volatile memory which means when the data will be lost when the router is powered off. There are two parts of RAM named as Main memory and shared I/O memory.The main memory is used to store routing table, ARP Table  and runnig configuration of the router. Shared I/O memory is used as buffer location for storing packets temporarily.

NVRAM: NVRAM stands for NON volatile Random Access memory. It is used to store the startup configuration of the router. When you made changes in the router Running configuration ,changes are saved in NVRAM so that they are not lost when the router shuts down.

FLASH: The flash memory is used for running and storing the Cisco IOS which is the Operating System(OS) of the router. The contents of the Flash memory is in read only mode when the router is running.

TFTP SERVER

 

TFTP sends Trivial File Transfer Protocol which is a backup server for router.
Routing Sequence of a Router

ROM --------> POST

NVRAM -------> Config-Register

FLASH -------->IOS

NVRAM --------> Startup-Config

RAM ---------> Running-Config


Note: Config-register only helps in finding the location of the router.


Tuesday, 23 August 2016

Network ID and Broadcast ID Description

Network ID

Network ID is a part of IP address that is used for recognizing devices or person on a network such as the internet.

Broadcast ID 

A Broadcast ID is a logical address of a network used to connect devices of a multiple access network. If you sent a message through a broadcast ID it will be received by all the hosts of that network.

So how can we find the network ID and the broadcast id of a subnet. We have been given an IP address 200.1.10.0 which require 16 subnets and also the network ID and the Broadcast ID of the first subnet. Here are the following steps

200.1.10.0
require 16 subnets

so 2^4 =16 so 4 is the required value 

first we write the table 
128      64      32      16      8      4      2       1

Now we insert the value in the table
128      64      32      16      8      4      2       1 
  1         1        1        1       0      0      0       0
so we know that the range of each IP will be 16 and the first subnet range is as follows 
200.1.1.0
200.1.1.1
200.1.1.2
       *
       *
200.1.1.14
200.1.1.15
So the Network ID and the Broadcast ID from the range is
200.1.1.0 ---------> Network ID
200.1.1.15--------> Broadcast ID 
       
Here is another question to clear your Concept

212.5.9.0/24
require 4 subnets
Sol
so 2^2 =4 so 2 is the required value 

first we write the table 
128      64      32      16      8      4      2       1

Now we insert the value in the table
128      64      32      16      8      4      2       1 
  1         1        0        0      0      0      0       0
so we know that the range of each IP will be 64 and the first subnet range is as follows 
200.5.9.0
200.5.9.1
200.5.9.2
       *
       *
200.5.9.62
200.5.9.63

The Network ID and the Broadcast ID from the range is
200.5.9.0 ---------> Network ID
200.5.9.63--------> Broadcast ID 
 

Monday, 22 August 2016

Subnetting Description

Subnetting

The art of dividing a network into subnet is called subnetting.
The importance of subnetting is to keep data inside the physical address or to funnel large no of addresses through a router to a single internal IP address.
The host bits are used for subnetting. In subnetting ,the no of hosts gets decreased but the no of subnet gets increased. Now you will understand more about routing and the definition is beginning to expand which is forwarding of data into different networks or subnetworks is called routing.

Now I will tell how to make subnet mask of a network ID. Here is the question

200.1.1.0
255.255.255.0
make 8 subnets

This is a class C network. Now the formula of subnet is 2^n where n is the no of subnet
so we have to make 8 subnets means  2^3=8
now first we create the table

128     64     32     16     8     4     2     1

now we start to fill the value of the subnet which is 3 in the table from the left hand side.

128     64     32     16     8     4     2     1
  1        1       1       0      0     0     0     0 

Now we add the no that have been fill which are 128 ,64 and 32 which gives us the total of 224. So after subnetting we get the answer which is

200.1.1.0
255.255.255.224 

Now here are some question for you to understand and practice 

1) 200.1.1.0
require 16 subnets

Sol
First we find the no subnets which is 2^4=16
now we fill the subnets in the table

128     64     32     16     8     4     2     1
  1        1       1       1      0     0     0     0 

The total is 240, now after subnetting we get 
200.1.1.0/28
255.255.255.240

2) 200.8.6.0
require 64 subnets

Sol
First we find the no subnets which is 2^6=64
now we fill the subnets in the table

128     64     32     16     8     4     2     1
  1        1       1       1      1     1     0     0 

The total is 252 ,now after subnetting we get 
200.1.1.0/30
255.255.255.252

3) 200.8.1.0
require 4 subnets

Sol
First we find the no subnets which is 2^2=4
now we fill the subnets in the table

128     64     32     16     8     4     2     1
  1        1       0       0      0     0     0     0 

The total is 192  ,now after subnetting we get 
200.1.1.0/26
255.255.255.192

4) 200.5.9.0
require 30 subnets

Sol
First we find the no subnets which is 2^5=32
now we fill the subnets in the table

128     64     32     16     8     4     2     1
  1        1       1       1      1     0     0     0 

The total is 248 ,now after subnetting we get 
200.1.1.0/29
255.255.255.248

Note:If we ever get a subnet value which is not in the 2^n , remember to pick that value ehich is closest to the given subnet.Like in the last question we have been given a subnet which is 30 so it is closest to 2^6 which is 32.




Routing Description

Routing

Forwarding of packets into different networks is called routing. As I have told you in the previous posts that assigning an IP in a router of a network will be the default gateway for all the devices connec ted in that network. It is necessary for a router to have different interface in its network. 

Routing Table 

A routing table is a data table in a router that shows all the routes to particular different networks.
The command to show routing table and the result for this command is shown below

Command
# show ip route
Result
C E0     10.0.0.0/8
C E1     20.0.0.0/8 
where C is for "Directly Connected"

How can a Node recognized that a packet which is being routed is a remote or a local. The answer is simple we take the source and destination IP address and perform the AND operation with the subnet we will get the default gateway. If the default gateway is the same for both than the packet is local or otherwise remote.

                              Source                                destination
    IP Address      10.0.0.1                                  10.0.0.2
    Subnet             255.0.0.0                               255.0.0.0
                           
Performing AND operation and we get

                              Source                                 destination
                            10.0.0.0                                    10.0.0.0

Same Default gateway means the packet is local not remote.
Those Id's which we are not connected with we must tell them manually through static routing. For Branch communication, Routing is very important.


Sunday, 21 August 2016

Gateway Description

Gateway

A gateway in networking works as an entrance for another network. They are also known as protocol converters. It can operate at any network layer. A gateway is often associated with a router or a switch although other devices can act as a gateway. 
A computer server that acts as a gateway node often acts as a proxy server or a firewall server. It is an essential feature of a router. There are two types of gateways which are as follows: 
  1. Unidirectional Gateway
  2. Bidirectional Gateway

Unidirectional Gateway:

Unidirectional gateways allow alerts to flow in one direction only. 
These gateways are considered as archiving tools. The changes that are made in the source are replicated in the destination server but changes made in the destination server are not replicated in the source server.

Bidirectional Gateway:
Bidirectional gateways allows alerts to flow and replicate in both direction( the source and the destination). These gateways are also considered as Synchronization tools.

The IP which we will assign to the router will be the default gateway to all the interfaces connect to the router. If a network has a base IP address of 10.0.0.0 with a subnet mask of 255.0.0.0 then any packet which is going outside of 10.0.0.X will be sent to the network's gateway.


Subnet (dotted decimal to bit count) Description

Subnet (dotted decimal to bit count)

How to convert a subnet which is in  dotted decimal into a bit count?
Suppose we have a subnet value which is 255.255.255.224 and can be written also as 27 in bit count value. So to convert it here are the following steps. 

We know that a 255 bit value is equal to 8 so if we add 8 bit each for 255.255.255 we will get 24.
Now the remaining bit which is 224 bits left in the dotted value can be calculated as shown below 

First Write the table as shown below 

128        64        32        16        8        4        2        1 

Now start calculating the sum of the table which will be equal 224 from the left side like this  

128        64        32        16        8        4        2        1  
 1         1       1      0      0      0      0     0   
  
so now we have filled 128, 64 and 32. If we add the values of the  three numbers we will get 224. It means 3 is the bit count for 224, so
255.255.255.224
8 + 8 + 8 + 3 =27 


                                        
Here are some other questions with solutions for you to understand and practice 

1) 255.255.255.252
Sol
Now first add the 255 bit value which is equal to 8 and the total we get is 24
Now convert the remaining value using the table 

128        64        32        16        8        4        2        1 
 1            1          1         1          1        1        0        0

Now after converting the remaining value we get the value which is
6 so

255.255.255.252
     8 + 8 + 8 + 6   = 24

2)255.192.0.0
Sol
Now first add the 255 bit value whic is equal to 8 and the total we get is 8
Now convert the remaining value using the table 

128        64        32        16        8        4        2        1 
 1            1                  0         0        0        0       0

Now after converting the remaining value we get the value which is
6 so

255.192.0.0
8 + 2 + 0 + 0   = 10
3)255.255.128.0
Sol
Now first add the 255 bit value which is equal to 8 and the total we get is 8
Now convert the remaining value using the table 

128        64        32        16        8        4        2        1 
 1            0                  0         0        0        0       0

Now after converting the remaining value we get the value which is
1 so

255.255.128.0
8 + 8 + 1 + 0   = 17

4)255.255.255.240
Sol
Now first add the 255 bit value which is equal to 8 and the total we get is24
Now convert the remaining value using the table 

128        64        32        16        8        4        2        1 
 1            1          1          1         0        0        0        0

Now after converting the remaining value we get the value which is
4 so

255.255.255.240
8 + 8 + 8 + 4  = 10
 
 

Saturday, 20 August 2016

Subnet (Bit count to dotted decimal) Description

Subnet( bit count to dotted decimal)

How to convert a subnet which is in bit count into a dotted decimal ?
Suppose we have a subnet value which is 27 and can be written also as 255.255.255.224 in dotted value. So to convert it, here are the following steps. 

We know that each bit value in a subnet is an 8 bit value and is equal to 255 so if we took out 8 bit each from 27 we will have 24 bits with the 3 bits remaining which will be equal to
255.255.255 
now the remaining 3 bits left in the bit count can be calculated which is shown below 

First Write the table  as shown below 

128        64        32        16        8        4        2        1 

Now start filling the remaining three bits from the left side
like this  

128        64        32        16        8        4        2        1  
 1         1       1      0      0      0      0     0   
  
Now add the numbers where the remaining three bits are filled which is 128 + 64 + 32 which is equal to 224 so this how we get the remaining value now the conversion complete and the subnet is

255.255.255.224 
Here are some other questions with solutions for you to understand and practice 

1)  9
Sol
Now first fill the address with 8 bit value we get the remaining bit which is 1 
Now convert the remaining bit using the table 

128        64        32        16        8        4        2        1 
 1            0          0          0         0        0        0        0

Now after converting the remaining bits we get the subnet value which is

255.128.0.0 

2) 15
Sol
Now first fill the address with 8 bit value we get the remaining bit which is 7
Now convert the remaining bit using the table 

128        64        32        16        8        4        2        1 
 1            1                  1         1        1        1        0

Now after converting the remaining bits we get the subnet value which is

255.254.0.0 
3) 12
Sol
Now first fill the address with 8 bit value we get the remaining bit which is 4
now convert the remaining bit using the table 

128        64        32        16        8        4        2        1 
 1            1                  1         0        0        0       0

Now after converting the remaining bits we get the subnet value which is

255.240.0.0  
4) 18
Sol
Now first fill the address with 8 bit value we get the remaining bit which is 2
now the convert the remaining bit using the table 

128        64        32        16        8        4        2        1 
 1            1          0          0         0        0        0        0

Now after converting the remaining bits we get the subnet value which is

255.255.192.0  
 
 

Subnet Mask Description

Subnet Mask

The human can tell the difference that which are the network bits and the host bits in an IP address but to make the computer understand the network bits and the host bits we use the subnet mask.

A Subnet mask is a 32-bit value which is used to create a boundary between network portion and the host portion. Computers that belong to a subnet are being addressed by the same, identical  and significant IP address.

In Networking subnet, the representation is shown by

1-------> Network
0-------> Host

Subnet mask according to Classes

N is for network 
H is for Host
w.x.y.z represents the IP address
   
For Class A

   N       H   
  w.     x.y.z
 255.    0.0.0 

There is one Network bit and three host bits in Class A 
                                             

 For Class B

   N              H   
w.x.             y.z
255.255.     0.0

There are two Network bits and two host bits in Class B
                                          

For Class C

   N                   H   
w.x.y                .z
255.255.255.    0
                                          

There are three Network bits and one host bit in Class C 
 Methods to Repesent Subnet mask
Dotted Decimal Notation              BIT Count
255 . 0 . 0 . 0                                       8
255 . 255 . 0 . 0                                  16
255 . 255 . 255 . 0                              32

We all know that one bit of an IP address is equal to 8 so this is another way to count the bit in a subnet mask.
So this is how we write an IP address with a subnet mask.

10.0.0.1/8
187.4.5.3/16
215.3.5.23/32

Note:this is just the basic concept of subnet, there will mathematical conversion also which will be discussed in the later post.