# DHCP, MAC addresses, and IP aliasing [SOLVED]

## gcasillo

I have a D-Link DGL-4300 router. I use its DHCP capabilities to assign IP addresses to three computers and a HDHR (TV device) on my LAN. In the router, I can reserve IP addresses for specific computers based on the MAC addresses of the NICs within them. Each computer has only one NIC (and thus one MAC address).

I would like to assign two (or more) IP addresses to a computer that serves as my web, mail, DNS, and SVN server. I want this so that I can run tinydns and dnscache on the same machine. The problem I have is that the routers DHCP server cannot reserve two IP addresses for one NIC, because it reserves/assigns them based on the MAC addresses.

I have yet to figure out from the router's manual and through experimentation if there is a way to assign strict static IP addresses without the use of its DHCP server. I have to believe there's a way to assign two IPs to my server, but I just don't know how (I'm a networking novice).

Anyone know how I can pull this off? Currently my /etc/conf.d/net is empty as I use dhcpcd on all of my computers to get an IP from the router. If I need to supply more information, let me know.Last edited by gcasillo on Sat Feb 21, 2009 12:27 am; edited 1 time in total

----------

## jon123

Here is a /etc/conf.d/net that assigns two IP address to one Interface

```

config_eth0=(   "192.168.0.5 netmask 255.255.255.0"

                       "192.168.0.10 netmask 255.255.255.0" )

routes_eth0=("default via 192.168.1.1")

dns_servers_eth0=( "192.168.1.1" )

```

I am pretty sure you can replace one of the items in config_eth0 with DHCP and then you'll have one on DHCP and one with a static address.

You can get more info from /etc/conf.d/net.example

----------

## gcasillo

Thank you. I got it working very similar to your prescription. Now, I have my caching and authoritative nameservers working properly. Miller time!   :Very Happy: 

Cheers,

Gregg

----------

