Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Static IP vs DHCP (http://www.chiefdelphi.com/forums/showthread.php?t=153520)

onenerdyguy 12-01-2017 09:52

Static IP vs DHCP
 
Last year, we had a heck of a time with connectivity dropping, and not 100% sure why. Things like the camera feed via mjpg wouldn't load up reliably and the like. While I'm sure a part of it was bandwidth, I'm wondering if a part of it could be also be mdns configs vs using static IPs. I've personally never had much luck with MDNS in other projects.

Is there a concern by statically configuring IP's for myd river station, roborio, and co-processor as long as their in the correct team number subnet, i.e. 10.59.29.xx for us, 5929?

marshall 12-01-2017 10:18

Re: Static IP vs DHCP
 
Quote:

Originally Posted by onenerdyguy (Post 1629848)
Last year, we had a heck of a time with connectivity dropping, and not 100% sure why. Things like the camera feed via mjpg wouldn't load up reliably and the like. While I'm sure a part of it was bandwidth, I'm wondering if a part of it could be also be mdns configs vs using static IPs. I've personally never had much luck with MDNS in other projects.

Is there a concern by statically configuring IP's for myd river station, roborio, and co-processor as long as their in the correct team number subnet, i.e. 10.59.29.xx for us, 5929?

Team 900's expert advice:

1) Use Static IPs where possible.
2) Ensure gateways and subnet masks are set correctly.
3) Ensure connectivity of vital components prior to start of the match by building a dashboard or script.
4) Don't use the words 'balls' and 'fuel' interchangeably on ChiefDelphi.*

* This one isn't strictly related and hasn't been tested yet.

ATannahill 12-01-2017 10:26

Re: Static IP vs DHCP
 
There should be no concern but I would recommend telling any FTA/FTAA/CSA that is working with your robot that you intentionally set static IPs so they do not assume that you are on mDNS.

Items 2 and 3 and 4 on Marshall's list are great points.

brian5115 12-01-2017 10:36

Re: Static IP vs DHCP
 
At CHS last year we were having similar issues so we talked to an FTA that basically said she thought FIRST had switched to MDNS prematurely, and the FMS couldn't keep up with all the robots. She told us to switch to static IPs and our issues disappeared.

Just for reference, we had two Axis cameras and a Raspberry-Pi on the network in addition to the robo-RIO and driver laptop.

marshall 12-01-2017 10:47

Re: Static IP vs DHCP
 
Quote:

Originally Posted by ATannahill (Post 1629888)
There should be no concern but I would recommend telling any FTA/FTAA/CSA that is working with your robot that you intentionally set static IPs so they do not assume that you are on mDNS.

This is also a good point. Do make sure any FTA's know what you have done if you are troubleshooting it with them.

onenerdyguy 12-01-2017 10:55

Re: Static IP vs DHCP
 
Awesome, that was the answer I was hoping for. I agree, mDNS was a bit premature, and as a working network professional myself, I'm not a fan of it in the first place.

Since we're a python shop, our interactions with the majority of FTA/FTAA/CSA is limited due to the non-supported nature, but it's a good thing to keep in mind.

as for #4, I'd like to put that should apply to the majority of discussions in person as well. We had a few interesting design discussions about how our robot would be good at ball handling, would store balls in a ball sack, and that we should find a way to empty the ball sack quickly and accurately with our shooter.

virtuald 12-01-2017 12:44

Re: Static IP vs DHCP
 
To echo what others have said, mDNS and static IP are equally supported by FIRST, and maybe one day mDNS will actually work. But I recommend anyone doing dashboards/coprocessors/etc to use static IPs.

rich2202 12-01-2017 13:10

Re: Static IP vs DHCP
 
My team uses Static IP's, and have avoided a lot of problems.

Make sure you use the default addresses. I believe they are:
10.XX.YY.zz

Where XXYY is your team number

ZZ is
1 Radio
5 RoboRio
10 Driver Station
12 Camera

I'm sure if I am wrong, someone will correct me.

ATannahill 12-01-2017 13:16

Re: Static IP vs DHCP
 
Quote:

Originally Posted by rich2202 (Post 1630014)
My team uses Static IP's, and have avoided a lot of problems.

Make sure you use the default addresses. I believe they are:
10.XX.YY.zz

Where XXYY is your team number

ZZ is
1 Robot Radio
5 2 RoboRio
10 5 Driver Station
12 11 Camera

I'm sure if I am wrong, someone will correct me.

I have put in the recommended way to set static IPs and how I do it as a CSA. Other things might work.

