Download Static Route configuration on Router

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IEEE 802.1aq wikipedia , lookup

AppleTalk wikipedia , lookup

Peering wikipedia , lookup

Network tap wikipedia , lookup

Serial digital interface wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Computer network wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Airborne Networking wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Routing wikipedia , lookup

Transcript
Static Route configuration on Router

Static routing occurs when you manually add routes in each router's routing table. There are
advantages and disadvantages to static routing, but that's true for all routing processes.
Static routing has the following advantages:



There is no overhead on the router CPU.
There is no bandwidth usage between routers.
It adds security because the administrator can choose to allow routing access to certain
networks only.
Static routing has the following disadvantages:



The administrator must really understand the internetwork and how each router is
connected in order to configure routes correctly.
If a network is added to the internetwork, the administrator has to add a route to it on all
routers—manually.
It's not possible in large networks because maintaining it would be a full-time job in
itself.
Command syntax for static route:
ip route [destination_network] [mask] [next-hop_address or exit_interface]
[administrative_distance] [permanent]
ip route The command used to create the static route.
destination_network The network you're placing in the routing table.
mask The subnet mask being used on the network.
next-hop_address The address of the next-hop router that will receive the packet and forward it
to the remote network.
exit_interfaceUsed in place of the next-hop address if you want, and shows up as a directly
connected route.
administrative_distance By default, static routes have an administrative distance of 1 (or even 0
if you use an exit interface instead of a next-hop address).
permanent Keyword (Optional) Without the permanent keyword in a static route statement, a
static route will be removed if an interface goes down. Adding the permanent keyword to a static
route statement will keep the static routes in the routing table even if the interface goes down and
the directly connected networks are removed.
In this article we will recall all the topics you have learnt yet and will try to implement these
command in practically.
Create a topology as shown in figure on packet tracer or
download this topology.
Now configure PC-0 first.To configure pc double click on pc and select desktop Now click on IP
configurations
Set ip address as shown in figure
IP address 10.0.0.2 Subnet mask 255.0.0.0 Default Gateway 10.0.0.1
Follow the same process in PC-1 and set the ip address to
IP address 30.0.0.2 Subnet mask 255.0.0.0 Default Gateway 30.0.0.1
Now double click on 1841 Router 0 and select CLI
Type no and press enter to avoid startup configuration Now you are in user exec mode.
--- System Configuration Dialog --Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>
Set Hostname to R1 and assign 10.0.0.1 255.0.0.0 ip address to fast Ethernet 0/0. also set a
message “ Unauthorized access is prohibited”.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#banner motd # Unauthorized access is prohibited #
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#
Configure Router-2 in same way with hostname R2 and 30.0.0.1 255.0.0.0 ip address on fast
Ethernet 0/0.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up
R2(config-if)#exit
R2(config)#
Now we have connectivity between local segment and router's Ethernet port.
configure serial port
When Serial connections are configured they need one more command that normal Ethernet
connections do not. That command is the clock rate command.
The clock rate command establishes a common rate at which the sending and receiving routers
will send data to each other.
It should be noted that if using a service provider circuit, there is no need for the clock rate
command since the service provider provides the clocking. Establish a simple serial to serial
connection between R1 Serial 0/0/0 and R2 Serial 0/0/0.
Now configure serial port on both router with ip address 20.0.0.1 255.0.0.0 on one and 20.0.0.2
255.0.0.0 on two.
On R1
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to
up
R1(config-if)#exit
R1(config)#
On R2
R2(config)#interface serial 0/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
At this point you have configured ip address on interfaces.
But still pc0 will not ping to pc1 as R1 have no information the network of 30.0.0.0
There are two way to configure route in router. Static or Dynamic. You will learn more about
static and dynamic in our next article. In this example we will use simple static route.
First tell R1 about to network of 30.0.0.0
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2
R1(config)#
In this command 30.0.0.0 is the destination network and 255.0.0.0 is the subnetmask on
destination network and 20.0.0.2 is the ip address of next hope
30.0.0.0 = destination network.
255.0.0.0 = subnet mask.
20.0.0.2 = next-hop address.
Say this way "To get to the destination network of 30.0.0.0, with a subnet mask of 255.0.0.0,
send all packets to 20.0.0.2"
Now tell R2 about to network of 10.0.0.0
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#
Now test the connectivity. Go on pc1 and
C:\> ping 30.0.0.2
If you get reply then you have successfully configured static routing between R1 and R2.
But if you get error then download this
configured topology
and do cross check that where you have committed mistakes
Default Routing
default routing is used to send packets with a remote destination network not in the routing
table to the next-hop router. You should only use default routing on stub networks—those with
only one exit path out of the network.