LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Debian DHCP Server (https://www.linuxquestions.org/questions/linux-networking-3/debian-dhcp-server-625197/)

initialdrifteg6 03-02-2008 03:08 PM

Debian DHCP Server
 
I have a debian box with 2 NICs installed:

eth0 -> connected directly to the modem
eth1 -> connected to switch & access point

The clients plugged into the switch and the access point are able to get an IP address from the server, but they do not have access online. Does anyone know what might be causing this issue?

Thanks!

initialdrifteg6 03-02-2008 03:11 PM

BTW. Here is my DHCP configuration file. I hope that this might help.

ddns-update-style none;


default-lease-time 6000;
max-lease-time 72000;

log-facility local7;

# Internal Network
subnet 192.168.0.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.0.1;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
range 192.168.0.10 192.168.0.100;
}

acid_kewpie 03-02-2008 03:54 PM

ok, well can you ping stuff locally? resolve internet sites by dns? ping those sites? are those dhcp details even correct... we have no idea if they are. is dns running on your machine?

initialdrifteg6 03-02-2008 04:25 PM

The client that I'm trying can resolve only the local network. It can not pull up sites via IP. It can not ping the modem or anything. It seems that the DHCP server is working correctly as it's pulling a local nonroutable address from the pool, but the traffic is not being redirected through eth0 (modem plugged into this nic).

********************************************************************
option domain-name-servers 74.128.1.31, 74.128.1.33;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}
**********************************************************************

above is the other DHCP config file i've tried... More condense and easier to read without all the remarks.

acid_kewpie 03-02-2008 04:27 PM

ok, so forget dhcp, seems like it's nothing at all to do with DHCP. is the box set to do ip forwarding and masq'ing? can you ping the name server ip's?

initialdrifteg6 03-02-2008 04:44 PM

i got it working! =)

had to 'apt-get install ipmasq'

i already had the configuration file set up and everything for the NAT. hehe. i suppose it was just that simple!

initialdrifteg6 03-03-2008 03:26 PM

Now that it is working, I would like to change some things around. Below are the two main things I need help with.

What should my DHCP config file look like if I am wanting to deny access to the 192.168.0.0 pool if the MAC address is in the list of hosts?

The rejected MAC address will then pull an IP adress out of a new pool which allows everyone access (10.0.0.0).

The computers in the pool 10.0.0.0 will then be redirected to an external IP address of my choice (www.catsthatlooklikehitler.com).

initialdrifteg6 03-04-2008 06:26 PM

DCHP Server Config File

ddns-updates off;
ddns-update-style interim;
authoritative;
shared-network local {
subnet 192.168.0.0 netmask 255.255.255.0 {
deny unknown-clients;
range 192.168.0.2 192.168.0.10;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 74.128.1.33 , 74.128.1.31;
option broadcast-address 192.168.0.255;
host MacbookPro {
hardware ethernet 00:19:e3:aa:84:aa;
}
host iPhone {
hardware ethernet 00:1c:b3:aa:a3:aa;
}
host blacknight {
hardware ethernet 00:14:6c:aa:9a:aa;
}
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.110;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.1;
allow unknown-clients;

}
}


ifconfig list

debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0a:e6:d7:87:b0
inet addr:74.XX.XX.XX Bcast:74.XX.XX.XX Mask:255.255.248.0
inet6 addr: XX::XX:XX:XX:XX/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2814272 errors:0 dropped:0 overruns:0 frame:0
TX packets:181965 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:565449199 (539.2 MiB) TX bytes:25793954 (24.5 MiB)
Interrupt:12 Base address:0xc400

eth1 Link encap:Ethernet HWaddr 00:a0:cc:5f:dc:2c
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:ccff:fe5f:dc2c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:182768 errors:1 dropped:0 overruns:0 frame:0
TX packets:302542 errors:3 dropped:0 overruns:0 carrier:3
collisions:0 txqueuelen:1000
RX bytes:26037969 (24.8 MiB) TX bytes:402482266 (383.8 MiB)
Interrupt:12 Base address:0xbc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 B) TX bytes:560 (560.0 B)

notes

eth0 is plugged directly into the modem
eth1 is plugged into a switch. the switch has an access point plugged into it

i'm trying to get any computer that is connecting to my network to get assigned an ip address of 192.168.1.x instead of 192.168.0.x but it's not working. instead it's not assigning any ip address.

below is a link to a place i used as a reference for getting this thing configured.
http://www.ex-parrot.com/~pete/upside-down-ternet.html


All times are GMT -5. The time now is 05:07 AM.