Windows не пингует linux

Модератор: Bizdelnick

code32

Сообщения: 3

Сеть между Windows и Linux. Не проходят пинги.

Поставил машине с Linux ИП 192.168.0.1 маску подсети 255.255.255.0, а машине с Windows 192.168.0.2 и маску подсети 255.255.255.0, основной шлюз поставил 192.168.0.1.
Пинги не доходят, а машина с Windows вообще утверждает что сетевой провод не подключен. Все те же действия проделанные в случае двух Windows машин(на одном из компов стоит и линукс и виндовс) дают положительный результат. В линуксе только осваиваюсь и поэтому даже не представляю в каком направлении копать, буду благодарен за любую информацию на эту тему, ссылки на документацию или объяснение.

Windows XP SP 2
ALT Linux 4.0.2

drBatty

Сообщения: 8735
Статус: GPG ID: 4DFBD1D6 дом горит, козёл не видит…
ОС: Slackware-current
Контактная информация:

Re: Сеть между Windows и Linux. Не проходят пинги.

Сообщение

drBatty »

code32 писал(а): ↑

20.08.2008 15:24

Если бы мне подскозали как этот вывод получить в консоле

кстати, может беда в том, что ifconfig запущена не с правами root’а?
надо сначала
su
пароль рута
ifconfig

ЗЫЖ вместо ifconfig написал ipconfig

Goodvin

Ведущий рубрики
Сообщения: 4333
Статус: ⚝⚠⚒⚑⚖☭☞☣☤&

Re: Сеть между Windows и Linux. Не проходят пинги.

Сообщение

Goodvin »

code32 писал(а): ↑

19.08.2008 19:06

Поставил машине с Linux ИП 192.168.0.1 маску подсети 255.255.255.0, а машине с Windows 192.168.0.2 и маску подсети 255.255.255.0, основной шлюз поставил 192.168.0.1.
Пинги не доходят, а машина с Windows вообще утверждает что сетевой провод не подключен. Все те же действия проделанные в случае двух Windows машин(на одном из компов стоит и линукс и виндовс) дают положительный результат. В линуксе только осваиваюсь и поэтому даже не представляю в каком направлении копать, буду благодарен за любую информацию на эту тему, ссылки на документацию или объяснение.

Windows XP SP 2
ALT Linux 4.0.2

Автор, вы это видели:
как настроить локальную сеть
сеть Linux win
Помогите настроить сеть в Suse 10.3
Помогите настроить сеть!
??
Поиск для кого существует ?

stomp писал(а): ↑

20.08.2008 15:38

Посмотри одинаковые ли рабочие группы.

Уважаемый, это Вы к чему написали ?
Какие в пингах «рабочие группы» ?

code32 писал(а): ↑

20.08.2008 15:24

Связь между компами есть, так как я уже заметил, при включении вместо линукса винды все работает и пинги проходят. Если бы мне подскозали как этот вывод получить в консоле (какой командой), я его предоставлю

Об этом уже сказали много раз.
Надо просто пересилить свою лень и воспользоваться поиском.

code32

Сообщения: 3

Re: Сеть между Windows и Linux. Не проходят пинги.

Сообщение

code32 »

Автор, вы это видели:
как настроить локальную сеть
сеть Linux win
Помогите настроить сеть в Suse 10.3
Помогите настроить сеть!
??
Поиск для кого существует ?

Поиском пользоваться я умею, и эти темы читал. Для надёжности прочёл их ещё раз. Собственно подобные шаги я пробовал. Такие как отключение фаирволов и выставления форварда в 1. Ничего этого не помогает. К тому же у меня есть ещё один интерфейс который смотрит в инет, и инет работает без проблем. А вот в домашней сети комп с виндой по прежнему не пингуется. Я уже начинаю думать что это что-то с драйверами сетевой карты. Скоро попробую переткнуть инет на эту карточку и проверить.
ifconfig
eth1
Link encap:Ethernet HWaddr 00:E0:4C:5D:09:F5
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:209 Base address:0xa000

ethtool eth1

Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes

Zmiulan

Сообщения: 22
ОС: OpenSUSE 11.1 + SLAX 6.06

Re: Сеть между Windows и Linux. Не проходят пинги.

Сообщение

Zmiulan »

На компе, где двойная загрузка Win и Linux:
Попробуй найти под Windows в диспетчере задач свою сетевую, там в Свойства — Дополнительно. ищи пункт Wake-On-Lan After Shutdown — установи в Enable.
У меня похожие проблемы были только при двойной загрузке. При выключении винды, выключалась сетевуха

з.ы. WakeOnLan по-русски там Пробуждение из выключенного состояния.

