PDA

View Full Version : Cannot start dhcp


anilbh
24th July 2006, 05:20 AM
I have followed the instructions in Christopher Negus' Linux Bible for FC4 . Still I cannot get DHCP to start . What can I check ? :confused:

brunson
24th July 2006, 05:26 AM
How about the log file?

Shobhit_Jain
24th July 2006, 10:56 AM

u can try this....
1. on console, type "setup"
2. select Network Configuration
3. Select the option which says u want to configure the ip address dynamically,

I think that should work. If not,
go to file "/etc/sysconfig/network-scripts/ifcfg-eth0" (or whatever ethernet name u have for the ethernet card.) eth1 / eth2
change "BOOTPROTO=dhcp"

now type service network restart

that should do the job.

anilbh
24th July 2006, 12:37 PM
u can try this....
1. on console, type "setup"
2. select Network Configuration
3. Select the option which says u want to configure the ip address dynamically,

I think that should work. If not,
go to file "/etc/sysconfig/network-scripts/ifcfg-eth0" (or whatever ethernet name u have for the ethernet card.) eth1 / eth2
change "BOOTPROTO=dhcp"

now type service network restart

that should do the job.
Thank you .
Will check the log file too.

anilbh
24th July 2006, 01:07 PM
Did not do the job . I have 2 cards one for connecting to the broadband and the other for the network . That could be a problem . Will check messages. I have forgotten what to do . Wil dmesg bring the error message?

Shobhit_Jain
25th July 2006, 04:14 AM
Hi Anilbh,

Make sure that you have connected the correct cable to proper interface. When u reinstall Linux, the system changes the names of the interfaces. So it might happen that eth0 of previous OS gets new name eth1 and vice versa.

what is the ip address that u r giving to the two cards.
Make sure that the ip address given to the two cards are in different network.

The log messages are found in /var/log/messages

anilbh
25th July 2006, 08:00 AM
Hi Anilbh,

Make sure that you have connected the correct cable to proper interface. When u reinstall Linux, the system changes the names of the interfaces. So it might happen that eth0 of previous OS gets new name eth1 and vice versa.

what is the ip address that u r giving to the two cards.
Make sure that the ip address given to the two cards are in different network.

The log messages are found in /var/log/messages
The Hardware is fine as the network is OK with win xp .

Using SETUP the problem was that it just assumed that eth0 was the Interface to the network . Eth0 is for the Broadband modem. Eth1 is for the network . I think I omitted a few things in the DHCPD.conf file will try that too . The messages do not seem to contain anything with regards to DHCP.

Shobhit_Jain
25th July 2006, 12:55 PM
If u r not sure which ethernet card connects to Modem or Netowrk, try the same after swapping the cables. I think this should solve the problem.....

anilbh
25th July 2006, 01:58 PM
If u r not sure which ethernet card connects to Modem or Netowrk, try the same after swapping the cables. I think this should solve the problem.....
Will try swapping .
But the broadband is working fine .
The extra card which I put in is set to eth0 . The built in card is eth1 .
Will post back ... Thank you .
I will get to know which card the broadband is connected to by deactivating the devices one by one .

anilbh
26th July 2006, 03:49 AM
How about the log file?

These are the last lines after using dmesg , and after doing "service dhcpd start".

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth1: link up, 10Mbps, half-duplex, lpa 0x0000
eth0: no IPv6 routers present
eth1: no IPv6 routers present
audit(1153881716.003:27): avc: denied { write } for pid=6459 comm="pppd" name="ip_dynaddr" dev=proc ino=-268435311 scontext=user_u:system_r:pppd_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file
audit(1153881716.363:28): avc: denied { use } for pid=6498 comm="nscd" name="null" dev=tmpfs ino=1248 scontext=user_u:system_r:nscd_t:s0 tcontext=user_u:system_r:pppd_t:s0 tclass=fd

anilbh
26th July 2006, 03:52 AM
these are the lines in the messages file .
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth1: link up, 10Mbps, half-duplex, lpa 0x0000
eth0: no IPv6 routers present
eth1: no IPv6 routers present
audit(1153881716.003:27): avc: denied { write } for pid=6459 comm="pppd" name="ip_dynaddr" dev=proc ino=-268435311 scontext=user_u:system_r:pppd_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file
audit(1153881716.363:28): avc: denied { use } for pid=6498 comm="nscd" name="null" dev=tmpfs ino=1248 scontext=user_u:system_r:nscd_t:s0 tcontext=user_u:system_r:pppd_t:s0 tclass=fd

anilbh
26th July 2006, 03:57 AM
The reason I need DHCP is this . :cool:
The network works fine using XP . I assume XP uses DHCP . Now when I use LINUX I still want access to the clients without configuring the clients ( otherwise they may not work with XP - and XP provides no information for tinkering :p ).

anilbh
26th July 2006, 01:45 PM
Getting somewhere ...Used the logviewer to view the log :
Jul 26 18:09:13 localhost dhcpd: Internet Systems Consortium DHCP Server V3.0.3-RedHat
Jul 26 18:09:13 localhost dhcpd: Copyright 2004-2005 Internet Systems Consortium.
Jul 26 18:09:13 localhost dhcpd: All rights reserved.
Jul 26 18:09:13 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Jul 26 18:09:13 localhost dhcpd: /etc/dhcpd.conf line 6: expecting allow/deny key
Jul 26 18:09:13 localhost dhcpd: ignore client-update;
Jul 26 18:09:13 localhost dhcpd: ^
Jul 26 18:09:13 localhost dhcpd: /etc/dhcpd.conf line 6: expecting a parameter or declaration
Maybe I can do something myself..

anilbh
26th July 2006, 02:27 PM
Managed to start DHCPd . Now will it work is another story.

The problem was in the /etc/dhcp.conf file .

ignore client-updates;
was spelt as
ignore client-update;

it seems you can give an option about which NIC to use eth0 or eth1 on the command line .
How can that be done in system-config-services? :cool:

anilbh
27th July 2006, 02:52 AM
Now I can see the Linux computer on the WIN98 client ( XP is on this commputer. )
Can also browse the Linux shared directory.
However
1. the Windows computer is still not visible from the Linux computer. :confused:
2. I thought the IP address would be within the range specified in the dhcpd.conf file . This is 192.168.0.0 --- 192.168.0.25. However the address is something like 67.xx.xx.xx. Where did this come from ? :(

Maybe I have got some Samba setting wrong ? :cool: