[NAS4Free] Multiple IPs on one network interface

I am a noob to FreeBSD and also Unix in general. I am setting up a NAS4Free server and it uses FreeBSD as its base OS. My question I think is a little too advanced for the NAS4Free people because it deals more with the actual OS than just a setting in the NAS4Free part of the system. Basically what I am trying to do is setup a second IP on one network interface. The reason for this is because the NAS4Free system has a transmission client running on it under a separate port, but on the same IP address as the server. I need to create a seperate IP address that is assigned to the transmission client instead of having it share the one that the server is using. I am setting up DNS so I need a separate IP.

Can anyone tell a noob what config files I need to edit to get this working? Be very specific about location etc because I don't have much knowledge about the layout of a FreeBSD system.

Thanks.
 
[thread=7290]Topics about PC-BSD | FreeNAS | NAS4Free | DesktopBSD | m0N0WALL | pfSense | kFreeBSD[/thread]
 
@Synaps3

/etc/rc.conf:
Code:
ifconfig_em0="inet 192.168.0.1 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 192.168.0.2 netmask 255.255.255.0"

/Sebulon
 
It doesn't seem to work. I suspect it is because it's causing some sort of port conflict.

Is it true that when you create an alias, you can have a service on port 80 of the original IP and a service on port 80 of the alias without them conflicting?
 
Sebulon said:
@Synaps3

/etc/rc.conf:
Code:
ifconfig_em0="inet 192.168.0.1 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 192.168.0.2 netmask 255.255.255.0"

/Sebulon

The alias0 needs a non-conflicting netmask.

From ifconfig(8):

alias Establish an additional network address for this interface. This is sometimes useful when changing network numbers, and one wishes to accept packets addressed to the old interface. If the address is on the same subnet as the first network address for this interface, a non-conflicting netmask must be given. Usually 0xffffffff is most appropriate.
 
Back
Top