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

Removing static route Get error %No matching route to delete

wilder7bc
Level 1
Level 1

  I am trying to remove a static route I added:

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

r2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.168.0.0/29 is subnetted, 1 subnets
S       172.168.0.0 [1/0] via 192.168.2.2
C    192.168.1.0/24 is directly connected, FastEthernet0/0
     192.168.2.0/30 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial0/0
r2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r2(config)#no ip route 172.168.0.0 255.255.255.0 192.168.2.2
%No matching route to delete
r2(config)#r2#show ip route

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

I was practicing setting up static routing on three routers      r2 (2600xm) connected to r1(2600xm) via T1 module cards on the serial ports. connected to r1 is an old 2500 router called PC.

I removed the static routes off r2 and PC but when I get to r2 which I am connecting to via console cable from another 2500 that I use for an access server I get the above error.  all the IPs are just generic subnets I created to play around with static routing.   I cannot get it removed anyone have any ideas?

1 Accepted Solution

Accepted Solutions

Nandan Mathure
Level 1
Level 1

you are using different subnet mask than the one you used. As per the route table entry mask is /29

try this,

1] r2(config)#no ip route 172.168.0.0 255.255.255.248 192.168.2.2

or 2] Other easy method would be check the running config and copy paste with "no" in the begining.

show run | include ip route

Copy the static route statment and paste it as is with "no " in global config and verify routing table.

View solution in original post

4 Replies 4

Nandan Mathure
Level 1
Level 1

you are using different subnet mask than the one you used. As per the route table entry mask is /29

try this,

1] r2(config)#no ip route 172.168.0.0 255.255.255.248 192.168.2.2

or 2] Other easy method would be check the running config and copy paste with "no" in the begining.

show run | include ip route

Copy the static route statment and paste it as is with "no " in global config and verify routing table.

Your good lol.... I actually figured it out before reading this.  I was at loss and waiting to see if someone post so I thought what the hex I will go do  show running-config and paste on here to see if it can help people trying to help me.

When I did that I saw that my ip route where listed there and was like wait it has 248 instead of a 0....  so then went back into conf t and it was easy I jsut typed no then copied and pasted my lines.

What I cannot figure out is how in the hex did you now I had a 248?   Anyway you was spot on with your assessment and even though I accidentally found it on my own what you said was exactly how I did it though I stumbled onto it by accident not through any real trouble shooting process lol...

I am still new to this and didnt realise that ip routes show up in the table but from the looks of it I guess everything does.  I am about to go study dynamic routes now and adding RIP thats why I needed the static cleared out as I am studying Jeremy Cioara Videos for CCNA.

Thanks again for the spot on assessment.

Respectfully,

Brian

      

P.S. Here was my config in case others wanted to see:

!

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

service password-encryption

!

hostname r2

!

boot-start-marker

boot-end-marker

!

no logging buffered

enable secret 5 $1$yMD.$.1GjKPdvhbHqx7QXgAjhH0

!

no aaa new-model

no network-clock-participate slot 1

no network-clock-participate wic 0

ip cef

!

!

!

!

ip domain name bwcat.net.int

ip auth-proxy max-nodata-conns 3

ip admission max-nodata-conns 3

!

!

!

crypto pki trustpoint TP-self-signed-959526629

enrollment selfsigned

subject-name cn=IOS-Self-Signed-Certificate-959526629

revocation-check none

rsakeypair TP-self-signed-959526629

!

!

username Brian privilege 15 password 7 141411050D

!

!

!

interface FastEthernet0/0

description $ETH-LAN$

ip address 192.168.1.6 255.255.255.0

duplex auto

speed auto

!

interface Serial0/0

ip address 192.168.2.1 255.255.255.252

!

ip default-gateway 192.168.1.1

ip forward-protocol nd

ip route 0.0.0.0 0.0.0.0 192.168.0.1

ip route 172.168.0.0 255.255.255.248 192.168.2.2

!

!

ip http server

ip http authentication local

ip http secure-server

!

!

!

!

control-plane

!

!

banner motd ^C

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

NO UNAUTHORIZED ACCESS!!!

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX^C

!

line con 0

exec-timeout 0 0

logging synchronous

login local

line aux 0

line vty 0 4

exec-timeout 0 0

logging synchronous

login local

!

!

end

Hi Brian,

I figured it out using the routing table that you have pasted. It has a following entry for the static route where it says

172.168.0.0/29 is subnetted, 1 subnets

S       172.168.0.0 [1/0] via 192.168.2.2

So routing table tells you that 172.168.0.0 which is Class B network is classlessly subnetted into /29 network.

So if you convert /29 to dotted decimal mask it becomes:

255.255.255.248 i.e in binary 1 1 1 1 1 1 1 1. 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 0 0 0

Best of luck with your studies.:)

Nandan

Oh ok.  I guess I did not know how to read the "show ip route" table correctly.  I thought it was only the numbers after the "s" Since the 172.168.0.0/29 was above that line I did not think about using it.  I shoudl have known since I am the one that created the 172.169.0.0 and I created it for the sole purpose of that connection.  However I got tunnel vision because all of this is so new that I missed the obvious.

As I get more comfortable I should be able to recognise things I already know at this point though I have only saw this stuff a few times so looks like a new world so to speak.

Thanks again!

Brian

Review Cisco Networking for a $25 gift card