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

using the "ip route" command

amarranca
Level 1
Level 1

What Im trying to do is force all traffic to a server and the server is then forwarding the traffic from there.

The IP that I want to push is 192.168.20.145

Here is what route statment entries look like:

ip route 0.0.0.0 0.0.0.0 192.168.1.1

ip route 192.168.20.144 255.255.255.248 192.168.1.100

the server is 192.168.1.100 and I'm pushing the whole subnet to that destination IP because I havent figured out a way to push just one IP unless you re-subnet it to reflect that.

My gateway of last resort is 192.168.1.1

What am I doing wrong?

4 Replies 4

pkhatri
Level 11
Level 11

Hi,

If you want to route just a single IP to the server, you can use this:

ip route 192.168.20.145 255.255.255.255 192.168.1.100

Hope that helps - pls do rate the post if it does.

Paresh

amarranca
Level 1
Level 1

The syntax of that command did take in the router ok. I'm watching traffic with Ethereal but my IP is not even hitting the destination where I want it to go. It's going out my gateway of last resort.

It doesnt matter that I'm pushing this to a linux server as opposed to a cisco router does it?

*Does the router read the Route Table like an access list, top down and whenever it finds a match it goes*?

My Gateway of last resort is the very first entry.

Switching to policy based routing now, I will post the results.....................

Can you post the output of 'sh ip ro 192.168.20.145' with the static route to 192.168.20.145 configured ?

It should work..

Paresh

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: