Sign in to follow this  
Followers 0
bryan372002

Subnet Mask

26 posts in this topic

at work we have a disarrayed plant network. Part of plant is 192.1.17.xxx part is 191.1.15.xxx part is 192.168.20.xxx and part is192.168.1.xxx We have all the different networks tied in to 1 router, so I am able to get online with anything in the plant from 1 desk. the issue is though I have to constantly change the IP address of programming computer (Using Free IP Switcher) depending on which system I want to get online with. My Question is could set the Subnet Mask on My programming computer to 0.0.0.0. and be able to connect to any IP range and without causing any problems ? Thanks

Share this post


Link to post
Share on other sites
Please try it and let us know.

Share this post


Link to post
Share on other sites
Do the three different ip ranges actually represent different networks more specifically are there really three different DHCP servers active or just three defined ip ranges on one server? If you actually have three seperate subnets then blanking your local machine mask should open everything up so you can at least see it all at the same time, you may still have to switch ip's to "talk to" devices on the other networks. I'm curious myself weather this works for you please let us know. FYI - the only problem I can see arising is potentially increased rates of packet collision; probably not a very big deal. Edited by DRoboto

Share this post


Link to post
Share on other sites
3 seperate subnets, I want to try it Just dont want to cause some kinda collision that would shut the entire plant down...lol. I mean I know I'll be safe with IP not being a duplicate IP, but oh well what the heck may try it anyway tommorow. I'll be sure and Let You guys know

Share this post


Link to post
Share on other sites
Try it at someone else's computer.

Share this post


Link to post
Share on other sites
This sounds to me like the gateway isn't set correctly on some device. If the router is connected to all three networks, and knows where to send the traffic for all three, then you should be able to connect to any network, regardless of your IP address. The gateway or default route on all the devices ought to be set to the IP address of the router to make it all work. Of course, if you have multiple routers, things get slightly hairier. Are the networks physically separate, or do they just occupy different IP subnets, while using the same ethernet (little e) network? Greg

Share this post


Link to post
Share on other sites
Thanks Everyone for the input, I did try the changing the subnet masking on my laptop and that did not work. I am not very up to speed on networking so I have drawn up a layout of Our networks and the different IP addresses, right now I have an issue where I would love to exchange Data between 192,168.1.213 and 192.1.17.15 just not sure the best way to make that happen. network.bmp

Share this post


Link to post
Share on other sites
After looking at the drawing above, I would recommend changing the IP address for the Machine 2 (switch has no IP address) to a 192.x.x.x address so you can communicate using a subnet mask of 255.0.0.0 on your programming PC. As far as changing the subnet mask goes, I believe, that since 191.x.x.x and 192.x.x.x addresses lie on the border of the subnet barriers, it is probably impossible to get these networks to communicate without high end IT support to configure the router. Good luck and let us know how this works out. J. Brad Jennings
1 person likes this

Share this post


Link to post
Share on other sites
Possibly a stupid question, I do not know - do the PLCs have a routing table? If so, it may be possible to set up a routing table in each PLC to do this.

Share this post


Link to post
Share on other sites
+1 J.B. Jennings I had the same thought when I looked at the drawing. If you can change the ip on machine 2 to 192.xxx.xxx.xxx it should make things a lot easier. Mark
1 person likes this

Share this post


Link to post
Share on other sites
You could try a subnet mask of 128.0.0.0. This would mean all but the most significant bit of the first octet can change. The right solution is to get them all into the same range. Or if they need to be on different subnets, the routers need to be configured to know how to forward the packets to the right subnet. Your PC should have a default gateway set. This should be the router on the PC's subnet, which should be configured to know which devices to connect to in order to forward the packets to the next subnet. It's all in the programming of the routers really.
1 person likes this

Share this post


Link to post
Share on other sites
Funny, I do it the other way round. My programming PC connects to the company LAN via DHCP. But the PLCs and HMIs have fixed IPs plus the Routers fixed IP as gateway. Edited by JesperMP

