static route randomly ignored












2















I have a couple of Linux guest VMs with bridged network to my physical adapter. For a certain reason I can't use the subnet of my host machine for the guests (and virtual adapter is too slow for me), so I created a separate subnet for them.



On host I added the guest subnet:



C:> route add 192.168.20.0 mask 255.255.255.0 0.0.0.0 metric 1


On guests:



# route add -host 192.168.148.87 dev eth3 # my host ip


It mostly works:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.20

Tracing route to 192.168.20.20 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.20

Trace complete.

basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.21

Tracing route to 192.168.20.21 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.21

Trace complete.


But it looks like some packets go through the gateway:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.23

Tracing route to 192.168.20.23 over a maximum of 30 hops

2 <1 ms <1 ms <1 ms 192.168.200.1 0
3 192.168.200.1 reports: Destination host unreachable.

Trace complete.


SSH connections to the guests often stall. What am I doing wrong?



IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.149.200 192.168.148.87 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306

192.168.20.0 255.255.255.0 On-link 192.168.148.87 21
192.168.20.255 255.255.255.255 On-link 192.168.148.87 276

192.168.56.0 255.255.255.0 On-link 192.168.56.1 266
192.168.56.1 255.255.255.255 On-link 192.168.56.1 266
192.168.56.255 255.255.255.255 On-link 192.168.56.1 266

192.168.148.0 255.255.254.0 On-link 192.168.148.87 276
192.168.148.87 255.255.255.255 On-link 192.168.148.87 276

192.168.149.255 255.255.255.255 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 192.168.56.1 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.148.87 276
255.255.255.255 255.255.255.255 On-link 192.168.56.1 266
===========================================================================


Upd:



Could it be that OS sends some ICMP request to different places and the reply overrides my static route? How to check this?










share|improve this question

























  • what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

    – Zina
    Jun 21 '16 at 22:26











  • @Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

    – basin
    Jun 22 '16 at 6:37











  • strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

    – Zina
    Jun 22 '16 at 22:45


















2















I have a couple of Linux guest VMs with bridged network to my physical adapter. For a certain reason I can't use the subnet of my host machine for the guests (and virtual adapter is too slow for me), so I created a separate subnet for them.



On host I added the guest subnet:



C:> route add 192.168.20.0 mask 255.255.255.0 0.0.0.0 metric 1


On guests:



# route add -host 192.168.148.87 dev eth3 # my host ip


It mostly works:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.20

Tracing route to 192.168.20.20 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.20

Trace complete.

basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.21

Tracing route to 192.168.20.21 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.21

Trace complete.


But it looks like some packets go through the gateway:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.23

Tracing route to 192.168.20.23 over a maximum of 30 hops

2 <1 ms <1 ms <1 ms 192.168.200.1 0
3 192.168.200.1 reports: Destination host unreachable.

Trace complete.


SSH connections to the guests often stall. What am I doing wrong?



IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.149.200 192.168.148.87 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306

192.168.20.0 255.255.255.0 On-link 192.168.148.87 21
192.168.20.255 255.255.255.255 On-link 192.168.148.87 276

192.168.56.0 255.255.255.0 On-link 192.168.56.1 266
192.168.56.1 255.255.255.255 On-link 192.168.56.1 266
192.168.56.255 255.255.255.255 On-link 192.168.56.1 266

192.168.148.0 255.255.254.0 On-link 192.168.148.87 276
192.168.148.87 255.255.255.255 On-link 192.168.148.87 276

192.168.149.255 255.255.255.255 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 192.168.56.1 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.148.87 276
255.255.255.255 255.255.255.255 On-link 192.168.56.1 266
===========================================================================


Upd:



Could it be that OS sends some ICMP request to different places and the reply overrides my static route? How to check this?










share|improve this question

























  • what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

    – Zina
    Jun 21 '16 at 22:26











  • @Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

    – basin
    Jun 22 '16 at 6:37











  • strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

    – Zina
    Jun 22 '16 at 22:45
















2












2








2








I have a couple of Linux guest VMs with bridged network to my physical adapter. For a certain reason I can't use the subnet of my host machine for the guests (and virtual adapter is too slow for me), so I created a separate subnet for them.



On host I added the guest subnet:



C:> route add 192.168.20.0 mask 255.255.255.0 0.0.0.0 metric 1


On guests:



# route add -host 192.168.148.87 dev eth3 # my host ip


It mostly works:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.20

Tracing route to 192.168.20.20 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.20

Trace complete.

basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.21

Tracing route to 192.168.20.21 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.21

Trace complete.


But it looks like some packets go through the gateway:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.23

Tracing route to 192.168.20.23 over a maximum of 30 hops

2 <1 ms <1 ms <1 ms 192.168.200.1 0
3 192.168.200.1 reports: Destination host unreachable.

Trace complete.


SSH connections to the guests often stall. What am I doing wrong?



IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.149.200 192.168.148.87 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306

192.168.20.0 255.255.255.0 On-link 192.168.148.87 21
192.168.20.255 255.255.255.255 On-link 192.168.148.87 276

