Page 1 of 4
adding a dhcp subnetwork
Posted: 2010/04/07 20:17:44
by hoodcanaljim
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
Re: adding a dhcp subnetwork
Posted: 2010/04/08 05:37:20
by yyagol
Yes you can , its very simple thing to do
follow http://www.centos.org/docs/5/html/5.2/Deployment_Guide/ch-dhcp.html
Re: adding a dhcp subnetwork
Posted: 2010/04/08 13:47:41
by hoodcanaljim
Thanks
I'll check out the info.
Jim
Re: adding a dhcp subnetwork
Posted: 2010/04/08 20:58:39
by hoodcanaljim
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]
192.168.1.1 -----|
|
192.168.1.7 -----| eth0
-----| eth1 192.168.2.1 --- DHCP server
[/code]
////////////////////////
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]
## 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;
}
[/code]
///////////////////////////
# this appears in dhcp.lease (it appears about 6 times with exactly the same info)
# the hardware address is the HDTV box.
[code]
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`?";
[/code]
///////////
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.]
Re: adding a dhcp subnetwork
Posted: 2010/04/09 05:46:53
by chuina
[quote]hoodcanaljim wrote:
///////////////////////////////
dhcp.conf[/quote]
The conf filename is [b]/etc/dhcpd.conf[/b]
After configuring the dhcpd.conf run
[code]service dhcpd configtest
service dhcpd restart[/code]
Also check [b]/var/log/messages[/b] for infos.
adding a dhcp subnetwork
Posted: 2010/04/09 13:23:28
by gerald_clark
Your config file is mixing 192.168.1 and 192.168.2 networks.
Re: adding a dhcp subnetwork
Posted: 2010/04/09 14:29:41
by hoodcanaljim
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
Re: adding a dhcp subnetwork
Posted: 2010/04/09 14:37:23
by chuina
[quote]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??[/quote]
They ought to set according to your dhcp-service's IP. i.e. eth1 192.168.2.1 --- DHCP server. 192.168.2.1
Re: adding a dhcp subnetwork
Posted: 2010/04/09 15:01:33
by hoodcanaljim
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
Re: adding a dhcp subnetwork
Posted: 2010/04/09 19:20:25
by hoodcanaljim
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