Cisco CCNA ICND2 (Interconnecting Cisco Networking Devices Part 2)Exam Cram

2. Routing Technologies

2.4 Static and Default routes

1. Static Routes - Configured by the administrator manually. The administrator must also update the table manually every time a change to the network takes place. Static routes are commonly used when routing from a network to a stub (a network with a single route) network.

The command is :

ip route network mask address/interface [distance]

ex: ip route 165.44.34.0 255.255.255.0 165.44.56.5

Here, 165.44.34.0 is the destination network or subnet

255.255.255.0 is the subnet mask
165.44.56.5 is the default gateway.

ip route <destination_network_address> <subnet_mask> <default_gateway>

An example of configuring static route is given below:

RouterA(config)#ip route 192.204.1.64 255.255.255.240 192.204.1.2

Fully Specified Static Route:

You must specify both the output interface (the interface on which all packets are sent to the destination network) and the next-hop address in a fully specified static route. You can use a fully specified static route when the output interface is a multi-access interface and you need to identify the next-hop address. The next-hop address must be directly attached to the specified output interface.

Configuration steps:

1. configure terminal

2. ip route { ip-prefix | ip-addr/ip-mask } {[ next-hop | nh-prefix ] | [ interface next-hop | nh-prefix ]} [ name nexthop-name] [ tag tag-value] [ pref ]

or

ipv6 route ip6-prefix { nh-prefix | link-local-nh-prefix } | { nh-prefix [ interface ] | link-local-nh-prefix [ interface ]} [ name nexthop-name] [ tag tag-value] [ pref ]

3. (Optional) show { ip | ipv6 } static-route

4. (Optional) copy running-config startup-config

A static route on a Cisco router is most commonly defined by using the command

Router(config)# ip route A.B.C.D (destination network/host) A.B.C.D (subnet mask) A.B.C.D (next hop)

You can also use the port identifier such as e0, s1 etc. to define the next hop address.

Optionally, the "distance metric" can be added at the end of the command to change the default weight.

images/pin-icon.png

In a fully specified static route, both the output interface and the next-hop IP address are specified. This form of static route is used when the output interface is a multi-access interface and it is necessary to explicitly identify the next hop. The next hop must be directly connected to the specified exit interface.

2. Default Routes - The default route (gateway of last resort) is used when a route is not known or is infeasible. The command is

ip route 0.0.0.0 0.0.0.0 165.44.56.5

Here 165.44.56.5 is the gateway of last resort to network 0.0.0.0

Default route is used when there is no other known route to a given IP packet's destination. Default route is also known as gateway of last resort.

syntax is for setting default route is: ip route 0.0.0.0 0.0.0.0 <next_hop_address>

EX : Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1

You can also set default route by specifying the interface as :

Router(config)#ip route 0.0.0.0 0.0.0.0 s0

"ip default-gateway" command is used when ip routing is disabled on a Cisco router. The ip default-network and ip route 0.0.0.0 0.0.0.0 commands are used to set the gateway of last resort on Cisco routers that have ip routing enabled.

1. ip default-gateway <ip address>

Ex: ip default-gateway 192.168.14.2

2. ip default-network <ip address>

Ex: ip default-network 192.168.1.0

3. ip route 0.0.0.0 0.0.0.0 <ip-address>

Ex: ip route 0.0.0.0 0.0.0.0 192.168.1.2

Here 192.168.1.2 is the gateway of last resort to network 0.0.0.0

3. Dynamic Routes - As soon as dynamic routing is enabled, the routing tables are automatically updated. Dynamic routing uses broadcasts and multicasts to communicate with other routers. Each route entry includes a subnet number, the interface out to that subnet, and the IP address of the next router that should receive the packet.

The commands to enable eigrp are :

router eigrp 0    -here 0 is the process-id
network <network-id>

Previous   Contents   Next


CCNA-ICND2 Cram Notes Contents certexams.com ad