Thursday, January 24, 2013

Dynamic Routing

Dynamic refers to automatic update of routing table. The routing protocol defines the set of rules used by a router when it communicates routing information between neighboring routers. There are two types of routing protocols which are used in inter-networks: interior gateway protocols (IGPs) and exterior gateway protocols (EGPs).

IGP is used to exchange routing information with routers in the same autonomous system (AS). An AS is a collection of networks under common administrative domain. In a AS all the routers basically share the same routing information. Eg. EIGRP, RIP, etc.

EGP is used to communicate between different ASes. Eg. BGP (Border Gateway Protocol)

Administrative distance (AD) defines the trustworthiness of the routing information received on a router from a neighbor router. It is an integer ranges from 0 to 255. O is the most trusted and 255 is the least trusted or no traffic will pass through it.

Default administrative distances:
* We can manually define the AD for static route also:
rtr# ip route <destinationNetwork> <subnetMask> <gatewayIP> <AD>

Routing Protocols
Routing protocols are categorized into three classes according to their working function:

Distance Vector: The best path to the destination network is calculated and judged by distance. Eg. if a packet is passed through a router it is count a hop. The route with the least number of hops to the network is determined to be the best route to the destination. E.g. RIP and IGRP.

Link State: These routing protocols send updates containing the state of their own links to the other directly connected routers on the network, which is then propagated to their neighbors. They keeps track of directly attached neighbors, topology of the entire inter-network and the routing table. Eg. OSPF and IS-IS.

Hybrid: They are the protocols with both the characters of distance vector and link state. It sends traditional distance-vector updates containing information about networks plus the cost of reaching them from the perspective of the advertising router. E.g. EIGRP. It is the propitiatory of CISCO.


Sunday, January 20, 2013

Routing

Routing is defined as taking a packet from one device and sending it through the network to another device on a different network. Routers don't really care about hosts - they only care about networks and the best path to each network. The main function of router is to route the packets, to do so a router must have know, the following;
  1. Destination address
  2. Neighbor routers from which it can learn about remote networks
  3. Possible routers to all remote networks
  4. The best route to each remote network
  5. How to maintain and verify routing information
Router maintains routing information in a table known as routing table.

There are mainly two types of routing: Static and Dynamic

Static Routing: We manually enter the routing information in it's routing table so that, the packets can be routing through the network. E.g. Let's see a scenario here.
Here, without the routing information on two routers (HQ and Remote), the packets from PC0 could not reach PC1. It will only reach up to serial interface of Remote router because the network 192.168.2.0 is connected with HQ router also. so, we enter a routing information on both routers so that, PC0 could ping PC1 and vice Varese.
Pr-configurations on both routers:
  1. Basic router configurations such as ; hostname, banner, logging sync, no ip domain-lookup, etc.
  2. IP addresses on the required interfaces

Static Routing:
syntax:
HQ(config)# ip route <destination_Network_address> <destination_subnetmask> <gateway_IP> or <interface>
Now,
HQ(config)# ip route 192.168.3.0 255.255.255.0 192.168.2.2
next,
Remote(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.1

To verify the routing information:
HQ# sh ip route
N.B. You can download the packet tracer file here.
Thank You !!

Wednesday, January 16, 2013

Using Pipe

Pipe ( | ) is an output modifier not the water pipe. It allows us to wade through all the configurations or other long outputs and get straight to our goods fast. It does not works in CISCO Packet tracer.
Syntax:
R1# sh run |  (append / begin / exclude / include / redirect / section / tee) <keyword>
e.g: if we want to get the only the information starting with interface of run command:
R1# sh run | begin interface



Viewing, Saving and Erasing Configurations

Viewing running configuration or startup configuration
R1# show run
R1# show start

Saving the running configuration to the startup configuration
R1# copy running-config startup-config
  
 R1# write [enter]

Deleting the Configuration and Reloading the Router
R1# erase startup-config
R1# reload
 

Serial Interface

There are many interfaces in a CISCO router. By default, serial interfaces of a CISCO router are all data terminal equipments (DTE) devices, so if you need it to act like a DCE device, these interface must be provided with clocking. Clock rate is defined on DCE interface.
Serial connection R1 to R2
Here, in the figure we configure clock rate on Se0/0/0 of R1 router. Clock rates are defined in bits per seconds. So,
syntax:
R1(config)# int s0/0/0
R1(config-f)# clock rate 64000      <==== (Clock rate is 1200 - 8000000)

To verify that the interface has a DCE Connection or not
R1# sh controllers s0/0/0





Saturday, January 12, 2013

Reverse Engineering the Subneting Problem

Scenario #1
In this scenario, a computer is connected to the Ethernet switch and has an IP address of 192.168.1.125 and subnet mask 255.255.255.224. Now, we want to find on which subnet the computer belongs to and the IP is usable IP address or not.
Now,
i) We take the lowest subnet mask i.e. in our case, 224 and convert it in binary.
    255.255.255.224 = 255.255.255.11100000