Share this post


Link to post
Share on other sites
I don't think crossbow said anything about DHCP. One of the pieces of information normally configured by DHCP -is- the default gateway. I think you're both saying the same thing, just using different words.

Share this post


Link to post
Share on other sites
You are probably right. I interpreted his writing as if he set the gateway address manually. Which made me think he didnt use DHCP on the PC side.

Share this post


Link to post
Share on other sites
DHCP sets the default gateway. So yes, we said the same thing. The default gateway on the PC should be the IP of the device it talks to that allows it to cross to other networks. The same for the PLC. A default gateway is where all traffic not destined for a node in the current subnet is sent.

Share this post


Link to post
Share on other sites
Ok Guys Guess Im a bigger dummy than I thought. set aside the machine addressed 191.1.15.xxx for now. I set the Subnet mask on my PC to 255.0.0.0 and Ip to 192.1.17.233, now using RSLinx Classic Gateway I cannot communicate with 192.168.1.213 but If I do a ping from My PC it is successful with 192.168.1.213 so Not sure what I am doing wrong.

Share this post


Link to post
Share on other sites
assuming you've already tried restarting RSLinx, and restarting the computer (force NIC drivers to reload from scratch with the new default gateway). The next thing I would try myself would be setting PC default gateway to the ip of the router.

Share this post


Link to post
Share on other sites
Did Talk to Rockwell and he suggested using a 2nd NIC in the PC, says there are however some downsides to doing that. I did set the default Gateway of my PC to same IP as Router and still nothing. Now the other devices like 192.1.17.15 (the particular device I want to exchange data with) there is no gateway settings applied, Could that be the problem ? sad part is if that is the case I would have to shut device down to make that change. I can go to any Ethernet switch anywhere in the plant and get on with any network I want, but I have to change the IP of my PC to the same range as the device I am trying to connect to.

Share this post


Link to post
Share on other sites
If the device does not have a gateway set, it cannot communicate to anything not on it's local subnet (ip address combined with subnet mask defines what is local).

Share this post


Link to post
Share on other sites
The right thing to do is to sit down and draw up an address allocation map, with IT's involvement. Just throwing around wild IP addresses like that will lead to nothing but trouble. For instance, 192.168.x.x is a nonroutable address...one that no other machine on the internet (not intranet) will ever have. 192.y.x.x where y is something OTHER than 168 is a legal IP address. So is 191.x.x.x. This is why you are having trouble. You would be much better off if you need more than 65K addresses to use 10.x.x.x. All 24 bits are available for use. Most companies tend to use 10.x.y.z where x is a "plant number" so that leaves you with just two octets left. Usually the IT guys use two or 3 blocks of 255 addresses for dynamic IP addresses (DHCP), and at least one block for servers. If possible, I try to get it to where "y" is a work cell or an area of the plant on the controls network ("IT" machines should be on totally different addresses), and the remaining 253 addresses (can't use 255 or 0) are allocated to equipment in that work cell/area. Then all the troubles you are having will NEVER happen. You can set your laptop up as anything on 10.x.x.x. Use 255.255.0.0 for the subnet masks for both PLC's and troubleshooting PC's. A secondary advantage of this configuration is that if you need to add/remove/change devices, you can very easily keep track of which IP addresses are in use. In practice we have a bunch of Excel spreadsheets where I work at now, one for each "subnet" (PLC subnet that is), and we never have problems keeping track of which IP addresses have been used and which are open.

Share this post


Link to post
Share on other sites
That's what we do at our plant. We have a "machine" network of 10.101.x.x. That is broken down further into different types of PLC's, for example, 10.101.20.x are all Mitsubishi PLC's. 10.101.1.X is all Opto 22, 10.101.50.x is all Allen-Bradley so on and so on. Then I have spreadsheets for each subnet that I keep track of all of the PLC's and HMI's. I can look at the spreadsheet and find exactly what I want to know is seconds because I know where in the spreadsheet to look. The more organization you can do up front the easier it will be in the long run. Keep your IT department in the loop at all times! If you add things to the network randomly then they can't make changes correctly to optimize the network, or even worse they will reassign IP addresses without knowing you're in a range and then there are duplicate IP's and time is wasted trying to figure out what's going on.

