Posts Tagged ‘ifconfig’

5
Feb

debian komut satırından static ip verme

   Posted by: Muhammed YÜRÜRDURMAZ    in Bilgi Ve Deneyim

tanımlı ağ bağlantılarını görmek için

#  -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:90:b5:46
          inet addr:192.168.0.85  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe90:b546/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:139716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17482 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:169356342 (161.5 MiB)  TX bytes:1355703 (1.2 MiB)
          Interrupt:19 Base address:0x2000 

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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)

dosyası içersinden eth0 a 192.168.0.17 adresini verecek örnek altta. ağ geçidi 192.168.0.1 olacak. dns sunucular 4.2.2.1, 4.2.2.2, 4.2.2.3 olacak

Not: dns ayarı için resolvconf yüklü olmalı

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
	address 192.168.0.17
	netmask 255.255.255.0
	network 192.168.0.0
	broadcast 192.168.0.255
	gateway 192.168.0.1
	dns-nameservers 4.2.2.1 4.2.2.2 4.2.2.3
Bookmark and Share
Tags: , , , ,

Tags: , , , ,

Switch to our mobile site