I want to ping IP using LAN cable not wireless

2

1

I have one machine connect to network using two method :

Wireless - got internet access - Class C ip : 192.168.2.xx - Connect with local network with few PCs.

LAN

  • do not have internet access
  • Class A ip : 10.236.xx.xx
  • Connect with local network with 2 PCs only

I want to ping ip 10.236.xx.xx but don't want go through Wireless network. Only use LAN. but i can't turn off wireless network because i need to remote that machine from other site using teamviewer.

Right now, if I tracert the ip 10.236.xx.xx.. the first hops will go through 192.168.2.1 (gateaway wireless) it should go for 10.236.xx.1 (gateaway LAN)

any advise?

user315384

Posted 2014-04-14T02:29:35.030

Reputation: 21

What OS are you using? Unix machines can do a ping -I eth0 (or similar ethernet interface name) to select which interface it goes through. – Alan Shutko – 2014-04-14T02:42:03.043

@AlanShutko im using windows.. what the command for cmd? – user315384 – 2014-04-14T02:47:42.050

Have you tried setting the dhcp server on 10.236.x.x as your default gateway? – spuder – 2014-04-14T03:22:34.803

@spuder yups. all already ok. the only i need to let the machine ping the 10.236.xx.xx ip using the LAN network. not the Wireless network. – user315384 – 2014-04-14T03:24:44.103

Answers

1

If the source computer with LAN interface is configured with IP:

10.236.10.10, netmask 255.255.255.0

And if the destination is:

10.236.11.20, netmask 255.255.255.0

And if there is a router between these two networks, then you have to add a route to the network via your gateway on your source computer:

route add 10.236.11.0 mask 255.255.255.0 10.236.10.1

If there is no router between the two networks, and they are directly connected, you have to use netmask 255.255.0.0 on both computers to get what you want.

If this doesn't help, print out the following from both your source and destination computers:

route print
ipconfig /all

Tero Kilkanen

Posted 2014-04-14T02:29:35.030

Reputation: 1 405