Author Topic: Problem with DHCP  (Read 1838 times)

newbie618

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Problem with DHCP
« on: July 22, 2008, 05:16:37 am »
Hi,

I have installed 2 ebox.  One of them, the DHCP works properly. Another ebox does not work.  The DHCP server does give an ip address but does not give the DNS server address with the IP address.  In addition,  we usually have to boot it 3 to 4 times to get internet and internal address working.

Can someone help me?

Thanks

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #1 on: July 22, 2008, 11:50:12 am »
Could you post the content of the following file:

Code: [Select]
/etc/dhcp3/dhcpd.conf

newbie618

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #2 on: July 23, 2008, 02:25:56 am »
Hi,

The /etc/dhcp3/dhcpd.net is as follow

# extra options
# RFC3442 routes
option rfc3442-classless-static-routes code 121 = array of integer 8;
# MS routes
option ms-classless-static-routes code 249 = array of integer 8;

ddns-update-style none;



default-lease-time 1800;
max-lease-time 7200;




shared-network eth1 {

   option routers 192.168.2.1;

        default-lease-time 1800;
        max-lease-time 7200;



   subnet 192.168.2.0 netmask 255.255.255.0 {
      range 192.168.2.101 192.168.2.199;
        }


}

When rebooting the ebox server, it takes 3 to 4 times for it to boot with internal ip and external ip

/etc/network/interfaces:

auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet static
   address 192.168.2.1
   netmask 255.255.255.0
   broadcast 192.168.2.255

Would you need other information?

Thanks


javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #3 on: July 23, 2008, 12:32:43 pm »
Ok it seems share-network-eth1 lacks a "option domain-name-servers" option.

Please go to the eBox interface, DHCP->interface eth1 and check Common Options->primary domain server

newbie618

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #4 on: July 24, 2008, 12:13:31 am »
Thanks.  By activating DNS then going to DHCP to use internal ebox DNS, the DHCP server seems to work.

I am still having problem accessing the internal network during reboot.  When we reboot the ebox, the system cannot be accessed internally and the server cannot ping to the internal network.  In addition, the external network cannot get an ip address from a DHCP server. 

I have to reboot in average about 2 times to get internal address.  If there is no external ip, then I restart the network at the ebox. 

There must be some problem with the configuration I have created, since both ebox does the same.  What can I show you so that you can help me out?

Thanks

javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #5 on: July 24, 2008, 12:43:07 pm »
Cool, baby steps and we'll have everything working ok :)

Please, post the content of the following file:

Code: [Select]
/etc/network/interfaces

And when you restart the machine, right after the boot process is done, please check what  the following command outputs:

Code: [Select]
ifconfig -a




newbie618

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #6 on: July 30, 2008, 02:50:50 am »
Hi,

Here is the interface file:

auto lo eth0 eth1
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet static
   address 192.168.2.1
   netmask 255.255.255.0
   broadcast 192.168.2.255

Here is ifconfig -a ==> 1st reboot does not work

eth0      Link encap:Ethernet  HWaddr 00:1f:c6:a9:39:f4 
          inet addr:70.79.103.241  Bcast:255.255.255.255  Mask:255.255.252.0
          inet6 addr: fe80::21f:c6ff:fea9:39f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3419 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:210037 (205.1 KB)  TX bytes:3190 (3.1 KB)
          Interrupt:254 Base address:0x4000

eth1      Link encap:Ethernet  HWaddr 00:c0:26:56:fc:53 
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::2c0:26ff:fe56:fc53/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:69 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6322 (6.1 KB)  TX bytes:1476 (1.4 KB)
          Interrupt:20 Base address:0xce00

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:229 errors:0 dropped:0 overruns:0 frame:0
          TX packets:229 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:45832 (44.7 KB)  TX bytes:45832 (44.7 KB)

tap0      Link encap:Ethernet  HWaddr 00:ff:9b:3e:3b:f4 
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::2ff:9bff:fe3e:3bf4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:3740 (3.6 KB)



Here is ifconfig -a ==> 2nd reboot does not work

eth0      Link encap:Ethernet  HWaddr 00:1f:c6:a9:39:f4 
          inet addr:70.79.103.241  Bcast:255.255.255.255  Mask:255.255.252.0
          inet6 addr: fe80::21f:c6ff:fea9:39f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3373 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:204351 (199.5 KB)  TX bytes:3186 (3.1 KB)
          Interrupt:254 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:c0:26:56:fc:53 
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::2c0:26ff:fe56:fc53/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3319 (3.2 KB)  TX bytes:4713 (4.6 KB)
          Interrupt:20 Base address:0xce00

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:181 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:37186 (36.3 KB)  TX bytes:37186 (36.3 KB)

Here is ifconfig -a ==> last reboot does work but have to do /etc/init.d/networking restart to obtain internet on eht0

eth0      Link encap:Ethernet  HWaddr 00:1f:c6:a9:39:f4 
          inet addr:70.79.103.241  Bcast:255.255.255.255  Mask:255.255.252.0
          inet6 addr: fe80::21f:c6ff:fea9:39f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3068 errors:0 dropped:0 overruns:0 frame:0
          TX packets:151 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:199990 (195.3 KB)  TX bytes:13501 (13.1 KB)
          Interrupt:254 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr 00:c0:26:56:fc:53 
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::2c0:26ff:fe56:fc53/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5520 (5.3 KB)  TX bytes:7117 (6.9 KB)
          Interrupt:20 Base address:0xce00

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:682 errors:0 dropped:0 overruns:0 frame:0
          TX packets:682 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:100689 (98.3 KB)  TX bytes:100689 (98.3 KB)

Thanks for your help.  This one I have to reboot about 20x for 0.75 hours in order for me to get an internal ip address; then I can do a network restart to obtain internet. 


jcanfield

  • Zen Monk
  • **
  • Posts: 89
  • Karma: +2/-0
    • View Profile
Re: Problem with DHCP
« Reply #7 on: August 05, 2008, 05:10:03 am »
Ummm...you realize you have your VPN (tap0) in the same subnet.  Could be a problem.
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius...and a lot of courage - to move in the opposite direction."  --  Albert Einstein

newbie618

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Problem with DHCP
« Reply #8 on: August 06, 2008, 08:30:40 pm »
Thanks for your help.

Even with the OpenVPN server and client inactive.  It seems to be a problem. I am new to the VPN and probably did not enter it correctly, so I did not activate them.

First, I deactivate the module, but that did not work.

I have to actually delete the inactive VPN server and client.  Finally, first boot gives me networking.

Again thanks