LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-11-2009, 11:28 PM   #1
prixone
Member
 
Registered: Jul 2007
Posts: 35

Rep: Reputation: 15
Connect VLAN with each other ?


Hi,

i have a dhcp server setup on eth1 with a shared network where i have
10.0.10.0 and 10.0.11.0, how could i route so each network can see each other ?

eth1 = 10.0.10.254 netmask 255.255.255.0
eth1:0 = 10.0.11.254 netmask 255.255.255.0

eth1:0 is an alias as it was neeeded for the dhcpd server for shared networks

Last edited by prixone; 09-11-2009 at 11:29 PM.
 
Old 09-12-2009, 01:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 09-12-2009, 01:48 AM   #3
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
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
 
Old 09-12-2009, 02:05 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.

Alternaivelty you can block MAC's under linux if they are all local machines: http://www.cyberciti.biz/tips/iptabl...filtering.html
 
Old 09-12-2009, 02:17 AM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by prixone View Post
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.
 
Old 09-12-2009, 02:37 AM   #6
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
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 ...

i will check the link you sent thanks
 
Old 09-12-2009, 03:12 AM   #7
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
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 ...
 
Old 09-12-2009, 06:03 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 09-12-2009, 02:04 PM   #9
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
This is my DHCPD.CONF
Code:
[root@localhost ~]# cat /etc/dhcpd.conf
ddns-update-style none; # keep it simple for now
ignore client-updates;  # here too

DHCPARGS=eth1;          # tells it what interface to listen on

shared-network eth1 {
        subnet 10.0.11.0 netmask 255.255.255.0 {
                option routers                  10.0.11.254;
                option subnet-mask              255.255.255.0;

                option domain-name              "LAN";
                option domain-name-servers      10.0.11.254;
                option netbios-name-servers     10.0.11.254;

                authoritative;
                allow unknown-clients;

                range dynamic-bootp 10.0.11.100 10.0.11.253;
                default-lease-time 600;
                max-lease-time 7200;
        }

        subnet 10.0.10.0 netmask 255.255.255.0 {
                option subnet-mask              255.255.255.0;
                authoritative;
                deny unknown-clients;

                range 10.0.10.1 10.0.10.3;
                default-lease-time 600;
                max-lease-time 7200;

                host m1 {
                        hardware ethernet 00:06:4F:63:90:BC;
                        fixed-address 10.0.10.1;
                }

                host m2 {
                        hardware ethernet 00:02:2A:E3:79:31;
                        fixed-address 10.0.10.2;
                }
        }
}
If you notice on the first subnet i have:
Code:
                option domain-name              "LAN";
                option domain-name-servers      10.0.11.254;
                option netbios-name-servers     10.0.11.254;
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.
 
Old 09-12-2009, 03:07 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 09-12-2009, 03:17 PM   #11
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
I DO NOT WANT VLAN OR WAS TRYING TO MAKE ONE !

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
 
Old 09-12-2009, 04:50 PM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 09-12-2009, 06:00 PM   #13
prixone
Member
 
Registered: Jul 2007
Posts: 35

Original Poster
Rep: Reputation: 15
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 :/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VLan help on Cisco 870 to Linux vlan spide21 Linux - Networking 4 07-30-2009 09:20 AM
VLAN configuration - native VLAN and setting PVID kumarwaiting Linux - Networking 0 07-24-2006 03:51 AM
vlan praveenchebolu Linux - Networking 1 03-25-2006 04:41 AM
how to connect a gateway linux with vlan ? ctis78 Linux - Networking 2 03-25-2005 08:28 AM
Vlan Markvw Linux - Networking 1 09-29-2003 09:33 AM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration