Home > Networking Tips > Routing and Switching > Static routing
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ROUTING AND SWITCHING

Static routing


FreeSkills.com
09.10.2004
Rating: -4.65- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Static routes are ideal when using something called a stub network. This is where there is only one way in and out of the network.

The disadvantage of using static routes is that if the connection to the next hop goes down the router will continue to route traffic there. It will never be aware of the fact that the path is no longer valid. Also, once you have more than a handful of static routes they can become time consuming administrative task to change and update.


FIG 5.2 Traffic Will Leave an Interface Even if the Link is Down

Configuring a Static Route

In order to configure a static route the router has to be in global configuration mode.

ip route network prefix mask {address | interface} [distance]

network - the destination network
mask - is the subnet mask for that network
address - IP address of the next hop router
interface - or the interface the traffic is to leave by
distance - (optional) the administrative distance of the route

There are other parameters but these have been removed as they are not relevant to the CCNA exam.

example:

ip route 10.0.0.0 255.0.0.0 131.108.3.4 110

10.0.0.0 is the destination network. 255.0.0.0 is the subnet mask for that network and 131.108.3.4 is the next hop for the router to use. The 110 is the administrative distance which we will look at later on.

Alternatively, we could have specified the interface the traffic is to leave by.

ip route 192.168.1.0 255.255.255.0 serial 0

This tells the router that to get to network 192.168.1.0, leave by interface Serial 0.


FIG 5.3 A Static Route to Get to Bs Network

When you give the router a static route to use it is vital that the router knows how to get to that next hop. Normally the next hop would be part of a directly connected network. Routers automatically are aware of directly connected networks.

One important fact to remember is that the router on the other side (destination) must have a route back to the source. If it is not aware of the source network there will never by a response. Just like if you don't put a return address on an envelope.


FIG 5.4 The Destination Router Must Know How to Get Back to the Source

Default Routes

A default route is a special variety of static route. Normally, when a router is looking for a network that is not in its routing table. It will simply drop the packet. Remember that routers never ever send broadcasts by default. You can change this behaviour but it is not advisable.

On the network below, the stub network has only one way for the traffic to go, to reach several different networks. To configure several static routes would be a long winded way of achieving what could be done with one command.

Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2

The 0s indicate any network and any subnet mask. i.e. any traffic for anywhere go via the next hop 192.168.1.2.

You could have specified an exit interface as well.

Router(config)# ip route 0.0.0.0 0.0.0.0 s0


FIG 5.5 All Traffic Will Leave the Stub Router By Serial 0

You could even have some static routes configured and then a default route at the end. A practical use may be that you work in a small office and any unknown traffic will be passed to a larger router at your head office that can make all the routing decisions for you.

One last point, all of my network diagrams are there to illustrate a point so please do not take them as examples of how to design your own network.

"Pass your IT exams by learning with our world class consultant trainers. Your hands on course comes with a 100% satisfaction money back guarantee and lifetime e-mail support to give you the very best chances of passing." This tutorial has been written and prepared by http://www.networksinc.co.uk.


The people at FreeSkills.com were nice enough to share one of their many free tutorials with us in order to make "Static Routing" available to SearchNetworking.com readers. FreeSkills.com has more than 400 free tutorials and many reasonably-priced courses available for different IT subjects. We recommend you stop by and visit this wonderful resource!



Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
IP Networking
What is the definition of ATM (Asynchronous Transfer Mode)?
Do I have to disable DHCP on my router to create a DHCP server?
Windows Server 2008 IP routing configuration: Static and dynamic RIPv2
What is IP?
Connect your LAN to the Internet using static or dynamic NAT
Using tracert and TTL to troubleshoot network connectivity problems
Test your TCP/IP protocol stack to troubleshoot network connectivity
IP addressing and subnetting explained
Checking IP configuration to troubleshoot Windows network connectivity
Does IPv6 abandon TCP/IP fragmentation?

Routing and Switching
How to test LAN switch energy efficiency
Testing LAN switch power consumption: A best practices guide
Dynamic IP routing and routing protocols
Monitor your network traffic with MRTG
How routers work: An overview for networking pros
Secure Cisco routers against IOS flaw attack
Network summarization -- Supernetting and wildcard masks
Routing: Five common, easily avoided errors
Router Expert: Building a WLAN proxy server, implementing ASR
Router Expert: Building a WLAN proxy server, implementing WPAD

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
32-bit IP addressing  (SearchNetworking.com)
fixed-length subnet mask  (SearchNetworking.com)
GARP (Generic Attribute Registration Protocol)  (SearchNetworking.com)
Port Address Translation (PAT)  (SearchNetworking.com)
route aggregation  (SearchNetworking.com)
route summarization  (SearchNetworking.com)
subnet  (SearchNetworking.com)
subnet mask  (SearchNetworking.com)
variable-length subnet mask  (SearchNetworking.com)
wildcard mask  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts