Solved

Multiple NIC's with fixed IP in DHCP

Posted on 2004-08-03
6
1,478 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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