cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
802
Views
0
Helpful
7
Replies

subnet forwarding to pc

robbinmra
Level 1
Level 1

Hello dear community!

I have 10 PCs connected to a switch.

IPs are: 192.168.10.10-10.168.10.18 and one pc with 192.168.15.31

I need to set a route so that when PCs ask for 192.168.10.31 they would be forwarded to 192.168.15.31 PC (its not a network)

Is it possible?

I've tried:

route 192.168.10.0 255.255.255.0 192.168.15.31

and

route 192.168.10.31 255.255.255.255 192.168.15.31

but this does not work

Would appreciate any help

1 Accepted Solution

Accepted Solutions

oh sorry there was an mistake in my command.

you cannot forward this via command route.

route 192.168.10.31 255.255.255.255 192.168.15.31 <----- this command said that the Host 192.168.10.31 is reacheable via the router 192.168.15.31.

You want, that the ip traffic change the destination Ip to 192.168.15.31 thats true?

so you need a router  to create a network like this: 192.168.15.0 255.255.255.0 (for example)

The router get the IP 192.168.10.31. You configure the router that packet with the destination address 192.168.10.31 forwarded to 192.168.15.31.

Interface fa 0/0

ip nat outside

ip add 192.168.10.31

interface fa 0/1

ip nat inside

ip add 192.168.15.31

ip nat inside source static tcp 192.168.15.31 192.168.10.31

I hope that is helpful


View solution in original post

7 Replies 7

Markus Thun
Level 1
Level 1

Hi

it can not be work, because the gateway must be in the same network.

route 192.168.0.0 255.255.255.0 192.168.10.1

Regards

Markus

Is there just any sense to route to the same network?

Andrey,

You could forward packets destined to 192.168.10.31 to 192.168.15.31 but the issue is that the PC with address 192.168.15.31 will discard those packets as it will not recognize the destination address as its own. This would require some kind of NAT to get it to work. Could you tell us a bit more on what you are trying to achieve and why you can't just change the adress of this PC from 192.168.15.31 to 192.168.10.31?

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Im using Allied Telesis switch (it level 2+ switch) x510-28GTX

I cant change adress from 192.168.15.31 to 192.168.10.31 because of broadcasting from 192.168.10.10 to 192.168.10.0

I've created vlan2 and put 192.168.15.31 pc port to that vlan, then made ip route 192.168.10.31 255.255.255.255 vlan2

but couldn't check if its working.

Hi,

it is not possible to make that without NAT. I have get you a solution with NAT.

Computers can not communicate form different subnets without a router (layer 3 device).

Your possibility is to use a router with NAT.

Regards

Markus

Hi, thanks for help, this seems to be correct, but impossible for my l2+ switch

oh sorry there was an mistake in my command.

you cannot forward this via command route.

route 192.168.10.31 255.255.255.255 192.168.15.31 <----- this command said that the Host 192.168.10.31 is reacheable via the router 192.168.15.31.

You want, that the ip traffic change the destination Ip to 192.168.15.31 thats true?

so you need a router  to create a network like this: 192.168.15.0 255.255.255.0 (for example)

The router get the IP 192.168.10.31. You configure the router that packet with the destination address 192.168.10.31 forwarded to 192.168.15.31.

Interface fa 0/0

ip nat outside

ip add 192.168.10.31

interface fa 0/1

ip nat inside

ip add 192.168.15.31

ip nat inside source static tcp 192.168.15.31 192.168.10.31

I hope that is helpful


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:

Review Cisco Networking products for a $25 gift card