Could not ping secondary interface private IP












0















I have attached a secondary interface to Debian EC2 instance. I attached the same security group that primary interface has and it allows ping on it.
Problem is after attaching the second network interface I am not able to ping the Secondary interface private IP.



eth0      Link encap:Ethernet  HWaddr 0a:65:1c:fd:cd:f0  
inet addr:10.195.0.76 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::865:1cff:fefd:cdf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164133 (160.2 KiB) TX bytes:185670 (181.3 KiB)

eth1 Link encap:Ethernet HWaddr 0a:2d:a1:fc:f5:d4
inet addr:10.195.0.82 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::82d:a1ff:fefc:f5d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24474 (23.9 KiB) TX bytes:2948 (2.8 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Ngrep result pinging from other interface:



root@ip-10-195-0-76:/home/admin# ngrep -d eth1 -Wbyline
interface: eth1 (10.195.0.64/255.255.255.224)
#
I fe80::81a:8eff:fe7b:e6a9 -> ff02::1 134:0
@.............
..{....@.............*....to.........
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[.....X
..................... !"#$%&'()*+,-./01234567
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[......
..................... !"#$%&'()*+,-./01234567









share|improve this question

























  • From where do you ping?

    – Dusan Bajic
    Nov 14 '18 at 12:35











  • I am trying from other instance in the same subnet.

    – Naveen Kerati
    Nov 14 '18 at 12:37
















0















I have attached a secondary interface to Debian EC2 instance. I attached the same security group that primary interface has and it allows ping on it.
Problem is after attaching the second network interface I am not able to ping the Secondary interface private IP.



eth0      Link encap:Ethernet  HWaddr 0a:65:1c:fd:cd:f0  
inet addr:10.195.0.76 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::865:1cff:fefd:cdf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164133 (160.2 KiB) TX bytes:185670 (181.3 KiB)

eth1 Link encap:Ethernet HWaddr 0a:2d:a1:fc:f5:d4
inet addr:10.195.0.82 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::82d:a1ff:fefc:f5d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24474 (23.9 KiB) TX bytes:2948 (2.8 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Ngrep result pinging from other interface:



root@ip-10-195-0-76:/home/admin# ngrep -d eth1 -Wbyline
interface: eth1 (10.195.0.64/255.255.255.224)
#
I fe80::81a:8eff:fe7b:e6a9 -> ff02::1 134:0
@.............
..{....@.............*....to.........
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[.....X
..................... !"#$%&'()*+,-./01234567
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[......
..................... !"#$%&'()*+,-./01234567









share|improve this question

























  • From where do you ping?

    – Dusan Bajic
    Nov 14 '18 at 12:35











  • I am trying from other instance in the same subnet.

    – Naveen Kerati
    Nov 14 '18 at 12:37














0












0








0








I have attached a secondary interface to Debian EC2 instance. I attached the same security group that primary interface has and it allows ping on it.
Problem is after attaching the second network interface I am not able to ping the Secondary interface private IP.



eth0      Link encap:Ethernet  HWaddr 0a:65:1c:fd:cd:f0  
inet addr:10.195.0.76 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::865:1cff:fefd:cdf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164133 (160.2 KiB) TX bytes:185670 (181.3 KiB)

eth1 Link encap:Ethernet HWaddr 0a:2d:a1:fc:f5:d4
inet addr:10.195.0.82 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::82d:a1ff:fefc:f5d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24474 (23.9 KiB) TX bytes:2948 (2.8 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Ngrep result pinging from other interface:



root@ip-10-195-0-76:/home/admin# ngrep -d eth1 -Wbyline
interface: eth1 (10.195.0.64/255.255.255.224)
#
I fe80::81a:8eff:fe7b:e6a9 -> ff02::1 134:0
@.............
..{....@.............*....to.........
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[.....X
..................... !"#$%&'()*+,-./01234567
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[......
..................... !"#$%&'()*+,-./01234567









share|improve this question
















I have attached a secondary interface to Debian EC2 instance. I attached the same security group that primary interface has and it allows ping on it.
Problem is after attaching the second network interface I am not able to ping the Secondary interface private IP.



eth0      Link encap:Ethernet  HWaddr 0a:65:1c:fd:cd:f0  
inet addr:10.195.0.76 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::865:1cff:fefd:cdf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:1494 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:164133 (160.2 KiB) TX bytes:185670 (181.3 KiB)

eth1 Link encap:Ethernet HWaddr 0a:2d:a1:fc:f5:d4
inet addr:10.195.0.82 Bcast:10.195.0.95 Mask:255.255.255.224
inet6 addr: fe80::82d:a1ff:fefc:f5d4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24474 (23.9 KiB) TX bytes:2948 (2.8 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Ngrep result pinging from other interface:



root@ip-10-195-0-76:/home/admin# ngrep -d eth1 -Wbyline
interface: eth1 (10.195.0.64/255.255.255.224)
#
I fe80::81a:8eff:fe7b:e6a9 -> ff02::1 134:0
@.............
..{....@.............*....to.........
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[.....X
..................... !"#$%&'()*+,-./01234567
#
I 10.195.1.30 -> 10.195.0.82 8:0
......[......
..................... !"#$%&'()*+,-./01234567






amazon-web-services amazon-ec2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 13:02







Naveen Kerati

















asked Nov 14 '18 at 12:33









Naveen KeratiNaveen Kerati

391317




391317













  • From where do you ping?

    – Dusan Bajic
    Nov 14 '18 at 12:35











  • I am trying from other instance in the same subnet.

    – Naveen Kerati
    Nov 14 '18 at 12:37



















  • From where do you ping?

    – Dusan Bajic
    Nov 14 '18 at 12:35











  • I am trying from other instance in the same subnet.

    – Naveen Kerati
    Nov 14 '18 at 12:37

















From where do you ping?

– Dusan Bajic
Nov 14 '18 at 12:35





From where do you ping?

– Dusan Bajic
Nov 14 '18 at 12:35













I am trying from other instance in the same subnet.

– Naveen Kerati
Nov 14 '18 at 12:37





I am trying from other instance in the same subnet.

– Naveen Kerati
Nov 14 '18 at 12:37












1 Answer
1






active

oldest

votes


















0














Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. To solve this i followed the following to add the routes for the interface.



#echo "200 out" >>/etc/iproute2/rt_tables
# ip route add default via 10.195.0.65 dev eth1 table out
#ip route show table out
#ip rule add from 10.195.0.82/32 table out
#ip rule add to 10.195.0.82/32 table out


And after that i am able ping the network interface.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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%2fstackoverflow.com%2fquestions%2f53300361%2fcould-not-ping-secondary-interface-private-ip%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














    Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. To solve this i followed the following to add the routes for the interface.



    #echo "200 out" >>/etc/iproute2/rt_tables
    # ip route add default via 10.195.0.65 dev eth1 table out
    #ip route show table out
    #ip rule add from 10.195.0.82/32 table out
    #ip rule add to 10.195.0.82/32 table out


    And after that i am able ping the network interface.






    share|improve this answer




























      0














      Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. To solve this i followed the following to add the routes for the interface.



      #echo "200 out" >>/etc/iproute2/rt_tables
      # ip route add default via 10.195.0.65 dev eth1 table out
      #ip route show table out
      #ip rule add from 10.195.0.82/32 table out
      #ip rule add to 10.195.0.82/32 table out


      And after that i am able ping the network interface.






      share|improve this answer


























        0












        0








        0







        Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. To solve this i followed the following to add the routes for the interface.



        #echo "200 out" >>/etc/iproute2/rt_tables
        # ip route add default via 10.195.0.65 dev eth1 table out
        #ip route show table out
        #ip rule add from 10.195.0.82/32 table out
        #ip rule add to 10.195.0.82/32 table out


        And after that i am able ping the network interface.






        share|improve this answer













        Debian in AWS does provide ec2-net-utils but the scripts on EC2 does not add the routes for the secondary interface. To solve this i followed the following to add the routes for the interface.



        #echo "200 out" >>/etc/iproute2/rt_tables
        # ip route add default via 10.195.0.65 dev eth1 table out
        #ip route show table out
        #ip rule add from 10.195.0.82/32 table out
        #ip rule add to 10.195.0.82/32 table out


        And after that i am able ping the network interface.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 15:31









        Naveen KeratiNaveen Kerati

        391317




        391317






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f53300361%2fcould-not-ping-secondary-interface-private-ip%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

            Bressuire

            Vorschmack

            Quarantine