Multiple Network Cards Inet Address and Socket

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am currently working on a program that needs to have multiple Wireless Network cards that can communicate to different devices at the same time on the same port. Currently, when I try and connect to the socket, it uses the default card, and no matter what I do, the second connection fails since it's trying to use the same socket on the same network card. Basically, I think I need a way to completely separate the two network cards. I am unsure how to go about doing this though, I know the solution might involve IP tables. Thanks



Current setup



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 10:7b:44:7b:09:84 brd ff:ff:ff:ff:ff:ff
inet 10.1.10.126/24 brd 10.1.10.255 scope global dynamic noprefixroute enp3s0
valid_lft 603140sec preferred_lft 603140sec
inet6 2603:3004:776:2000::a426/128 scope global dynamic noprefixroute
valid_lft 603143sec preferred_lft 603143sec
inet6 2603:3004:776:2000:4c2f:a5a0:4a46:157f/64 scope global temporary dynamic
valid_lft 345598sec preferred_lft 84734sec
inet6 2603:3004:776:2000:39ff:407f:32ae:ea8b/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 345598sec preferred_lft 345598sec
inet6 fe80::45a1:765:4ea:18cb/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether d4:6e:0e:10:32:95 brd ff:ff:ff:ff:ff:ff
inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp1s0
valid_lft 298sec preferred_lft 298sec
inet6 fe80::7fcd:ba35:3541:639e/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 7c:8b:ca:0a:11:de brd ff:ff:ff:ff:ff:ff
inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp2s0
valid_lft 298sec preferred_lft 298sec
inet6 fe80::c503:ddbe:74f4:3f0f/64 scope link noprefixroute
valid_lft forever preferred_lft forever








share







