* Re: [Comm] напомните - 2 сетевые
2006-10-09 16:24 ` Alexey Voinov
@ 2006-10-09 20:28 ` Alexey Rusakov
2006-10-10 4:31 ` Alexey Voinov
2006-10-10 1:13 ` Вадим Илларионов
2006-10-10 5:27 ` Vladimir V. Kamarzin
2 siblings, 1 reply; 16+ messages in thread
From: Alexey Rusakov @ 2006-10-09 20:28 UTC (permalink / raw)
To: ALT Linux Community
Alexey Voinov пишет:
> Artem Zolochevskiy <az@zolochevskie.net> writes:
>
>
>> Шенцев Алексей Владимирович wrote:
>>
>>
>>> В сообщении от 9 октября 2006 12:31 Artem Zolochevskiy написал(a):
>>>
>>>> hi all
>>>>
>>> Привет.
>>>
>>>> Напомните, чем закончились разбирательства с прыгающими именами
>>>> сетевушек?
>>>>
>>> Какой дистрибутив? И у кого именно? Есть свои нюансы ...
>>>
>> на 3.0 при использовании etcnet
>>
>
> Я немного поразбирался с прыгающими именами, и, пожалуй, поделюсь
> найденным решением.
>
> В etcnet есть поддержка замечательной возможности: переименование
> интерфейсов с помощью ifrename. Для того, чтобы эту штуку
> задействовать делаем следующее:
>
> ~ В /etc/net/ создаём файлик c именем iftab. Как он должен выглядеть
> подробно расписано в man iftab. Лично мне хватило ровно одного
> критерия - MAC-адреса карточки. В моём случае файлик выглядит
> приблизительно так:
>
> $ cat /etc/net/iftab
> air0 mac 00: ... :9A
> cbl0 mac 00: ... :14
>
> ~ В /etc/net/ifaces переименовываем (или создаём) директории
> соответствующие интерфейсам в новые имена. Не забываем в
> /etc/net/ifaces/*/options этих интерфейсов добавить строчку
>
> TYPE=eth
>
> В противном случае etcnet не сможет распознать тип интерфейса по
> имени, и начнёт ругаться.
>
> ~ Перезапускаем сеть.
>
> # service network restart
>
> И всё должно получится. После такого у меня именем cbl0 всегда
> называется карточка в которую я втыкаю витую пару, а именем air0 -
> wifi. Есть один маленький глюк: при первом запуске сервиса network,
> etcnet пытается перед переименованием опустить интерфейс, которого
> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
>
Что-то он у меня про какие-то SIOCGIFFLAGS жалуется... (или это потому
что я на Сизифе?) Но интерфейсы поднимает, прикольно. Правда, не всякий
софт спокойно относится к такому произволу (в частности,
gnome-applets-extra-hardware-monitor такие интерфейсы мониторить просто
не умеет), но это проблемы софта.
--
Alexey "Ktirf" Rusakov
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-09 20:28 ` Alexey Rusakov
@ 2006-10-10 4:31 ` Alexey Voinov
0 siblings, 0 replies; 16+ messages in thread
From: Alexey Voinov @ 2006-10-10 4:31 UTC (permalink / raw)
To: ALT Linux Community
Alexey Rusakov <ktirf@altlinux.org> writes:
>> И всё должно получится. После такого у меня именем cbl0 всегда
>> называется карточка в которую я втыкаю витую пару, а именем air0 -
>> wifi. Есть один маленький глюк: при первом запуске сервиса network,
>> etcnet пытается перед переименованием опустить интерфейс, которого
>> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
>> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
>>
> Что-то он у меня про какие-то SIOCGIFFLAGS жалуется... (или это потому
> что я на Сизифе?)
Это как раз и есть та самая ругань, о которой я предупреждал. У меня
etcnet уже пропатченный, так что я её не вижу, и не мог привести
пример.
> Но интерфейсы поднимает, прикольно. Правда, не всякий
> софт спокойно относится к такому произволу (в частности,
> gnome-applets-extra-hardware-monitor такие интерфейсы мониторить просто
> не умеет), но это проблемы софта.
Переименовывать можно в том числе и в eth0, eth1 и т.д, но зачем, если
есть возможность дать более "гооврящие" названия? :) А софт патчить
надо, wmnd, например, не испытывает никаких трудностей с этими
интерфейсами.
--
Voins
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-09 16:24 ` Alexey Voinov
2006-10-09 20:28 ` Alexey Rusakov
@ 2006-10-10 1:13 ` Вадим Илларионов
2006-10-10 5:00 ` Alexey Voinov
2006-10-10 5:27 ` Vladimir V. Kamarzin
2 siblings, 1 reply; 16+ messages in thread
From: Вадим Илларионов @ 2006-10-10 1:13 UTC (permalink / raw)
To: community
Alexey Voinov wrote:
> Artem Zolochevskiy <az@zolochevskie.net> writes:
>
>> Шенцев Алексей Владимирович wrote:
>>
>>> В сообщении от 9 октября 2006 12:31 Artem Zolochevskiy написал(a):
>>>> hi all
>>> Привет.
>>>> Напомните, чем закончились разбирательства с прыгающими именами
>>>> сетевушек?
>>> Какой дистрибутив? И у кого именно? Есть свои нюансы ...
>> на 3.0 при использовании etcnet
>
> Я немного поразбирался с прыгающими именами, и, пожалуй, поделюсь
> найденным решением.
>
> В etcnet есть поддержка замечательной возможности: переименование
> интерфейсов с помощью ifrename. Для того, чтобы эту штуку
> задействовать делаем следующее:
Первым делом service network stop
> ~ В /etc/net/ создаём файлик c именем iftab. Как он должен выглядеть
> подробно расписано в man iftab. Лично мне хватило ровно одного
> критерия - MAC-адреса карточки. В моём случае файлик выглядит
> приблизительно так:
>
> $ cat /etc/net/iftab
> air0 mac 00: ... :9A
> cbl0 mac 00: ... :14
>
> ~ В /etc/net/ifaces переименовываем (или создаём) директории
> соответствующие интерфейсам в новые имена. Не забываем в
> /etc/net/ifaces/*/options этих интерфейсов добавить строчку
>
> TYPE=eth
>
> В противном случае etcnet не сможет распознать тип интерфейса по
> имени, и начнёт ругаться.
>
> ~ Перезапускаем сеть.
>
> # service network restart
service network start
>
> И всё должно получится. После такого у меня именем cbl0 всегда
> называется карточка в которую я втыкаю витую пару, а именем air0 -
> wifi.
А у меня карточка так и называется - wifi
А та, что в локалку смотрит - lan
Есть ещё подсеть для ПКД. Угадайте, как интерфейс назван.
Жаль, этот номер не проходит с ppp0...pppX и dvb0_0...dvbX_X
> Есть один маленький глюк: при первом запуске сервиса network,
> etcnet пытается перед переименованием опустить интерфейс, которого
> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
Если делать все перименования при остановленной сети, не будет ни глюка, ни
надобности в патчике.
________________________
С уважением,
Вадим Илларионов
системный администратор
Усолье-Сибирский почтамт
JID: см. <mailto:>
UIN: 7899517
Телефоны:
Мобильный +7 904 658-4154
Рабочий +7 39543 444-00
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-10 1:13 ` Вадим Илларионов
@ 2006-10-10 5:00 ` Alexey Voinov
2006-10-11 1:24 ` Вадим Илларионов
0 siblings, 1 reply; 16+ messages in thread
From: Alexey Voinov @ 2006-10-10 5:00 UTC (permalink / raw)
To: master; +Cc: ALT Linux Community
Вадим Илларионов <master@usib.irkps.ru> writes:
>> Есть один маленький глюк: при первом запуске сервиса network,
>> etcnet пытается перед переименованием опустить интерфейс, которого
>> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
>> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
> Если делать все перименования при остановленной сети, не будет ни глюка, ни
> надобности в патчике.
etcnet пытается остановить интерфейс уже с новым именем, но делает это
до переименования. Так что restart или stop/start, тут роли не
играет.
--
Voins
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-10 5:00 ` Alexey Voinov
@ 2006-10-11 1:24 ` Вадим Илларионов
2006-10-11 4:39 ` Alexey Voinov
0 siblings, 1 reply; 16+ messages in thread
From: Вадим Илларионов @ 2006-10-11 1:24 UTC (permalink / raw)
To: community
Alexey Voinov wrote:
> Вадим Илларионов <master@usib.irkps.ru> writes:
>>> Есть один маленький глюк: при первом запуске сервиса network,
>>> etcnet пытается перед переименованием опустить интерфейс, которого
>>> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
>>> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
>> Если делать все перименования при остановленной сети, не будет ни глюка,
>> ни надобности в патчике.
> etcnet пытается остановить интерфейс уже с новым именем, но делает это
> до переименования.
Как он может остановить новое имя, которого ещё нет?
Читайте по губам:
1. интерфейс надо остановить ДО переименования, со старым именем.
2. После переименования поднять интерфейс уже с новым именем.
Или, что то же самое, остановить сеть, ... см. выше, в общем.
> Так что restart или stop/start, тут роли не играет.
3. в свете пп. 1,2 - оч.даже играет.
Просто я уже неоднократно проделывал это на разных версиях етснет - без
каких-либо глюков.
________________________
С уважением,
Вадим Илларионов
системный администратор
Усолье-Сибирский почтамт
JID: см. <mailto:>
UIN: 7899517
Телефоны:
Мобильный +7 904 658-4154
Рабочий +7 39543 444-00
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-11 1:24 ` Вадим Илларионов
@ 2006-10-11 4:39 ` Alexey Voinov
2006-10-16 7:59 ` Вадим Илларионов
0 siblings, 1 reply; 16+ messages in thread
From: Alexey Voinov @ 2006-10-11 4:39 UTC (permalink / raw)
To: master; +Cc: ALT Linux Community
Вадим Илларионов <master@usib.irkps.ru> writes:
>>>> Есть один маленький глюк: при первом запуске сервиса network,
>>>> etcnet пытается перед переименованием опустить интерфейс, которого
>>>> ещё нет, что приводит к появлению ругани. Эту ругань имеет смысл
>>>> проигнорировать, а патчик к etcnet на этой неделе уйдёт в devel@
>>> Если делать все перименования при остановленной сети, не будет ни глюка,
>>> ни надобности в патчике.
>> etcnet пытается остановить интерфейс уже с новым именем, но делает это
>> до переименования.
> Как он может остановить новое имя, которого ещё нет?
>
> Читайте по губам:
Предпочитаю читать код.
> 1. интерфейс надо остановить ДО переименования, со старым именем.
> 2. После переименования поднять интерфейс уже с новым именем.
> Или, что то же самое, остановить сеть, ... см. выше, в общем.
/etc/net/ifup:
...
if ExecIfExecutable $SCRIPTDIR/create-$TYPE $NAME; then
print_progress
else
...
fi
...
if [ -s "$IFTAB_FILE" ]; then
if $IFRENAME -c "$IFTAB_FILE" -n "$NAME"; then
...
/etc/net/create-eth:
if [ -n "$MODULE" ]; then
for oneword in $MODULE; do
$MODPROBE $oneword
done
else
$IP link set dev $NAME down
fi
--
Voins
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-11 4:39 ` Alexey Voinov
@ 2006-10-16 7:59 ` Вадим Илларионов
2006-10-16 8:08 ` Вадим Илларионов
0 siblings, 1 reply; 16+ messages in thread
From: Вадим Илларионов @ 2006-10-16 7:59 UTC (permalink / raw)
To: community
Alexey Voinov wrote:
>> Читайте по губам:
> Предпочитаю читать код.
И сам читаю. И правлю местами. К примеру, в етснет-0.8.4 есть косячок в
functions-fw:
IPTABLES_SED_RULES+="s/\(^\|[^-]\b\)$SEARCH\(\b[^-]\|$\)/\1$REPLACE\2/g;"
Может, сизифовый bash и умеет "+=", а в моём компакте+апдейты+бэкпорты -
фигушки. Пришлось менять на:
IPTABLES_SED_RULES=${IPTABLES_SED_RULES}"s/\(^\|[^-]\b\)$SEARCH\(\b[^-]\
$\)/\1$REPLACE\2/g;"
И прочее по мелочи. Типа VARPREFIX в ifup-common, который неправильно
собирал опции sysctl.conf
Ладно, оставим. Если угодно, могу выслать пересобранный срц.рпм
________________________
С уважением,
Вадим Илларионов
системный администратор
Усолье-Сибирский почтамт
JID: см. <mailto:>
UIN: 7899517
Телефоны:
Мобильный +7 904 658-4154
Рабочий +7 39543 444-00
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-16 7:59 ` Вадим Илларионов
@ 2006-10-16 8:08 ` Вадим Илларионов
2006-10-16 8:15 ` Motsyo Gennadi aka Drool
0 siblings, 1 reply; 16+ messages in thread
From: Вадим Илларионов @ 2006-10-16 8:08 UTC (permalink / raw)
To: community
А вот бы ещё при работе с интерфейсом в виде переменных помимо ${NAME} были
доступны его ${IP}, ${NET}, ${MASK}, ${BROADCAST} - как просто было бы
писать правела иптаблесов! А будь эти переменные доступны не только для
фаервола, но и для всяких ip route, ip link и т.п...
Да где ж времени столько взять?
________________________
С уважением,
Вадим Илларионов
системный администратор
Усолье-Сибирский почтамт
JID: см. <mailto:>
UIN: 7899517
Телефоны:
Мобильный +7 904 658-4154
Рабочий +7 39543 444-00
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Comm] напомните - 2 сетевые
2006-10-09 16:24 ` Alexey Voinov
2006-10-09 20:28 ` Alexey Rusakov
2006-10-10 1:13 ` Вадим Илларионов
@ 2006-10-10 5:27 ` Vladimir V. Kamarzin
2 siblings, 0 replies; 16+ messages in thread
From: Vladimir V. Kamarzin @ 2006-10-10 5:27 UTC (permalink / raw)
To: ALT Linux Community
>>>>> On 09 Oct 2006 at 22:24 "AV" == Alexey Voinov writes:
AV> В etcnet есть поддержка замечательной возможности: переименование
AV> интерфейсов с помощью ifrename. Для того, чтобы эту штуку
AV> задействовать делаем следующее:
AV> ~ В /etc/net/ создаём файлик c именем iftab. Как он должен выглядеть
AV> подробно расписано в man iftab. Лично мне хватило ровно одного
AV> критерия - MAC-адреса карточки. В моём случае файлик выглядит
AV> приблизительно так:
AV> $ cat /etc/net/iftab
AV> air0 mac 00: ... :9A
AV> cbl0 mac 00: ... :14
Я относительно недавно сталкивался с подобной задачей. Так вот, привязка по
макам в моём случае не срабатывала. vsu посоветовал вместо неё использовать
привязку по businfo.
--
vvk
^ permalink raw reply [flat|nested] 16+ messages in thread