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

    how to change netmask and ip range?

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    17
    4.2k
    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.
    • O
      onenetwork
      last edited by onenetwork

      alt text

      hey guys, where can i change client IP range, say from 204.10.x.10 - 204.10.x.254 — to — 204.10.x.50 - 204.10.x.254?
      also, where can i change netmask from 255.255.255.0 — to — 255.255.255.224?
      please see the photo.
      i use ubuntu 14.04 and edit the etc/dhcp/dhcpd.conf but it keep changing back to 255.255.255.0 from 255.255.255.224 everytime i reinstall. thanks in advance.

      1 Reply Last reply Reply Quote 0
      • Q
        Quazz Moderator
        last edited by

        Edit /opt/fog/.fogsettings and set blddhcp to 0 so it doesn’t generate a DHCP file and your changes remain.

        Btw 255.255.255.254 would make it so only one ip is on the entire subnet, just so you know.

        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
        • O
          onenetwork
          last edited by onenetwork

          @Quazz said in how to change netmask and ip range?:

          Edit /opt/fog/.fogsettings and set blddhcp to 0 so it doesn’t generate a DHCP file and your changes remain.

          Btw 255.255.255.254 would make it so only one ip is on the entire subnet, just so you know.

          Thank you Quazz for your answered. The problem is still there after I edit /opt/fog/.fogsettings and set blddhcp to 0. Everytime I reinstall it changed Client IP back to: 204.10.x.10 and netmask 255.255.255.0
          My fog server is 204.10.x.68 and only able to use IP 204.10.x.66 to 204.10.x.192, I can’t use 204.10.x.10 as it was assigned to other switch. I hope someone could help.

          Q 1 Reply Last reply Reply Quote 0
          • Q
            Quazz Moderator @onenetwork
            last edited by

            @onenetwork You might have to set dodhcp to N as well.

            Or you could alter the submask= value to try and let FOG handle it.

            O 1 Reply Last reply Reply Quote 1
            • O
              onenetwork @Quazz
              last edited by onenetwork

              @Quazz said in how to change netmask and ip range?:

              @onenetwork You might have to set dodhcp to N as well.

              Or you could alter the submask= value to try and let FOG handle it.

              Still not work after edited dodhcp to “N”. What do you mean alter the submask= value, where and how?
              Thanks

              Q 1 Reply Last reply Reply Quote 0
              • Q
                Quazz Moderator @onenetwork
                last edited by

                @onenetwork FOG should no longer overwrite your dhcp config with those settings to off. Is that not the case for you?

                The submask value is located in the .fogsettings file, (along with other info such as routers and what not) which FOG will use to build the DHCP config (if you’re allowing it to control DHCP)

                O 1 Reply Last reply Reply Quote 0
                • O
                  onenetwork @Quazz
                  last edited by onenetwork

                  @Quazz said in how to change netmask and ip range?:

                  @onenetwork FOG should no longer overwrite your dhcp config with those settings to off. Is that not the case for you?

                  The submask value is located in the .fogsettings file, (along with other info such as routers and what not) which FOG will use to build the DHCP config (if you’re allowing it to control DHCP)

                  Sorry to say I can’t find anything related to submask or IP range locate in the .fogsettings files. I try to change routeraddress to 255.255.255.224 or 204.10.x.65(gateway) and it not working.
                  By the way I’m using fog server 1.2.0

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @Quazz
                    last edited by

                    @Quazz said in how to change netmask and ip range?:

                    Edit /opt/fog/.fogsettings and set blddhcp to 0 so it doesn’t generate a DHCP file and your changes remain.

                    Btw 255.255.255.254 would make it so only one ip is on the entire subnet, just so you know.

                    On older trunk and perhaps 1.2.0, the installer ignored bldhcp if dodhcp was turned on. This isn’t a problem in the current I believe but it’s been a while since I messed with the dhcp functionality.

                    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!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @onenetwork
                      last edited by

                      @onenetwork On your server, what is the output of ip addr show ?

                      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!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      O 1 Reply Last reply Reply Quote 0
                      • O
                        onenetwork @Wayne Workman
                        last edited by Wayne Workman

                        @Wayne-Workman said in how to change netmask and ip range?:

                        @onenetwork On your server, what is the output of ip addr show ?

                        fog@ubuntu:~$ ip addr show
                        1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
                            link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
                            inet 127.0.0.1/8 scope host lo
                               valid_lft forever preferred_lft forever
                            inet6 ::1/128 scope host
                               valid_lft forever preferred_lft forever
                        2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
                            link/ether 00:0c:19:61:5c:da brd ff:ff:ff:ff:ff:ff
                            inet 204.10.185.68/27 brd 204.10.185.255 scope global eth0
                               valid_lft forever preferred_lft forever
                            inet6 fe50::40c:49ff:fe61:6cda/64 scope link
                               valid_lft forever preferred_lft forever
                        fog@ubuntu:~$
                        

                        thanks

                        Mod edited to use code box.

                        1 Reply Last reply Reply Quote 0
                        • O
                          onenetwork
                          last edited by onenetwork

                          so there is no way to fix client IP and netmask at all?
                          is there a file some where i can edit before update so it can bypass this? thanks all, i really need this to work.

                          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                          • Wayne WorkmanW
                            Wayne Workman @onenetwork
                            last edited by Wayne Workman

                            @onenetwork there is, and it’s easy. I’m not at a computer at the moment - but when I am, I can easily construct a dhcpd.conf file that is exactly what you need - along with changes so fog 1.2.0 no longer overwrites the file. I’ll get it together sometime tonight for you.

                            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!
                            Daily Clean Installation Results:
                            https://fogtesting.fogproject.us/
                            FOG Reporting:
                            https://fog-external-reporting-results.fogproject.us/

                            O 1 Reply Last reply Reply Quote 0
                            • O
                              onenetwork @Wayne Workman
                              last edited by

                              @Wayne-Workman said in how to change netmask and ip range?:

                              @onenetwork there is, and it’s easy. I’m not at a computer at the moment - but when I am, I can easily construct a dhcpd.conf file that is exactly what you need - along with changes so fog 1.2.0 no longer overwrites the file. I’ll get it together sometime tonight for you.

                              Awesome!

                              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                              • Wayne WorkmanW
                                Wayne Workman @onenetwork
                                last edited by Wayne Workman

                                @onenetwork

                                Edit your /opt/fog/.fogsettings file to set the dodhcp and bldhcp like below. Be sure to save.

                                vi /opt/fog/.fogsettings
                                Instructions on using Vi

                                dodhcp='N'
                                bldhcp='0'
                                

                                Then, edit the /etc/dhcp/dhcpd.conf file to contain the below. Notice that option domain-name-servers is commented out with a # because I don’t know your preferred DNS address. If you want to set that, remove the comment and replace the x.x.x.x with the ip address - comma separated for multiple DNS addresses if you want multiple ones.

                                I’ve assumed from one of your below posts:

                                I try to change routeraddress to 255.255.255.224 or 204.10.x.65(gateway)

                                That the proper router address for this subnet is 204.10.185.65, so I’ve excluded this address from the DHCP range, and have defined it as a router option.

                                vi /etc/dhcp/dhcpd.conf

                                option space PXE;
                                option PXE.mtftp-ip    code 1 = ip-address;
                                option PXE.mtftp-cport code 2 = unsigned integer 16;
                                option PXE.mtftp-sport code 3 = unsigned integer 16;
                                option PXE.mtftp-tmout code 4 = unsigned integer 8;
                                option PXE.mtftp-delay code 5 = unsigned integer 8;
                                option arch code 93 = unsigned integer 16; # RFC4578
                                
                                use-host-decl-names on;
                                ddns-update-style interim;
                                ignore client-updates;
                                next-server 204.10.185.68;
                                authoritative;
                                
                                
                                subnet 204.10.185.64 netmask 255.255.255.224 {
                                        option subnet-mask 255.255.255.224;
                                        range dynamic-bootp 204.10.185.66 204.10.185.94;
                                        default-lease-time 21600;
                                        max-lease-time 43200;
                                        #option domain-name-servers x.x.x.x;
                                        option routers 204.10.185.65;
                                 
                                    class "UEFI-32-1" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
                                    filename "i386-efi/ipxe.efi";
                                    }
                                
                                    class "UEFI-32-2" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
                                     filename "i386-efi/ipxe.efi";
                                    }
                                
                                    class "UEFI-64-1" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
                                     filename "ipxe.efi";
                                    }
                                
                                    class "UEFI-64-2" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
                                    filename "ipxe.efi";
                                    }
                                
                                    class "UEFI-64-3" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
                                     filename "ipxe.efi";
                                    }
                                
                                    class "Legacy" {
                                    match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
                                    filename "undionly.kkpxe";
                                    }
                                
                                }
                                host ubuntu {
                                    hardware ethernet 00:0c:19:61:5c:da;
                                    fixed-address 204.10.185.68;
                                }
                                

                                You can copy/paste this into the vi editor as long as you’re in insert mode (see tutorial above). Pasting from windows clipboard into putty is just a right click anywhere in the window - if you’re using putty (which I would highly recommend).

                                After writing the file and closing it, you will need to restart dhcp. On Ubuntu that would be:
                                service dhcpd restart
                                or
                                service dhcpd stop
                                service dhcpd start

                                And to enable dhcpd to start on boot:
                                service dhcpd enable

                                Check the status of the dhcpd daemon on Ubuntu like this:
                                service dhcpd status

                                And - let me know if it works. If not, give me the output of service dhcpd status

                                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!
                                Daily Clean Installation Results:
                                https://fogtesting.fogproject.us/
                                FOG Reporting:
                                https://fog-external-reporting-results.fogproject.us/

                                1 Reply Last reply Reply Quote 0
                                • O
                                  onenetwork
                                  last edited by

                                  Thank you Wayne Workman, it’s working now. also, thank you Quazz.
                                  After copy instruction provided by Wayne Workman, changed boot to Grub style and command out /var/www/fog/lib/fog/BootMenu.class.php line 696 booturl/ipxe/bg.png it is now working perfect. This is awesome!

                                  Wayne WorkmanW 1 Reply Last reply Reply Quote 1
                                  • Wayne WorkmanW
                                    Wayne Workman @onenetwork
                                    last edited by Wayne Workman

                                    @onenetwork said in how to change netmask and ip range?:

                                    changed boot to Grub style and command out /var/www/fog/lib/fog/BootMenu.class.php line 696 booturl/ipxe/bg.png

                                    I wasn’t aware you were having problems with the background image?

                                    Instead of commenting out code, we can help you get it working. It is a separate issue, so I would ask you to make a new thread with details on the fog version, os version, model you’re booting, any relevant network layout information, boot file, efi mode, and any other information that may be relevant.

                                    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!
                                    Daily Clean Installation Results:
                                    https://fogtesting.fogproject.us/
                                    FOG Reporting:
                                    https://fog-external-reporting-results.fogproject.us/

                                    1 Reply Last reply Reply Quote 0
                                    • O
                                      onenetwork
                                      last edited by

                                      Yes, background image is different issue I have learned from previous problem. Again, thank you for your helping with this netmask and IP range problem. Without your help I probably go crazy, LOL.

                                      1 Reply Last reply Reply Quote 0
                                      • 1 / 1
                                      • First post
                                        Last post

                                      167

                                      Online

                                      12.1k

                                      Users

                                      17.3k

                                      Topics

                                      155.3k

                                      Posts
                                      Copyright © 2012-2024 FOG Project