New contributor




Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I am currently working on a program that needs to have multiple Wireless Network cards that can communicate to different devices at the same time on the same port. Currently, when I try and connect to the socket, it uses the default card, and no matter what I do, the second connection fails since it's trying to use the same socket on the same network card. Basically, I think I need a way to completely separate the two network cards. I am unsure how to go about doing this though, I know the solution might involve IP tables. Thanks



    Current setup



    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 10:7b:44:7b:09:84 brd ff:ff:ff:ff:ff:ff
    inet 10.1.10.126/24 brd 10.1.10.255 scope global dynamic noprefixroute enp3s0
    valid_lft 603140sec preferred_lft 603140sec
    inet6 2603:3004:776:2000::a426/128 scope global dynamic noprefixroute
    valid_lft 603143sec preferred_lft 603143sec
    inet6 2603:3004:776:2000:4c2f:a5a0:4a46:157f/64 scope global temporary dynamic
    valid_lft 345598sec preferred_lft 84734sec
    inet6 2603:3004:776:2000:39ff:407f:32ae:ea8b/64 scope global dynamic mngtmpaddr noprefixroute
    valid_lft 345598sec preferred_lft 345598sec
    inet6 fe80::45a1:765:4ea:18cb/64 scope link noprefixroute
    valid_lft forever preferred_lft forever
    3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether d4:6e:0e:10:32:95 brd ff:ff:ff:ff:ff:ff
    inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp1s0
    valid_lft 298sec preferred_lft 298sec
    inet6 fe80::7fcd:ba35:3541:639e/64 scope link noprefixroute
    valid_lft forever preferred_lft forever
    4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7c:8b:ca:0a:11:de brd ff:ff:ff:ff:ff:ff
    inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp2s0
    valid_lft 298sec preferred_lft 298sec
    inet6 fe80::c503:ddbe:74f4:3f0f/64 scope link noprefixroute
    valid_lft forever preferred_lft forever








    share







    New contributor




    Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am currently working on a program that needs to have multiple Wireless Network cards that can communicate to different devices at the same time on the same port. Currently, when I try and connect to the socket, it uses the default card, and no matter what I do, the second connection fails since it's trying to use the same socket on the same network card. Basically, I think I need a way to completely separate the two network cards. I am unsure how to go about doing this though, I know the solution might involve IP tables. Thanks



      Current setup



      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
      2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 10:7b:44:7b:09:84 brd ff:ff:ff:ff:ff:ff
      inet 10.1.10.126/24 brd 10.1.10.255 scope global dynamic noprefixroute enp3s0
      valid_lft 603140sec preferred_lft 603140sec
      inet6 2603:3004:776:2000::a426/128 scope global dynamic noprefixroute
      valid_lft 603143sec preferred_lft 603143sec
      inet6 2603:3004:776:2000:4c2f:a5a0:4a46:157f/64 scope global temporary dynamic
      valid_lft 345598sec preferred_lft 84734sec
      inet6 2603:3004:776:2000:39ff:407f:32ae:ea8b/64 scope global dynamic mngtmpaddr noprefixroute
      valid_lft 345598sec preferred_lft 345598sec
      inet6 fe80::45a1:765:4ea:18cb/64 scope link noprefixroute
      valid_lft forever preferred_lft forever
      3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      link/ether d4:6e:0e:10:32:95 brd ff:ff:ff:ff:ff:ff
      inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp1s0
      valid_lft 298sec preferred_lft 298sec
      inet6 fe80::7fcd:ba35:3541:639e/64 scope link noprefixroute
      valid_lft forever preferred_lft forever
      4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      link/ether 7c:8b:ca:0a:11:de brd ff:ff:ff:ff:ff:ff
      inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp2s0
      valid_lft 298sec preferred_lft 298sec
      inet6 fe80::c503:ddbe:74f4:3f0f/64 scope link noprefixroute
      valid_lft forever preferred_lft forever








      share







      New contributor




      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am currently working on a program that needs to have multiple Wireless Network cards that can communicate to different devices at the same time on the same port. Currently, when I try and connect to the socket, it uses the default card, and no matter what I do, the second connection fails since it's trying to use the same socket on the same network card. Basically, I think I need a way to completely separate the two network cards. I am unsure how to go about doing this though, I know the solution might involve IP tables. Thanks



      Current setup



      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
      2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 10:7b:44:7b:09:84 brd ff:ff:ff:ff:ff:ff
      inet 10.1.10.126/24 brd 10.1.10.255 scope global dynamic noprefixroute enp3s0
      valid_lft 603140sec preferred_lft 603140sec
      inet6 2603:3004:776:2000::a426/128 scope global dynamic noprefixroute
      valid_lft 603143sec preferred_lft 603143sec
      inet6 2603:3004:776:2000:4c2f:a5a0:4a46:157f/64 scope global temporary dynamic
      valid_lft 345598sec preferred_lft 84734sec
      inet6 2603:3004:776:2000:39ff:407f:32ae:ea8b/64 scope global dynamic mngtmpaddr noprefixroute
      valid_lft 345598sec preferred_lft 345598sec
      inet6 fe80::45a1:765:4ea:18cb/64 scope link noprefixroute
      valid_lft forever preferred_lft forever
      3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      link/ether d4:6e:0e:10:32:95 brd ff:ff:ff:ff:ff:ff
      inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp1s0
      valid_lft 298sec preferred_lft 298sec
      inet6 fe80::7fcd:ba35:3541:639e/64 scope link noprefixroute
      valid_lft forever preferred_lft forever
      4: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      link/ether 7c:8b:ca:0a:11:de brd ff:ff:ff:ff:ff:ff
      inet 200.100.200.20/24 brd 200.100.200.255 scope global dynamic noprefixroute wlp2s0
      valid_lft 298sec preferred_lft 298sec
      inet6 fe80::c503:ddbe:74f4:3f0f/64 scope link noprefixroute
      valid_lft forever preferred_lft forever






      networking wifi socket





      share







      New contributor




      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 mins ago









      Nark

      1




      1




      New contributor




      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Nark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Nark is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476410%2fmultiple-network-cards-inet-address-and-socket%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Nark is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          Nark is a new contributor. Be nice, and check out our Code of Conduct.












          Nark is a new contributor. Be nice, and check out our Code of Conduct.











          Nark is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476410%2fmultiple-network-cards-inet-address-and-socket%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?