marshall 12-01-2017 13:31

Re: Static IP vs DHCP
 
Let's see if we can't resolve this properly:

https://frc-qa.firstinspires.org/qa/90

ATannahill 12-01-2017 13:34

Re: Static IP vs DHCP
 
Quote:

Originally Posted by marshall (Post 1630032)
Let's see if we can't resolve this properly:

https://frc-qa.firstinspires.org/qa/90

Have you reviewed this?

I am all for letting teams stick with what they found has worked, I was posting what I used for reference for anyone new to setting their own static IP addresses.

marshall 12-01-2017 13:37

Re: Static IP vs DHCP
 
Quote:

Originally Posted by ATannahill (Post 1630039)
Have you reviewed this?

I am all for letting teams stick with what they found has worked, I was posting what I used for reference for anyone new to setting their own static IP addresses.

In fact, I had not. From that link for others to reference:

Quote:

It is also possible to configure static IPs on your devices to accommodate devices or software which do not support mDNS. When doing so you want to make sure to avoid addresses that will be in use when the robot is on the field network. These addresses are 10.TE.AM.1 and 10.TE.AM.4 for the DAP1522 radio and the field access point and anything 10.TE.AM.20 and up which may be assigned to a device still configured for DHCP. The roboRIO network configuration can be set from the webdashboard.

DAP1522 radio - Static 10.TE.AM.1 programmed by Kiosk
roboRIO - Static 10.TE.AM.2 would be a reasonable choice, subnet mask of 255.255.255.0 (default)
Driver Station - Static 10.TE.AM.5 would be a reasonable choice, subnet mask must be 255.0.0.0
IP Camera (if used) - Static 10.TE.AM.11 would be a reasonable choice, subnet 255.255.255.0 should be fine
Other devices - Static 10.TE.AM.6-.10 or .12-.19 (.11 if camera not present) subnet 255.255.255.0
I'm glad that is in screensteps with no mention of it in the manual.

EDIT: On the plus side, just threw the Q&A team a softball.

wilsonmw04 12-01-2017 13:44

Re: Static IP vs DHCP
 
We had some interesting times trying to connect to the field at he beginning of the season. It was suggested we try a static IP by our awesome FTA and the connection problems disappeared. I so no downside to setting static IP's on your 'bots as long as you put each item in the expected range.

scca229 12-01-2017 15:05

Re: Static IP vs DHCP
 
Going to just highlight this one from marshall's post.

Driver Station - Static 10.TE.AM.5 would be a reasonable choice, subnet mask must be 255.0.0.0

When there is a communication problem on a DS and they have informed me they are using static IPs, or I drag it out of them after getting the deer-in-the-headlights look when I ask, this is very often the issue. Everyone is so used to using /24 submasks (255.255.255.0) when this particular one must be a /8 (255.0.0.0). The funny thing is that most versions of Windows that I know of automatically default to a /8 when you enter a 10. IP.

billbo911 12-01-2017 15:27

Re: Static IP vs DHCP
 
This is one area that I have a strong opinion on.

If reliability is one of your team's goals for the season, then why take a risk on mDNS?
Yes, usually mDNS works just fine. But, I did say usually.

Why not just lock down your IPs to KNOWN values and move on.
They won't change, you know where each device is addressed, and connections on the field will JUST WORK! What more could you ask for?
Well, OK, you could ask for an easy to find guide to setting your IP's statically. Fortunately, this thread already has what you really need to know.

andrewthomas 12-01-2017 16:07

Re: Static IP vs DHCP
 
Quote:

Originally Posted by billbo911 (Post 1630116)
This is one area that I have a strong opinion on.

If reliability is one of your team's goals for the season, then why take a risk on mDNS?
Yes, usually mDNS works just fine. But, I did say usually.

Why not just lock down your IPs to KNOWN values and move on.
They won't change, you know where each device is addressed, and connections on the field will JUST WORK! What more could you ask for?
Well, OK, you could ask for an easy to find guide to setting your IP's statically. Fortunately, this thread already has what you really need to know.

Couldn't agree with this more. At the end of the day, mDNS (DHCP) doesn't buy you much.

As for the IPs themselves, I wouldn't be too worried. Last year, our roboRIO and Driver Station IPs were correct, but we got away with our other device (Jetson) as 10.TE.AM.25. Where we did get hung up, however, was with FMS allowed network ports. Make sure to double check your SSH, camera stream, etc. port configurations (http://wpilib.screenstepslive.com/s/...ms-whitepaper).

