cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1141
Views
10
Helpful
17
Replies

Cisco 2951: setting up and changing a static route.

roncro
Level 3
Level 3

Hello,

 

I have two access points, but they are connected to a computer:

AP1 192.168.66.6 (the ipaddr of the computer interface is 192.168.66.1)

AP2 192.168.67.6 (the ipaddr of the computer interface is 192.168.67.1)

The computer's ip "itself" is 192.168.1.112

 

I used to have it setup with another machine, that worked, but replaced stuff and forgot how I set up the routes on a Cisco 2951

I have to change replace one route on the router I think, and complete another one

 

here is  the relevant part that "show ip route" shows.

 

%<

192.168.66.0/24 is variably subnetted, 3 subnets, 2 masks
S 192.168.66.0/25 [1/0] via 192.168.1.110
C 192.168.66.128/25 is directly connected, GigabitEthernet0/1.66
L 192.168.66.131/32 is directly connected, GigabitEthernet0/1.66
192.168.67.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.67.0/24 is directly connected, GigabitEthernet0/1.67
L 192.168.67.131/32 is directly connected, GigabitEthernet0/1.67

 

%<

 

How do I change/replace the 192.168.1.110 address, and complete it for the 192.168.67.0 traffic?

 

thanks,

 

Ron

 

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

As we discussed -  if you like /24 need to route via 112, you need to have route point 112 and back - example as below

 

ip route  192.168.67.0 255.255.255.0 192.168.1.112 (Hope Router knows how to reach 192.168.1.112 IP address)

for the return traffic, you need same route back towards router 

 

is this make sense?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

17 Replies 17

Hello,

 

it is difficult to figure out from your description what you are trying to achieve, and what you are asking. Providing a schematic drawing of your topology and visualizing what you are asking could help.

Hello Georg,

 

what I am trying to do is 'snif' traffic from a wireless device, to figure out a data protocol.   That 's why I connect a wireless access point (AP) via ethernetcable to a computer.  I want the wireless device to connect to wireless as usual, and have the computer route traffic to and from the wireless device, so I can easily see IP traffic.

I used to have a setup that worked, but can't find how I created the entries in the routing table.

 

What I want is:

replace:

192.168.66.0/24 is variably subnetted, 3 subnets, 2 masks
S 192.168.66.0/25 [1/0] via 192.168.1.110
C 192.168.66.128/25 is directly connected, GigabitEthernet0/1.66
L 192.168.66.131/32 is directly connected, GigabitEthernet0/1.66

 

with something like:

192.168.66.0/24 is variably subnetted, ? subnets, ? masks
S 192.168.66.0/24 [1/0] via 192.168.1.112
? 192.168.66.0/24 is directly connected, GigabitEthernet0/1.66

basically what I try to accomplish is that anything in the/my network can find the device and vice versa, even with the computer (192.168.1.112).

 

(hard to draw)

 

Ron

 

I think some weirdness is going on.

 

When I issue a:

ip route 192.168.67.0 255.255.255.128 192.168.1.112

 

on the router, I see these entries in the routing table:

192.168.67.0/24 is variably subnetted, 3 subnets, 3 masks
C 192.168.67.0/24 is directly connected, GigabitEthernet0/1.67
S 192.168.67.0/25 [1/0] via 192.168.1.112
L 192.168.67.131/32 is directly connected, GigabitEthernet0/1.67

 

(which works,  but looks clumsy/cluttered)

 

However, when I issue  a:

ip route 192.168.67.0 255.255.255.0 192.168.1.112   (I want all traffic in the 192.168.67.0 net to go through 192.168.1.112)

the S entry (S 192.168.67.0/25 [1/0] via 192.168.1.112) doesn't show up   well actually, I would expect to see

something like: "S 192.168.67.0/24 [1/0] via 192.168.1.112"

 

So I am wondering  why the first command I issued "works"  and the second one doesn't?

 

Ron

Hello,

from your first post of the IP routing table we see that:

 

>> C 192.168.67.0/24 is directly connected, GigabitEthernet0/1.67

 

prefix 192.168.67.0/24 is directly connected to sub-interface gi0/1.67.

 

You are trying to foul the router to make traffic go via new PC next-hop 192.168.1.112

 

The trick is to create a set of most specific static routes so you need :

ip route 192.168.67.0 255.255.255.128 192.168.1.112

+

ip route 192.168.67.128 255.255.255.128 192.168.1.112

 

the static route for 192.168.67.0/24 does not appear in routing table because the connected route has admin distance of 0 and the static route has admin distance of 1.

 

Be aware of possible routing loops

 

Hope to help

Giuseppe

 

correct,  what I want is the router to know that IP traffic for the networks 192.168.66.0 and 192.168.67.0  needs to go through 192.168.1.112

(The old situation I had was for something different, where one piece of equipment was located elsewhere, and yet another on the same 192.168.66.0 ntwork, but attache to  another computer,  that's why the 255/255.255.128 netmask, That old setup is not needed anymore.).

 

But yes, I want the router "to know" that IP traffic for 192.168.66.0 and 192.168.67.0  needs to go through 192.168.1.112

 

thanks,

 

Ron

balaji.bandi
Hall of Fame
Hall of Fame

just to clarify below route you looking to change to a 112 IP address.

 

S 192.168.66.0/25 [1/0] via 192.168.1.110

 

First you need to remove this static route going to 110 and then add static route 112?

 

Orginal Static Route 66.0/25 Later you adding 67.0/24 is this correct ? or is this your intention?

 

what is this device having IP address 192.168.1.112 ?  what is the route added for this device ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

correct, however I figured out how to do that,   I just forgot the syntax.

 

Well ideally,  I want both the 192.168.66.9/24 and 192.168.67.0/24 to be routed to a computer with I address  192.168.1.112

 

thanks,

 

Ron

I agree you going to correct that, again look like a typo here :

 

192.168.66.9/24 ( that should be 0 i guess) and 192.168.67.0/24

 

You also need to route back the same subnet from device 192.168.1.112 to back to router to work.

 

if this windows? route add command should work for you.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

that was indeed a typo, sorry about that.

 

the 192.168.1.112 machine is a linux box.

If this is Linux box, you need to add route back 192.168.1.112

 

# route -n   - this will give you exiting static route information

 

depends on Linux distro check the command syntax for Route add perssitance.

 

 

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello BB,

 

the distro is RHEL 8, and I already have that part working (routing on the Linux box);  I can ping the Cisco 2951 from the accesspoints through that computer (192.168.1.112, in "the middle"), and vice versa. Routing on the linux box is not an issue at all.

 

I am just looking to find out what the best/appropriate way is to set up the two routes on the Cisco 2951 (so that I don't have to use those weird netmasks etc, left over from a previous setup/project).

 

thanks,

 

Ron

I am just looking to find out what the best/appropriate way is to set up the two routes on the Cisco 2951 (so that I don't have to use those weird netmasks etc, left over from a previous setup/project).

you can summarise them in to 1 network. not sure what is end goal, orgial post you mentioned routing not working, now you looking different here end of the post.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

right, but I want 2 separate networks. 

The endgoal is to have a  decent routing table on the Cisco 2951, right now  I basically just hacked it together. (on the 2951).

Originally it wasn't working, when I tried to  add a route for the whole subnet, but could get it to work with the 255.255.255.128 netmask.

 

Ron

you can do /23 to cover 2 subnet or more depends requirement.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for 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