Click to See Complete Forum and Search --> : DHCP and static IPs


maggotbrain
10-25-2002, 12:32 PM
hello all
uber newb here

running rh 7.1 . not sure of the developer/release of dhcp but pretty sure it's the one that ships on the cd
how do you add hosts (I guess) so that they will have static IP addresses.
links to howtos are appreciated if u can't be bothered :)
thanks in advance

cowanrl
10-25-2002, 12:43 PM
I'm not sure what you're really looking for so I'll ask you a question.

Are you talking about running a DHCP server? If so, do you want to configure it so that when a computer comes up on the network, it is always assigned the same IP address by the DHCP server?

maggotbrain
10-25-2002, 12:55 PM
no sir.
I have a RH 7.1 box which hands out the addys. I want to assign static IPs to two machines
is it a matter of editing a fie (which file?) then stopping then starting the daemon?
after which I'd manually configure ip on the two machines that need static ips??


danke

cowanrl
10-25-2002, 01:38 PM
Originally posted by maggotbrain
no sir.
I have a RH 7.1 box which hands out the addys. I want to assign static IPs to two machines
is it a matter of editing a fie (which file?) then stopping then starting the daemon?

If by this you mean starting and stopping the dhcpd daemon, you don't need to modify any configuration files or start and stop that daemon.

after which I'd manually configure ip on the two machines that need static ips??

This is all you would have to do to change the machines from DHCP to static IP addresses. Are they Linux machines or Windows?


danke

maggotbrain
10-25-2002, 02:13 PM
one address is for a copier/fax/scanner/printer and the other is for a w2k box that will route the scan jobs to the user's pc

on stopping/starting dhcp
what are the commands to do this?
again, not sure of the release/development, but the daemon file name in /etc is dhcpd. the conf file is dhcpd.conf.

appreaciate your help.

cowanrl
10-25-2002, 02:36 PM
Well, since you're on Red Hat, you should be able to start and stop dhcpd as root with:

service dhcpd stop
and
service dhcpd start

You can also do a:

service dhcpd restart

You would change the IP address from DHCP to static on the Win2k machine on the TCP/IP properties page. I've done it but I don't have a Win2k machine in front of me right now. I think you can right click on Network Neighborhood or Network Connections or something like that and select properties.

As far as your copier/fax/scanner/printer, you'll probably have to get the manual for that one. Some have an LCD screen where you can do it from a menu on the machine itself. Some have a web interface. Some need software running on the PC to connect to it and configure it. I can't help with that one.

The Whizzard
10-25-2002, 02:53 PM
If you have the MAC address for the two, then:
host pc1 {
hardware ethernet 00:aa:bb:cc:dd:01;
fixed-address 192.168.0.251;
}

host pc2 {
hardware ethernet 00:aa:bb:cc:dd:02;
fixed-address 192.168.0.252;
}

The above example will assign 192.168.0.251 to pc1 and 192.168.0.252 to pc2.

If you don't have the MAC address, then use two scopes and manually set the network config on those two devices:

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.200;
range 192.168.0.210 192.168.0.250;
}

The above example has 192.168.0.1, 192.168.0.201 through 192.168.0.209 and 192.168.0.251 through 192.168.0.254 free for static addresses.

Or you can just use a single scope which doesn't take up the entire range of IP addresses. Then manually set the network config using IP addresses which aren't in the scope:


subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.2 192.168.0.250;
}


With the above example you can use 192.168.0.1 and 192.168.0.251 through 192.168.0.254.