Mandrake 8.0 > Mandriva 2k6 > Mandriva 2k7 > Mandriva 2k8 > OpenSUSE 10.3 > OpenSUSE 11
Сейчас: OpenSUSE 11 | SLAX 6.06

  • Печать

Страницы: [1]   Вниз

Тема: Не пингует машину с установленной Windows 7 c Kubuntu 19.04  (Прочитано 2047 раз)

0 Пользователей и 1 Гость просматривают эту тему.

vcomp71

Начал процедуру перехода на свободное программное обспечение. Есть ноутбук, коннект с сетью через Wifi

enp4s0f1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 80:fa:5b:0d:0e:aa  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Локальная петля (Loopback))
        RX packets 104783  bytes 10323623 (10.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 104783  bytes 10323623 (10.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.22.20  netmask 255.255.255.0  broadcast 192.168.22.255
        inet6 fe80::3210:b3ff:feee:5124  prefixlen 64  scopeid 0x20<link>
        ether 30:10:b3:ee:51:24  txqueuelen 1000  (Ethernet)
        RX packets 1554503  bytes 1227920113 (1.2 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 957862  bytes 170615197 (170.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Сетевое соединение wlp3s0 получает ip адрес через dhcp на роутере, поэтому коннект с сетью есть, адрес внутри локальной сети присвоен. 

Естественно, на машине с Windows остались папки и массив данных, к которым пока приходится обращаться.
Установил на Kubuntu Virtualbox из стандартных репрозиториев с гостевой системой Windows 7

А теперь к проблеме. С host машины машина Windows не видится, не пингуется, не открывается соединение rdp через remmina. Соответственно штатными средствами KDE (Dolphin) не удается увидеть общие папки. В то же время с гостевой системы Virtualbox все прекрасно видится, как с соединением типа «Сетевой мост», так с соединением типа «NAT».

Почитал, всё, что нашел в сети по данному вопросу, но сам факт отсутствия даже пинга к машине не увидел.
Может в дистрибутиве 19.04 надо что-то доставить?

По факту, без разных танцев с бубном и установок дополнительных пакетов расшаренные папки windows, по всем описаниям, должны быть видны, но их нет.

В чем проблема?

upd Прочитал, увидел орфографические ошибки и опечатки и ужаснулся… Что мог исправил. 


Профиль ТС (пользователь vcomp71) по состоянию на 23/02/2020 на форуме более не существует. Модератором раздела принято решение закрыть тему.
—zg_nico

« Последнее редактирование: 23 Февраля 2020, 05:16:09 от zg_nico »


jack_solovey

Вопрос 1. Адрес винды который пингуешь, по памяти написал в команду пинг, или перепроверил какой он там?
Вопрос 2. А выход в сеть на машинах имеется? Роутер доступен с обеих осей?
Вопрос 3. На винде специально ответы на пинг в фаерволе не блокировал?


Usermaster

А может проблема в том что Вы пытаетесь подключаться по имени ПК а не по IP адресу.
Так как локального DNS в сети нет то имя ПК не разрешается в сети от IP адреса.
Так как Linux не пингует машины по NetBios имени ПК Вы его и не видите.
NetBios имя и доменное имя это разные вещи.

А чего это вы тут делаете, а?


vcomp71

Вопрос 1. Адрес винды который пингуешь, по памяти написал в команду пинг, или перепроверил какой он там?

Твоя правда, мастер, пинговал по сетевому имени… Позор мне… Вспомнил я эту проблему, при которой машины в сети по именам не открываются. Один из компьютеров в сети берет на себя роль суперсервера, который всем имена dns пересылает в локальной сети… Давно это было, когда еще Windows XP и Windows 7 друг-друга в сети не видели. Видимо опять машина с Windows потеряла такую роль…
Спасибо, что напомнил… Надо проверить.
А по ip пингуется. Но расшаренные папки в gui интерфейсе не показывает, а очень хочется, чтобы с помощью Double Commander копировать постепенно нужные данные на машину с Kubuntu.

Вопрос 2. А выход в сеть на машинах имеется? Роутер доступен с обеих осей?

Роутер доступен с обоих сетей и я могу выходить по терминалу на машину с Windows 7 с гостевой ОС в Virtualbox, установленной на Kubuntu, оттуда и узнаю сетевой адрес машины с Windows 7, и да они в одной подсети.

Вопрос 3. На винде специально ответы на пинг в фаерволе не блокировал?

Нет.


Пользователь добавил сообщение 11 Июля 2019, 12:04:43:


А может проблема в том что Вы пытаетесь подключаться по имени ПК а не по IP адресу.
Так как локального DNS в сети нет то имя ПК не разрешается в сети от IP адреса.
Так как Linux не пингует машины по NetBios имени ПК Вы его и не видите.
NetBios имя и доменное имя это разные вещи.

Да… Где-то здесь проблема… Надо разобраться с именами ПК. Точно.

« Последнее редактирование: 11 Июля 2019, 12:04:43 от vcomp71 »


Usermaster

Шара не показывается совсем?
Или запрашивает пароль?
Если запрашивает то можно ввести любой логин и любой пароль.
У меня такая ситуация когда я лезу в шару на Win 2008 server.

С именами можно попробовать разобраться следующим образом:
Установить пакет
libnss-winbind
В конец строчки hosts файла /etc/nsswitch.conf дописать
wins

А чего это вы тут делаете, а?


vcomp71

Шара не показывается совсем?
Или запрашивает пароль?

Не показывается совсем.


Usermaster

А конфигурацию ip адресов на хосте и на виртуалке поглядеть можно?
Если в сети dhcp то и на хосте и на виртуалке ip должен получаться по dhcp.
А адаптер должен быть сетевым мостом.

А чего это вы тут делаете, а?


jack_solovey

По факту, без разных танцев с бубном и утсновок дополнительных пакетов расшаренные паки windows по всем опсаниям должны быть видны, но их нет.

Разные танцы с бубном и установка всякого.
По своему опыту говорю. Можно такого наворотить, что и опытный с трудом разберется, не зная точную последовательность, что именно было поставлено, и что снесено.
Самба клиент вообще стоит?


ALiEN

vcomp71, покажите диагностику:

ping -c4 IP_КОМПА
ping -c4 ИМЯ_КОМПА
systemctl status systemd-resolved
systemctl status nmbd

🖥 AsRock B550M Pro4 :: AMD Ryzen 5 3600 :: 16 GB DDR4 :: AMD Radeon RX 6600 :: XFCE
💻 ACER 5750G :: Intel Core i5-2450M :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


vcomp71

А конфигурацию ip адресов на хосте и на виртуалке поглядеть можно?
Если в сети dhcp то и на хосте и на виртуалке ip должен получаться по dhcp.
А адаптер должен быть сетевым мостом.

На виртуалке стояло соединение «Сетевой мост» — соединяться отказалось, подумал, подумал и перестал соединяться. То есть сначала соединялся- потом перестал. Вроде ничего дополнительного не ставил.

В Режиме сетевого соедения NAT — соединяется. Именно по DNS имени

Ethernet adapter Подключение по локальной сети:

   DNS-суффикс подключения . . . . . :
   IPv4-адрес. . . . . . . . . . . . : 10.0.2.15
   Маска подсети . . . . . . . . . . : 255.255.255.0
   Основной шлюз. . . . . . . . . : 10.0.2.2

Основная сеть Host-машина

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.22.20  netmask 255.255.255.0  broadcast 192.168.22.255
        inet6 fe80::3210:b3ff:feee:5124  prefixlen 64  scopeid 0x20<link>
        ether 30:10:b3:ee:51:24  txqueuelen 1000  (Ethernet)
        RX packets 1554503  bytes 1227920113 (1.2 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 957862  bytes 170615197 (170.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Провайдер — Ростелеком и эта подсеть его.

ping -c4 ИМЯ_КОМПА

$ ping -c4 madmin
ping: madmin: Name or service not known

ping -c4 IP_КОМПА

ping -c4 192.168.22.22
PING 192.168.22.22 (192.168.22.22) 56(84) bytes of data.
64 bytes from 192.168.22.22: icmp_seq=1 ttl=128 time=140 ms
64 bytes from 192.168.22.22: icmp_seq=2 ttl=128 time=1.47 ms
64 bytes from 192.168.22.22: icmp_seq=3 ttl=128 time=1.44 ms
64 bytes from 192.168.22.22: icmp_seq=4 ttl=128 time=4.04 ms

systemctl status systemd-resolved

systemd-resolved.service - Network Name Resolution
   Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-07-20 08:21:16 MSK; 34min ago
     Docs: man:systemd-resolved.service(8)
           https://www.freedesktop.org/wiki/Software/systemd/resolved
           https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
           https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
 Main PID: 997 (systemd-resolve)
   Status: "Processing requests..."
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/systemd-resolved.service
           └─997 /lib/systemd/systemd-resolved

июл 20 08:21:16 lubov systemd-resolved[997]: Using system hostname 'lubov'.
июл 20 08:21:16 lubov systemd[1]: Started Network Name Resolution.
июл 20 08:30:26 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:30:26 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:34:49 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:34:49 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:34:49 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:34:49 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:34:50 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
июл 20 08:44:03 lubov systemd-resolved[997]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.

systemctl status nmbd

lubov@lubov:~$ systemctl status nmbd
Unit nmbd.service could not be found.

Так, для информации.. Со смартфона видит по dns имени и даже подключает шару через Total Commander

upd — снес Kubuntu поставил

-Версия-
Ядро : Linux 4.15.0-54-generic (x86_64)
Версия : #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019
Библиотека C : GNU C Library / (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Дистрибутив : Linux Mint 19.1 Tessa

« Последнее редактирование: 20 Июля 2019, 10:31:00 от vcomp71 »


ALiEN

sudo apt install samba
sudo systemctl start nmbd

ping -c4 ИМЯ_КОМПА

🖥 AsRock B550M Pro4 :: AMD Ryzen 5 3600 :: 16 GB DDR4 :: AMD Radeon RX 6600 :: XFCE
💻 ACER 5750G :: Intel Core i5-2450M :: 6 GB DDR3 :: GeForce GT 630M :: XFCE


  • Печать

Страницы: [1]   Вверх

Друзья, не пингуется комп с установленным altlinux кентавр по имени с windows машин. Есть другая машина с той же осью, она прекрасно пингует linux машину по имени 07-23, а виндовые машины нет.
А вот другую машину по имени acer windows машины пингуют.

Инет и локальные ресурсы обе linux машины видят. Ось устанавливалась с одного носителя, с одинаковыми настройками (т.е. по умолчанию)
Куда копать подскажите?

Записан


Теоретически, варианта всего 2:
1. Конфигурация сети.
2. Настройки конкретной машины.

По пункту 1 уточните пожалуйста, какая у Вас сеть: одноранговая или есть контролер домена, есть ли DNS-сервер (компьютер или любое устройство, например, роутер, исполняющий эту функцию).

По пункту 2. Уточните, установлен ли фаервол на windows-машинах.

Общий алгоритм действий примерно такой. Пингуем одну и ту же машину по имени и по ip. Если пингуется обоими способами — все ок. Если только по ip — значит, проблемы с разрешением имен — следует добавить соответствие между именем и ip в настройки DNS-сервера или (при его отсутствии) в файл hosts на машине, с которой нужно дать доступ. Если же нет пинга и по ip, то проверять конфигурацию сти вообще, наличие физического подключения и настройки фаервола на обеих машинах.

Записан


Имхо если хотите что бы имена работали нужно поднять dns иначе будет проблема сплошная, а не работа. Делается довольно легко. Если брать возможности альта, то даже через альтератор можно.

Записан


Друзья, не пингуется комп с установленным altlinux кентавр по имени с windows машин.

Разрешение имён делается в рамках ОС и настроенного DNS/WINS/разное, в зависимости от. Если c конкретной Windows-машины не работает, там и надо смотреть. Если только DNS/WINS/разное для неработающей машины не этот самый сервер с Кентавром. Если он, то, может, и на нём. Но вряд ли, если другой компьютер видит по имени.

Записан


По пункту 1 уточните пожалуйста, какая у Вас сеть: одноранговая или есть контролер домена, есть ли DNS-сервер (компьютер или любое устройство, например, роутер, исполняющий эту функцию).

Попробую описать детальнее. Сеть одноранговая ~100 ПК. В качестве dns и dhcp на сервере под убунтой поднят dnsmasq. Уже не первый год работает и проблем в локалке нет, все друг друга видят и пингуют.

Встала задача потестить Altlinux. Установили на два ПК. В smb.conf обоих машин прописали workgroup и netbios name. Но виндовые машины не видят компы с линуксом в своей рабочей группе (через обзор сети).
ПК1: имя acer, ip динамический
ПК2: имя 07-23, ip динамический

ПК1 и ПК2 пингуют друг друга по имени и по ip
ПК1 пингуется также со всех windows-машин
ПК2 с windows машин пингуется только по ip

Есть в сети еще два сервера под убунтой, так они тоже прекрасно пингует ПК1 и ПК2 по имени.

« Последнее редактирование: 23.11.2016 08:35:10 от progmo »

Записан


имя 07-23

Записан


имя 07-23

И что? тире смущает? В сети практически у всех компов такие имена XX-XX. Этот комп (07-23) по имени пингует любая машина с линуксом, но виндовые только по ip.

Записан


Записан


Записан


В Windows сами машины пересылают друг-другу имена, в Linux — нужно что-бы какой-нибудь сервер прислал это имя. Это может быть как обычный DNS сервер, так и что-то типа AD или mnbd

nmbd (NetBIOS nameserver)

Как выше писал в сети поднят сервер ubuntu, он же dns,dhcp, в самбе прописан как preffered master, os level 255. Сама сеть работает отлично уже не первый год. У серверов под убунтой имена тоже с тире (server-0X) и их виндовые машины пингуют, входят на их шары и т.п.

Загвоздка только вот с одной машиной где стоит altlinux 7.0.5 кентавр. Она не пингуется по имени только виндовых машин и не видна в рабочей группе.

Записан


Загвоздка только вот с одной машиной где стоит altlinux 7.0.5 кентавр. Она не пингуется по имени только виндовых машин и не видна в рабочей группе.

Надо смотреть как устроен у вас в сети резолвинг имён.

Записан


что выдаёт команда,выполненная на днс-сервере

nslookup <<имя_altlinux_машины.локальный_домен>>
что говорит опрос nmbd статус на linux машинах (убунты и altlinux)?

что прилетает в ответ на

nslookup <<имя_windows_машины.локальный_домен>>при исполнении его на другой вындовс-машине и при исполнении его на машине с убунту?

Записан


что выдаёт команда,выполненная на днс-сервере

C Ubuntu (dns/dhcp сервер)


nslookup 07-23
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   07-23
Address: 172.22.4.184

что говорит опрос nmbd статус на linux машинах (убунты и altlinux)?

на altlinux (комп 07-23)

service nmb status
inactive
на убунте (сервер днс)
service nmbd status
nmbd start/running, process 1169

при исполнении его на другой вындовс-машине и при исполнении его на машине с убунту?

nslookup  с windows машины

PS C:\Windows\system32> nslookup acer5630
╤хЁтхЁ:  server-ikc
Address:  172.22.4.200

╚ь :     acer5630
Address:  172.22.4.104

PS C:\Windows\system32> nslookup 03-27
╤хЁтхЁ:  server-ikc
Address:  172.22.4.200

*** Нет записей internal type for both IPv4 and IPv6 Addresses (A+AAAA), доступных для 03-27

C ubuntu (просто рабочая станция)

nslookup 07-23
Server:         172.22.4.200
Address:        172.22.4.200#53

Name:   07-23
Address: 172.22.4.184

bav@server-07:~$ nslookup acer5630
Server:         172.22.4.200
Address:        172.22.4.200#53

Name:   acer5630
Address: 172.22.4.104

« Последнее редактирование: 23.11.2016 12:56:25 от progmo »

Записан


service nmb status

Записан


service nmb status

Да именно так. Ибо altlinux в ответ на service nmbd status выдает   service: nmbd: Unrecognized service

Записан


**WSL Cannot Ping Host: What’s Wrong and How to Fix It**

Windows Subsystem for Linux (WSL) is a powerful tool that allows you to run Linux distributions on Windows 10. However, there are some common problems that can occur, such as WSL not being able to ping a host. This can be a frustrating issue, but it’s usually easy to fix.

In this article, we’ll take a look at the causes of this problem and how to troubleshoot it. We’ll also provide some tips on how to prevent it from happening in the future.

What Causes WSL Not to Be Able to Ping a Host?

There are a few different things that can cause WSL not to be able to ping a host. These include:

* **Firewall issues:** The Windows Firewall may be blocking traffic from WSL to the host.
* **Network adapter issues:** The network adapter that WSL is using may not be configured correctly.
* **DNS issues:** The DNS server that WSL is using may not be able to resolve the host name.
* **Other software issues:** Other software on your computer may be interfering with WSL’s ability to ping hosts.

How to Troubleshoot WSL Not Being Able to Ping a Host

If you’re experiencing this problem, here are a few things you can try to troubleshoot it:

1. **Check the Windows Firewall:** The Windows Firewall may be blocking traffic from WSL to the host. To check this, open the **Firewall & Network Protection** settings in the **Settings** app. Under **Inbound Rules**, find the rule for **Remote Desktop** and make sure it’s enabled.
2. **Check the network adapter:** The network adapter that WSL is using may not be configured correctly. To check this, open the **Network Connections** window. Right-click on the network adapter that WSL is using and select **Properties**. Make sure that the **Internet Protocol Version 4 (TCP/IPv4)** and **Internet Protocol Version 6 (TCP/IPv6)** properties are configured correctly.
3. **Check the DNS server:** The DNS server that WSL is using may not be able to resolve the host name. To check this, open the **Settings** app and go to **Network & Internet** > DNS. Under Preferred DNS server, select Manual and enter the IP address of a public DNS server, such as 1.1.1.1 or 8.8.8.8.
4. Disable other software: Other software on your computer may be interfering with WSL’s ability to ping hosts. To check this, try disabling any other software that you’re not using.

If you’ve tried all of these steps and you’re still having problems, you can contact Microsoft support for help.

Problem Solution Reference
WSL cannot ping host
  • Make sure that the host is reachable from your WSL instance.
  • Check the firewall settings on your WSL instance and make sure that the port you are trying to ping is open.
  • Try using a different network adapter in WSL.
  • WSL troubleshooting guide
  • How to check if a firewall is blocking network traffic in Windows 10
  • How to select a network adapter in WSL

What is WSL and why can it’t ping hosts?

WSL stands for Windows Subsystem for Linux. It is a feature of Windows 10 that allows you to run a Linux kernel and command-line environment on your Windows PC. This means that you can use Linux tools and applications on your Windows machine without having to dual-boot or use a virtual machine.

One of the limitations of WSL is that it cannot ping hosts on your local network. This is because WSL uses a different network stack than the rest of Windows. This means that WSL cannot see or communicate with devices on your local network.

There are a few ways to work around this limitation. One way is to use a tool like [ngrok](https://ngrok.com/) to create a tunnel between your WSL instance and your local network. Another way is to use a tool like [sshuttle](https://github.com/apenwarr/sshuttle) to create a secure tunnel between your WSL instance and your local network.

Troubleshooting steps for WSL not being able to ping hosts

If you are having trouble pinging hosts on your local network from WSL, here are a few troubleshooting steps you can try:

1. Make sure that your WSL instance is up to date. You can check for updates by opening the Windows Powershell and running the following command:

wsl –update

2. Make sure that your WSL instance is using the latest version of the Linux kernel. You can check the version of the Linux kernel by running the following command:

uname -r

If the version of the Linux kernel is not the latest, you can update it by running the following command:

sudo apt-get update && sudo apt-get upgrade

3. Make sure that your WSL instance has the `net-tools` package installed. The `net-tools` package provides the `ping` command. You can check if the `net-tools` package is installed by running the following command:

dpkg -l net-tools

If the `net-tools` package is not installed, you can install it by running the following command:

sudo apt-get install net-tools

4. Make sure that your WSL instance has the correct permissions to ping hosts on your local network. You can check the permissions by running the following command:

ls -l /proc/sys/net/ipv4/ping_group_range

The output of this command should show the following lines:

-rw-r–r– 1 root root 0 Dec 13 15:48 /proc/sys/net/ipv4/ping_group_range

If the output of this command does not show the same lines, you can change the permissions by running the following command:

sudo chmod 777 /proc/sys/net/ipv4/ping_group_range

5. Make sure that your firewall is not blocking ICMP traffic. ICMP traffic is used by the `ping` command. You can check if your firewall is blocking ICMP traffic by running the following command:

sudo ufw status

If the output of this command shows that ICMP traffic is blocked, you can allow ICMP traffic by running the following command:

sudo ufw allow icmp

6. Make sure that your network adapter is enabled. You can check if your network adapter is enabled by running the following command:

lsusb

The output of this command should show the following lines:

Bus 001 Device 004: ID 8086:0a70 Intel Corporation Ethernet Controller I219-V

If the output of this command does not show the same lines, your network adapter may be disabled. You can enable your network adapter by following the instructions in your computer’s manual.

7. Make sure that your network adapter is configured correctly. You can check the configuration of your network adapter by running the following command:

ifconfig

The output of this command should show the following lines:

enp0s31f6: flags=4163 mtu 1500 inet 192.168.1.100 netmask 255.255.255

3. Common causes of WSL not being able to ping hosts

There are a few common causes of WSL not being able to ping hosts. These include:

  • Incorrect firewall settings: By default, the Windows firewall blocks all incoming and outgoing traffic from WSL. This can prevent you from pinging hosts on your local network or the internet. To fix this, you can either disable the firewall or add an exception for WSL.
  • Incorrect network adapter settings: WSL uses a virtual network adapter called “vEthernet (WSL)”. This adapter is not always configured correctly, which can prevent you from pinging hosts. To fix this, you can open the Network Connections window and right-click on the “vEthernet (WSL)” adapter. Then, select Properties and make sure that the Internet Protocol Version 4 (TCP/IPv4) and Internet Protocol Version 6 (TCP/IPv6) settings are correct.
  • Incorrect DNS settings: WSL uses the same DNS settings as your Windows installation. If your DNS settings are incorrect, you may not be able to ping hosts. To fix this, you can open the Network Connections window and right-click on the Ethernet adapter. Then, select Properties and click on the Internet Protocol Version 4 (TCP/IPv4) tab. In the DNS Server field, enter the IP addresses of your DNS servers.
  • Network connectivity issues: If you are not able to ping hosts on your local network, it is possible that there is a problem with your network connection. To troubleshoot this, you can try restarting your router and modem. You can also try connecting to your network using a different device.

4. How to fix WSL not being able to ping hosts

Once you have identified the cause of the problem, you can follow these steps to fix it:

  • Incorrect firewall settings: To disable the Windows firewall, open the Windows Security app and go to Firewall & network protection. Then, click on Firewall & network protection settings and select Turn Windows Firewall on or off. In the Private network settings section, uncheck the Block all incoming connections, including those from applications and devices checkbox.
  • Incorrect network adapter settings: To open the Network Connections window, press Windows+R and type ncpa.cpl. Then, right-click on the vEthernet (WSL) adapter and select Properties. In the Internet Protocol Version 4 (TCP/IPv4) tab, make sure that the Use the following IP address and Use the following DNS server addresses options are selected. In the IP address field, enter the IP address of your WSL instance. In the Subnet mask field, enter the subnet mask of your network. In the Default gateway field, enter the IP address of your router. In the Preferred DNS server field, enter the IP address of your primary DNS server. In the Alternate DNS server field, enter the IP address of your secondary DNS server.
  • Incorrect DNS settings: To change your DNS settings, open the Network Connections window and right-click on the Ethernet adapter. Then, select Properties and click on the Internet Protocol Version 4 (TCP/IPv4) tab. In the DNS Server field, enter the IP addresses of your DNS servers.
  • Network connectivity issues: If you are not able to ping hosts on your local network, it is possible that there is a problem with your network connection. To troubleshoot this, you can try restarting your router and modem. You can also try connecting to your network using a different device.

WSL not being able to ping hosts can be a frustrating problem, but it is usually easy to fix. By following the steps in this guide, you can quickly get your WSL instance back up and running.

Q: Why can’t I ping a host from WSL?

A: There are a few possible reasons why you might not be able to ping a host from WSL. Here are some of the most common:

  • Your WSL installation is not up to date. Make sure that you have the latest version of WSL installed. You can check your version by running the following command:

wsl –version

If your version is not up to date, you can update it by running the following command:

wsl –update

  • Your firewall is blocking the ping traffic. Make sure that your firewall is not blocking ping traffic. You can check your firewall settings to see if ping traffic is allowed.
  • The host you are trying to ping is not online. Make sure that the host you are trying to ping is actually online. You can check the host’s status by using a different computer or device.
  • You are using the wrong IP address. Make sure that you are using the correct IP address for the host you are trying to ping. You can find the host’s IP address by using a different computer or device.
  • You are not using the correct protocol. Make sure that you are using the correct protocol for the host you are trying to ping. The most common protocol for pinging a host is ICMP.

Q: How do I fix WSL so that I can ping hosts?

A: There are a few different ways to fix WSL so that you can ping hosts. Here are some of the most common solutions:

  • Update your WSL installation. Make sure that you have the latest version of WSL installed. You can check your version by running the following command:

wsl –version

If your version is not up to date, you can update it by running the following command:

wsl –update

  • Disable your firewall. If your firewall is blocking ping traffic, you can disable it temporarily to troubleshoot the issue. To disable your firewall, open the Windows Defender Firewall app and click Turn Windows Defender Firewall on or off. Then, click Turn off Windows Defender Firewall for both Private networks and Public networks.
  • Restart your computer. Sometimes, a simple restart can fix the issue.
  • Reinstall WSL. If all else fails, you can try reinstalling WSL. To reinstall WSL, open the Windows Terminal app and run the following command:

wsl –uninstall

Then, run the following command to reinstall WSL:

wsl –install

Q: What are some other common problems with WSL?

A: In addition to being unable to ping hosts, there are a few other common problems with WSL. Here are some of the most common:

  • WSL not starting. WSL may not start for a variety of reasons. Some of the most common reasons include:
  • The WSL kernel is not installed.
  • The WSL installation is corrupted.
  • The WSL service is not running.
  • WSL not running properly. WSL may not run properly for a variety of reasons. Some of the most common reasons include:
  • The WSL kernel is outdated.
  • The WSL installation is missing dependencies.
  • The WSL environment is not configured correctly.

Q: How can I troubleshoot problems with WSL?

A: If you are having problems with WSL, there are a few things you can do to troubleshoot the issue. Here are some tips:

  • Check the WSL logs. The WSL logs can provide valuable information about what is going wrong. To view the WSL logs, open the Windows Terminal app and run the following command:

wsl –log

  • Use the WSL troubleshooter. The WSL troubleshooter can help you identify and fix problems with WSL. To run the WSL troubleshooter, open the Windows Terminal app and run the following command:

wsl — troubleshoot

  • Search for help online. There are a number of resources available online that can help you troubleshoot problems with WSL. Some of the most helpful resources include:
  • The [WSL documentation](https://docs.microsoft.com/en-us

    In this blog post, we have discussed how to troubleshoot the issue of WSL not being able to ping a host. We first identified the possible causes of the issue, and then provided steps on how to fix each cause. We hope that this blog post has been helpful in resolving your WSL pinging issue.

Here are the key takeaways from this blog post:

  • WSL not being able to ping a host can be caused by a variety of factors, including incorrect firewall settings, DNS issues, and network adapter problems.
  • To troubleshoot the issue, you can try disabling the firewall, flushing the DNS cache, and resetting the network adapter.
  • If these steps do not resolve the issue, you can try reinstalling WSL or updating your drivers.
  • If you are still unable to resolve the issue, you can contact Microsoft support for assistance.

Author Profile

Hatch, established in 2011 by Marcus Greenwood, has evolved significantly over the years. Marcus, a seasoned developer, brought a rich background in developing both B2B and consumer software for a diverse range of organizations, including hedge funds and web agencies.

Originally, Hatch was designed to seamlessly merge content management with social networking. We observed that social functionalities were often an afterthought in CMS-driven websites and set out to change that. Hatch was built to be inherently social, ensuring a fully integrated experience for users.

Now, Hatch embarks on a new chapter. While our past was rooted in bridging technical gaps and fostering open-source collaboration, our present and future are focused on unraveling mysteries and answering a myriad of questions. We have expanded our horizons to cover an extensive array of topics and inquiries, delving into the unknown and the unexplored.

Latest entries

Не по теме:

Просто ping -t -w 100 192.168.0.1
Сейчас попробую arping

Выяснил:
если удалить arp кэш у винды, то пинг появляется на 2 пакета.

Добавлено через 13 минут
Если делать arping 192.168.0.2 -I eth1 на рутере, то пинг идёт нормально без сбоев. В этот момент пинг с виндовской машины становиться лучше (50% сбоев).
Неправильно настроены routing tables на рутере? (Но с линуксом на клиентской машине проблем ведь нет)

Добавлено через 11 минут
Если пинговать arping’ом с виндовской машины — то тоже всё впорядке, пинг arping идёт 100%. Пока идёт arping с виндовской машины простой пинг тоже проходит на 100%

Добавлено через 18 часов 13 минут
Перепроверил тублицы роутинга у рутера и сервисы у винды.
Не обнаружил нечего необычного. Непонимаю в чём может быть дело

Добавлено через 1 час 51 минуту
Посмотрел что происходит в сети через сниффер. Вот 2 пакета в качестве примера (в оффтоп убрано лишнее, жирным выделенно подозрительное).
Пакет от рутера:
ARP request

Не по теме:

HW type: Ethernet (0x0001)
Protocol type: IP (0x0800)
HW size: 6
Protocol size: 4
Opcode: request (0x0001)
[Is gratuitous: False]

Sender MAC address: 00:00:00_00:00:12 (00:00:00:00:00:12)
Sender IP address: 127.0.0.1 (127.0.0.1)
Target MAC address: 00:00:00_00:00:00 (00:00:00:00:00:00)
Target IP address: 192.168.0.2 (192.168.0.2)

Снифер выдаёт следующее инфо об этом пакете: «Who has 192.168.0.2? Tell 127.0.0.1»

Пакет от винды:
ARP reply:

Не по теме:

HW type: Ethernet (0x0001)
Protocol type: IP (0x0800)
HW size: 6
Protocol size: 4
Opcode: reply (0x0002)
[Is gratuitous: False]

Sender MAC address: AsustekC_79:86:ca (00:1b:fc:79:86:ca)
Sender IP address: 192.168.0.2 (192.168.0.2)
Target MAC address: 00:00:00_00:00:10 (00:00:00:00:00:10)
Target IP address: 127.0.0.1 (127.0.0.1)

Снифер выдаёт инфо на этот пакет: «192.168.0.2 is at 00:1b:fc:79:86:ca (duplicate use of 127.0.0.1 detected)»

Странно что 127.0.0.1 учавствует в arp. Странно что у него постоянно меняется mac адресс.

Если очестить arp кэш, то последовательность пакетов в сети такая:

Не по теме:

1. «Who has 192.168.0.1? Tell 127.0.0.1» — это запрос к рутеру
2. «192.168.0.1 is at 00:1b:fc:79:86:ca» -ответ от рутера
3. Echo (ping) request
4. Echo (ping) reply
5. Echo (ping) request
6. Echo (ping) reply
7 «Who has 192.168.0.2? Tell 127.0.0.1 (duplicate use of 127.0.0.1 detected)»
8.»192.168.0.2 is at 00:1b:fc:79:86:ca (duplicate use of 127.0.0.1 detected)»
9. DNS запрос антивируса
10. DNS ответ антивирусу
Всё.

Примечательно что в п.1, п7 и п.8 используется 3 разных мак адреса (причём все они какие-то странные типа 00:00:00:00:00:53)
+/- 3 к последнему числу.

Из всего следует что проблема с 127.0.0.1 — почему-то этот интерфейс учавствует в arp и у него постоянно меняется мак.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Что такое резервное копирование windows 10
  • Ошибка 1083 центр обновления windows
  • Ms paint windows 7 version
  • Hasleo wintousb для windows 10
  • При запуске этого средства возникла проблема windows 10 0x80080005 0x90018