Solved

Multiple NIC's with fixed IP in DHCP

Posted on 2004-08-03
6
1,474 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
Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux CentOs 6.7 : i can't start service 8 68
Help instaling linux on vmware 36 81
linux, squid, exchange 14 142
squid proxy, active sync, autodiscover, squid proxy, exchange 2007 42 287
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…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

930 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

10 Experts available now in Live!

Get 1:1 Help Now