My ip address on a beaglebone is set to:
$ ip address show dev eth0
4: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 64:33:db:27:e9:d2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.132/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::6633:dbff:fe27:e9d2/64 scope link
valid_lft forever preferred_lft forever
I can temporarily add a second address for 100 seconds with the command:
sudo ip addr add 192.168.4.244/23 dev eth0 valid_lft 100 preferred_lft 100
I would like to do the same thing only instead of the second address being static, I would like it assigned by the router (dhcp?/dynamic?) but for the life of me I can't figure out the syntax. any ideas?
I was told that:
ifconfig eth0 0.0.0.0 0.0.0.0 && dhclient
would work but is that ok to do considering my static IP address was set with connman? Also if ifconfig is ok to use how do add the timeout???
TIA