Running dhclient
gets me an IPv4 address.
Running dhclient -6
gets me an IPv6 address.
And the man page says you can't combine v4 and v6. So how to get both v4 and v6 addresses at the same time?
Running dhclient
gets me an IPv4 address.
Running dhclient -6
gets me an IPv6 address.
And the man page says you can't combine v4 and v6. So how to get both v4 and v6 addresses at the same time?
You can issue both commands and have them run concurrently in one line like:
(dhclient &); (dhclient -6 &)
You could then add it to a BASH script or alike, named how you'd like. :)
More info on combining commands in Linux:
If they can't be combined, you'll have to make two separate calls of dhclient
and if you want this to run with one command, you could wrap it in a little shell-script. You can find infos on Bash-scripting here.