Connecting 2 different subnet masks

6,776
  • Router

There are two networks- you need a Router to join them.

[10.1.1.1]lan<-- wire -->[router]lan<-- wire> -->lan[10.100.100.1]


Or

  • PC with 2 NICs

[10.1.1.1]lan<-- wire -->[NIC1] --> PC <-- [NIC2]<-- wire> -->lan[10.100.100.1]

Set the "Routing and RAS" service from disabled toautomatic and start the service to get things going. Further it is advisable to set the

HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\IPEnableRouter

reg entry to

1

Also add persistent routes to either networks:

Destination: 10.1.1.0 Mask: 255.255.255.0 Gateway: 10.100.100.1

Destination: 10.100.100.0 Mask: 255.255.255.0 Gateway: 10.1.1.1

Or

  • Change the IPs on the cutting-machine as:

IP: 10.1.1.x Subnet: 255.255.255.0 Gty: 10.1.1.1

Share:
6,776

Related videos on Youtube

Jonathan
Author by

Jonathan

Updated on September 18, 2022

Comments

  • Jonathan
    Jonathan over 1 year

    I'm no network genius, but I have managed to get most things running. I get confused about subnets and gateways though. We have an office server connected to around 20 PC's that all communicate fine. We have just gotten a cutting machine that won't connect to our network. The server has DHCP, but that fails on the cutting machine, so I've been trying to set the IP manually.

    Server details are as follows:

    IP: 10.1.1.12 SUBNET: 255.255.255.0 GATEWAY: 10.1.1.1

    Internet connection is via the modem which is 10.1.1.1

    An office PC is ussually set up through DHCP and has the following settings:

    IP: 10.1.1.36 SUBNET: 255.255.255.0 GATEWAY: 10.1.1.1 PRIMARY DNS: 10.1.1.12

    Cutting Machine computer has 2 network ports. 1 is specifically for the communication between the PC and the cutting machine. It's details must be as follows:

    IP: 10.100.100.2 SUBNET: 255.255.255.252 GATEWAY: BLANK

    The other network port need to connect to the server. I was told that the IP and SUBNET need to be as follows:

    IP: 10.100.100.1 SUBNET: 255.255.255.252 GATEWAY: ??

    How can I connect this port to the server and/or the internet. If anyone can offer assistance, it would really be appreaciated.

    • Frank Thomas
      Frank Thomas almost 10 years
      From those instructions it can't be hooked to the internet, and the instructions wouldn't even work for the PC and server connections. .252 masks allow 2 hosts per network, so both nics on the cutter are on the same lan, but the pc and server cannot. it sounds like the PC should be the 10.100.100.2 connection, and that it should be on a dedicated nic. There definitely seems to be a problem here.
    • Jonathan
      Jonathan almost 10 years
      Thanks for the information Frank. The cable from the cutter goes straight to the modem and then the modem is connected to the server. After some fiddling, I have the PC (10.100.100.1) communicating with the laser cutter (10.100.100.2) which I didn't have before so that's a start. Now I just need 10.100.100.1 to be able to see the shares of the server. That's all it needs.
    • pulsarjune
      pulsarjune almost 10 years
      @Jonathan route add 10.1.1.0 mask 255.255.255.0 <gateway of 10.100.100.0 network> metric 2. If a route addition fails, you can use the tracert command to verify that the gateway specified is directly reachable from the same subnet as this computer.
    • pulsarjune
      pulsarjune almost 10 years
      @Jonathan add a NIC on the 10.100.100.1 and connect that to the switch that connects to the 10.0.0.1/24 network(assign an IP of range 10.0.0.x/24 to the new NIC). Now the shares should be accessible from the PC.
    • pulsarjune
      pulsarjune almost 10 years
      @Jonathan check this pic Hope this solves your issue
  • barlop
    barlop almost 10 years
    that looks very well written and analyzed, but could you explain why (and perhaps this is a silly question), in your static routes, something destined for 10.1.1.0 would go to gateway interface 10.100.100.1 If anything wouldn't you want something destined for 10.1.1.0 to go to interface 10.1.1.1 ? Suppose for example a packet comes in from 10.1.1.30 with destination ip 10.100.100.2 Your static route that will take that is the route for dest 10.100.100.0 but it will send it back to 10.1.1.0 so.. I could be wrong but that seems wrong to me and might even cause a loop.
  • barlop
    barlop almost 10 years
    also he did say his mask on his 10.100.100.0 network was 255.255.255.252 (perhaps he thinks it needs to be) Is there a really good reason why you made it 255.255.255.0?
  • pulsarjune
    pulsarjune almost 10 years
    @barlop [10.1.1.0]switch<-- wire -->[router]lan<-- wire> -->switch[10.100.100.0] This is how the network looks like. So the packets in each network will communicate within themselves as the switch forwards packets to the destined port after checking against the MAC Addr Table.
  • barlop
    barlop almost 10 years
    I know that. Your diagram showed great clarity, I have no issue with it. I am commenting on your "static routes" (which are on the router?) e.g. Destination: 10.1.1.0 Mask: 255.255.255.0 Gateway: 10.100.100.1 not your diagram. Your static route looks like it is just sending it back where it came like a boomerang. Shouldn't it be Destination: 10.1.1.0 Mask: 255.255.255.0 Gateway: 10.1.1.1 The Gateway: ___ is the next hop. if the Destination is 10.1.1.0/24 then it came from 10.100.100.0/24
  • Jonathan
    Jonathan almost 10 years
    The way the cutter is setup (proprietary software etc that can't change what IP it looks for) the NIC that communicates with the cutter must have a subnet of 255.255.255.252 and must have an IP of 10.100.100.2. I can't change those values. The NIC that goes from the cutter PC to the Gateway I figure needs to be set as 10.100.100.1 with the same subnet.
  • pulsarjune
    pulsarjune almost 10 years
    @barlop check this 1. and 2.
  • pulsarjune
    pulsarjune almost 10 years
    @Jonathan check this pic this is what you want, i assume
  • barlop
    barlop almost 10 years