0

I'm running ubuntu server 20.04 LTS in raspi 4 model B.

I want to set a static IP in one raspi and run API over that ip and that must me accessible over the the network to which I'm connected to. I have wlan0 and wlan1 in both devices.

For example i want to connect wlan0 (with static ip) of device1 to a router and device2 will also be connected to the same router and I must be able to access the static ip of the device1 in device2

Is this possible i tried few configurations but i was not able to connect to the IP remotely

Edit : Content of yaml file is as below

network:
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  version: 2
  wifis:
    wlan0:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.200/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]
      access-points:
        "SSID":
          password: *********
    wlan1:
      access-points:
        "SSID":
          password: *********
      dhcp4: true
      optional: true
7
  • 1
    The easiest way may be to reserve the IP address assigned by the router via the router set up. You will need to know the MAC address associated with the Raspberry Pi's wlan0 interface. Each router is different and this is beyond the scope of this site.
    – user68186
    Nov 30, 2022 at 17:38
  • No i can't do this because this will be a production device, i can't get access to their routers
    – Eldho K K
    Nov 30, 2022 at 17:49
  • You will need to know which IP address will be available in the production environment for static allocation and assign an IP address from that pool.
    – user68186
    Nov 30, 2022 at 17:51
  • You may find Ubuntu 17.10 Server static IP netplan - how to set netmask useful. Please post the content of the file /etc/netplan/01-netcfg.yaml in your question.
    – user68186
    Nov 30, 2022 at 18:00
  • I think i tried the same thing but it didn't work and also stopped blocked internet connection
    – Eldho K K
    Nov 30, 2022 at 19:40

0

You must log in to answer this question.

Browse other questions tagged .