Share this post


Link to post
Share on other sites
Do you folks have just one physical ethernet network? Do you use VLANs or some other technique to keep broadcast traffic from swamping the network, or have you not found that to be a problem? I've not taken a close look, but I was under the impression that a lot of the communication between HMIs and PLCs was done using broadcast traffic. Still honing my PLC skills, Greg

Share this post


Link to post
Share on other sites
One physical network, multiple VLANs. VLANs are assigned on a port by port basis by our network administrator. Usually I'll run one ethernet line out to the machine I need network connectivity to, IT will assign a port on the switch closest and give it access to the 10.101 VLAN. On the machine side I put a cheap Phoenix Contact industrial Ethernet switch (unmanaged) in the machine control panel. I will connect the PLC, HMI and whatever else on the machine I want network connectivity to that switch. Two benefits to this: 1: If the network goes down for some reason the PLC and HMI can still communicate with eachother, so the machine won't be down. 2: The cheap switch in the machine keeps a lot of traffic off of the main network switch. All HMI <-> PLC traffic is routed by the switch to the correct port by MAC address and not back to the network. Make sure this is a SWITCH and not a HUB! If you put a HUB in it sends every packet it gets from one port out on all the others and you'll flood your network with all kinds of stuff. The Phoenix Contact switches are pretty cheap ($90) so it's worth it to put those in for the added benefit. I don't know the specifics of the network side, our network administrator takes care of all of that. I just tell him I need to go back to such-and-such electrical room, how many IP addresses I'll need, and a description of what each connected device is. He takes care of the rest, then I hook it up when he's gotten the switch configured the way he wants and we test.

Share this post


Link to post
Share on other sites
This is partly true. Many of the "auto-discovery" type protocols and even the multicast routing protocol use broadcast. However as a general rule, broadcast traffic with PLC's and HMI's is insignificant relative to the amount that you see with office equipment. One specific PLC protocol, Ethernet/IP, when used for I/O, IF you do not set it up correctly, becomes broadcast. It is commonly implemented as multicasting. If you do not have a device generating packets called "IGMP query" some place in your network and/or you do not use switches that implement IGMP snooping, it turns into broadcast. As a general rule, IO devices in particular tend to be relatively "underpowered" compared to the servers and laptops they share the Ethernet network with. Depending on the device, the maximum capacity of the device can be as low as 600 packets/second (Allen Bradley Powerflex 20-COMM-E or 22-COMM-E boards), compared to typical maximum packet capacities of over 20,000 packets/second for typical PC equipment. Broadcast traffic is an issue but is not the only possible way that these relatively low powered devices can become overloaded. In terms of traffic management itself, VLAN's do two things for you. First, they restrict the size of the broadcast domain (which nodes receive broadcast traffic). Second, they can be used to classify (mark) traffic. That's as much as they do in and of themselves. It is still possible to cause starvation if one particular VLAN generates so much traffic that it crowds out traffic from other VLAN's. The solution is congestion (flow) control, regardless of whether you use VLAN's or not. The big advantage of VLAN's is that with some switches and routers, it is relatively easy to specify traffic priorities on a VLAN-by-VLAN basis. So if congestion control becomes necessary, you can use VLAN's to control priorities so that for instance, IO traffic doesn't get crowded out if congestion becomes a problem.

Share this post


Link to post
Share on other sites
If you get IT involved they can tell the router(s) to do what they are designed to do which is "route" traffic. In a previous life we connected to any PLC (there were at least 30) anywhere on our network (10 states). Each site had it's own IP range (subnet mask was always 255.255.255.0) and our laptops were set to get their IP address via DHCP. As long as the PLC was assigned an address range that was within the locations routers range we could "hit it" from anywhere in the cloud...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0