Tuesday, November 19, 2013

Static Route (part II)

Ok. So let us begin our exercise about static route.
For this tutorial, i don’t explain how to add router, switch, etc.
so i will skip this section.
First of all, let us see picture below
Picture Information:
Router1
- Interface 0/0 : 172.17.1.1/24
- Interface 1/0 : 172.18.1.1/30
Router2
- Interface 0/0 : 172.18.1.2/30
- Interface 1/0 : 172.18.2.1/30
- Interface 2/0 : 172.17.2.1/24
Router3
- Interface 0/0 : 182.18.2.2/30
- Interface 1/0 : 172.17.3.1/24
LAN 1 : 172.17.1.0 / 24
LAN 2 : 172.17.2.0 / 24
LAN 3 : 172.17.3.0 / 24
Now Let’s begin the configuration
go to router 1
Router> en
Router#configure terminal
Router(config)#hostname Router1
Router1(config)#interface fastEthernet 0/0
Router1(config-if)#ip address 172.17.1.1 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#
Router1(config)#interface fastEthernet 0/1
Router1(config-if)#ip address 172.18.1.1 255.255.255.252
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#exit
Explanation
we use command hostname to give a name to router.
in above example, command hostname is give name router1 to router.
To give IP Address to router, we can use command
ip address .
In example above, the router1 using ip address 172.17.1.1 with /24 for eth 0/0. We can use command
ip address 172.17.1.1 255.255.255.0 . after that we must use command ‘no shutdown’ to enable the configuration in router.
/24 using subnet mask 255.255.255.0 (for more explanation, i will explain this in subneting ip.)
so let continue our configuration. next we will go to configuration in router 2.
to make us more easy to type. i will use a shortcut command for
en = enable
conf t = configure terminal.
u can also make a quick type in configuration using tab.
Router > en
Router # conf t
Router(config)# hostname Router2
Router2(config)# interface fa 0/0
Router2(config-if)#ip address 172.18.1.2 255.255.255.252
Router2(config-if)#no shut
Router2(config-if)#exit
Router2(config)#interface fa 2/0
Router2(config-if)#ip address 172.17.2.1 255.255.255.0
Router2(config-if)#no shut
Router2(config-if)#exit
Router2(config)#interface fa 1/0
Router2(config-if)#ip address 172.18.2.1 255.255.255.252
Router2(config-if)# no shut
Router2(config-if)# exit
Router2(config)#exit
Now we go to Router 3
Router> en
Router# conf t
Router(config)#hostname Router3
Router3(config)#interface fa 0/0
Router3(config-if)#ip add 172.18.2.2 255.255.255.252
Router3(config-if)#no shut
Router3(config-if)#exit
Router3(config)#interface fa 1/0
Router3(config-if)#ip add 172.17.3.1 255.255.255.0
Router3(config-if)#no shut
Router3(config-if)#exit
Right now, we already done giving IP Address. So we will go to step giving ip route.
To give ip route, we must go in mode global config (Router(config)#)
First we go to router1.
Router1(config)#ip route 172.18.2.0 255.255.255.252 172.18.1.2
Router1(config)#ip route 172.17.3.0 255.255.255.0 172.18.1.2
Router1(config)#ip route 172.17.2.0 255.255.255.0 172.18.1.2
Router1(config)#exit
explanation:
to make us more simple to understand, we assume that routing table is sign post.
imagine that router is a street. the computer is home.
to make us easy to go to destination we want, we can use signpost to guide us until we arrive to our destination.
ip route is a command that we use in router configuration to put destination map in our router’s routing table.
which mean a signpost to make us more easy go to our destination.
in above case:
ip route 172.18.2.0 255.255.255.0 172.18.1.2
mean we put road to destination network 172.18.2.0 with subnet mask 255.255.255.252 (/30) through 172.18.1.2
ip route 172.17.3.0 255.255.255.0 172.18.1.2
mean we put road to destination network 172.17.3.0 with subnet mask 255.255.255.0 (/24) through 172.18.1.2
ip route 172.17.2.0 255.255.255.0 172.18.1.2
mean we put road to destination network 172.17.2.0 with subnet mask 255.255.255.0 (/24) through 172.18.1.2
Now let us continue to configuration in Router2
Router2(config)#ip route 172.17.1.0 255.255.255.0 172.18.1.1
Router2(config)#ip route 172.17.3.0 255.255.255.0 172.18.2.2
Router2(config)#exit
The last, we configure in Router3
Router3(config)#ip route 172.17.2.0 255.255.255.0 172.18.2.1
Router3(config)#ip route 172.18.1.0 255.255.255.252 172.18.2.1
Router3(config)#ip route 172.17.1.0 255.255.255.0 172.18.2.1
Router3(config)#exit
To make sure our configuration is already correct or not. we can use command ping.
For example:
From router 1, ping 172.17.3.0 /24
Router 1 ping to Router 3
Router 2 ping to network 172.17.1.0 /24
In addition, we also can use command “show ip router” in privileged mode EXEC to show routing table
Router#show ip route
if we not in privileged mode (global configuration mode), we can use command ‘do’ following with command show ip route
Router(config)#do show ip route
This is the end for static route.
Hope u understand with this tutorial.
:)

0 comments:

Post a Comment