Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Laptop IP addresses, automation issues using multiple wifi networks

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
i get involved with automation systems and have designed Hmi applications & written Plc programs.
These are networked devices, something I want to brush up on.
My IP on my wifi system at home is 192.168.0.x, at work its 192.168.1.x, I assume thats the ISP's settings.
If I take my laptop to work I change all my IP's on the laptop and networked devices to make things work.
There must be an easyer way to deal with this, I cant easily change IP's on the network devices, and they dont all support Dhcp is there a way I can assign IP's depending which net I'm on?
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,921
Helped
4,874
Reputation
9,766
Reaction score
4,661
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
126,954
Its doubtful those are ISP settings, all 192.168.x.x addresses are within the local network and not available outside unless forwarded.

Depending on what OS you are using, you might have the option for a second network configuration.
You might be able to bind the IP addresses at source (one or both routers/access points) to the MAC of your laptop.
You might be able to 'port forward' the two sources to a common address then set your laptop to use it.

I have three access points here, one is a WiFi router (Draytek) and two are TP-Link routers used as access points. I bind the MAC of my laptop to a fixed IP address and it works with whichever one is in range. I use Linux (Kubuntu) and it has a network configuration setting that allows many different WiFi networks to be selected, it automatically picks the strongest signal to which a connection is authorized but also has a priority setting so if several are in range it picks them in a pre-selected order.

Brian.
 

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
I will research binding, its not something I know much about.
The systems are windows, android and bespoke industrial electronics, the latter seems to be the odd one out, some settings are accessible not all.
I am familar with port forwarding, wouldnt that require connecting the devices to the router not the slaptop, I could if it made things convenient run a cat5 from the router in both 'shops to a socket on the bench.
If I have a working controller/Hmi/Servo drive setup it appears to remain stable & working if I unplug it from the laptop, I'm a little concerned some leccy will come along plug another laptop in & mess things up, I'l have to deal with if and when it happens.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,396
Helped
14,251
Reputation
28,763
Reaction score
12,937
Trophy points
1,393
Location
Bochum, Germany
Activity points
280,075
You can have multiple IP ranges in a local network.

The usual method is to set the IP of your mobile PC via DHCP, so it will be able access the internet and local resources in the network. The devices you want to communicate with can keep their fixed IP. You set an additional IP for the active network adapter of your local PC (WiFi or ethernet cable) and a route to the respective network. Can be done on a administrator command shell or with specific tools.
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,921
Helped
4,874
Reputation
9,766
Reaction score
4,661
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
126,954
I use Android on my phone and tablet but for 'industrial control' and the likes I use MQTT to carry data and port forward it to a VPN so it can be accessed anywhere. The excellent "IoT Controller" from "SNR Lab" (I have no affiliation to them) for Android lets me build graphical and text monitoring and control of all data streams. I also use Node-Red on the MQTT broker to monitor the MQTT data and if an alarm goes off, it sends a text message to my phone in case I'm out and about.

Binding is actually quite a simple concept - you link (bind) an IP address with the device MAC so that the address is always the same whenever that MAC is recognized. For example, (using fake numbers!) if my laptop MAC was 12:34:56:78:90 and it was bound to 192.168.5.234, it would always be assigned that same address. Using it here allows me to write scripts for automating backups and data transfers between machines without having to manually enter different IP addresses each time.

Brian.
 

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
Ok, I wondered if the mac could be used to assign or bind the iP, thats a handy concept as on most devices I can change the mac fairly easily.
I'll see if google can help me.
I have dhcp enabled for wifi as it'll work anywhere.
I have been in various industries currently the paper industry invariably siemens PLC's & drives are used in paper plants, and modbusRTU or modbusIP is used for comms between PLC's & drives/motion controllers, so I'm kinda limited.
I looked at using mqtt a while back, seems like a logical system not overly complexcated.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,717
Helped
4,343
Reputation
8,695
Reaction score
4,304
Trophy points
1,393
Activity points
130,522
Hi,

I guess changing the MAC is not what you should do. MAC should be unique from beginning, thus no need to be changed.

Binding - as I understand - works the other way round:
Your deivce tells the network to be a new device. The DHCP server (router) recognizes (table, database) the MAC of your device and assignes your device the fixed (bound) IP address.
So you don´t have to change the MAC but you need to tell the DHCP which MAC your device has and which IP it should assign.

.. but I´m no expert with networking...

Klaus
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,921
Helped
4,874
Reputation
9,766
Reaction score
4,661
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
126,954
That is correct Klaus, you ARE an expert :)

The MAC is supposed to be unique to the device connecting to the network and although it often can be changed, you open up a whole load of problems, clashing numbers and unrecognized devices. It is normally pre-programmed by the device manufacturer and never intended to be changed. Manufacturers buy blocks of numbers for use in their products from IEEE who maintain the master database and ensure duplicates are not issued.

As Klaus stated, the usual method is to bind the IP address to the MAC. DHCP normally picks IP numbers from a pool and assigns them to devices as they connect, if you apply binding, the same number will be allocated to the same MAC each time.

Brian.
 

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
I'm still not getting it right.
I had been going to the ethernet options and fixing the IPV4 IP.
At home my wifi gateway is 192.168.0.1, at work its 192.168.1.1, the subnet is different.
So I have been redefining a fixed IP for the laptops ethernet port between using the system at home & at work, as well as that of all the networked devices this is what I want to change.
As I understand it I need wifi and ethernet to be 2 seperate nets, or can I do something with the subnet mask.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,717
Helped
4,343
Reputation
8,695
Reaction score
4,304
Trophy points
1,393
Activity points
130,522
Hi,

Are you sure you modify at the DHCP server? It needs to provide a suitable IP address according the devices MAC.
Set the device to get the address from the DHCP server.

Klaus
 

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
I'll rerun what I have, I probably havent made myself clear.
PLC (programmable controller)
HMI (touchscreen human interface)
Arduino (Running modbustcp and sits on the net)

Laptop (used for programming & debug, not always connected, the laptop also connects to the internet via wifi)

The first 3 have registers where the IP address is set for the other 2, the HMI and arduino do not support DHCP.

The gateway at home is:
192.168.0.1
At work its:
192.168.1.1

To make the system function moving everything from home tp work I have to change the 0 to a 1 on all devices & vice versa.
I'd like to setup so that I can just plug in & go no matter whether I'm at home or work.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,717
Helped
4,343
Reputation
8,695
Reaction score
4,304
Trophy points
1,393
Activity points
130,522
Hi,

A picture says more than many words.....

Klaus
 

pal7mentor

Newbie
Joined
May 25, 2021
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
5
i get involved with automation systems and have designed Hmi applications & written Plc programs.
These are networked devices, something I want to brush up on.
My IP on my wifi system at home is 192.168.0.x, at work its 192.168.1.x, I assume thats the ISP's settings.
If I take my laptop to work I change all my IP's on the laptop and networked devices to make things work.
There must be an easyer way to deal with this, I cant easily change IP's on the network devices, and they dont all support Dhcp is there a way I can assign IP's depending which net I'm on?
Depending on what network you are connecting to, you may need coordinated permission to use the Wi-Fi. If you skip this step, the wireless network can certainly feel broken.

Regards : <link to advert removed by moderator>
 

dr pepper

Full Member level 6
Joined
Mar 15, 2010
Messages
347
Helped
34
Reputation
68
Reaction score
38
Trophy points
1,308
Location
lancs
Activity points
3,707
Ok what is coordinated permission?
I am responsible for the internet connection so obviously have all the rights.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top