rich2202 12-01-2017 19:10

Re: Static IP vs DHCP
 
Quote:

Originally Posted by scca229 (Post 1630109)
Going to just highlight this one from marshall's post.

Driver Station - Static 10.TE.AM.5 would be a reasonable choice, subnet mask must be 255.0.0.0

When there is a communication problem on a DS and they have informed me they are using static IPs, or I drag it out of them after getting the deer-in-the-headlights look when I ask, this is very often the issue. Everyone is so used to using /24 submasks (255.255.255.0) when this particular one must be a /8 (255.0.0.0). The funny thing is that most versions of Windows that I know of automatically default to a /8 when you enter a 10. IP.

255.255.255.0 was useful when imaging the crio. The program would search all possible internet address. Using the small address space (subnet mask) speeded things up. However, once we go to a competition, we had to change it to 255.0.0.0. Otherwise it couldn't talk to FMS. Too bad they couldn't write FMS with a simulated IP address of 10.xx.yy.255 for each team.

sraque 13-01-2017 07:13

Re: Static IP vs DHCP
 
If you set static IPs, make sure many kids on the team know it and can tell anyone who comes to help them with their robot. I have spent many hours trying to help teams with Comms issues only to find out that the one network-savvy person on the team decided to set static IPs and then didn't come to the competition, and no one present knew about it.

rich2202 13-01-2017 10:33

Re: Static IP vs DHCP
 
Quote:

Originally Posted by sraque (Post 1630405)
If you set static IPs, make sure many kids on the team know it and can tell anyone who comes to help them with their robot. I have spent many hours trying to help teams with Comms issues only to find out that the one network-savvy person on the team decided to set static IPs and then didn't come to the competition, and no one present knew about it.

We put a sticker with the Static IP Address on all the devices.

It started because we have multiple driver station/programming computers, as well as multiple cameras.

If CSA help is needed, it is immediately obvious that we are using Static IP's, and the address of that device.

jlindquist74 13-01-2017 15:22

Re: Static IP vs DHCP
 
Quote:

Originally Posted by andrewthomas (Post 1630134)
Couldn't agree with this more. At the end of the day, mDNS (DHCP) doesn't buy you much.

Please don't use those terms as if they mean the same thing. They really, truly, vastly DO NOT.

Greatly simplified:
  • DHCP is how a host, lacking its own address, asks a server to assign it one. (It requires a DHCP server to be present somewhere on the local network in order to work.)
  • mDNS is how a host, lacking the address of another host on the local network, asks that other host to provide its address. (It does NOT require a server to work.)

How those protocols are implemented and used varies with the operating system. Of course, Windows has peculiar issues about mDNS, which complicates things. It certainly keeps our work from being boring!

Conor Ryan 13-01-2017 15:30

Re: Static IP vs DHCP
 
always static IPs. Its like using mail with a full mailing address then Zip Code + 4, using DHCP is like "Please mr. postman please deliver me to mr. rio. I promise i paid postage." It is in your own network so just make it specific.

andrewthomas 13-01-2017 15:51

Re: Static IP vs DHCP
 
Quote:

Originally Posted by jlindquist74 (Post 1630676)
Please don't use those terms as if they mean the same thing. They really, truly, vastly DO NOT.

Greatly simplified:
  • DHCP is how a host, lacking its own address, asks a server to assign it one. (It requires a DHCP server to be present somewhere on the local network in order to work.)
  • mDNS is how a host, lacking the address of another host on the local network, asks that other host to provide its address. (It does NOT require a server to work.)

How those protocols are implemented and used varies with the operating system. Of course, Windows has peculiar issues about mDNS, which complicates things. It certainly keeps our work from being boring!

Yes, this is true. I was merely relating this option back to OPs original "Static IP vs DHCP".

AustinSchuh 14-01-2017 03:40

Re: Static IP vs DHCP
 
Quote:

Originally Posted by jlindquist74 (Post 1630676)
  • DHCP is how a host, lacking its own address, asks a server to assign it one. (It requires a DHCP server to be present somewhere on the local network in order to work.)
  • mDNS is how a host, lacking the address of another host on the local network, asks that other host to provide its address. (It does NOT require a server to work.)

The fun one is what happens when you plug your DS into the robot (a network without a DHCP server). Turns out, you get a link local IPv6 address which can be found via mDNS, allowing the two devices to communicate. Sometimes, if you are luck and everything works. We just gave up debugging the various issues we ran into and put everything on static IP addresses.


All times are GMT -5. The time now is 15:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi