# 20211018_ip-kargs-behavior
# current behavior
- ip=auto
- try both, wait some time for ipv4
- ip=dhcp
- try both, DHCP4 is required
- ip=dhcp4
- try both, wait some time for ipv4
- (this is not handled explicitly, it's treated as "auto")
- ip=dhcp6
- only try ipv6
- ip=dhcp4,dhcp6
- try both, wait some time for ipv4
- ip=dhcp6,dhcp4
- try both, wait some time for ipv4
- ip=dhcp,dhcp6
- try both, wait some time for ipv4
# desired behavior
We need to decide what to do with `ip=dhcp` - what does it mean in the future?
Two options I can see:
- ip=dhcp means dhcp* -> try both first one wins
- ip=dhcp maps directly to ip=dhcp4
- i.e. dhcp is considered dhcp4 and mapped directly there in all cases
- I think this is the only solution. Changing ip=dhcp to mean "the first one wins" would break existing users
- +1 - ok so that simplifies our matrix
- ip=auto
- confusing?? What does it do?
- could we get rid of this option? -> it's the default behavior generated when you only pass 'rd.neednet'...
- ... and also when the ip= value is unknown
- I think we should never mention `auto` anywhere and just have an internal mapping and documentation that says "when rd.neednet is specified but no ip= argument is given then ip=dhcp is assumed"
- Ok
- ip=dhcp4
- ip=dhcp6
- ip=dhcp4,dhcp6
- ip=dhcp6,dhcp4
OK let's talk about cases:
- I want dhcp4
- ip=dhcp4
- I want dhcp6
- ip=dhcp6
- I want dhcp4, no dhcp6 at all
- is it different from "I want dhcp4"?
- looks like ip=dhcp4 will still have ipv6.method=auto, what if someone wants that disabled?
- ok, in theory it shouldn't make much difference if you do IPv6 and doesn't wait for it
- agree - trying to cover all bases -> +1
- I want dhcp6, no dhcp4 at all
- I want dhcp4 and dhcp6 tried, first one wins
- I want dhcp4 and dhcp6 tried, wait extra time for dhcp4
- I want dhcp4 and dhcp6 tried, wait extra time for dhcp6
- I want dhcp4 and dhcp6 tried, wait extra time for BOTH
How do we reconcile these cases?
It's almost like we need
what if we come up with a richer format
ip=dhcp4=required,dhcp6=recommended
ip=dhcp4=recommended,dhcp6=tried
ip=dhcp4=required,ipv6=none
ip=dhcp4 -> ip=dhcp4=recommended,dhcp6=tried ?
ip=dhcp4,dhcp6 -> ip=dhcp4=recommended,dhcp6=recommended ?
- required = fail if it doesn't succeed
- recommended = wait a little longer
- tried = try, but don't wait
- missing qualifier == recommended?
- basically we have to figure out what a missing qualifier maps to
- none = dont try, disabled
- for this you can omit dhcpX?
- maybe, but that's not what we have today -> ack
Of course we could use different syntax, mostly talking about the spirit of trying to encode more information.
Yes, it seems those 3 should cover all combinations...