The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

форумы  помощь  поиск  регистрация  майллист  ВХОД  слежка  RSS
"настройка сетевой карты"
Вариант для распечатки  
Пред. тема | След. тема 
Форумы OpenNET: Виртуальная конференция (Public)
Изначальное сообщение [Проследить за развитием треда]

"настройка сетевой карты"  
Сообщение от Roma (??) on 13-Фев-07, 13:13 
можно ли настроить на одну сетевую карту несколько ip адресов
типо fxp0.1 fxp0.2
если можно приведите пример
Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

 Оглавление

Сообщения по теме [Сортировка по времени, UBB]


1. "настройка сетевой карты"  
Сообщение от lavr email on 13-Фев-07, 13:31 
>можно ли настроить на одну сетевую карту несколько 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

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

2. "настройка сетевой карты"  
Сообщение от Roma (??) on 13-Фев-07, 13:33 
>>можно ли настроить на одну сетевую карту несколько 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

спасибо

Высказать мнение | Ответить | Правка | Наверх | Cообщить модератору

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ] [Рекомендовать для помещения в FAQ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2025 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру