[linux] debian 3.0 viac ip na jeden interface
Marian Cavojsky
cavojsky na soria-grey.sk
Pondělí Září 16 13:29:15 CEST 2002
On Mon, Sep 16, 2002 at 09:56:07AM +0200, Dragon wrote:
>
> root@[raptor ~] # cat /etc/network/interfaces
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
>
> # The loopback interface
> auto lo
> iface lo inet loopback
>
> # The first network card - this entry was created during the Debian
> installation
> # (network, broadcast and gateway are optional)
> auto eth0
^^^^^^^^^^ doplnit eth0:1
>
> iface eth0 inet static
> address 192.168.0.40
> netmask 255.255.255.0
> gateway 192.168.0.1
>
> iface eth0:1 inet static
> address 192.168.0.41
> netmask 255.255.255.0
> gateway 192.168.0.1
> root@[raptor ~] # ifconfig
> eth0 Link encap:Ethernet HWaddr 00:60:97:82:B4:20
> inet addr:192.168.0.40 Bcast:192.168.0.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:653 errors:0 dropped:0 overruns:0 frame:0
> TX packets:547 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:71582 (69.9 KiB) TX bytes:49783 (48.6 KiB)
> Interrupt:12 Base address:0xe400
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:3924 Metric:1
> RX packets:14 errors:0 dropped:0 overruns:0 frame:0
> TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:1120 (1.0 KiB) TX bytes:1120 (1.0 KiB)
>
>
> >Mne taketo nastavenie funguje. Akurat, ze so suborom intefaces pracuju
> >programy ifup a ifdown a nie ifconfig.
> >
Ako som uz pisal kezdze nie je nastavene automaticke nahodenie adresy
eth0:1 (Preco ste nepouzili eth0:0?) Tak ho treba spustit pomocou:
$ ifup eth0:1
Ukoncenie pomocou:
$ ifdown eth0:1
Su to skripty na konfiguraciu sietovych rozhrani pomocou konfiguracneho
suboru interfaces. Mozete vsetko rucne nastavovat pomocou ifconfig.
$ ifconfig eth0:1 192.168.0.41
$ ifconfig eth0:1 up
$ route add default gw 192.168.0.1
dufam, ze som na nic nezabudol. Nepouzivam to.
--
Marian Cavojsky <cavojsky @ soria-grey.sk>
Spravca siete, Soria & Grey s.r.o, reklamna agentura
Další informace o konferenci linux