Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Config Static routing with example ?

Configuring a Static Route

You can configure a static route on the router.

SUMMARY STEPS

1. configure terminal

2. ip route {ip-prefix | ip-addr ip-mask} {[next-hop nh-prefix] | [interface next-hop nh-prefix]} [tagtag-value [pref]]

3. (Optional) show ip static-route

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

DETAILED STEPS

 

    Command Purpose

Step 1 

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters configuration mode.

Step 2 

ip route {ip-prefix ip-addrip-mask} {[next-hop | nh-prefix] | [interface next-hop | nh-prefix]} [tag tag-value[pref]

 

Example:

switch(config)# ip route.0.2.0/8 ethernet1/.0.2.4

Configures a static route and the interface for this static route. You can optionally configure the next-hop address. The preference value sets the administrative distance. The range is from1 to. The default is1.

Step 3 

show ip static-route

 

Example:

switch(config)# show ip static-route

(Optional) Displays information about static routes.

Step 4 

copy running-config startup-config

 

Example:

switch(config)# copy running-config startup-config

(Optional) Saves this configuration change.

 

This example shows how to configure a static route:

switch# configure terminal switch(config)# ip route.0.2.0/.0.2. switch(config)# copy running-config startup-config  

Use the no ip static-route command to remove the static route.

user-image
Question added by Harsud hanath , Field Engineer , Super Communications
Date Posted: 2018/02/28
Harsud hanath
by Harsud hanath , Field Engineer , Super Communications

Configuring a Static Route

You can configure a static route on the router.

SUMMARY STEPS

1. configure terminal

2. ip route {ip-prefix | ip-addr ip-mask} {[next-hop nh-prefix] | [interface next-hop nh-prefix]} [tagtag-value [pref]]

3. (Optional) show ip static-route

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

DETAILED STEPS

 

    Command Purpose

Step 1 

configure terminal

 

Example:

switch# configure terminal

switch(config)#

Enters configuration mode.

Step 2 

ip route {ip-prefix ip-addrip-mask} {[next-hop | nh-prefix] | [interface next-hop | nh-prefix]} [tag tag-value[pref]

 

Example:

switch(config)# ip route 192.0.2.0/8 ethernet 1/2192.0.2.4

Configures a static route and the interface for this static route. You can optionally configure the next-hop address. The preference value sets the administrative distance. The range is from 1 to 255. The default is 1.

Step 3 

show ip static-route

 

Example:

switch(config)# show ip static-route

(Optional) Displays information about static routes.

Step 4 

copy running-config startup-config

 

Example:

switch(config)# copy running-config startup-config

(Optional) Saves this configuration change.

 

This example shows how to configure a static route:

switch# configure terminal switch(config)# ip route 192.0.2.0/8192.0.2.10 switch(config)# copy running-config startup-config  

Use the no ip static-route command to remove the static route.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.