• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Changing the static IP of a client

Scheduled Pinned Locked Moved
Feature Request
5
8
3.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    TheGrinch
    last edited by Jul 9, 2014, 1:54 PM

    Hi guys,

    I already have seen someone who used FOG for changing the static IP of Windows XP clients after imaging several years ago. Now that I want to try this on my own, I can not find any information about it. Is this feature gone in the new versions?

    1 Reply Last reply Reply Quote 0
    • A
      axel12
      last edited by Jul 10, 2014, 2:43 AM

      [url]https://stackoverflow.com/questions/9868045/changing-ip-address-via-command-line-on-windows-xp[/url]
      something like:
      [B][FONT=Segoe UI][COLOR=#333333]netsh interface ip set address “Local Area Connection” static 192.168.0.10 255.255.255.0 192.168.0.1 1[/COLOR][/FONT][/B]

      [COLOR=#333333]aaanywhooo … [/COLOR]

      [COLOR=#333333]1. create a .bat file with the netsh command in it. [/COLOR]
      [COLOR=#333333]2. make a new snapin -> upload the bat file into the snapin.[/COLOR]
      [COLOR=#333333]3. associate the snapin with a computer[/COLOR]
      [COLOR=#333333]4. deploy the snapin[/COLOR]
      [COLOR=#333333]5. have coffee [/COLOR]

      [COLOR=#333333]for one computer, this really really seems like overkill to do via fog. [/COLOR]

      [COLOR=#333333]and easier way, would be to enable win remote shell on the target computer with “winrm quickconfig”[/COLOR]
      [COLOR=#333333]then you can simply connect to it and force the static ip change yourself, without doing any FOG-stuff.[/COLOR]

      [CODE]winrs: -r:remote_comp_name cmd
      netsh interface … blah blah blah[/CODE]

      1 Reply Last reply Reply Quote 0
      • A
        axel12
        last edited by Jul 10, 2014, 2:44 AM

        also, please do not post this kind of comment in “feature request” … post it in general category.

        1 Reply Last reply Reply Quote 0
        • T
          TheGrinch
          last edited by Jul 10, 2014, 5:14 AM

          Thanks for your reply. This means that I need one batch file for each machine. With over 400 machines this produces much snapins.

          I remember a data field in the fog web gui below host name for it. Maybe the guy just coded a snapin that connected to the fog database to get the individual IP for each machine…? I also read a comment in another forum that the FogService should be also able to change the IP.

          @mod: Please feel free to move this thread to general.

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott
            last edited by Jul 10, 2014, 10:54 AM

            I’m not aware of the FogService being able to change the hosts IP address. While what you’re saying is “possible” it has never been a default part of the FOG Client/Service files.

            There was never a “feature” of this type before either. Yes there did used to be n “ip” field but it was rarely used or needed. This “field” still exists however and can be set during registration time.

            The “text” field has since been deprecated out and we removed the “header” on the list/search host feature, but if the IP is set in the DB you should see it next to the host anyway.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • J
              Junkhacker Developer
              last edited by Jul 10, 2014, 1:19 PM

              we use a single snapin for each group of computers we need to change to static.
              [CODE]
              Set csv=.\IPs.csv

              for /f “skip=1 delims=, tokens=1-4” %%a in (%csv%) do (
              if “%computername%”==“%%a” (
              netsh int ipv4 set address “Local Area Connection” static %%b %%c %%d
              )
              )
              [/CODE]

              and in file IPs.csv
              [CODE]
              computer,IP#,mask,gateway
              ComputerName-01,192.168.1.5,255.255.255.0,192.168.1.1
              ComputerName-02,192.168.1.6,255.255.255.0,192.168.1.1
              ComputerName-03,192.168.1.7,255.255.255.0,192.168.1.1
              [/CODE]

              signature:
              Junkhacker
              We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

              1 Reply Last reply Reply Quote 0
              • T
                TheGrinch
                last edited by Jul 11, 2014, 7:50 AM

                @Junkhacker

                Ok using a CSV seems to be a good idea. Unfortunately you generate another place of information with this.

                It would be great if the snapin link would be configurable for every host. So I could give every host different arguments for runnning a netsh script.

                1 Reply Last reply Reply Quote 0
                • S
                  shania Banned
                  last edited by Dec 20, 2014, 1:45 PM

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  276

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project