Solved

Multiple NIC's with fixed IP in DHCP

Posted on 2004-08-03
6
1,476 Views
Last Modified: 2012-08-13
Hi all,

I am working on freeBSD 5.0 and installed a DHCP server in my machine... Now I have a problem.

I have a machine with two NICs and I want to give them two fixed address. But I don't know how to do it.  I am only able to configure only one interface but not both...

e.g.

host Neo {
         hardware ethernet 00:55:66:ff:fe:ff;
         fixed-address 192.168.0.21;
}

Now for the same host I want to add another fixed-address..... How can I do it....

Thanks in advance
Dennis
0
Comment
Question by:dennis_george
6 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 150 total points
ID: 11712366
host Neo1 {
         hardware ethernet 00:55:??:??:??:??;
         fixed-address 192.168.1.21;
}

Should work. Note that for both ethernet interfaces to be usable each will have to be on a different network. That probably means adding a second subnet declaration to your DHCP server and having the DHCP requests frowarded from that network to the DHCP server.
0
 
LVL 5

Author Comment

by:dennis_george
ID: 11713787


I have created two separate networks 192.168.2.0/24 and 192.168.1.0/24.

But shouldn't be the host name for the machine should be same ?? (Neo and Neo1)

Or the name is just a placeholder and doesnot effect the hostname of the machine ?

Dennis
0
 

Assisted Solution

by:ainals
ainals earned 100 total points
ID: 11714415
It shouldn't affect the machine's own hostname. The names is visible only if you setup something like dynamic updates to a dns server.

If you structure your dhcpd.conf file properly, you could do this. It should look something like this

#net1
subnet 192.168.1.0 netmask 255.255.255.0 {
        option ...
        .
        .
        host test {
                hardware ethernet 00:55:66:ff:fe:ff;
                fixed-address 192.168.1.2
                }
        }
# net2
subnet 192.168.2.0 netmask 255.255.255.0 {
        .
        host test {
                hardware ethernet 00:55:??:??:??:??;
                fixed-address 192.168.2.9;
                }
        }

Hope this helps.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 40

Expert Comment

by:jlevie
ID: 11714782
> But shouldn't be the host name for the machine should be same ?? (Neo and Neo1)

Those aren't necessarily actual hostnames. They are only tags for the static reservation in DHCP.
0
 
LVL 5

Author Comment

by:dennis_george
ID: 11722905
Hi all,

Thankyou for all your responses. I have still one more doubt.....

Suppose in my network I have a machine with two NICs [one wireless and the other one wred]. And that machine will use either one of the card at a time. So can I provide same fixed address two both the interfaces ?

host test {
            hardware ethernet 00:55:66:??:??:??;
            fixed-address 192.168.0.3;
}

host test1 {
          hardware ethernet 00:55:77:??:??:??;
          fixed-address 192.168.0.3;
}

Is the above configuration right ? If I put this in the same subnet.....

Dennis
0
 
LVL 3

Assisted Solution

by:pYrania
pYrania earned 50 total points
ID: 11725247
You can't assign one IP-Address twice, but if just one interface is up at a time, you can of course use the same IP for both.

I'd go with grouping anyway.

group {
    use-host-decl-names on;
    host neo {
        hardware ethernet 01:02:03:04:05:06;
        fixed-address 192.168.0.1;
    }
    host neo1 {
        hardware ethernet 11:12:13:14:15:16;
        fixed-address 192.168.0.2;
    }
}    
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now