Solved

Multiple NIC's with fixed IP in DHCP

Posted on 2004-08-03
6
1,473 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

20 Experts available now in Live!

Get 1:1 Help Now