debian-networking.rst
changeset 1894 2e3bc2435d68
parent 1 743f7a15697a
child 1905 fba288d59662
equal deleted inserted replaced
1893:da0024f4f068 1894:2e3bc2435d68
       
     1 .. -*- coding: utf-8; -*-
       
     2 .. include:: HEADER.rst
       
     3 
       
     4 ===================
       
     5  Debian networking
       
     6 ===================
       
     7 .. contents::
       
     8 
       
     9 Описание файлов конфигурации::
       
    10 
       
    11   $ cat /etc/hostname       (сетевое имя компьютера без домена)
       
    12   debian-vm
       
    13   $ cat /etc/resolv.conf    (Настройки DNS)
       
    14   search bifit.int
       
    15   nameserver 192.168.1.1
       
    16   $ cat /etc/hostname.eri0  (имя из hosts или IP)
       
    17   sparc
       
    18   $ cat /etc/hosts          (назначение IP хосту)
       
    19   127.0.0.1     localhost                      (обязательная строка)
       
    20   192.168.1.26  debian-vm.bifit.int debian-vm  (обязательная строка)
       
    21   $ cat /etc/interfaces
       
    22   # This file describes the network interfaces available on your system
       
    23   # and how to activate them. For more information, see interfaces(5).
       
    24 
       
    25   # The loopback network interface
       
    26   auto lo
       
    27   iface lo inet loopback
       
    28 
       
    29   # The primary network interface
       
    30   allow-hotplug eth0
       
    31   iface eth0 inet static
       
    32       address 192.168.1.26          (назначить сетевой адрес интерфейса)
       
    33       netmask 255.255.255.0         (назначить сетевую маску для подсетей)
       
    34       network 192.168.1.0
       
    35       broadcast 192.168.1.255
       
    36       gateway 192.168.1.1
       
    37       # dns-* options are implemented by the resolvconf package, if installed
       
    38       dns-nameservers 192.168.1.1
       
    39       dns-search bifit.int
       
    40