LinuxForum.Fans
Тема

Не пингуются компьютеры сети не Linux -> Linux не Windows -> Linux

Автор: yurasik6363 5 сообщений 2501 просмотров
15.01.2015 18:25 #409647

Господа товарищи подскажите что не так и куда копать с лунуксом знаком недавно, не понимаю в какую сторону капать. Настроил сервер как шлюз 2 сетевые карты
eth0 - 192.168.10.1 (локалка)
eth1 - DHCP (интернет 1)
настроен DHCP

text

# Динамическое обновление DNS, обязательная строчка без нее dhcpd не запустится
# none - не использовать динамическое обновление
# ad-hoc - устарело, и не должно использоваться
# interim - позволяет обновлять DNS записи
authotitative;
ddns-update-style      interim;
default-lease-time    28800;
max-lease-time          28800;

allow booting; allow bootp; option option-128 code 128 = string; option option-129 code 129 = text; next-server 192.168.10.1; filename "ploplinux-netboot/pxelinux.0";

# Описание подсети subnet 192.168.10.0 netmask 255.255.255.0 {

# Параметры передаваемые dhcp-клиентам option subnet-mask 255.255.255.0; # Маска подсети option broadcast-address 192.168.10.255; # Адрес широковещатель$ option routers 192.168.10.1; # Адрес шлюза option domain-name-servers 192.168.10.1,192.168.10.3,8.8.8.8,4.4.4.4,77.50.$ option netbios-node-type 8; # Конфигурация WINS-клиента option domain-name "htcdn.net"; # Суффикс домена pool { range dynamic-bootp 192.168.10.10 192.168.10.254; # Обл$

}

#deny unknown-clients;

}

настроен named

text

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options { listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; forwarders {77.50.0.3; 212.1.224.6; }; recursion yes; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; zone "." IN { type hint; file "named.ca"; };

листинг hosts

text

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.10.1 gateway.localdomain gateway
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

листинг nano /etc/resolv.conf

text

; generated by /sbin/dhclient-script
search lcl.starlink.ru
nameserver 77.50.0.3
nameserver 77.50.1.3

листинг /etc/nsswitch.conf

text

#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Valid entries include:
#
#    nisplus                 Use NIS+ (NIS version 3)
#    nis                     Use NIS (NIS version 2), also called YP
#    dns                     Use DNS (Domain Name Service)
#    files                   Use the local files
#    db                      Use the local database (.db) files
#    compat                  Use NIS on compat mode
#    hesiod                  Use Hesiod for user lookups
#    [NOTFOUND=return]    Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis #hosts: db files nisplus nis dns hosts: files dns

# Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files

netgroup: nisplus

publickey: nisplus

automount: files nisplus aliases: files nisplus

в итоге интернет работает, ping ya.ru и ему любой другой ресурс интернет пингуется без вопросов с любой машины, а вот внутренние компьютеры пингуются только по IP

text

nslookup storagesmb 192.168.10.1
Server:        192.168.10.1
Address:    192.168.10.1#53

** server can't find storagesmb: NXDOMAIN

15.01.2015 19:17 · отредактировано #409650

В файле /etc/host.conf должна быть прописана строка:

text
order hosts, bind
15.01.2015 19:19 #409652

ну правильно, а кто за вас будет настраивать локальную зону dns ?

15.01.2015 19:37 #409653

Ну, да. Чтобы пинговались внутренние машины, надо настроить либо локальную зону dns, либо прописывать все внутренние компьютеры в файле hosts на всех внутренних компьютерах. Но, в случае прописывания внутренних машин в файле hosts, использовать nslookup для локальных адресов не имеет смысла.

03.02.2015 02:27 #412713

А как по ip быстро и легко узнать имя?, при том что dhscp+ddns настроен и работает(пингуется по имени и win и lin).

Войдите или зарегистрируйтесь, чтобы ответить.