Can I use the same default gateway for a device on a different network?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Say I have IP 192.168.1.0 and all the IP addresses are taken so I go onto 192.168.2.0 and have 192.168.2.5 available. When I'm assigning a gateway for the device to access can I use a gateway on the 192.168.1 network?



I know this question is very basic but my issue is that I have a network I do not have the gateway for and have no way of determining it. My only access point in range is on the hypothetical 192.168.1 network.










share|improve this question























  • If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

    – Sander Steffann
    Oct 27 '16 at 0:53


















0















Say I have IP 192.168.1.0 and all the IP addresses are taken so I go onto 192.168.2.0 and have 192.168.2.5 available. When I'm assigning a gateway for the device to access can I use a gateway on the 192.168.1 network?



I know this question is very basic but my issue is that I have a network I do not have the gateway for and have no way of determining it. My only access point in range is on the hypothetical 192.168.1 network.










share|improve this question























  • If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

    – Sander Steffann
    Oct 27 '16 at 0:53














0












0








0








Say I have IP 192.168.1.0 and all the IP addresses are taken so I go onto 192.168.2.0 and have 192.168.2.5 available. When I'm assigning a gateway for the device to access can I use a gateway on the 192.168.1 network?



I know this question is very basic but my issue is that I have a network I do not have the gateway for and have no way of determining it. My only access point in range is on the hypothetical 192.168.1 network.










share|improve this question














Say I have IP 192.168.1.0 and all the IP addresses are taken so I go onto 192.168.2.0 and have 192.168.2.5 available. When I'm assigning a gateway for the device to access can I use a gateway on the 192.168.1 network?



I know this question is very basic but my issue is that I have a network I do not have the gateway for and have no way of determining it. My only access point in range is on the hypothetical 192.168.1 network.







networking wireless-networking routing gateway ipv4






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 26 '16 at 22:40









J ManJ Man

12




12













  • If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

    – Sander Steffann
    Oct 27 '16 at 0:53



















  • If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

    – Sander Steffann
    Oct 27 '16 at 0:53

















If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

– Sander Steffann
Oct 27 '16 at 0:53





If you configure the subnet as 192.168.1.0/24 then only addresses 192.168.1.0 to 192.168.1.255 are included. But 192.168.0.0/22 includes all addresses from 192.168.0.0 to 192.168.3.255, so all address you mention would be in the same subnet and all would be fine. Bottom line: your question cannot be answered without knowing the subnet mask.

– Sander Steffann
Oct 27 '16 at 0:53










1 Answer
1






active

oldest

votes


















0














Though there are some exceptions to this in unusual setups, the general answer is no. You cannot configure your computer to use a gateway that is on a different subnet.



You cannot reach devices on other subnets without going through a router (gateway). Your system determines that a system is outside of your network by using your address and subnet mask to compute the network you are on. If the system you are trying to contact is on your local network, and your local network is Ethernet, it will perform an ARP lookup to get the MAC address of the device you want to connect to. If the destination is not on your local network it will contact the router you have configured for that destination, or the default router. The router must be on the same layer 2 and 3 network, or you won't be able to reach it to have it forward your packets.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1139352%2fcan-i-use-the-same-default-gateway-for-a-device-on-a-different-network%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Though there are some exceptions to this in unusual setups, the general answer is no. You cannot configure your computer to use a gateway that is on a different subnet.



    You cannot reach devices on other subnets without going through a router (gateway). Your system determines that a system is outside of your network by using your address and subnet mask to compute the network you are on. If the system you are trying to contact is on your local network, and your local network is Ethernet, it will perform an ARP lookup to get the MAC address of the device you want to connect to. If the destination is not on your local network it will contact the router you have configured for that destination, or the default router. The router must be on the same layer 2 and 3 network, or you won't be able to reach it to have it forward your packets.






    share|improve this answer




























      0














      Though there are some exceptions to this in unusual setups, the general answer is no. You cannot configure your computer to use a gateway that is on a different subnet.



      You cannot reach devices on other subnets without going through a router (gateway). Your system determines that a system is outside of your network by using your address and subnet mask to compute the network you are on. If the system you are trying to contact is on your local network, and your local network is Ethernet, it will perform an ARP lookup to get the MAC address of the device you want to connect to. If the destination is not on your local network it will contact the router you have configured for that destination, or the default router. The router must be on the same layer 2 and 3 network, or you won't be able to reach it to have it forward your packets.






      share|improve this answer


























        0












        0








        0







        Though there are some exceptions to this in unusual setups, the general answer is no. You cannot configure your computer to use a gateway that is on a different subnet.



        You cannot reach devices on other subnets without going through a router (gateway). Your system determines that a system is outside of your network by using your address and subnet mask to compute the network you are on. If the system you are trying to contact is on your local network, and your local network is Ethernet, it will perform an ARP lookup to get the MAC address of the device you want to connect to. If the destination is not on your local network it will contact the router you have configured for that destination, or the default router. The router must be on the same layer 2 and 3 network, or you won't be able to reach it to have it forward your packets.






        share|improve this answer













        Though there are some exceptions to this in unusual setups, the general answer is no. You cannot configure your computer to use a gateway that is on a different subnet.



        You cannot reach devices on other subnets without going through a router (gateway). Your system determines that a system is outside of your network by using your address and subnet mask to compute the network you are on. If the system you are trying to contact is on your local network, and your local network is Ethernet, it will perform an ARP lookup to get the MAC address of the device you want to connect to. If the destination is not on your local network it will contact the router you have configured for that destination, or the default router. The router must be on the same layer 2 and 3 network, or you won't be able to reach it to have it forward your packets.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 26 '16 at 23:23









        ZoredacheZoredache

        17.4k74367




        17.4k74367






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1139352%2fcan-i-use-the-same-default-gateway-for-a-device-on-a-different-network%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How do I know what Microsoft account the skydrive app is syncing to?

            When does type information flow backwards in C++?

            Grease: Live!