1

I have the following network setup:

enter image description here

From Laptop I can ping any IP in the 192.168.2.0/24 network and I have internet access. On Tower PC I can ping any IP in the 192.168.2.0/24 network (including 192.168.2.1) but I cannot ping any other addresses in either the 192.168.0.0/24 network or the internet at large.

This is my routing table (it's the default):

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.108      4
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      192.168.0.0    255.255.255.0         On-link     192.168.0.108    258
    192.168.0.108  255.255.255.255         On-link     192.168.0.108    258
    192.168.0.255  255.255.255.255         On-link     192.168.0.108    258
      192.168.2.0    255.255.255.0         On-link       192.168.2.1    257
      192.168.2.1  255.255.255.255         On-link       192.168.2.1    257
    192.168.2.255  255.255.255.255         On-link       192.168.2.1    257
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link       192.168.2.1    257
        224.0.0.0        240.0.0.0         On-link     192.168.0.108    258
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link       192.168.2.1    257
  255.255.255.255  255.255.255.255         On-link     192.168.0.108    258
===========================================================================
Persistent Routes:
  None

I have tried a few static routes but cannot figure it out and any help would be welcome.

  • Yes. My bad. Just corrected the typo. – Fabricio Oct 18 '17 at 20:31
  • Yes, the Tower PC has default gateway set to 2.1. It is assigned by the DHCP server running on the Laptop and bound to the eth interface. And as I said from the Tower PC I can ping 192.168.2.1, so the address is resolved at Ethernet level by ARP. – Fabricio Oct 18 '17 at 20:34
  • 1
    Hi @Facebook, the two rules made the packets flow from one network to the other. But then the ping from the Tower to the TP Link wasn't returning anything and I added a rule there to route to 192.168.2.0/24 via 192.168.0.108 and then it worked. :-) Please feel free to answer the question with the information you gave in the comments and I'll accept it. Thanks! – Fabricio Oct 19 '17 at 19:25
1

You can use route to add network routes to the Windows routing table to pass traffic between the two subnets and network interfaces—below are two quick examples.

ROUTE ADD 192.168.2.0 MASK 255.255.255.0 192.168.0.108 
ROUTE ADD 192.168.0.0 MASK 255.255.255.0 192.168.2.1 

This will give the two network interfaces on the laptop (Ethernet and Wi-Fi), a route to get to the other subnet between the two—but test and adjust accordingly for your needs.


Further Resources

| improve this answer | |
  • 1
    I also used the “route add -p” switch to make the rule permanent across reboots. – Fabricio Oct 21 '17 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.