[afnog] Two IP Addresses on the same Interface

Vincent Ngundi vincent at kenic.or.ke
Thu Jul 12 09:28:12 UTC 2007


Thanks Phi, Randy, Steve, Noah and GJ.

I have the following configuration in /etc/rc.conf

<snip>

ifconfig_fxp0="inet A.B.C.41  netmask 255.255.255.240"
ifconfig_fxp0_alias0="inet E.F.G.1 netmask 255.255.255.240"
ifconfig_fxp0_alias1="inet E.F.G.2 netmask 255.255.255.255"
[...]
defaultrouter="A.B.C.33"

How do I define the gateway for the prefix E.F.G?

<snip>

Regards,

-Vincent

On Jul 11, 2007, at 3:33 PM, Phil Regnauld wrote:

> Randy Bush (randy) writes:
>>> I'd like to configure two routable IP addresses (from different
>>> prefixes) on the same NIC. How can I go about this in FreeBSD?
>>
>> from /etc/rc.conf
>>
>> ifconfig_em0="inet 147.28.0.62 netmask 255.255.255.0"
>> ifconfig_em0_alias0="inet 147.28.0.34 netmask 255.255.255.255"
>> ifconfig_em0_alias1="inet 147.28.0.36 netmask 255.255.255.255"
>
> 	[...]
>
>> in your case, the alias would have a diff mask than /32 i assume
>
> 	He says "different prefixes".  If that's the case, then the
> 	alias will have the real netmask.
>
> 	i.e.:
>
> 	ifconfig_em0_alias0="inet 1.2.3.4/27"
>
> 	/32 is only used for aliases within the same IP subnet.
>
> 	P.
>
>

--
KeNIC - The Kenya Network Information Center
http://www.kenic.or.ke


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://afnog.org/pipermail/afnog/attachments/20070712/fa90d3b3/attachment-0001.html 


More information about the afnog mailing list