Multiple Network Cards with the same Inet Address and Socket connections
Clash 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
default via 10.1.10.1 dev enp3s0 proto dhcp metric 100
10.1.10.0/24 dev enp3s0 proto kernel scope link src 10.1.10.126 metric 100
169.254.0.0/16 dev wlp2s0 scope link metric 1000
200.100.200.0/24 dev wlp1s0 proto kernel scope link src 200.100.200.20 metric 600
200.100.200.0/24 dev wlp2s0 proto kernel scope link src 200.100.200.20 metric 601
sudo arp-scan --interface=wlp1s0 --localnet
Interface: wlp1s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 f0:45:da:29:ed:c7 (Unknown)
sudo arp-scan --interface=wlp2s0 --localnet
Interface: wlp2s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 50:f1:4a:f6:c3:0e (Unknown)
networking wifi socket
New contributor
add a comment |Â
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
default via 10.1.10.1 dev enp3s0 proto dhcp metric 100
10.1.10.0/24 dev enp3s0 proto kernel scope link src 10.1.10.126 metric 100
169.254.0.0/16 dev wlp2s0 scope link metric 1000
200.100.200.0/24 dev wlp1s0 proto kernel scope link src 200.100.200.20 metric 600
200.100.200.0/24 dev wlp2s0 proto kernel scope link src 200.100.200.20 metric 601
sudo arp-scan --interface=wlp1s0 --localnet
Interface: wlp1s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 f0:45:da:29:ed:c7 (Unknown)
sudo arp-scan --interface=wlp2s0 --localnet
Interface: wlp2s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 50:f1:4a:f6:c3:0e (Unknown)
networking wifi socket
New contributor
add a comment |Â
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
default via 10.1.10.1 dev enp3s0 proto dhcp metric 100
10.1.10.0/24 dev enp3s0 proto kernel scope link src 10.1.10.126 metric 100
169.254.0.0/16 dev wlp2s0 scope link metric 1000
200.100.200.0/24 dev wlp1s0 proto kernel scope link src 200.100.200.20 metric 600
200.100.200.0/24 dev wlp2s0 proto kernel scope link src 200.100.200.20 metric 601
sudo arp-scan --interface=wlp1s0 --localnet
Interface: wlp1s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 f0:45:da:29:ed:c7 (Unknown)
sudo arp-scan --interface=wlp2s0 --localnet
Interface: wlp2s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 50:f1:4a:f6:c3:0e (Unknown)
networking wifi socket
New contributor
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
default via 10.1.10.1 dev enp3s0 proto dhcp metric 100
10.1.10.0/24 dev enp3s0 proto kernel scope link src 10.1.10.126 metric 100
169.254.0.0/16 dev wlp2s0 scope link metric 1000
200.100.200.0/24 dev wlp1s0 proto kernel scope link src 200.100.200.20 metric 600
200.100.200.0/24 dev wlp2s0 proto kernel scope link src 200.100.200.20 metric 601
sudo arp-scan --interface=wlp1s0 --localnet
Interface: wlp1s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 f0:45:da:29:ed:c7 (Unknown)
sudo arp-scan --interface=wlp2s0 --localnet
Interface: wlp2s0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
200.100.200.1 50:f1:4a:f6:c3:0e (Unknown)
networking wifi socket
networking wifi socket
New contributor
New contributor
edited 10 mins ago
New contributor
asked 23 mins ago
Nark
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476410%2fmultiple-network-cards-with-the-same-inet-address-and-socket-connections%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password