Get the current ip address using `ip` command

Some virtual machines have vnet0 as their default interface and `ifconfig` command raises an error.