Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
02-13-2009, 10:23 AM
#1
Member
Registered: Jan 2006
Posts: 70
Rep:
DHCP on CentOs 5.2 with 2 NICs Help
Hi guys.
im running Centos 5.2 with dual nics, and cant get dicpd to start.
here is my ifconfig.
Code:
eth1 Link encap:Ethernet HWaddr 00:11:43:5A:61:47
inet addr:175.9.159.40 Bcast:175.9.159.47 Mask:255.255.255.240
inet6 addr: fe80::211:43ff:fe5a:6147/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:70072 errors:0 dropped:0 overruns:0 frame:0
TX packets:60326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7542665 (7.1 MiB) TX bytes:8727357 (8.3 MiB)
Interrupt:193
eth2 Link encap:Ethernet HWaddr 00:04:23:B3:AF:9C
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:23ff:feb3:af9c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23983 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8921931 (8.5 MiB) TX bytes:12305 (12.0 KiB)
Base address:0xccc0 Memory:fcda0000-fcdc0000
the eth1 goes to my router, then i want eth2 to go to the switch where the dhcp clients will connect to.
dhcpd.conf is:
Code:
subnet 192.168.1.100 netmask 255.255.255.0 {
range 192.168.1.101 192.168.1.253;
default-lease-time 43200;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.100;
option domain-name-servers 68.87.74.162, 68.87.68.162;
option domain-name "candela.com";
var/log/messages shows:
Code:
Feb 13 11:13:09 candela dhcpd: /etc/dhcpd.conf line 3: subnet 192.168.1.100 netmask 255.255.255.0: bad subnet number/mask combination.
Feb 13 11:13:09 candela dhcpd: subnet 192.168.1.100 netmask 255.255.255.0
any help will greatly be appreciated.
thanks!
Last edited by xtremeclones; 02-13-2009 at 10:40 AM .
02-13-2009, 12:37 PM
#2
Member
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Rep:
In dhcpd.conf, change:
subnet 192.168.1.100 netmask 255.255.255.0 {
to:
subnet 192.168.1.0 netmask 255.255.255.0 {
02-25-2009, 03:51 PM
#3
Member
Registered: Jan 2006
Posts: 70
Original Poster
Rep:
IT works!
Just got back from trip and intered what Captn recommended.
this worked well now whatever i put on that switch gets the IP correctly.
the issue i have now is that the systems cant reach the outside network, meaning i have no internet.
i did from an windows system an ipconfig /all and the system has a valid 192.168 IP along with the correct DNS, but it cant ping an external ip or yahoo.com.
i also tried disabling the firewall and still nothing happened.
what am i missing?
thanks.
02-25-2009, 04:32 PM
#4
Member
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Rep:
make sure the firewall is routing packets:
as root:
echo 1 > /proc/sys/net/ipv4/ip_forward
make sure you have a NAT rule in iptables to do the network address translation. something like:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(you might have to do some research on this last one as it's off the top of my head) I'll check back later to see the results and help more if needed.
02-25-2009, 04:32 PM
#5
Member
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Rep:
oh, and it's admiral, not captain. LOL
02-25-2009, 05:53 PM
#6
Member
Registered: Jan 2006
Posts: 70
Original Poster
Rep:
Quote:
Originally Posted by
Admiral Beotch
oh, and it's admiral, not captain. LOL
LOL sorry Admiral.
ill try that in the iptables.
02-25-2009, 06:04 PM
#7
Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
FWIW, CentOS doesn't require a manual entry in /proc/sys/net/ipv4/ip_forward, but uses the method described here
http://wiki.centos.org/TipsAndTricks/IPForwarding .
The former method still works (and is what I use on my boxes in fact), but I thought I'd let you know.
02-25-2009, 06:06 PM
#8
Member
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Rep:
g2k, thanks!
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 05:18 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News