Assigning Static IP address

Forum Forums New users New Users and General Questions Assigning Static IP address

  • This topic has 5 replies, 2 voices, and was last updated Nov 6-11:39 am by Xecure.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #70381
    Member
    eyekay234

      Hello,

      I am trying to set up my laptop to have a static ip address so that the ip doesnt keep changing. I have run the following commands and got stuck at the last one..

      ip -c link show
      ip -c addr show wlan0

      Then i see the ip address assigned via dhcp which i want to make permanent.

      When i now run sudo nano /etc/network/interfaces

      i dont see how to assign the ip address manually.

      Can someone help out as the commands here dont help : https://www.cyberciti.biz/faq/add-configure-set-up-static-ip-address-on-debianlinux/

      #70383
      Member
      Xecure
        Helpful
        Up
        0
        ::

        You must avoid using dhcp and instead use inet static
        See the configuration this user posted.

        `auto lo wlan0
        iface lo inet loopback
        iface wlan0 inet static
        address 192.168.1.10
        netmask 255.255.255.0
        broadcast 192.168.1.255
        network 182.168.1.0
        gateway 192.168.1.1
        dns-nameserver 192.168.1.1
        wpa-psk ******
        wpa-ssid ******

        • This reply was modified 1 year, 5 months ago by Xecure.

        antiX Live system enthusiast.
        General Live Boot Parameters for antiX.

        #70385
        Member
        eyekay234
          Helpful
          Up
          0
          ::

          After i run : ip -c addr show wlan0
          This is what i see:
          3: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether 78:dd:08:f5:1a:dd brd ff:ff:ff:ff:ff:ff
          inet 10.1.1.83/24 brd 10.1.1.255 scope global wlan0
          valid_lft forever preferred_lft forever
          inet6 fe80::7add:8ff:fef5:1add/64 scope link
          valid_lft forever preferred_lft forever

          But when i run sudo nano /etc/network/interfaces

          this is all i see:
          GNU nano 5.9 /etc/network/interfaces I #——————————————————————————
          # /etc/network/interfaces
          #
          # interfaces(5) file used by ifup(8) and ifdown(8)
          # Used by ceni but not by connman
          #——————————————————————————

          auto lo
          iface lo inet loopback

          How do i go about setting what you described above?

          #70387
          Member
          Xecure
            Helpful
            Up
            0
            ::

            Are you connecting using Ceni or connman?

            antiX Live system enthusiast.
            General Live Boot Parameters for antiX.

            #70388
            Member
            eyekay234
              Helpful
              Up
              0
              ::

              I just connected via Connman But if you can provide me with instructions for both I will appreciate it as i dont know which would be easier to use

              #70390
              Member
              Xecure
                Helpful
                Up
                0
                ::

                For connman:
                in cmst (the gui interface), you can edit the access point configuration.

                Go to the “Details” tab and select your Wireless Access Point from the drop-down box.
                Click on the “Configuration” button at the bottom-right of the window. It should open a new small window to let you edit some options.
                On the “IPv4” section, you can switch the connection method from DHCP to MANUAL. Address is where your static IP should go. Netmask you normally use 255.255.255.0 (or use a custom one if you need a special DNS mask). Gateway is the router’s broadcast gateway.

                See your
                ifconfig wla0
                to see what are the current configuration for your wlan0 wireless that is being used right now.

                Example:

                Address: 192.168.1.55
                Netmask: 255.255.255.0
                Gateway: 192.168.1.255

                For terminal configuration with connmanctl:
                https://variwiki.com/index.php?title=Static_IP_Address

                • This reply was modified 1 year, 5 months ago by Xecure. Reason: Example
                • This reply was modified 1 year, 5 months ago by Xecure.

                antiX Live system enthusiast.
                General Live Boot Parameters for antiX.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.