IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

Van egy Debian testing rendszer, amelyik az egyik Ethernetjen egy csomo
Etherdrive taroloegyseghez csatlakozik AoE-vel (ATA over Ethernet).
Ami egy regisztralt protokoll, szama 0x88a2. (Ahogy az IPv4 a 0x0800,
az IPv6 a 0x86dd, az ARP a 0x0806 stb.)

Arra lenne szuksegem, hogy valaki, _mondjuk_ a /etc/init.d/ifupdown
up-ba tegye az interfeszt bootolaskor. De ne akarjon IP cimet adni
neki. Se IPX-et. Csak legyen az allapota UP.

Mit kellene beirni a /etc/network/interfaces file-ba?
Az "auto eth2" melle.

Az "iface eth2 inet manual" nem jott be.
Az "iface eth2 inet static" melle cimet, es mas csicsakat kell megadni.
(Persze ha minden kotel szakad, akkor megteszem. De nem szep.)

(Igen, irhatnek scripteket a /etc/rc*.d/-be, de nem fogok.)

Szoval ELEGANS megoldasa van-e valakinek?
Favago az van nekem is. :-)

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Lajber Zoltan
On Tue, 1 Aug 2006, Kiss Gabor wrote:

> Mit kellene beirni a /etc/network/interfaces file-ba?
> Az "auto eth2" melle.

Az nagyon csunya, ha pl az eth0-hoz olyant irsz, hogy
"pre-up  ifconfig eth2 up" ?

Udv,
-=Lajbi=
 LAJBER Zoltan   Szent Istvan Egyetem,  Informatika Hivatal
  Experience is something you don't get until just after you need it
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gábor Lénárt
On Tue, Aug 01, 2006 at 09:53:37AM +0200, Lajber Zoltan wrote:
> > Mit kellene beirni a /etc/network/interfaces file-ba?
> > Az "auto eth2" melle.
> 
> Az nagyon csunya, ha pl az eth0-hoz olyant irsz, hogy
> "pre-up  ifconfig eth2 up" ?

:) Hat az azert gaz mert akkor osszefugges lesz a ket iface kozott.
En pl azt csinalnam, hogy megadok egy IP cimet (1.2.3.4, akarmi)
aztan egy up utan torlom az interface-rol:

auto eth2
iface eth2 inet static
address 1.2.3.4
netmask 255.255.255.0
up /sbin/ip addr del 1.2.3.4 dev eth2

Ez se sokkal szebb, de legalabb "kulon" van es nincs osszehazasitva
ket NIC-re vonatkozo bejegyzes, pl le lehet nyomni es felhuzni
kulon oket ...

-- 
- Gábor
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gábor Lénárt
On Tue, Aug 01, 2006 at 10:15:03AM +0200, Gábor Lénárt wrote:
> auto eth2
> iface eth2 inet static
> address 1.2.3.4
> netmask 255.255.255.0
> up /sbin/ip addr del 1.2.3.4 dev eth2

Most nezem, van olyan hogy "manual" method static helyett, az lehet meg
szebb lenne (man interfaces), lehet hogy pl ez mukodne:

auto eth2
iface eth2 inet manual
up /sbin/ifconfig eth2 up

Vagy valami hasonlo?

-- 
- Gábor
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
Lajber Zoltan <[EMAIL PROTECTED]> writes:
>> Mit kellene beirni a /etc/network/interfaces file-ba?
>> Az "auto eth2" melle.
> 
> Az nagyon csunya, ha pl az eth0-hoz olyant irsz, hogy
> "pre-up  ifconfig eth2 up" ?

Felek, szintaktikai hiba, ha _csak_ ennyit irok.

Ird csak ki teljes reszletesseggel a bekezdest! (Stanza)
En meg lefuttatom az ifup parancsot, es visszajelzek, mi volt a baja. :)

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
Lajber Zoltan <[EMAIL PROTECTED]> writes:
> Az nagyon csunya, ha pl az eth0-hoz olyant irsz, hogy
> "pre-up  ifconfig eth2 up" ?

Ja, hogy az eth0-hoz!
Igen, az nagyon.

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
Gábor Lénárt <[EMAIL PROTECTED]> writes:
> En pl azt csinalnam, hogy megadok egy IP cimet (1.2.3.4, akarmi)
> aztan egy up utan torlom az interface-rol:
> 
> auto eth2
> iface eth2 inet static
> address 1.2.3.4
> netmask 255.255.255.0
> up /sbin/ip addr del 1.2.3.4 dev eth2
> 
> Ez se sokkal szebb,

Vegul is... ez meg mindig jobb, mint ami eddig eszembe jutott. :-)

