cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4274
Views
0
Helpful
4
Replies

ip route noob question

chrisirene
Level 1
Level 1

hi guys, this command tells what? ip route 192.168.1.16 255.255.255.0 10.1.1.2

and ip route 0.0.0.0  0.0.0.0.0 192.168.1.17 tells what also? thanks.

3 Accepted Solutions

Accepted Solutions

u1kumar2002
Level 1
Level 1

Hi,

     ip route 192.168.1.16 255.255.255.0 10.1.1.2---> this statement is wrong...  The network is not in correct format... if you configure this command in router it will show you error - Inconsistent address and mask. it should be --- ip route 192.168.1.0 255.255.255.0 10.1.1.2 , means remote network 192.168.1.0/24 is accessible via 10.1.1.2.

ip route 0.0.0.0  0.0.0.0.0 192.168.1.17 : this statement is wrong, it should not be 5 octet in mask. It should like this 0.0.0.0 0.0.0.0 192.168.1.17 this is a default route means that all packet should go to 192.168.1.17.

Hope this information will help you

Do rate for helpful posts...

Uttam

http://www.startnetworks.blogspot.com/

View solution in original post

k_srinadh
Level 1
Level 1

Hi,

Wrong Usage : ip route 192.168.1.16 255.255.255.0 10.1.1.2

-----------------------------------------------------------------

Correct Usage: ip route 192.168.1.0 255.255.255.0 10.1.1.2

In that ip route

We are routing particular network (192.168.1.0) to go out thro/Via (10.1.1.2) this path.

Wrong Usage : ip route 0.0.0.0  0.0.0.0.0 192.168.1.17

-------------------------------------------------------------------

Correct Usage : ip route 0.0.0.0 0.0.0.0 192.168.1.17

this is called Default routing

also known as the gateway of last resort, is the network route used by a router when no other known route exists for a givenIP packets destination address

Hope this helps.

Regards,

Srinadh

View solution in original post

vinod.agrahari
Level 1
Level 1

Hi Chris,

The first command:

Ip route 192.168.1.16 255.255.255.0 10.1.1.2 is incorrect and will return an error message of bad subnet mask as we are using hop address in place of network address.

The correct configuration of static route should follow the following format:

Ip route and probably we can use it:

Ip route 192.168.1.0 255.255.255.0 10.1.1.2

This is what we call it static routing and in above corrected scenario, all the traffic of network 192.168.1.0 will go via interface 10.1.1.2

In Second command:

Ip route 0.0.0.0 0.0.0.0 192.168.1.17 is wrong and will return incomplete command error as we are using five zero’s in the wild mask option instead of four zero.

The correct configuration for default routing should follow following format:

Ip route 0.0.0.0 0.0.0.0 and probably we can use like this

Ip route 0.0.0.0 0.0.0.0 192.168.1.17

This is what call gateway of last resort and will often configure in the Stub Network where gateway of last resort is not set.

Regards

Vinod Agrahari

View solution in original post

4 Replies 4

u1kumar2002
Level 1
Level 1

Hi,

     ip route 192.168.1.16 255.255.255.0 10.1.1.2---> this statement is wrong...  The network is not in correct format... if you configure this command in router it will show you error - Inconsistent address and mask. it should be --- ip route 192.168.1.0 255.255.255.0 10.1.1.2 , means remote network 192.168.1.0/24 is accessible via 10.1.1.2.

ip route 0.0.0.0  0.0.0.0.0 192.168.1.17 : this statement is wrong, it should not be 5 octet in mask. It should like this 0.0.0.0 0.0.0.0 192.168.1.17 this is a default route means that all packet should go to 192.168.1.17.

Hope this information will help you

Do rate for helpful posts...

Uttam

http://www.startnetworks.blogspot.com/

k_srinadh
Level 1
Level 1

Hi,

Wrong Usage : ip route 192.168.1.16 255.255.255.0 10.1.1.2

-----------------------------------------------------------------

Correct Usage: ip route 192.168.1.0 255.255.255.0 10.1.1.2

In that ip route

We are routing particular network (192.168.1.0) to go out thro/Via (10.1.1.2) this path.

Wrong Usage : ip route 0.0.0.0  0.0.0.0.0 192.168.1.17

-------------------------------------------------------------------

Correct Usage : ip route 0.0.0.0 0.0.0.0 192.168.1.17

this is called Default routing

also known as the gateway of last resort, is the network route used by a router when no other known route exists for a givenIP packets destination address

Hope this helps.

Regards,

Srinadh

vinod.agrahari
Level 1
Level 1

Hi Chris,

The first command:

Ip route 192.168.1.16 255.255.255.0 10.1.1.2 is incorrect and will return an error message of bad subnet mask as we are using hop address in place of network address.

The correct configuration of static route should follow the following format:

Ip route and probably we can use it:

Ip route 192.168.1.0 255.255.255.0 10.1.1.2

This is what we call it static routing and in above corrected scenario, all the traffic of network 192.168.1.0 will go via interface 10.1.1.2

In Second command:

Ip route 0.0.0.0 0.0.0.0 192.168.1.17 is wrong and will return incomplete command error as we are using five zero’s in the wild mask option instead of four zero.

The correct configuration for default routing should follow following format:

Ip route 0.0.0.0 0.0.0.0 and probably we can use like this

Ip route 0.0.0.0 0.0.0.0 192.168.1.17

This is what call gateway of last resort and will often configure in the Stub Network where gateway of last resort is not set.

Regards

Vinod Agrahari

chrisirene
Level 1
Level 1

thanks guys, for your help

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco