Score:0

How to setup static IP with wireless interface and netplan on ubuntu 22.04?

au flag

I am trying to setup a static ip for a ubuntu server 22.04 instance on a laptop. I though I am going to do that by modifying netplan configuration.

IP of router is 192.168.80.32 netplan config file is 00-installer-config

network:
  version: 2
  renderer: networkd
  wifis:
    wlp3s0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.80.222/24]
      nameservers:
        addresses: [192.168.80.1, 8.8.8.8]
      access-points:
        "bssid":
          password: "pass"
      routes:
        - to: default
          via: 192.168.80.32

after generate and apply the ip does not change. What I am doing wrong?

ec flag
Just to confirm, you're running `networkd,` correct (`sudo service systemd-networkd status')? Had to check assumptions.
llesh avatar
au flag
@richbl correct networkd. no networkmanager or other.
Score:1
au flag

Well I am sorry I think I found where the problem is. It should be written false instead of no in the lines where it asks about dhcp. I will consider this as SOLVED. Sorry if anyone has wasted their time.

network:
  version: 2
  renderer: networkd
  wifis:
    wlp3s0:
      dhcp4: false
      dhcp6: false
      addresses: [192.168.80.222/24]
      nameservers:
        addresses: [192.168.80.1, 8.8.8.8]
      access-points:
        "bssid":
          password: "pass"
      routes:
        - to: default
          via: 192.168.80.32
ec flag
Glad that you resolved your issue. Please mark the question as solved so this question can be closed. Thanks
llesh avatar
au flag
I can't at the moment. it shows "You can accept your own answer in 2 days".
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.