3

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?

1
  • 1
    Doesn't your operating system distribution have network startup scripts to handle this for you? Commented May 24, 2013 at 16:40

2 Answers 2

2

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:

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .