Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Linux/AM5728: dhclient does not start automatically

$
0
0

Part Number:AM5728

Tool/software: Linux

Hello,

We are using Yocto based build system and we have recently started using /etc/network/interface file to manage our network. Main aim to use this file is to have automatic dhcp invocation and IP allocation when interface file is modified respectively. We have dhclient as the DHCP client. Previously we used to run the dhclient manually through our application whenever there was new network configuration updated. 

I know having an interface file, dhclient can work automatically and systemd can invoke it whenever required. In our case, dhclient is not invoking automatically (neither at bootup nor at interface file change), if we manually run the dhclient wlan0 command, then only it will retrieve an IP address from the DHCP server. We only need it for wlan0 interface, we don't have an ethernet.

I have also attached the interface file for the clarification below:

interface file for dynamic IP allocation:

auto lo
iface lo inet loopback

auto can0
iface can0 inet manual
pre-up /sbin/ip link set $IFACE type can bitrate 125000
pre-up ip link set $IFACE type can restart-ms 1000
up /sbin/ifconfig $IFACE up
down /sbin/ifconfig $IFACE down

auto can1
iface can1 inet manual
pre-up /sbin/ip link set $IFACE type can bitrate 125000
pre-up ip link set $IFACE type can restart-ms 1000
up /sbin/ifconfig $IFACE up
down /sbin/ifconfig $IFACE down

auto wlan0
iface wlan0 inet dhcp
post-up systemctl start wpa_supplicant
post-down systemctl stop wpa_supplicant

interface file for static IP allocation:

auto wlan0
iface wlan0 inet static
address 192.168.180.111
netmask 255.255.255.0
gateway 192.168.180.1
dhcp 0

Ultimate goal is to have dhclient work automatically as what it supposed to do. I would appreciate a prompt response.

Thanks,

Divyeshkumar 


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>