#auto em1
auto eth0 eth0:1
 iface eth0 inet static
     address 1.1.1.1
     network1.1.1.0
     netmask 255.255.255.0
     broadcast 1.1.1.255
     gateway 1.1.1.1
 iface eth0:1 inet static
     address 1.1.1.2
     network 1.1.2.0
     netmask 255.255.255.0


auto eth0 eth0:1
 iface eth0 inet static
     address 1.1.1.2
     network 1.1.1.0
     netmask 255.255.255.0
     broadcast 1.1.1.255
     gateway 1.1.1.1
 iface eth0:1 inet static
     address 1.1.1.3
     network 1.1.1.0
     netmask 255.255.255.0
     gateway 1.1.1.1

şeklinde yaparsanız doğru config olur. yukarıda aynı network 'den 2 ip vermiş oluyorsunuz. eğer ip leri farklı subnetlerden vermek istiyorsanız "address, network, broadcast" kısımlarını değiştirerek yazmalısınız.
 gateway 1.1.1.1
adresiniz de sizin modeminiz veya dışarıya çıkarken kullandığınız ip 'nizdir.





Saygılarımla,


K. Gökhan COŞKUN | Linux System Admin

efe yilmaz yazdı:
Merhabalar,
/etc/network/interface üzerinden başka bir tane daha ip tanımlamak için aşagıdaki ayarları girmeme rağmen, ikinci ip adresimi tanımlayamıyorum. Internette ne kadar kaynak varsa hepsini denedim diyebilirim fakat bir türlü olduramadım. Sebebi ne olabilir acaba? 

#auto lo
#iface lo inet loopback

#auto em1
auto eth0 eth0:1
 iface eth0 inet static
     address 1.1.1.1
     network1.1.1.0
     netmask 255.255.255.0
     broadcast 1.1.1.255
     gateway 1.1.1.1
 iface eth0:1 inet static
     address 1.1.1.2
     network 1.1.2.0
     netmask 255.255.255.0



SONUÇ:

em1       Link encap:Ethernet  HWaddr d4:ae:52:c5:22:23  
          inet addr:1.1.1.1  Bcast:77.223.134.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fec5:2223/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:456394 errors:0 dropped:6469 overruns:0 frame:0
          TX packets:3351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:30510900 (30.5 MB)  TX bytes:476552 (476.5 KB)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:138156 (138.1 KB)  TX bytes:138156 (138.1 KB)

kaynaklar: 


GİZLİLİK NOTU: Bu mesaj ve ekleri yalnızca gönderildiği kişi(lere) özeldir ve gizlidir. Mesaj sizin adınıza değilse, içeriğini ve varsa ekindeki dosyaları kimseye göndermeyiniz ya da kopyalamayınız. Bu mesajın herhangi bir şekilde açıklanması, kullanılması, kopyalanması, yayılması veya mesaj içeriği ile ilgili olarak herhangi bir işlem yapılması kesinlikle yasaktır. Böyle bir durumda lütfen göndereni uyarıp, mesajı siliniz. İstanbul Ulaşım San. ve Tic. A.Ş. bu mesajın içeriği ve ekleri ile ilgili olarak hiçbir hukuksal sorumluluğu kabul etmez.
CONFIDENTIALITY NOTICE: This message and attachments are confidential and intended solely for the individual(s) stated in this message. If you received this message although you are not the addressee, you are responsible to keep the message confidential. If you are not the intended recipient please notify the sender immediately and destroy this e-mail. İstanbul Ulaşım San. ve Tic. A.Ş. does not accept legal responsibility for the contents and the attacments of this message.
_______________________________________________
Linux-sunucu E-Posta Listesi
[email protected]

Liste kurallarını http://liste.linux.org.tr/kurallar.php  bağlantısından 
okuyabilirsiniz;

Bu Listede neden bulunduğunuzu bilmiyorsanız veya artık bu listeden gelen 
e-postaları almak istemiyorsanız aşağıdaki bağlantı adresini kullanarak 1 
dakika içinde üyeliğinizi sonlandırabilirsiniz.
https://liste.linux.org.tr/mailman/listinfo/linux-sunucu

Cevap