Linux - NetworkingThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a sever with two nics. eth0 and eth1. on eth0 i get the internet conection and it's ip is asigned by dhcp, on eth1 i want to make a dhcp server that asigns ips on the subnetwork.
if i stop eth0 and start dhcp and then start eth0 it works just fine. but if eth0 is up and i start dhcp i get in /var/log/syslog the following error message(and dhcp doesn't start)
Code:
Aug 11 14:50:50 marlboro dhcpd: No subnet declaration for eth0 (192.168.10.108).
Aug 11 14:50:50 marlboro dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Aug 11 14:50:50 marlboro dhcpd: network segment to which interface eth0 is attached.
Aug 11 14:50:50 marlboro dhcpd: exiting.
Ok, this is just a wild guess... how is your network set up? What device are each of these ethernet interfaces connected to?
I'm imagining that they're both connected to, say, a switch. There's another device connected to the switch, a cable modem perhaps, which is acting as a dhcp server, assigning a 192.168.10.108 ip address to eth0.
You fire up dhcpd on eth1, but eth0 still has an IP address from the previous dhcp server. If you do an ifdown and on eth0, eth0 then releases from the previous DHCP server, and on ifup aquires a 10.x.x.x address from your DHCP server.
i get the internet conection from my isp on eth0. this nics ip is set by the dhcp of the isp. i have on the server another nic eth1. i want to run on the server a dhcp server that works only on eth1 and sets the ips for the hosts that connect to eth1 via a switch
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.