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 one DHCP Server and four networks. The four networks are 10.191.41.X/24
10.191.42. X/24, 10.191.43.X/24 and 10.191.44.X/24. My DHCP server is on 10.191.41.X network that need to supply IPs for all networks. How I need to configure the DHCP server? What is the IP I need to keep for my DHCP server? Those networks are I divided on my switch in one interface with Virtual IP. All the networks connected in a single interface in my switch. Please help me out this problem?
You need to configure 4 scopes on the server, one for each subnet. You then need to configure the L3switch or router you are using to get between the subnets to forward DHCP/BOOTP packets to the server.
On a Cisco switch you go into the Vlan interface where the ip address is and enable bootp helper with the address of the server. Do this for each subnet. It doesn't matter what IP you keep for your server as long as it isn't in the scope for the local subnet.
Presuming that port 67/68 are not blocked by the router
it doesnt matter that wether you have 4 nic cards or all of them on 1 with virtual addresses
by virtual i mean..
eth0;1
eth0;2 ..
Correct although ime it would be unusual for port 67/68 to be blocked unless they have been deliberately filtered. You don't need to join the DHCP server to all of the subnets, either with 4 nics or 4 virtual addresses. Using the DHCP helper, which most routers have, its unnecessary; all DHCP broadcasts will get unicast to the DHCP server. This makes everything clean and simple.
My problem is in My switch, i have only one gigabit interface where i add secondary as other network address something like virtual IPS for single interface. i added subnets in ther DHCP server. I have one NIC card. when the client requests the DHCP Server it is alocating 41.X network IP. so is there any chance to do that ?
If you want to allocate addresses in 4 different subnets then you need a router to route between them. I assumed you had one. If you have no router then the DHCP will need to be a member of all 4 networks, either by 4 physical NIC connections or 4 IP's on one nic. Your DHCP server will probably assign the address pools sequentialy starting with the first IP on the nic as it has no way of differentiating which hosts you want in which subnets. You really need to either use a router or split the subnets into vlans and 802.1q trunk to the server. At least then the Bootp requests will come into the server on a VLAN specific subinterface on the nic and the DHCP server will know which pool to hand out an address from.
Otherwise the only way to ensure that your hosts get the addresses you want them to have is to enter static reservations for all of your mac addresses, which is a right pain in the bum.
You need to understand that the hosts in different subnets won't be able to talk to each other unless something is routing. Is the DHCP server also going to be serving as a router?
I changed the senario here. i put the dhcp server in 10.191.40.2/16 network.i configure the subnet also in 10.191.0.0/16. i given differnet scopes here the things are working. but but differnet gateways for differnet networks. how i can mention the differnet gatway in DHCP server. and another thing can we have fixed Gatway using MAC address ?
when you put ip address on vitural lan the dhcpd scope auto sence which interface bind with this subnet i am already using this senario but we have 4 NIC on machine and each work with define subnet have't try with Vlan
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.