>можно ли настроить на одну сетевую карту несколько ip адресов
>типо fxp0.1 fxp0.2
>если можно приведите пример [unix1]~ > ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
inet 159.93.44.57 netmask 0xffffff00 broadcast 159.93.44.255
inet6 fe80::20a:48ff:fe18:e187%em0 prefixlen 64 scopeid 0x1
inet 159.93.44.59 netmask 0xffffffff broadcast 159.93.44.59
inet 159.93.44.58 netmask 0xffffffff broadcast 159.93.44.58
ether 00:0a:48:18:e1:87
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
[unix1]~ > grep em0 /etc/rc.conf
ifconfig_em0="inet 159.93.44.57 netmask 255.255.255.0"
ifconfig_em0_alias0="inet 159.93.44.59 netmask 255.255.255.255"
ifconfig_em0_alias1="inet 159.93.44.58 netmask 255.255.255.255"
[unix1]~ >
# man ifconfig
# man rc.conf ( раздел network_interfaces)
...
One can configure more than one IPv4 address with the
ipv4_addrs_<interface> variable. One or more IP addresses
must be provided in Classless Inter-Domain Routing (CIDR)
address notation, whose last byte can be a range like
192.168.0.5-23/24. In this case the address 192.168.0.5 will
be configured with the netmask /24 and the addresses
192.168.0.6 to 192.168.0.23 with the non-conflicting netmask
/32 as explained in the ifconfig(8) alias section. With the
interface in question being ed0, an example could look like:
ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28"
It is also possible to add IP alias entries using ifconfig(8)
syntax. Assuming that the interface in question was ed0, it
might look something like this:
ifconfig_ed0_alias0="inet 127.0.0.253 netmask 0xffffffff"
ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff"
And so on. For each ifconfig_<interface>_alias<n> entry that
is found, its contents are passed to ifconfig(8). Execution
stops at the first unsuccessful access, so if something like
this is present:
ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff"
ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff"
ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff"
ifconfig_ed0_alias4="inet 127.0.0.254 netmask 0xffffffff"
Then note that alias4 would not be added since the search
would stop with the missing ``alias3'' entry. Due to this
difficult to manage behavior, the
ifconfig_<interface>_alias<n> form is deprecated.
If the /etc/start_if.<interface> file is present, it is read
and executed by the sh(1) interpreter before configuring the
interface as specified in the ifconfig_<interface> and
ifconfig_<interface>_alias<n> variables.
If the ifconfig_<interface> contains the keyword ``NOAUTO''
then the interface will not be configured at boot or by
/etc/pccard_ether when network_interfaces is set to ``AUTO''.
...
http://www.opennet.me/base/net/bsdalias.txt.html
http://www.opennet.me/tips/info/477.shtml