Kosz!

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
Gábor Lénárt <[EMAIL PROTECTED]> writes:
> Most nezem, van olyan hogy "manual" method static helyett, az lehet meg
> szebb lenne (man interfaces), lehet hogy pl ez mukodne:
> 
> auto eth2
> iface eth2 inet manual
>   up /sbin/ifconfig eth2 up
> 
> Vagy valami hasonlo?

Mondtam az elejen, hogy a manual nem ment.
De igy ahogy csinalod, mar igen. :-)

Igy a tokelyes:

iface eth2 inet manual
up ifconfig eth2 up
down ifconfig eth2 down

Prma!

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Lajber Zoltan
On Tue, 1 Aug 2006, Kiss Gabor wrote:

> > "pre-up  ifconfig eth2 up" ?
>
> Felek, szintaktikai hiba, ha _csak_ ennyit irok.
>
> Ird csak ki teljes reszletesseggel a bekezdest! (Stanza)
> En meg lefuttatom az ifup parancsot, es visszajelzek, mi volt a baja. :)

iface eth0.105 inet static
vlan-raw-device eth0
address 192.168.105.253
netmask 255.255.255.0
pre-up  ifconfig eth0 up

Ez persze teljesen mas celbol van, de mukodik :)

Udv,
-=Lajbi=
 LAJBER Zoltan   Szent Istvan Egyetem,  Informatika Hivatal
  Experience is something you don't get until just after you need it
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gábor Lénárt
On Tue, Aug 01, 2006 at 08:41:53AM +, Kiss Gabor wrote:
> Mondtam az elejen, hogy a manual nem ment.
> De igy ahogy csinalod, mar igen. :-)
> 
> Igy a tokelyes:
> 
> iface eth2 inet manual
> up ifconfig eth2 up
> down ifconfig eth2 down

Igen, a down kimaradt, tenyleg :)

-- 
- Gábor
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
Lajber Zoltan <[EMAIL PROTECTED]> writes:
>> Ird csak ki teljes reszletesseggel a bekezdest! (Stanza)
>> En meg lefuttatom az ifup parancsot, es visszajelzek, mi volt a baja. :)
> 
> iface eth0.105 inet static
> vlan-raw-device eth0
> address 192.168.105.253
> netmask 255.255.255.0
> pre-up  ifconfig eth0 up
> 
> Ez persze teljesen mas celbol van, de mukodik :)

Csak nem azt valositja meg, amit en szeretnek.

Arra celoztam, hogy _ez_ nem mukodne:

iface eth2 inet static
pre-up ifconfig eth0 up

Mert akkor ordit az ifup, hogy nincs cim.

kissg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gábor Lénárt
On Tue, Aug 01, 2006 at 09:15:13AM +, Kiss Gabor wrote:
> Arra celoztam, hogy _ez_ nem mukodne:
> 
> iface eth2 inet static
>   pre-up ifconfig eth0 up
> 
> Mert akkor ordit az ifup, hogy nincs cim.

igen, mert static method-nal ugye kotelezo az address es a netmask, pont
amit nem akarunk itt ;) Azert gondoltam ennek utolagos eltavolitasara (up ip
addr del ...) vagy mas method hasznalatara (manual). Marmint ezt
magyarazatkeppen irom listara, nem neked, te nyilvan erted, hisz te vetetted
fel a problemat eleve :)

-- 
- Gábor
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread SZOKOVACS Robert
On Tuesday 01 August 2006 10:18, Gábor Lénárt wrote:
> On Tue, Aug 01, 2006 at 10:15:03AM +0200, Gábor Lénárt wrote:
> > auto eth2
> > iface eth2 inet static
> > address 1.2.3.4
> > netmask 255.255.255.0
> > up /sbin/ip addr del 1.2.3.4 dev eth2
>
> Most nezem, van olyan hogy "manual" method static helyett, az lehet meg
> szebb lenne (man interfaces), lehet hogy pl ez mukodne:
>
> auto eth2
> iface eth2 inet manual
>   up /sbin/ifconfig eth2 up
>
> Vagy valami hasonlo?

nekem ez muxik:

auto eth2
iface eth2 inet manual
up command ifconfig eth2 up

Szo

-- 
Any honest declaration for peace must be an enumeration of 
the sacrifices one is prepared to make for its preservation.
  Werner Heisenberg
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Kiss Gabor

In article <[EMAIL PROTECTED]>,
SZOKOVACS Robert <[EMAIL PROTECTED]> writes:
> On Tuesday 01 August 2006 10:18, Gábor Lénárt wrote:
>> Vagy valami hasonlo?
> nekem ez muxik:
> auto eth2
> iface eth2 inet manual
> up command ifconfig eth2 up

