Search...

Loading

Friday, November 18, 2011

Configure a static routing on cisco router

Good day!!!

Just want to apologize for my English. I am from Belarus and if there are errors, then feel free to write about them, I will correct them :).
In last post I was speaking about initial configuration on cisco router. Today, I suggest you to configure a static routing on cisco devices.
If you interested, welcome to post…


For our work I will use GNS3. So, let’s begin and collect this scheme:


If we will configure all fine then we should see successful pings between hosts. Ok, let’s start our work :).
First configure pouter R1 towards a host (interface Fa 0/0):
  • R1>
    R1>en
    R1#conf t
    R1(config)#int fa 0/0
    R1(config-if)#description Link_to_host
    R1(config-if)#ip address 172.16.10.1 255.255.255.0
    R1(config-if)#no sh
    R1(config-if)#exit
    R1(config)#
Then configure router R1 towards a router R2 (interface Ser 0/0/0):
  • R1(config)#int serial 0/0
    R1(config-if)#description Link_to_R2
    R1(config-if)#clock rate 56000
    R1(config-if)#ip address 172.16.20.1 255.255.255.252
    R1(config-if)#no sh
    R1(config-if)#exit
    R1(config)#exit
    R1#wr
Make same configuration on routers R2 and R3, only with corresponding IP – addressing:
  • R2>en
    R2#conf t
    R2(config)#int fa 0/0
    R2(config-if)#description Link_to_host
    R2(config-if)#ip address 172.16.30.1 255.255.255.0
    R2(config-if)#no sh
    R2(config-if)#exit
    R2(config)#int serial 0/0
    R2(config-if)#clock rate 56000
    R2(config-if)#ip address 172.16.20.2 255.255.255.252
    R2(config-if)#no sh
    R2(config-if)#description Link_to_R1
    R2(config-if)#exit
    R2(config)#int serial 0/1
    R2(config-if)#clock rate 56000
    R2(config-if)#ip address 172.16.40.1 255.255.255.252
    R2(config-if)#no sh
    R2(config-if)#description Link_to_R3
    R2(config-if)#exit
    R2(config)#exit
    R2#wr
  • R3>
    R3>en
    R3#conf t
    R3(config)#int fa 0/0
    R3(config-if)#description Link_to_host
    R3(config-if)#ip address 172.16.50.1 255.255.255.0
    R3(config-if)#no sh
    R3(config-if)#exit
    R3(config)#int serial 0/1
    R3(config-if)#description Link_to_R2
    R3(config-if)#clock rate 56000
    R3(config-if)#ip address 172.16.40.2 255.255.255.252
    R3(config-if)#no sh
    R3(config-if)#exit
    R3(config)#exit
    R3#wr
Check network availability between routers and look at the routing table:




Now, verify network availability between hosts and routers and check that ping between hosts are not working:




As we see, availability of routers is present, but further the traffic does not pass. Let's correct it.
Add adequate static routes on our routers.
For this, go to router R1 and add next commands:
  • R1>en
    R1#conf t
    R1(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.2
    R1(config)#ip route 172.16.40.0 255.255.255.252 172.16.20.2
    R1(config)#ip route 172.16.50.0 255.255.255.0 172.16.20.2
    R1(config)#exit
    R1#
On other routers make this configuration:
  • R2>en
    R2#conf t
    R2(config)#ip route 172.16.10.0 255.255.255.0 serial 0/0
    R2(config)#ip route 172.16.50.0 255.255.255.0 serial 0/1
    R2(config)#exit
    R2#wr
  • R3>en
    R3#conf t
    R3(config)#ip route 0.0.0.0 0.0.0.0 serial 0/1
    R3(config)#exit
    R3#wr
Note that on each router we configured routes differently. On router R1 we added routes to networks and put IP-address of the neighbor as a next-hop. On router R2 we added routes to networks and indicated interface through which traffic must go to destination. And on router R3 we added one «default route» which means that all unknown traffic (that not present in routing table) must go through specified interface.
As we can see, add static routes you may different ways and this is not so hard :).
Now, let’s check that ping between hosts are working:




As you can see on pictures, all working fine. Congratulate you!!! We have configured a static routing on our cisco routers :).

On this step, I want to finish my post. Thanks for attention, I hope, you have received for yourselves the helpful information.

If you have a questions or comments, then do not be afraid to write me!!!! This is my contact information. I will pleased to answer!!!!

I’m waiting for you in next posts!!!

With best regards, Ant0ni0n

No comments:

Post a Comment