LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Got troubles by using IP addresses (statics and DHCP) (https://www.linuxquestions.org/questions/linux-newbie-8/got-troubles-by-using-ip-addresses-statics-and-dhcp-832748/)

amhma 09-17-2010 01:37 AM

Got troubles by using IP addresses (statics and DHCP)
 
Hi everybodies,

I've got some problems.
First I would like to introduce myself; My name is Myo. My work is Network Professional in HORIZON International School in Yangon, Myanmar.

In this school, use SUSE Server and made it by DHCP but in my hand I changed many rules. All are OK at the start but now they requested that they who are principal, and vice principals are want to use the Internet without filtering.
So I've made new rules by using Webmin software to control the SUSE Server.
1st I've gave static IP from LAN x.x.x.40 to x.x.x.45.
2nd IP is x.x.x.12 to x.x.x.15.
At First, there's nothing happen but now I've got problems because Server gave DHCP so that Server gives IP itself and conflict with static IPs. And also I can't find in Webmin software how to disable the DHCP Assign.
Please reply me as possible as.
Thanks by Myo

prayag_pjs 09-17-2010 01:39 AM

Hi,

Please frame your question properly , we can't understand

vinaytp 09-17-2010 02:05 AM

Little difficult to understand your problem amhma.

Check the network configuration files under /etc/sysconfig/network

Make BOOTPROTO parameter set to static in /etc/sysconfig/network/ifcfg-eth0 file, if you do not want to get IP from local DHCP server.

sem007 09-17-2010 02:22 AM

Quote:

Originally Posted by amhma (Post 4100218)
Hi everybodies,

I've got some problems.
First I would like to introduce myself; My name is Myo. My work is Network Professional in HORIZON International School in Yangon, Myanmar.

In this school, use SUSE Server and made it by DHCP but in my hand I changed many rules. All are OK at the start but now they requested that they who are principal, and vice principals are want to use the Internet without filtering.
So I've made new rules by using Webmin software to control the SUSE Server.
1st I've gave static IP from LAN x.x.x.40 to x.x.x.45.
2nd IP is x.x.x.12 to x.x.x.15.
At First, there's nothing happen but now I've got problems because Server gave DHCP so that Server gives IP itself and conflict with static IPs. And also I can't find in Webmin software how to disable the DHCP Assign.
Please reply me as possible as.
Thanks by Myo

First wel-come to LQ.

You question is create confusion.

Is your school network have static ip or DCHP?
Do you want to give static ip or from DHPC?

If you want to use DHCP in client machine.

If you want to use static for all and DHCP for couple of machine you can exclude ip range or bind mac address in dhcp server.( i assume you create DHCP for couple of users)

Please clarify your question so some one can help you.

Regards,

amhma 09-18-2010 04:31 PM

Thanks for reply me what is happening of my questions.

My school is using both DHCP and Static.
so I've got problems with conflict IP.
How can I solve this problems.
Please be patient to read and reply me.
For Examples; 3 of the static IP want to use as non filtering.
But by using DHCP It will going to be IP conflict again.
So I need to know how can I disable the DHCP Server from
SUSE Server and I also want to know How Can I do it in easy
way such like using Webmin software.

Thanks for assists me
Myo Htet Min

chrism01 09-18-2010 11:30 PM

I don't know how you'd do that in Webmin, but you can easily edit the dhcp.conf file to specify ranges and static IPs so that they don't overlap. See examples 20.4, 20.5 http://www.linuxtopia.org/online_boo...ng-server.html

prayag_pjs 09-19-2010 01:42 PM

bind mac address to IP in dhcpd.conf file


ExAMPLE DHCPD.CONF FILE :


Code:

ddns-update-style interim;                                  # Required for dhcp 3.0+ / Red Hat 8.0+
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

        range 192.168.1.128 192.168.1.254;                  # Range of IP addresses to be issued to DHCP clients
          option subnet-mask              255.255.255.0;    # Default subnet mask to be used by DHCP clients
          option broadcast-address        192.168.1.255;    # Default broadcastaddress to be used by DHCP clients
          option routers                  192.168.1.1;      # Default gateway to be used by DHCP clients
          option domain-name              "your-domain.org";
          option domain-name-servers      40.175.42.254, 40.175.42.253;          # Default DNS to be used by DHCP clients
          option netbios-name-servers    192.168.1.100;    # Specify a WINS server for MS/Windows clients.
                                                            # (Optional. Specify if used on your network)

#        DHCP requests are not forwarded. Applies when there is more than one ethernet device and forwarding is configured.
#      option ipforwarding off;

        default-lease-time 21600;                            # Amount of time in seconds that a client may keep the IP address
        max-lease-time 43200;

        option time-offset              -18000;              # Eastern Standard Time
#      option ntp-servers              192.168.1.1;        # Default NTP server to be used by DHCP clients
#      option netbios-name-servers    192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless you understand Netbios very well
#      option netbios-node-type 2;

        # We want the nameserver "ns2" to appear at a fixed address.
        # Name server with this specified MAC address will recieve this IP.

        host ns2 {
                next-server ns2.your-domain.com;
                hardware ethernet 00:02:c3:d0:e5:83;
                fixed-address 40.175.42.254;
        }

        # Laser printer obtains IP address via DHCP. This assures that the
        # printer with this MAC address will get this IP address every time.

        host laser-printer-lex1 {
                hardware ethernet 08:00:2b:4c:a3:82;
                fixed-address 192.168.1.120;

        }
}



All times are GMT -5. The time now is 08:18 AM.