Проблема не пингуется сервер ud1804 по имени с винды.
Фича Ubuntu18.04 в том, что при обращении по имени к серверу, например ud1804, для ping, ssh, (имя сервера 1С) добавляем к имени .local, т.е. ud1804.local .
Samba share works with IP but not with hostname from Windows 7
Что делает «.local»?
Как изменить имя хоста на Ubuntu 18.04
How to Change Hostname in Ubuntu 18.04 (Change Computer Name)
$ grep 'wins' /etc/nsswitch.conf
user@u1804:~$ ps aux | grep 'winbind\|nmbd\|avahi' | grep -v 'grep'
avahi 722 0.0 0.0 47204 3684 ? Ss 15:58 0:00 avahi-daemon: running [u1804.local]
avahi 801 0.0 0.0 47076 340 ? S 15:58 0:00 avahi-daemon: chroot helper
root 836 0.0 0.0 264048 11996 ? Ss 15:58 0:00 /usr/sbin/nmbd --foreground --no-process-group
user@u1804:~$ ps aux | grep 'winbind\|nmbd\|avahi' | grep -v 'grep'
avahi 722 0.0 0.0 47204 3684 ? Ss 15:58 0:00 avahi-daemon: running [u1804.local]
avahi 801 0.0 0.0 47076 340 ? S 15:58 0:00 avahi-daemon: chroot helper
root 836 0.0 0.0 264048 12484 ? Ss 15:58 0:00 /usr/sbin/nmbd --foreground --no-process-group
Увидел u1804.local , так пингуется.
Ниже полезные команды:
$ grep -c 'u1804' /etc/hosts
1
$ sudo nano /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.53 u1804
$ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-08-10 15:58:41 UTC; 45min ago
Main PID: 722 (avahi-daemon)
Status: "avahi-daemon 0.7 starting up."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/avahi-daemon.service
├─722 avahi-daemon: running [u1804.local]
└─801 avahi-daemon: chroot helper
авг 10 15:58:41 u1804 avahi-daemon[722]: New relevant interface lo.IPv6 for mDNS.
авг 10 15:58:41 u1804 avahi-daemon[722]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
авг 10 15:58:41 u1804 avahi-daemon[722]: New relevant interface lo.IPv4 for mDNS.
авг 10 15:58:41 u1804 avahi-daemon[722]: Network interface enumeration completed.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for fe80::a00:27ff:fed2:1c9a on enp0s3.*.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for 192.168.0.53 on enp0s3.IPv4.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for ::1 on lo.*.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for 127.0.0.1 on lo.IPv4.
авг 10 15:58:41 u1804 systemd[1]: Started Avahi mDNS/DNS-SD Stack.
авг 10 15:58:42 u1804 avahi-daemon[722]: Server startup complete. Host name is u1804.local. Local service cookie is 2772089266
$ dig u1804
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> u1804
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60914
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;u1804. IN A
;; ANSWER SECTION:
u1804. 0 IN A 192.168.0.53
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Aug 10 17:00:53 UTC 2018
;; MSG SIZE rcvd: 50
Фича Ubuntu18.04 в том, что при обращении по имени к серверу, например ud1804, для ping, ssh, (имя сервера 1С) добавляем к имени .local, т.е. ud1804.local .
Samba share works with IP but not with hostname from Windows 7
Что делает «.local»?
Как изменить имя хоста на Ubuntu 18.04
How to Change Hostname in Ubuntu 18.04 (Change Computer Name)
$ grep 'wins' /etc/nsswitch.conf
user@u1804:~$ ps aux | grep 'winbind\|nmbd\|avahi' | grep -v 'grep'
avahi 722 0.0 0.0 47204 3684 ? Ss 15:58 0:00 avahi-daemon: running [u1804.local]
avahi 801 0.0 0.0 47076 340 ? S 15:58 0:00 avahi-daemon: chroot helper
root 836 0.0 0.0 264048 11996 ? Ss 15:58 0:00 /usr/sbin/nmbd --foreground --no-process-group
user@u1804:~$ ps aux | grep 'winbind\|nmbd\|avahi' | grep -v 'grep'
avahi 722 0.0 0.0 47204 3684 ? Ss 15:58 0:00 avahi-daemon: running [u1804.local]
avahi 801 0.0 0.0 47076 340 ? S 15:58 0:00 avahi-daemon: chroot helper
root 836 0.0 0.0 264048 12484 ? Ss 15:58 0:00 /usr/sbin/nmbd --foreground --no-process-group
Увидел u1804.local , так пингуется.
Ниже полезные команды:
$ grep -c 'u1804' /etc/hosts
1
$ sudo nano /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.53 u1804
$ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-08-10 15:58:41 UTC; 45min ago
Main PID: 722 (avahi-daemon)
Status: "avahi-daemon 0.7 starting up."
Tasks: 2 (limit: 4915)
CGroup: /system.slice/avahi-daemon.service
├─722 avahi-daemon: running [u1804.local]
└─801 avahi-daemon: chroot helper
авг 10 15:58:41 u1804 avahi-daemon[722]: New relevant interface lo.IPv6 for mDNS.
авг 10 15:58:41 u1804 avahi-daemon[722]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
авг 10 15:58:41 u1804 avahi-daemon[722]: New relevant interface lo.IPv4 for mDNS.
авг 10 15:58:41 u1804 avahi-daemon[722]: Network interface enumeration completed.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for fe80::a00:27ff:fed2:1c9a on enp0s3.*.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for 192.168.0.53 on enp0s3.IPv4.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for ::1 on lo.*.
авг 10 15:58:41 u1804 avahi-daemon[722]: Registering new address record for 127.0.0.1 on lo.IPv4.
авг 10 15:58:41 u1804 systemd[1]: Started Avahi mDNS/DNS-SD Stack.
авг 10 15:58:42 u1804 avahi-daemon[722]: Server startup complete. Host name is u1804.local. Local service cookie is 2772089266
$ dig u1804
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> u1804
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60914
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;u1804. IN A
;; ANSWER SECTION:
u1804. 0 IN A 192.168.0.53
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Aug 10 17:00:53 UTC 2018
;; MSG SIZE rcvd: 50
Комментариев нет:
Отправить комментарий