Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
these are not vlans, just the same network hacked onto the same nick. not advised in any way, very messy and counters any standard you'd like to see. if you want to route between them on this box, then you should indeed configure them as proper vlans, but that would require a suitably intelligent switch. To be honest I'm not sure if you could route between those two networks as you have it now, try it... "echo 1> /proc/sys/net/ipv4/ip_forward" and ensure that any two machines you wish to communicate via have routes to the opposite network within their own routing tables, and if it's going to work, it'll work. vlans or seperate nics are the way forward though.
that is sad well actually what i want is the DHCP Server to give DNS and GW to all stations but 2 mac adress that won't get DNS or GW but will still be on the network the only way i found to do that was doing this shared network thing but then i need then to communicate with them selfs so any suggestions of a good way of doing it i am all ears i was trying to do it all with DHCP server but it seems i can't.
well you've not said what your dhcp server is, but on any real dhcp server you can refuse to provide leases to certain mac addresses and such. Seems odd to refuse to do this though, are these machines just statically assigned? If so, then DHCP just wouldn't matter.
that is sad well actually what i want is the DHCP Server to give DNS and GW to all stations but 2 mac adress that won't get DNS or GW but will still be on the network the only way i found to do that was doing this shared network thing but then i need then to communicate with them selfs so any suggestions of a good way of doing it i am all ears i was trying to do it all with DHCP server but it seems i can't.
thanks for taking the time to help me out
Most modern DHCP servers can be configured to perform special actions for particular MACs, like a static DHCP assignment triggered by specific MACs.
Read the documentation for your DHCP server, see if you can handle the two machines of interest in a particular way.
The other approach is obvious -- set static IP configurations for those machines. If this isn't possible, then the above MAC detection approach should work.
i've been reading it and i can't do it with just dhcp ....
if i setup a main config with dns and gw then all the others station will attain that if i remove it then i did need to configure all the stations in there with special options to have a dns and gw so what would be the easier way would be to have the 2 mac's with a different config but there is not setup to remove the dns and gw from what i saw ...
well the mac stuff is awesome but what i want to do is just not let this 2 computers get the DNS and GW on the dhcp config i guess the best would be on manual setup but then again it would break up the need of a dhcp server at all ...
not really, no. There's a difference between static addressing and DHCP reserved addressing. Same end result, but you can fix a clients IP address from the server. Then you can convetionally block using IP addresses easily enough, not MAC. Of course, if you change the IP manually on the machine then the rules won't apply, just like if you changed the MAC you'd get a different DHCP lease etc... Work out what does and doesn't matter and the right solution, or acceptance of the lack of a good one at all.
so whatever computer enter it it will attain those information and at the second subnet i havent declared that so whatever computer enter it it will not get those informations.
if there a way to put inside the host m1 and m2 something to exclude those 3 values i could have only 1 subnet setup and wouldnt have to worry about it but nothing seems to work.
if i setup teh first subnet without those informations then i would have to register all the computers on the network so they would have those information when gathering an IP and to be able to use internet and such.
the block of MAC is awesome but in this case it would not solve my problem as i do not want to limit the MAC's what i want to do is not to let those 2 computers have this DNS and GW as they already have an internet NIC and if i let it, they will just go over and use this internet.
Your logic is flawed. How do these machines know which network they are on?? As above, these are NOT vlans, and when any machine broadcasts a DHCP request on the network it will be recieved by the server listening on the same IP address, so there is no way to separate them at all, do you see? you don't HAVE different networks... you only have one.
Again, i'd say define reserved leases on the server and just provide them with fixed addresses, and block those addresses on the router, or just block their macs.
all i wanted to do is what i said on the post before this one ! The 2 MAC's are recognized on the second subnet as they are inside the group with fixed ips and they do not get GW OR DNS this way but then i do not see the other network which is something i dont want to happen.
WHAT I WANT IS JUST 1 SUBNET with those 2 MAC's not having a DNS or GW setted up like my CONFIGURATION EXAMPLE...
I just don't know how to do that if you do know post me some example that can lead me to something ... because i can't really figure out a way otu that ACTUALLY WORKS
OK, mr shouty. As above, if you don't want your DHCP server assigning DNS or a gateway, then define them as known clients in dhcpd.conf and just don't provide one.
the only way i found for doing it was the way i described in my configuration that is why i am asking for an example or something that can help me out with it because other then this way my dhcp won't go up.
I may have put a wrong title in my subject but bear with me i am breaking in nevers to get this done within dhcp server only i do know i could have done this by blocking the macs from dns and such but i am trying to within dchp :/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.