www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ICND1 / Day 11 – Static Routing / Day 11 Tasks / Configuring Static Routes

Configuring Static Routes

The commands to configure a static route (see Figure 11.1 below) include the following:

  • network address/prefix mask
  • address or exit interface
  • distance (optional)

 

Here is an example of these commands in use:

RouterA(config)#ip route network prefix mask {address | interface} [distance]

 

 11.1

Figure 11.1 – Sample Network for Static Routes

 

To add a static route for the network above, you would write the following line of configuration on the router on the left:

Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.2

With static routes, you can specify a next-hop IP address the router needs to go to on the way to the destination address, or you can specify an exit interface. Often, you won’t know your next hop because it is your ISP, or your IP address will change over time (see Figure 11.2 below). If this is the case, use an exit interface.

11.2

Figure 11.2 – You Might Not Always Know Your Next-Hop Address

 

Router(config)#ip route 192.168.1.0 255.255.255.0 s0/0

The command line above tells the router to send traffic destined for the 192.168.1.0 network out of the Serial interface. The next command tells the router to send all traffic for all networks out of the Serial interface:

Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0

The route above is actually a default route. Default routes are used to direct packets addressed to networks not explicitly listed in the routing table.

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.