Az "ifdown eth2" nem fog csinalni semmit. Ezert kell a down sor is.

kissg





_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread SZOKOVACS Robert
On Tuesday 01 August 2006 12:14, Kiss Gabor wrote:
> In article <[EMAIL PROTECTED]>,
>
>   SZOKOVACS Robert <[EMAIL PROTECTED]> writes:
> > On Tuesday 01 August 2006 10:18, Gábor Lénárt wrote:
> >> Vagy valami hasonlo?
> >
> > nekem ez muxik:
> > auto eth2
> > iface eth2 inet manual
> > up command ifconfig eth2 up
>
> Az "ifdown eth2" nem fog csinalni semmit. Ezert kell a down sor is.

En tudtam elni anelkul is, nekem a vmware kapta ezt az interfacet. :)

Szo
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gabor HALASZ

Gábor Lénárt wrote:


Vagy valami hasonlo?

A manual kapcsolo csak tervezesi hiba, nem hasznalhato semmire. Azt 
mondja az ifupdown-nak, hogy ne csinaljon semmit  vele. De akkor minek 
beirni?!


--
Gabor HALASZ <[EMAIL PROTECTED]>
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gabor HALASZ

Kiss Gabor wrote:

Van egy Debian testing rendszer, amelyik az egyik Ethernetjen egy csomo
Etherdrive taroloegyseghez csatlakozik AoE-vel (ATA over Ethernet).
Ami egy regisztralt protokoll, szama 0x88a2. (Ahogy az IPv4 a 0x0800,
az IPv6 a 0x86dd, az ARP a 0x0806 stb.)

Arra lenne szuksegem, hogy valaki, _mondjuk_ a /etc/init.d/ifupdown
up-ba tegye az interfeszt bootolaskor. De ne akarjon IP cimet adni
neki. Se IPX-et. Csak legyen az allapota UP.

Mit kellene beirni a /etc/network/interfaces file-ba?
Az "auto eth2" melle.

Az "iface eth2 inet manual" nem jott be.


Pedig de.


Az "iface eth2 inet static" melle cimet, es mas csicsakat kell megadni.
(Persze ha minden kotel szakad, akkor megteszem. De nem szep.)

(Igen, irhatnek scripteket a /etc/rc*.d/-be, de nem fogok.)

Szoval ELEGANS megoldasa van-e valakinek?


Elegans megoldas az, hogy nem hasznalod az ifupdown-t, mert nem 
hasznalhato semmilyen osszetett feladatra.



Favago az van nekem is. :-)


Kevesbe favgo modszer:

manual-ba teszed, utana az up.d es down.d direkbe raksz egy-egy sciptet, 
ami ehhez hasonlo:



#!/bin/sh

case $IFACE in
eth2)
ifconfig eth2 up
;;
esac


--
Gabor HALASZ <[EMAIL PROTECTED]>
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gábor Lénárt
On Tue, Aug 01, 2006 at 04:14:00PM +0200, Gabor HALASZ wrote:
> Gábor Lénárt wrote:
> >
> >Vagy valami hasonlo?
> >
> A manual kapcsolo csak tervezesi hiba, nem hasznalhato semmire. Azt 
> mondja az ifupdown-nak, hogy ne csinaljon semmit  vele. De akkor minek 
> beirni?!

Szerintem nem azt mondja. Illetve ha csak azt irod, akkor persze azt :)
Viszont azonnal lesz ertelme, ha up vagy down parancsokat adogatsz utana.
Ahogy meg is beszeltuk mar. Persze "normal" esetben a static is jo lenne,
ha nem lenne kotelezo megadni IP cimet es netmaszkot, amit pont nem akarunk
ugye, csak annyit hogy az iface up-ban legyen ...

-- 
- Gábor
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux


Re: IP-mentes interfesz

2006-08-01 Thread Gabor HALASZ

Gábor Lénárt wrote:


Szerintem nem azt mondja. Illetve ha csak azt irod, akkor persze azt :)
Viszont azonnal lesz ertelme, ha up vagy down parancsokat adogatsz utana.
Ahogy meg is beszeltuk mar. Persze "normal" esetben a static is jo lenne,
ha nem lenne kotelezo megadni IP cimet es netmaszkot, amit pont nem akarunk
ugye, csak annyit hogy az iface up-ban legyen ...

Vagyis semmi extra funkcionalitassal nem rendelkezik, csak tobb 
lehetoseget ad ertelmezesi es konfiguralasi hibak elkovetesere.


--
Gabor HALASZ <[EMAIL PROTECTED]>
_
linux lista  -  linux@mlf.linux.rulez.org
http://mlf2.linux.rulez.org/mailman/listinfo/linux