Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

static route question

Status
Not open for further replies.

spivy66

MIS
Nov 8, 2002
150
US
question.

I have a machine ip 192.168.1.23 and the default gateway is pointing to my cisco 2600 at ip 192.168.1.1

The cisco 2600 ip last resort is 192.168.1.20 so as you all know all traffic will be sent to 192.168.1.20. My question is i need 192.168.1.23 to send all its traffic to 192.168.1.22 instead of 192.168.1.20. So i created a static route on the cisco ip route 192.168.1.23 255.255.255.255 192.168.1.22

for some reason the traffic still goes to 192.168.1.20.. I though static routes have a higher priority then default gateways..

Also i know i can just change the gateway on 192.168.1.23 but i want to do this through the router not on the local machine.

-thanks
 
There is a good chance you turned off the routing brain of the router when you added the default gateway.

Do this:

router#config t
router(config)#ip routing

The ip default-gateway command is used on switches but not on routers as a general rule. If the routing brain is on, the default gateway isn't used at all. It is often used when a router dies and we want a crashdump file sent to a file server.
 
Thank for your input, but still no good, all traffic still goes to 192.168.1.20.

Does it have to do with being on the same subnet is why i'm having the problem? Other then that i can't think of any other reason why it's not working. basically i have all my machines pointing to the cisco and the cisco default is 192.168.1.20


192.168.0.0/16 is variably subnetted, 3 subnets, 2 masks
S 192.168.1.23/32 [1/0] via 172.17.1.54
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 172.17.2.0/24 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 172.17.1.20
 
sorry, this is the correct config


192.168.0.0/16 is variably subnetted, 3 subnets, 2 masks
S 192.168.1.23/32 [1/0] via 172.17.1.54
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 172.17.1.20


 
it sounds like you need to use policy-based routing or, like you said, just change the gateway on the .23 host to be .22 instead.

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
do you think policy-based routing will work. Its a prodcution router i don't want to screw with anything
 
yes it will, but if you don't want to mess with anything just change the gateway on the host

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
OK , so i made the change and it worked, but everybody that connects to the other interface f0/1 crashed. Any idea why?

I removed the policy but i was just curious why that might of happened. do i maybe have to apply the rule to both interfaces?
 
access-list 10 permit any
route-map route32 permit 10
match ip address 10 route32
!
route-map route32 permit 10
match ip address 10
set ip next-hop 172.17.1.54
 
your acl needs to change to permit host 192.168.1.32
and then add in a second sequence to your route map with nothing underneath it route-map route32 permit 20

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
Hello these are the step I'm taking, maybe you can correct from here. If this looks right why are all my other users on the other interface having problems?



mask(config)#access-list 10 permit 192.168.1.23
mask(config)#route-map route32
mask(config-route-map)#match ip address 10
mask(config-route-map)#set ip next-hop 192.168.1.22
mask(config)#inter fa0/0
mask(config-if)#ip policy route-map route32
 
so now it looks like this...



access-list 10 permit 192.168.1.23
route-map route32 permit 10
match ip address 10
set ip next-hop 192.168.1.22
!
route-map route32 permit 20
!
 
ok, so you're saying hosts on the 172.17.2/24 subnet are not able to communicate properly?? what about other hosts on the 192.168.1/24 subnet??

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
Yes everything on 192.168.1/24 have no problems, it just seems the 172.17.2/24 is having the problems, and I can't see why because the acl's that i setup has nothing to do with that interface?

 
mask(config)#access-list 10 permit host 192.168.1.23

did you clear the ACL 10 before adding above line ?



We must go always forward, not backward
always up, not down and always twirling twirling towards infinity.
 
yes,

so your saying my config i have above should work and not interfere with fe0/1?

The only thing i haven't tested with was
route-map route32 permit 20

an empty entry for route32 permit 20

I'll TEST tomorrow morning

 
Cool!! thanks for everyone's help that worked. I must of typed something wrong before.

Quick easy question for most of you. I need decent 48 port 10/100 layer 3 cisco switchs for intervlan routing. I have about 10 48 port net gears and they sux! the buffer mem is low and they keep burning out on me.Any ideas? Right not i have a 2 2600 separated on 3 different masks. So i need switches that are good but not over kill. I was also looking online for a document on if 2900 are layer 3 and if they are 48 ports. It says its layer 2 but can do 2-4 . what doe sthat mean? doe sit mean its really a layer 2? any help would be great!!

 
I'm assuming you want stackable so go with either the 3560 or 3750. The 3750s can have up to nine individual switches stacked together and not only managed via a single ip address, but also act as a single virtual chassis.

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
The 2900 series are layer 2 switches.

/

tim@tim-laptop ~ $ sudo apt-get install windows
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package windows...Thank Goodness!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top