adding a dhcp subnetwork

Issues related to configuring your network

adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/07 20:17:44

Hi

I have an existing home network with fixed ip's. I'd like to connect a "dish network" HDTV box into the network but it can't use fixed ip's. So is it possible to use one of my computers and setup a DHCP subnetwork??

Thanks
Jim
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Re: adding a dhcp subnetwork

Postby yyagol » 2010/04/08 05:37:20

Yes you can , its very simple thing to do
follow http://www.centos.org/docs/5/html/5.2/D ... -dhcp.html
yyagol
 
Posts: 1015
Joined: 2006/06/10 18:27:44
Location: 32 4′N 34 47′E

Re: adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/08 13:47:41

Thanks

I'll check out the info.


Jim
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Re: adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/08 20:58:39

Hi

Well I followed the info at the link and the "man" pages and have it running but so far I haven't been able to get a connection. I tried omshell but always get this

omshell
> server 192.168.2.1
> port 7911
> connect
dhcpctl_connect: connection refused

//////////////////////

My network looks like this.

Code: Select all
192.168.1.1 -----|
                 |
                   192.168.1.7 -----|  eth0
                               -----|  eth1  192.168.2.1 ---  DHCP server


////////////////////////

ifconfig

eth1 Link encap:Ethernet HWaddr 00:12:17:54:38:B9
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::212:17ff:fe54:38b9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62 errors:0 dropped:0 overruns:0 frame:0
TX packets:190 errors:3 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:1000
RX bytes:19748 (19.2 KiB) TX bytes:27593 (26.9 KiB)
Interrupt:169 Base address:0xcc00

///////////////////////////////
dhcp.conf
Code: Select all
## copied from /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample  8apr10
ddns-update-style interim;
ignore client-updates;

subnet 192.168.2.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.1.1;
        option subnet-mask              255.255.255.0;
        default-lease-time 21600;
        max-lease-time 43200;
        option nis-domain               "light.org";
        option domain-name-servers      192.168.1.1;
        option broadcast-address        192.168.2.255;

# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
        option netbios-node-type 2;

        range dynamic-bootp 192.168.2.2 192.168.2.21;

}

///////////////////////////

# this appears in dhcp.lease (it appears about 6 times with exactly the same info)
# the hardware address is the HDTV box.
Code: Select all
lease 192.168.2.21 {
  starts 4 2010/04/08 20:34:37;
  ends 5 2010/04/09 02:34:37;
  binding state active;
  next binding state free;
  hardware ethernet 00:24:af:bd:60:3f;
  uid "\001\000$\257\275`?";

///////////


I've stared at this so long I can no longer see the forest for the trees. So I will take a break and try again tomorrow.
If you see something out of place please let me know.

Thanks
Jim
[Moderator edit: Added additional code tags to preserve formatting.]
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Re: adding a dhcp subnetwork

Postby chuina » 2010/04/09 05:46:53

hoodcanaljim wrote:
///////////////////////////////
dhcp.conf

The conf filename is /etc/dhcpd.conf

After configuring the dhcpd.conf run
Code: Select all
service dhcpd configtest
service dhcpd restart


Also check /var/log/messages for infos.
chuina
 
Posts: 355
Joined: 2009/12/11 10:25:56

adding a dhcp subnetwork

Postby gerald_clark » 2010/04/09 13:23:28

Your config file is mixing 192.168.1 and 192.168.2 networks.
gerald_clark
 
Posts: 9513
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/09 14:29:41

chuina

Sorry that was a mis-spelling error. The file name is dhcpd.conf




gerald_clark

I must be confused about how to definite "option routers 192.168.1.1;" and "option domain-name-servers 192.168.1.1;"
I thought they should be the same as the 198.168.1 network.
What should they be set to??


Thank you both for your help

Jim
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Re: adding a dhcp subnetwork

Postby chuina » 2010/04/09 14:37:23

hoodcanaljim wrote:
I must be confused about how to definite "option routers 192.168.1.1;" and "option domain-name-servers 192.168.1.1;"
I thought they should be the same as the 198.168.1 network.
What should they be set to??


They ought to set according to your dhcp-service's IP. i.e. eth1 192.168.2.1 --- DHCP server. 192.168.2.1
chuina
 
Posts: 355
Joined: 2009/12/11 10:25:56

Re: adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/09 15:01:33

chuina


I made those changes and now the HDTV box shows the ip addr, net mask, and primary dns
But I am afraid I still am missing something. Do I need to be running anything other then dhcpd to make the dns and routing work??

Sorry I have to leave now and wont be back for sometime.

Jim
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Re: adding a dhcp subnetwork

Postby hoodcanaljim » 2010/04/09 19:20:25

Hi

Well I started trying to find a way to enable ping through out the network. I setup shorewall and iptables and now can ping the HDTV from anywhere in the network. So I am getting closer.

Jim
hoodcanaljim
 
Posts: 220
Joined: 2006/02/05 17:49:10

Next

Return to CentOS 5 - Networking Support

Who is online

Users browsing this forum: No registered users and 0 guests