0

I have a problem that I'm trying to solve

I have a computer with this IP address 10.0.0.1 / 255.255.255.0

and a router in the same network

the wan IP is: 10.0.0.5 / 255.255.255.0 and the LAN IP is: 192.168.1.1 / 255.255.255.0

the computer can ping the router WAN IP that it's obvious, but how can it be that the computer can ping router LAN IP 192.168.1.1, that it's the internal IP of the router when I'm doing in the computer this command:

ip route 192.168.1.0 mask 255.255.255.0 10.0.0.1

diagram screenshot

12
  • 1
    I'm not sure I follow. You're asking why your route… works? Are you intentionally using an incorrect gateway IP address? Are you perhaps reaching some other 192.168.1.1?
    – Daniel B
    Commented Apr 26, 2023 at 7:28
  • 1
    Why wouldn't it be able to ping an address, once it's been told where to reach it? Commented Apr 26, 2023 at 7:29
  • 10.0.0.1 its the ip of the computer , i didnt do route to 10.0.0.5 wan of the router
    – mikuzan
    Commented Apr 26, 2023 at 7:31
  • and i can ping the router internal ip
    – mikuzan
    Commented Apr 26, 2023 at 7:31
  • show us a diagram. that would help immensely Commented Apr 26, 2023 at 7:56

1 Answer 1

1

You told the computer to send packets bound for the 192.168.1.0 network to 10.0.0.1, so it sends the packets to the router. So the outbound packet gets to its destination.

The router knows how to reach 10.0.0.1 because it's in the same WAN subnet. So the return packet gets to its destination.

You don't explain why you think this wouldn't work. The route fixes the problem -- getting the outbound ping to the correct destination.

3
  • but when im adding another ip to the computer , this ip: 192.168.1.5 , without doing route in the cmd , then im not getting respone from the router but i can see when im doing arp -a , the mac of the router
    – mikuzan
    Commented Apr 26, 2023 at 18:31
  • That computer is not on the 192.168.1.5 network so how are the return packets going to get to it unless you add a route on the router? Commented Apr 26, 2023 at 19:37
  • i'v found out the problm . some one plug another router with the ip 192.168.1.1 in the 10.0.0.0/24 netowork
    – mikuzan
    Commented Apr 27, 2023 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .