Is there a way to setup a computer to talk to two different devices on different subnets which are physically connected?

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











up vote
0
down vote

favorite












Situation: I have 3 devices on an Ethernet network.



1) 172.30.40.100 (Ubuntu 14.04)
2) 172.30.41.101 (other)
3) 192.168.30.102 (other)


I would like to setup 1) to be able to send msgs to both of the devices. I can hear each of the devices emitting UDP traffic (ngrep/tcpdump/Wireshark). There is a UDP protocol msg which will tell 2)/3) to change its IP, allowing a proper network setup where all three devices are on the same network.



Background: 2)/3) are devices that may reboot and when they do, they come up on a different network(192) than what I currently have set. There are other devices on the network that can only hear UDP msgs on the current network so getting the 2)/3) onto the proper network is important.



Currently, I have a program running on 1) that will change its IP address to 192 and send the msg to 3) to change to 172, and then change its own IP back to 172. I am hoping there is some other way to be able to send UDP msgs to each device WITHOUT changing 1)'s IP address.



Is this possible?







share|improve this question





















  • What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
    – Thomas Ward
    Jun 13 at 17:08











  • The devices are simply connected by a ethernet hub (no intelligence)
    – Carl Bartlett
    Jun 13 at 17:46














up vote
0
down vote

favorite












Situation: I have 3 devices on an Ethernet network.



1) 172.30.40.100 (Ubuntu 14.04)
2) 172.30.41.101 (other)
3) 192.168.30.102 (other)


I would like to setup 1) to be able to send msgs to both of the devices. I can hear each of the devices emitting UDP traffic (ngrep/tcpdump/Wireshark). There is a UDP protocol msg which will tell 2)/3) to change its IP, allowing a proper network setup where all three devices are on the same network.



Background: 2)/3) are devices that may reboot and when they do, they come up on a different network(192) than what I currently have set. There are other devices on the network that can only hear UDP msgs on the current network so getting the 2)/3) onto the proper network is important.



Currently, I have a program running on 1) that will change its IP address to 192 and send the msg to 3) to change to 172, and then change its own IP back to 172. I am hoping there is some other way to be able to send UDP msgs to each device WITHOUT changing 1)'s IP address.



Is this possible?







share|improve this question





















  • What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
    – Thomas Ward
    Jun 13 at 17:08











  • The devices are simply connected by a ethernet hub (no intelligence)
    – Carl Bartlett
    Jun 13 at 17:46












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Situation: I have 3 devices on an Ethernet network.



1) 172.30.40.100 (Ubuntu 14.04)
2) 172.30.41.101 (other)
3) 192.168.30.102 (other)


I would like to setup 1) to be able to send msgs to both of the devices. I can hear each of the devices emitting UDP traffic (ngrep/tcpdump/Wireshark). There is a UDP protocol msg which will tell 2)/3) to change its IP, allowing a proper network setup where all three devices are on the same network.



Background: 2)/3) are devices that may reboot and when they do, they come up on a different network(192) than what I currently have set. There are other devices on the network that can only hear UDP msgs on the current network so getting the 2)/3) onto the proper network is important.



Currently, I have a program running on 1) that will change its IP address to 192 and send the msg to 3) to change to 172, and then change its own IP back to 172. I am hoping there is some other way to be able to send UDP msgs to each device WITHOUT changing 1)'s IP address.



Is this possible?







share|improve this question













Situation: I have 3 devices on an Ethernet network.



1) 172.30.40.100 (Ubuntu 14.04)
2) 172.30.41.101 (other)
3) 192.168.30.102 (other)


I would like to setup 1) to be able to send msgs to both of the devices. I can hear each of the devices emitting UDP traffic (ngrep/tcpdump/Wireshark). There is a UDP protocol msg which will tell 2)/3) to change its IP, allowing a proper network setup where all three devices are on the same network.



Background: 2)/3) are devices that may reboot and when they do, they come up on a different network(192) than what I currently have set. There are other devices on the network that can only hear UDP msgs on the current network so getting the 2)/3) onto the proper network is important.



Currently, I have a program running on 1) that will change its IP address to 192 and send the msg to 3) to change to 172, and then change its own IP back to 172. I am hoping there is some other way to be able to send UDP msgs to each device WITHOUT changing 1)'s IP address.



Is this possible?









share|improve this question












share|improve this question




share|improve this question








edited Jun 13 at 20:19









dhag

10.7k32642




10.7k32642









asked Jun 13 at 17:05









Carl Bartlett

31




31











  • What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
    – Thomas Ward
    Jun 13 at 17:08











  • The devices are simply connected by a ethernet hub (no intelligence)
    – Carl Bartlett
    Jun 13 at 17:46
















  • What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
    – Thomas Ward
    Jun 13 at 17:08











  • The devices are simply connected by a ethernet hub (no intelligence)
    – Carl Bartlett
    Jun 13 at 17:46















What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
– Thomas Ward
Jun 13 at 17:08





What handles routing between the networks? A firewall? A router? A switch? Without any of these to handle the Layer 2/3 routing your computer won't really know how to communicate to the devices outside the subnet that it's configured with. You could theoretically make a custom route to achieve this, but you'd have to code it for each and every subnet manually.
– Thomas Ward
Jun 13 at 17:08













The devices are simply connected by a ethernet hub (no intelligence)
– Carl Bartlett
Jun 13 at 17:46




The devices are simply connected by a ethernet hub (no intelligence)
– Carl Bartlett
Jun 13 at 17:46










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










If you are plugged into a non-managed switch or hub, an Ethernet Alias will fix you up. Not sure how to do it in Network Manager (I always remove it anyway, and use the /etc/network/interfaces file) but if you open a terminal you can do



sudo ifconfig eth0:1 192.168.30.105 netmask 255.255.255.0


And you should be able to talk freely between either of the other devices from the Ubuntu machine.



In /etc/network/interfaces simply add a second stanza referencing eth0:1 and set an IP and netmask. Don't set a gateway address.






share|improve this answer





















  • First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
    – Carl Bartlett
    Jun 13 at 20:11










  • Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
    – Carl Bartlett
    Jun 13 at 20:13










  • @CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
    – ivanivan
    Jun 14 at 22:39










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
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449605%2fis-there-a-way-to-setup-a-computer-to-talk-to-two-different-devices-on-different%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










If you are plugged into a non-managed switch or hub, an Ethernet Alias will fix you up. Not sure how to do it in Network Manager (I always remove it anyway, and use the /etc/network/interfaces file) but if you open a terminal you can do



sudo ifconfig eth0:1 192.168.30.105 netmask 255.255.255.0


And you should be able to talk freely between either of the other devices from the Ubuntu machine.



In /etc/network/interfaces simply add a second stanza referencing eth0:1 and set an IP and netmask. Don't set a gateway address.






share|improve this answer





















  • First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
    – Carl Bartlett
    Jun 13 at 20:11










  • Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
    – Carl Bartlett
    Jun 13 at 20:13










  • @CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
    – ivanivan
    Jun 14 at 22:39














up vote
1
down vote



accepted










If you are plugged into a non-managed switch or hub, an Ethernet Alias will fix you up. Not sure how to do it in Network Manager (I always remove it anyway, and use the /etc/network/interfaces file) but if you open a terminal you can do



sudo ifconfig eth0:1 192.168.30.105 netmask 255.255.255.0


And you should be able to talk freely between either of the other devices from the Ubuntu machine.



In /etc/network/interfaces simply add a second stanza referencing eth0:1 and set an IP and netmask. Don't set a gateway address.






share|improve this answer





















  • First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
    – Carl Bartlett
    Jun 13 at 20:11










  • Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
    – Carl Bartlett
    Jun 13 at 20:13










  • @CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
    – ivanivan
    Jun 14 at 22:39












up vote
1
down vote



accepted







up vote
1
down vote



accepted






If you are plugged into a non-managed switch or hub, an Ethernet Alias will fix you up. Not sure how to do it in Network Manager (I always remove it anyway, and use the /etc/network/interfaces file) but if you open a terminal you can do



sudo ifconfig eth0:1 192.168.30.105 netmask 255.255.255.0


And you should be able to talk freely between either of the other devices from the Ubuntu machine.



In /etc/network/interfaces simply add a second stanza referencing eth0:1 and set an IP and netmask. Don't set a gateway address.






share|improve this answer













If you are plugged into a non-managed switch or hub, an Ethernet Alias will fix you up. Not sure how to do it in Network Manager (I always remove it anyway, and use the /etc/network/interfaces file) but if you open a terminal you can do



sudo ifconfig eth0:1 192.168.30.105 netmask 255.255.255.0


And you should be able to talk freely between either of the other devices from the Ubuntu machine.



In /etc/network/interfaces simply add a second stanza referencing eth0:1 and set an IP and netmask. Don't set a gateway address.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 13 at 18:15









ivanivan

3,1271213




3,1271213











  • First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
    – Carl Bartlett
    Jun 13 at 20:11










  • Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
    – Carl Bartlett
    Jun 13 at 20:13










  • @CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
    – ivanivan
    Jun 14 at 22:39
















  • First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
    – Carl Bartlett
    Jun 13 at 20:11










  • Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
    – Carl Bartlett
    Jun 13 at 20:13










  • @CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
    – ivanivan
    Jun 14 at 22:39















First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
– Carl Bartlett
Jun 13 at 20:11




First I found a better solution. Routes. But this works because it is doing the same thing. It is creating a route to each of the networks I need to communicate with. The problems is that I didn't mention (and didn't think it would matter) that I have a second interface that shares the same IP range. This broke that interface, but again not part of the original question.
– Carl Bartlett
Jun 13 at 20:11












Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
– Carl Bartlett
Jun 13 at 20:13




Ultimately adding ip route add 2'sIP/32 dev eth0 allowed direct communication with that ip address without changing my ip.
– Carl Bartlett
Jun 13 at 20:13












@CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
– ivanivan
Jun 14 at 22:39




@CarlBartlett - yeah, the fact that you have a second adapter would've been nice to know :)
– ivanivan
Jun 14 at 22:39












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449605%2fis-there-a-way-to-setup-a-computer-to-talk-to-two-different-devices-on-different%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?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay