[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Make a DHCP server using Fedora - Help



--- On Sun, 11/16/08, Marko Vojinovic <vvmarko panet rs> wrote:

> From: Marko Vojinovic <vvmarko panet rs>
> Subject: Re: Make a DHCP server using Fedora - Help
> To: fedora-list redhat com, olivares14031 yahoo com
> Date: Sunday, November 16, 2008, 4:49 PM
> Antonio and others, I'm writing the stuff below off the
> top of my head --- 
> please feel free to correct me if necessarry, I may have
> slipped here or 
> there... ;-)
> 
> On Sunday 16 November 2008 20:52, Antonio Olivares wrote:
> > I changed DHCPDARG=eth0 as was suggested, but not
> working.
> 
> I missed this part. Where did you put this?
I had changed back and forth between eth0 and eth1 and now it is and should be eth0 :) 

[root localhost ~]# cat /etc/sysconfig/dhcpd
DHCPDARGS=eth0

> 
> > The original machine gets its ip from a central server
> and then I want to
> > use it as a server for several machines in my
> classroom.
> >
> > It connects to 10.154.19.210 which is its address in
> the "BIG" network.  it
> > gets DNS 10.154.16.130, 10.128.0.4 and gateway
> 10.154.19.1
> 
> Ok. I suggest the following setup. Get the cable coming
> from the "big" network 
> and plug it into your eth0. Then, take a small
> hub/switch/router/whatever and 
> connect your classroom computers to it (I guess this is
> already set up). Make 
> sure that *no* cable connects your hub to the
> "big" network. Instead, connect 
> the hub to the eth1 of your server. Your server should be
> the only link 
> between the big network and classroom network.
> 
> Leave eth0 configuration for later.
> 
> Configure eth1 device to have a *static* (manually
> assigned) IP address, 
> say, 192.168.0.1 with netmask 255.255.255.0 and bring it
> up. Do this using 
> "system-config-network" interface and running
> "service network restart". Make 
> sure there is nothing related to NetworkManager active in
> the setup.
> 
> Next, configure dhcpd.conf in the following (most
> elementary) way, for the 
> time being:
> 
> ###########################
> default-lease-time 21600; #600
> max-lease-time 43200;     #7200
> ddns-update-style none;
> authoritative;
> 
> subnet 10.154.19.0 netmask 255.255.255.0 {
> } # this means don't do anything with the big network
> 
> subnet 192.168.0.0 netmask 255.255.255.0 {
> option routers 192.168.0.1  # your server is the router for
> classroom
> option subnet-mask 255.255.255.0  # the mask given to
> classroom
> option domain-name-servers 10.154.16.130, 10.128.0.4; # dns
> servers
> range 192.168.0.2 192.168.0.254  # the pool of addresses
> for classroom
> }
> ###########################
> 
> Save, do a "service dhcpd restart" (it should say
> OK), then
> "tail -f /var/log/messages" and watch what is
> going on. Restart the clients 
> (one by one if you wish to examine /var/log/messages after
> each client, 
> otherwise you may restart them all simultaneously :-)...).
> 
> [[ N.B. I suppose you have configured the clients to use
> dhcp and not have 
> anything statically assigned... ]]
> 
> What should be going on is that the clients in the
> classroom ask for IP 
> configuration (dhcp request), then dhcpd replies with the
> data above (dhcp 
> offer) and then each client accepts this offer. If all goes
> well, up to this 
> point each client should have a 192.168.0.* IP assigned
> dynamically, and be 
> able to ping any other client with such address, as well as
> the server, 
> 192.168.0.1. If this doesn't happen, tell us what does
> happen.
> 
> If all is well, up to now you have a working dhcpd
> configuration and each 
> client has an IP assigned. In /var/lib/dhcp/dhcpd.leases
> you have a list 
> stating which client (distinguished by its MAC address) has
> which IP assigned 
> to it. The leases file may have some stale/old/obsolete
> information (because 
> you have been playing with dhcpd before) --- ignore it,
> look at the bottom of 
> the file, where fresh information is stored.
> 
> The next step is to configure NAT (network address
> translation) on your 
> server's firewall, in order to allow the clients to
> access the "big" network 
> using your server as a router. But this is a different
> problem --- first make 
> sure the above configuration works, and then we'll go
> to the NAT 
> configuration after that. One step at a time. ;-)
> 
> HTH, :-)
> Marko

I will sure try this and hopefully it will work.  I will report back.

Thank you for your help as well :)

Regards,

Antonio 


      


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]