Switches, Hubs, and Modems
1753658 Members
5435 Online
108798 Solutions
New Discussion юеВ

Re: Two NICs on one machine, and two different networks (two DHCP )

 
index
Occasional Contributor

Two NICs on one machine, and two different networks (two DHCP )

Hi people,

I have interesting issue, and would like to ask you for opinion. I have the net like


|||||||||--switch
| | |
| | | ---one NIC
1 2 3
| | | ----second NIC
| | |
|||||||||||-- switch (the same as above but other ports and NICs connected to these ports receive IP from DHCP from other network )

I need to set up machines 1,2,3 to be in two nets. On " one NIC " they should receive ip address from DHCP which is installed on one of machines 1,2 or 3. On "second NIC " they should receive ip address from some other dhcp server.
I have idea to put ports to which are connected "one NIC " into an VLAN,and when they boot up to receive just ip address on that interface form machine (1,2 or 3 ). I need to prevent them to receive an ip address from other DHCP server other than is running on 1,2 or 3.

Have you some idea, beside this one I am going to try to make this works.
OS is WIN2003 server.
Thank you in advance.

Regards,
4 REPLIES 4
Colonelk
Frequent Advisor

Re: Two NICs on one machine, and two different networks (two DHCP )

On your switches you need to create 2 VLAN's. In this example we will say VLAN 10 and VLAN 20.

On your PC's with 2 NIC's in them you need to assign one NIC as an untagged member of vlan 10, and the other NIC as an untagged member of vlan 20.

On your DHCP server the server itself needs to be an untagged member of one of the vlans. If you create 2 scopes on the DHCP server, and have 2 NICS in the DHCP server, you can assign each of the nics as an untagged member of a vlan (one nic untagged vlan 10, the other untagged vlan 20) and you can assign IP addresses from that DHCP server to both scopes.

If you want 2 DHCP servers, then one needs to be an untagged member of vlan 10, and the other an untagged member of vlan 20.


Hope this helps

Tino
index
Occasional Contributor

Re: Two NICs on one machine, and two different networks (two DHCP )

Hi,

Thank you for your answer.

""" On your switches you need to create 2 VLAN's. In this example we will say VLAN 10 and VLAN 20. """" ---this part is clear to me.

"""On your PC's with 2 NIC's in them you need to assign one NIC as an untagged member of vlan 10, and the other NIC as an untagged member of vlan 20."""""---how to do this.

For me is further confusing, what if DHCP request from other client different than clients 1,2,3 arrive it will be served. I mean I want to push dhcp server on one of clients (1,2 or 3 ) just to answer on DHCP reqests from its VLAN ( network ) and not to DHCP requests from other clients which are not from VLAN where are clients 1,2, 3.
For example, if is on 3 dncp server, then it should serve dhcp answer only to machines which are in same net on " one NIC ", but not to anser on DHCP requests which can arrive on "second NIC "


""""On your DHCP server the server itself needs to be an untagged member of one of the vlans. """ Can you please direct me to read some materials related to this ?

I will on machines 1,2 or 3 (on one of them ) have just one dhcp server, with one scope which should serve just machines that are connected on "one NIC " to switch.


"Hope this helps" ---it helps for sure, Thank you very much.

Regards
Colonelk
Frequent Advisor

Re: Two NICs on one machine, and two different networks (two DHCP )

See inline answers:

"""On your PC's with 2 NIC's in them you need to assign one NIC as an untagged member of vlan 10, and the other NIC as an untagged member of vlan 20."""""---how to do this.

You do this on the switch. Lets say PC 1, NIC 1, is attached to port 1 of the switch. You want that PC to be a member of VLan 10. On the switch you set port 1 to be :

Vlan 1 (Default_Vlan) = No
Vlan 10 (1st Vlan) = Untagged
Vlan 20 (2nd Vlan) = No

What happens is that NIC will only communicate with other tagged/untagged members of VLAN 10. It will not communicate with members of vlan 1 or vlan 20.

Therefore if you set up a DHCP server with 1 NIC to be configured as above (vlan 1 = No, Vlan 10 = Untagged, vlan 20 = no) then it will only service clients that are untagged members of Vlan 10.


With reference to your example:

If I understand correctly you want 3 PC's to be a member of one VLAN and the other PC's on that switch not to be able to see those 3 PC's?

If thats the case this is what you need to do.

Configure the switch ports for PC 1, 2 and 3, as above (Vlan 1 = No, Vlan 10 = untagged, vlan 20 = no). The DHCP server that needs to service ONLY THESE PC's needs a port configuring on the switch identically. When you do that, the NIC belonging to VLan 10 will pick up a DHCP assigned address from the DHCP server NIC also configured on vlan 10.

Do you follow me? If you see it as each vlan is a completely segregated network then it becomes easier to understand. For another machine to belong to that network, you need to set its port to "untagged" for that vlan.



Reading your first post again, it seems you want those 3 PC's to be on two separate networks. This is fine if it has 2 NIC's in each PC. In this case we have already said that the first NIC will be an untagged member of VLAN 10. For the second NIC you make the port on the switch that it is attached to a member of VLAN 20. e.g.

2nd Nic: Port 2 on switch:

Vlan 1 = no
Vlan 10 = no
Vlan 20 = untagged.

If you then had a separate DHCP server to service vlan 20 its NIC would need to be attached to a port configured as:

Vlan 1 = no
Vlan 10 = no
Vlan 20 = untagged.

Now on those PC's the first nic would have DHCP from VLan 10 DHCP server, and the second NIC would have DHCP from VLAN 20 DHCP server.

Phew.......

It might be easier to draw a diagram!

:D

Tino


Joel Belizario
Trusted Contributor

Re: Two NICs on one machine, and two different networks (two DHCP )

Just curious, what is the requirement for these 3 PCs having to reside in two networks?