?
Solved

Multiple NIC's with fixed IP in DHCP

Posted on 2004-08-03
6
Medium Priority
?
1,481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 600 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 400 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 200 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

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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