192.168.56.0 255.255.255.0 On-link 192.168.56.1 266
192.168.56.1 255.255.255.255 On-link 192.168.56.1 266
192.168.56.255 255.255.255.255 On-link 192.168.56.1 266

192.168.148.0 255.255.254.0 On-link 192.168.148.87 276
192.168.148.87 255.255.255.255 On-link 192.168.148.87 276

192.168.149.255 255.255.255.255 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 192.168.56.1 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.148.87 276
255.255.255.255 255.255.255.255 On-link 192.168.56.1 266
===========================================================================


Upd:



Could it be that OS sends some ICMP request to different places and the reply overrides my static route? How to check this?










share|improve this question
















I have a couple of Linux guest VMs with bridged network to my physical adapter. For a certain reason I can't use the subnet of my host machine for the guests (and virtual adapter is too slow for me), so I created a separate subnet for them.



On host I added the guest subnet:



C:> route add 192.168.20.0 mask 255.255.255.0 0.0.0.0 metric 1


On guests:



# route add -host 192.168.148.87 dev eth3 # my host ip


It mostly works:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.20

Tracing route to 192.168.20.20 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.20

Trace complete.

basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.21

Tracing route to 192.168.20.21 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms 192.168.20.21

Trace complete.


But it looks like some packets go through the gateway:



basin@BASIN /cygdrive/c/Users/basin
$ tracert -d 192.168.20.23

Tracing route to 192.168.20.23 over a maximum of 30 hops

2 <1 ms <1 ms <1 ms 192.168.200.1 0
3 192.168.200.1 reports: Destination host unreachable.

Trace complete.


SSH connections to the guests often stall. What am I doing wrong?



IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.149.200 192.168.148.87 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306

192.168.20.0 255.255.255.0 On-link 192.168.148.87 21
192.168.20.255 255.255.255.255 On-link 192.168.148.87 276

192.168.56.0 255.255.255.0 On-link 192.168.56.1 266
192.168.56.1 255.255.255.255 On-link 192.168.56.1 266
192.168.56.255 255.255.255.255 On-link 192.168.56.1 266

192.168.148.0 255.255.254.0 On-link 192.168.148.87 276
192.168.148.87 255.255.255.255 On-link 192.168.148.87 276

192.168.149.255 255.255.255.255 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.148.87 276
224.0.0.0 240.0.0.0 On-link 192.168.56.1 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.148.87 276
255.255.255.255 255.255.255.255 On-link 192.168.56.1 266
===========================================================================


Upd:



Could it be that OS sends some ICMP request to different places and the reply overrides my static route? How to check this?







windows-7 networking






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 21 '16 at 15:50







basin

















asked Jun 21 '16 at 13:01









basinbasin

265312




265312













  • what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

    – Zina
    Jun 21 '16 at 22:26











  • @Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

    – basin
    Jun 22 '16 at 6:37











  • strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

    – Zina
    Jun 22 '16 at 22:45





















  • what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

    – Zina
    Jun 21 '16 at 22:26











  • @Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

    – basin
    Jun 22 '16 at 6:37











  • strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

    – Zina
    Jun 22 '16 at 22:45



















what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

– Zina
Jun 21 '16 at 22:26





what virtualization solution are you using? I used VirtualBox on Windows (now I am on OS X and still using VirtualBox) and it has a nice Networking part which does not need additional setup on host/guest as you described.

– Zina
Jun 21 '16 at 22:26













@Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

– basin
Jun 22 '16 at 6:37





@Zina I use VirtualBox. I explained my case in the 1st paragraph. Bridge gives me 2.5Gbit. Other modes - 100Mbit

– basin
Jun 22 '16 at 6:37













strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

– Zina
Jun 22 '16 at 22:45







strange you cant get more than 100Mbit with other connections. What type of adapter did you select? A 1Gb or the PCnet? And I don't see where from the hop to 192.168.200.1 came? I do not see it in your routing table.

– Zina
Jun 22 '16 at 22:45












1 Answer
1






active

oldest

votes


















1














Static routes are only used if the target address is not on directly connected network. In your case all hosts are on directly connected networks, so the static routes are ignored.






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%2f1091775%2fstatic-route-randomly-ignored%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









    1














    Static routes are only used if the target address is not on directly connected network. In your case all hosts are on directly connected networks, so the static routes are ignored.






    share|improve this answer




























      1














      Static routes are only used if the target address is not on directly connected network. In your case all hosts are on directly connected networks, so the static routes are ignored.






      share|improve this answer


























        1












        1








        1







        Static routes are only used if the target address is not on directly connected network. In your case all hosts are on directly connected networks, so the static routes are ignored.






        share|improve this answer













        Static routes are only used if the target address is not on directly connected network. In your case all hosts are on directly connected networks, so the static routes are ignored.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 9 at 14:40









        ThunderbelchThunderbelch

        111




        111






























            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%2f1091775%2fstatic-route-randomly-ignored%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 to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

            is 'sed' thread safe

            How to make a Squid Proxy server?