ii) From the binary we know that our incremental = 32 (crossed one from binary).
iii) So, from the incremental, our subnets will be:
     0 - 31
    32 - 63
    64 - 95
    96 - 127
    128 - 179
iv) So, the IP address falls in Network add of 96 and Broadcast address of 127. And yes, it is a valid IP address.

Scenario #2

In this scenario, a computer is connected to the Ethernet switch and router and has an IP address of 127.16.68.65 and subnet mask 255.255.255.240. Now, we want to find on which subnet the computer and the router belongs to and the IP addresses are usable or not. And, is there any network problem ??
Now,
i) We take the lowest subnet mask i.e. in our case, 240 and convert it in binary.
    255.255.255.240 = 255.255.255.11110000
ii) From the binary we know that our incremental = 16 (crossed one from binary).
iii) So, from the incremental, our subnets will be:
     0 - 15
    16 - 31
    32 - 47
    48 - 63
    64 - 79 
    
iv) So, from the above the router falls in subnet of 48 and PC subnet of 64. Both the IP addresses        assigned to router and PC are valid but, there is a network problem, because gateway IP and IP of the PC are different.
v) To solve this problem, we have to either assign the IP address subnet of 48 or 64 on both PC and Router.

Wednesday, January 2, 2013

Subnetting Part-I

In network IP address (binary), we use '1' as network bit and '0' as host bit. Subnetting is breaking down the number of hosts to increase the number of networks.


Always remember the table:

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

Sub-netting based on networks:
In the above network diagram we need 5 networks from a single network address : 216.21.5.0 / 24.
To subnet the network address into 5 different networks ( a. LAN1, b. LAN2, c. LAN3, d. WAN1, and e. WAN2);

i. We determine the number of networks and convert to binary.
    Here, we have to subnet into 5 networks, converting it into binary from the above table.
     we get. 5 = 00000101
    Here, the underlined 3 - bits are needed to make 5.

ii. Next, we reserve bits in subnet mask and find the incremental.
    In our case, our subnet mask is = 255.255.255.0
                                      In binary, = 11111111.1111111.11111111.00000000
    Now, we reserve the number of bits of subnet mask, equivalent to the bits to make of "5" coz 5       networks. We save the network bits.
                                    therefore, = 11111111.11111111.11111111.11100000
      Now, our new subnet mask will be = 255.255.255.224  (: 128 + 64 + 32)
   
   To find the increment ;  we take the lowest network bit from the customized subnet mask
   i.e. 11100000 (crossed one). So, the increment = 32 .

iii. Finally, we use increment to find the network range.
      Network range is found, starting from '0' subnet.
      so, first IP range will be = 216.21.5.0  - 216.21.5.31
                                                216.21.5.32 - 216.21.5.63
                                                216.21.5.64 - 216.21.5.95
                                              ------------------------------------
                                               --------------------------------- so on.

  
Sub-netting based on hosts:
In the above network diagram let's say, we need 30 hosts in each subnet. Now we have a network address : 216.21.5.0 / 24.
We have to divide the given network address into subnets with 30 hosts in each.
The Process is a like.

i. First we determine the number of hosts and convert it into binary.
   Here, we need 30 hosts per subnet. So, 30 = 00011110
   Here, the underlined 5 - bits are required to be 30.

ii. Next, we reserve bits in subnet mask and find the incremental.

    In our case, our subnet mask is = 255.255.255.0

                                      In binary, = 11111111.1111111.11111111.00000000

Now, we reserve the number of bits of subnet mask. We, here save the host. Because here, we focus on the number of hosts not network.

                                    therefore, = 11111111.11111111.11111111.11100000

      Now, our new subnet mask will be = 255.255.255.224  (: 128 + 64 + 32)  or in bit notation = /27

   To find the increment ;  we take the lowest network bit from the customized subnet mask
   i.e. 11100000 (crossed one). So, the increment = 32 .

iii. Finally, we use increment to find the network range.
      Network range is found, starting from '0' subnet.
      so, first IP range will be = 216.21.5.0  - 216.21.5.31
                                                216.21.5.32 - 216.21.5.63
                                                216.21.5.64 - 216.21.5.95
                                              ------------------------------------
                                               --------------------------------- so on.

I hope it is informative to you, and thank you !!