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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up static route

Status
Not open for further replies.

jahistx

Technical User
Jun 21, 2002
94
GB
Hi

I want to add a static route to a Cisco 803, and then delete the existing static route.

I did 'show ip route' to see the current routing table, but when I enter config mode I cannot see the syntax to add and delete static routes.

I think its 'ip route ...' but I cant work out the syntax.

Can anyone help me please?

I want to add route to 192.168.4.0/24 mask 255.255.255.0

 
Hi

The route currently displayd is

192.168.0.0/24 [200/0] via 192.168.254.6


How would I add a route via another ip?

I have tried

ip route 192.168.4.0 255.255.255.0 192.168.254.6 permanent but this doesn't add a similar line to the table.

Any help much appreciated!
 
Hi John,

To add in the new route into your config go into global config mode:

Router(config)# ip route 192.168.4.0 255.255.255.0 ?.?.?.?(add in your next hop ip or interface in place of ?)

To remove old route, first of all in exec mode do a show running-config and look down near the end of config and you will see the new route you just added and your old route that you want to remove. take note of old route and go into global config mode again and type in the whole line of your route that needs to be removed and place a "no" at start of line
router(config)# no ip route (network ip)(subnet mask)(next hop ip of interface)

Hope this helps

Max
 
Hi Max

After adding a route with command

ip route 192.168.4.0 255.255.255.0 192.168.254.6

I have a routes displayed as follows;

S 192.168.4.0/24 is directly connected, Dialer1
is directly connected
192.168.254.0/29 is subnetted, 1 subnets
C 192.168.254.0 is directly connected, Dialer1
C 192.168.1.0/24 is directly connected, Ethernet0

I still cannot ping 192.168.4.0 subnet

What am I missing?
 
Hi John,

Have you removed the old static route from your config yet? Also i forgot to say that once your new route is added and old route removed remember to do a write memory command in exec # mode.
What is the ip you are trying to ping in 192.168.4.0 subnet?

Max
 
Paste a copy of your config up please.

Thanks,
steven
 
Hi

I can now ping the ethernet ip of the remote router, which is 192.168.4.104, but nothing else on the network 192.168.4.x

My local routing table is now:

Gateway of last resort is not set

S 192.168.4.0/24 [1/0] via 192.168.254.6
S 192.168.0.0/24 [200/0] via 192.168.254.6
192.168.254.0/29 is subnetted, 1 subnets
C 192.168.254.0 is directly connected, Dialer1
C 192.168.1.0/24 is directly connected, Ethernet0
York803#

My remote routing table is:

Gateway of last resort is not set

C 192.168.4.0/24 is directly connected, Ethernet0
192.168.254.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.254.0/29 is directly connected, Dialer1
C 192.168.254.1/32 is directly connected, Dialer1
S 192.168.1.0/24 [200/0] via 192.168.254.1
London803#

What is the [200/0]part? I will remove the duplicate entry in the local table and add it back in.

All help much appreciated!!!

 
not that this means anything anymore, but if you are in an older environment, in the past, I have had problems using networks that end in ".0"

For example, your network address is 192.168.0.0 and is a class C subnet mask, making the number of your network "192.168.0" and the addresses on the network fall into that last octet (254 addresses)

Specifically, I had problems with using a network of 10.0.0.0/24, but using 10.1.1.0/24 was fine.

At this point, it is highly esoteric, but does anybody have a clue as to why this might have happened? Other than poor or ill-implemented RFC? Again, this was about 5 years ago so it might have been fixed since then.
 
If you can ping the ethernet interface on the remote router but nothing on that network then it does suggest that those devices don't have their default gateway set.

Chris.

**********************
Chris Andrew, CCNA, CCSA
chris@iproute.co.uk
**********************
 
Hi iproute

As you suggested, the static route set up on the server we were trying to connect to was typed in incorrectly: what should have been 192.168.4.104 was typed as 192.168.4.1 ....

I do however have a new question: The 192.168.4.x subnet is connected to the 192.168.0.x subnet over a vpn. I want the users on subnet 192.168.1.x (who are now connected to the 192.168.4.x subnet over an isdn line) to be able to route through the 192.168.4.x subnet to 192.168.0.x

I have done

ip route 192.168.0.0 255.255.255.0 192.168.254.6

on one machine on the 192.168.1.x range. I have also set up a default gateway on this machine of 192.168.4.1 (the firewall ip address over which the vpn runs) but I cannot ping an address on the 192.168.0.x range.

Is the above possible? Can I route packets through the 192.168.4.x range to the 192.168.0.x range from the 192.168.1.x range?

Any assistance much appreciated.

 
Hi

I tried to do

192.168.0.0 255.255.255.0 192.168.254.6 192.168.4.1

Where the last dotted decimal is the 'second hop' to reach the 192.168.0.x range, but the cisco 803 doesn't like this second hop.

Is there any way to acheive the above?

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top