Relase dhcp but I have configured static IP [SOLVED]

Kernels & Hardware, configuring network, installing services

Re: Relase dhcp but I have configured static IP

Postby coppolino97 » 2018-06-22 06:42

Don't worry about the two wireless cards.

Sorry but I did not understood a thing about this:
systemctl disable network-wireless@wlan{0,1}.service


Will this service not start again at boot with the command disable right?
Thanks!
coppolino97
 
Posts: 13
Joined: 2018-06-05 15:23

Re: Relase dhcp but I have configured static IP

Postby Head_on_a_Stick » 2018-06-23 10:41

coppolino97 wrote:I did not understood a thing about this:
systemctl disable network-wireless@wlan{0,1}.service


Will this service not start again at boot with the command disable right?

Please read `man systemctl` to understand the enable and disable options.
User avatar
Head_on_a_Stick
 
Posts: 7904
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Relase dhcp but I have configured static IP

Postby coppolino97 » 2018-06-26 08:29

I have read about systemctl and I have understood that
Code: Select all
 systemctl disable  example.service

prevent that this service will start at boot

Thanks
:D
coppolino97
 
Posts: 13
Joined: 2018-06-05 15:23

Re: Relase dhcp but I have configured static IP

Postby Head_on_a_Stick » 2018-06-27 04:58

Is the thread now [SOLVED]?

If so, please edit the title to reflect this.
User avatar
Head_on_a_Stick
 
Posts: 7904
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Relase dhcp but I have configured static IP

Postby coppolino97 » 2018-06-28 08:07

Sorry @Head_on_a_Stick if I did not write a replay for a few days but I haven't time to try this on my odroid board.
Today I have tried with this command:
Code: Select all
systemctl disable network-wireless@wlan{0,1}.service


When I have rebooted the device It did not connect automatically to my wifi network (it was configured before using wpa_supplicant)
I have typed

because in this moment the Wlan0 is in client mode and the Wlan1 is in AP mode.

Can't I simply comment the line
Code: Select all
ExecStart=/sbin/dhclient %i
in the file "systemctl cat network-wireless@.service"? :?

Thanks for your support! :D
coppolino97
 
Posts: 13
Joined: 2018-06-05 15:23

Re: Relase dhcp but I have configured static IP

Postby Head_on_a_Stick » 2018-06-28 17:06

coppolino97 wrote:When I have rebooted the device It did not connect automatically to my wifi network (it was configured before using wpa_supplicant)

Do you have the interface listed in /etc/network/interfaces and is networking.service enabled and started correctly?

That should bring your connection up, or at least it would in Debian :mrgreen:

coppolino97 wrote:Can't I simply comment the line
Code: Select all
ExecStart=/sbin/dhclient %i
in the file "systemctl cat network-wireless@.service"? :?

If you want to use network-wireless@.service (rather than /etc/network/interfaces & networking.service) then replace the `dhclient` lines with commands to assign the IP addresses you want to use, like this:
Code: Select all
ExecStart=/bin/ip address add 192.168.1.39/24 broadcast 192.168.1.255 dev %i
ExecStart=/bin/ip route add default via 192.168.1.1

Just remember to remove the interface from /etc/network/interfaces to avoid conflicts.
User avatar
Head_on_a_Stick
 
Posts: 7904
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Relase dhcp but I have configured static IP

Postby coppolino97 » 2018-07-04 06:50

Thanks for your help!
I think that it is solved now!
:D :D
coppolino97
 
Posts: 13
Joined: 2018-06-05 15:23

Previous

Return to System configuration

Who is online

Users browsing this forum: 1885, sunrat and 10 guests

fashionable