Ubuntu network is unreachable как исправить

When I attempt to ping google's dns or any outside the network I get connect: Network is unreachable? I can't update either which I put down to this I am new to networking... And Ubuntu. But the...

When I attempt to ping google’s dns or any outside the network I get
connect: Network is unreachable?

I can’t update either which I put down to this

I am new to networking… And Ubuntu. But these are results of some commands I thought might help

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:0e:7f:a9:10:54 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.5/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::20e:7fff:fea9:1054/64 scope link 
       valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
    link/ether 86:0b:cb:43:63:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
mcserver@helloworld:~$ 

$ vi /etc/resolv.conf:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.0.5
nameserver 8.8.8.8

$ vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.5
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.0.255
        post-up iptables-restore < /etc/iptables.up.rules
        dns-nameservers 192.168.0.5 8.8.8.

chaos's user avatar

chaos

26.6k12 gold badges73 silver badges77 bronze badges

asked Feb 3, 2014 at 21:28

user240010's user avatar

11

The following line is wrong:

iface eth0 inet static
    address 192.168.0.5
    netmask 255.255.255.0
    network 192.168.1.0 <<<<<<<<<<<<<<<<<<<<<<<< It should be 192.168.0.0
    broadcast 192.168.0.255
    post-up iptables-restore < /etc/iptables.up.rules
    dns-nameservers 192.168.0.5 8.8.8.8

Also, there doesn’t seem to be any default gateway setup.

Not having more info about your network, I would suggest adding the following line at the end:

    gateway <YOUR.ROUTER.IP.ADDRESS>

So, assuming your router ip address is 192.168.0.1, this would be the whole entry:

iface eth0 inet static
    address 192.168.0.5
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    post-up iptables-restore < /etc/iptables.up.rules
    gateway 192.168.0.1
    dns-nameservers 192.168.0.5 8.8.8.8

answered Feb 3, 2014 at 22:06

GnP's user avatar

GnPGnP

3672 silver badges7 bronze badges

The problem is that you need to set your default gateway

  1. Take terminal

  2. Type in

    sudo ip route add default via <your gateway>(eg:192.168.136.1) dev eth0
    
  3. Sometimes you will be able to ping (ping 8.8.8.8) but no internet connection in the browser, then:

  4. Go to sudo nano /etc/resolv.conf

  5. Add nameserver 8.8.8.8

  6. Add nameserver <your gateway> or nameserver 127.0.1.1

  7. sudo /etc/init.d/networking restart or sudo service networking restart

cocomac's user avatar

cocomac

2,6253 gold badges14 silver badges43 bronze badges

answered Nov 28, 2017 at 10:45

akhil kumar's user avatar

1

You may need to add a default gateway. As a root user, execute this command.

E.g.

root@localhost:~# route add default gw 172.23.5.1

You can get the first 3 octets, 172.23.5 from eth0/eoM

Then ping an IP to see if connection works.

root@localhost:~# ping 10.56.94.81    
PING 10.56.94.81 (10.56.94.81) 56(84) bytes of data.    
64 bytes from 10.56.94.81: icmp_seq=1 ttl=62 time=0.203 ms    
64 bytes from 10.56.94.81: icmp_seq=2 ttl=62 time=0.197 ms    
64 bytes from 10.56.94.81: icmp_seq=3 ttl=62 time=0.210 ms    
^C    
--- 10.56.94.81 ping statistics ---    
3 packets transmitted, 3 received, 0% packet loss, time 2033ms    
rtt min/avg/max/mdev = 0.197/0.203/0.210/0.012 ms

Stephen Rauch's user avatar

answered Jun 28, 2018 at 0:04

Prasanna Venkatesh's user avatar

In my case, if your system is behind a firewall, that can’t interact with internet. Unless you specify a proxy server for HTTP/HTTPS/FTP, it is not reachable.

Try this:

export  http_proxy=http://yourcompanyproxy.company.com:1234   
export  ftp_proxy=ftp://yourcompanyproxy.company.com:1234  
export  https_proxy=https://yourcompanyproxy.company.com:1234

answered Sep 8, 2017 at 15:51

Sireesh Yarlagadda's user avatar

  • Печать

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

Тема: Network is unreachable  (Прочитано 3264 раз)

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

Оффлайн
Dolores

ОС ubuntu-16.04.2-server-amd64
Стоит задача присвоить серверу статический IP

sudo nano /etc/network/interfaces
исправляем вот так:

=====================================================
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto enp3s0                            # комментируем, если сеть не работает - разкомм
#iface enp3s0 inet dhcp                 #        не будет работать - убрать "#"

auto enp3s0
iface enp3s0 inet static
   address 192.168.3.200
   geteway 192.168.3.1
   netmask 255.255.255.0
   network 192.168.3.0
   broadcast 192.168.3.255
   dns-nameservers 192.168.3.1
===============================================================

ping ya.ruполучаем

Network is unreachableЧТО НЕ ТАК? где что исправить, чтоб заработало?
P.S. с динамическим IP пингуется.

« Последнее редактирование: 28 Июля 2017, 18:01:08 от Azure »


Оффлайн
fisher74

geteway 192.168.3.1[/quote]


Оффлайн
Dolores


Оффлайн
koshev

Обратиться к тому, кто выдает серверу адрес, чтобы он его закрепил за сервером?  ;) Ну, как вариант.
А вообще покажите ситуацию при DHCP и статике? А то урывки какие-то, нет целой картины.

ip -s link show dev enp3s0
ip -4 route show dev enp3s0
ip -4 neigh show dev enp3s0

ну и traceroute до хоста в интернете.
во всех случаях.
И уберите пожалуйста

   network 192.168.3.0
   broadcast 192.168.3.255
В них нет никакой необходимости при правильно построенной сети, ядро давно (как бы с 2.Х версии) само назначетет ШВ-адрес и адрес сети.


Оффлайн
Dolores

lora@ic-db:~$ ip -s link show dev enp3s0
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 60:a4:4c:3e:15:b2 brd ff:ff:ff:ff:ff:ff
    RX: bytes  packets  errors  dropped overrun mcast
    20625      119      0       0       0       23
    TX: bytes  packets  errors  dropped carrier collsns
    21214      127      0       0       0       0
lora@ic-db:~$ ip -4 route show dev enp3s0
192.168.3.0/24  proto kernel  scope link  src 192.168.3.200
lora@ic-db:~$ ip -4 neigh show dev enp3s0
192.168.3.34 lladdr 6c:f0:49:e3:5d:9d REACHABLE
192.168.3.40 lladdr 00:1b:fc:8b:2f:1e STALE
192.168.3.1 lladdr ec:43:f6:e2:16:a0 DELAY
lora@ic-db:~$ traceroute ya.ru
traceroute to ya.ru (87.250.250.242), 30 hops max, 60 byte packets
connect: Сеть недоступна
Вот эта команда решает проблему до перезагрузки:

sudo route add –net 0.0.0.0 netmask 0.0.0.0 gw 192.168.3.1но так быть не должно.


Оффлайн
Azure

geteway 192.168.3.1

Исправили?

« Последнее редактирование: 31 Июля 2017, 09:45:33 от Azure »

В Линукс можно сделать ВСЁ что угодно, достаточно знать КАК !


  • Печать

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

My host machine OS is Windows 10, and I install oracle VirtualBox on it. The guest OS in the VirtualBox virtual machine is Ubuntu 18.04.1. I use the Ubuntu OS normally for example code development. But one day when I start the Ubuntu virtual machine, I find the network does not work correctly.

I can not access the network, the error message is ubuntu connection failed, activation of network connection failed, I can not ping the domain name, when I  ping a domain name (for example www.google.com), it will return the error message Name or service not known. And I can not ping the IP address of the domain even, the error message is network is unreachable. I struggled with all these errors for almost several hours, and I resolve this problem by following the below steps finally.

1. Enable Network Connection To Fix Activation Of Network Connection Failed.

  1. If you encounter a network issue in Linux OS such as Ubuntu, the first thing you need to do is to check whether your network configuration is correct or not.
  2. Open a terminal and run the below command.
    ~$ ifconfig
    enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.6 netmask 255.255.255.0 broadcast 192.168.1.255
  3. If you can not find the inet address in the console output, this means the network is not enabled correctly. You need to follow the below steps to enable the network first.
  4. Click Show Applications —> Settings icon to open the Ubuntu configuration panel.
  5. Click the Network menu item in the left panel. Then toggle the Wired button to ON in the right panel.
  6. Now run $ifconfig command in terminal again, you should find the IP address that the DHCP server assigned to you.

2. Fix Name Or Service Not Known Issue.

  1. After configurations in step 1, you should get your virtual machine IP address, and you can also ping other IP addresses in your local network or internet website.
  2. But you may find you can not ping the domain name. When you ping a domain name you get an error message Name or service not known like below.
    ~$ ping www.google.com
    ping: www.google.com:
    Name or service not known
  3. When you turn on / off the wired network in step 1. Below DNS record will be written to /etc/resolve.conf, and the DNS record is invalid.
    # Generated by NetworkManager
    nameserver 127.0.0.53
  4. This leads to the error Name or service not know when you ping the website domain in the terminal. And this DNS record is generated by the NetworkManager automatically.
  5. To resolve this problem, just run $ sudo gedit /etc/resolve.conf to change the nameserver IP to a valid one such as 8.8.8.8 ( google provide ). Then save the resolve.conf file.
  6. Now you can ping the website domain successfully.

3. Fix Invalid DNS Record nameserver 127.0.0.53 Permanently.

  1. After step 1 and step 2, you can ping the website domain name now.
  2. To avoid this error happening again, you can remove the invalid DNS record 127.0.0.53  and add a valid DNS record permanently in /etc/resolve.conf when you reboot the OS again.
  3. Run the below command to install Ubuntu resolvconf package.
    $ sudo apt install resolvconf
  4. Modify file /etc/resolvconf/resolv.conf.d/tail and add a valid DNS record ( such as nameserver 8.8.8.8 ) in it. If the tail file does not exist then create it.
    $ sudo gedit /etc/resolvconf/resolv.conf.d/tail
  5. Now when you boot the Ubuntu OS, the DNS record ( nameserver 8.8.8.8) in the tail file will be added at the end of file /run/resolvconf/resolv.conf, and /etc/resolv.conf will be a symbol link to this file.

4. How To Fix VirtualBox Virtual Machine connect: Network is unreachable” Error.

4.1 Question.

  1. I use the Oracle VirtualBox to create a virtual machine.
  2. My host os is Windows7, and the guest os is Ubuntu 18.
  3. I open the VM settings dialog, click the Network tab and select NAT in the Enable Network Adapter Attached to the drop-down list.
  4. But when I ping an IP address that exists on the internet, it shows the error message connect: Network is unreachable.
  5. Below is the output when I run the command ifconfig on the guest Ubuntu OS.
    $ ifconfig
    enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet6 fe80::7bb4:e4e0:dc7d:16a9  prefixlen 64  scopeid 0x20<link>
            ether 08:00:27:c6:c0:0d  txqueuelen 1000  (Ethernet)
            RX packets 32987  bytes 45350863 (45.3 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 11336  bytes 856368 (856.3 KB)
            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  (Local Loopback)
            RX packets 196  bytes 17046 (17.0 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 196  bytes 17046 (17.0 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

4.2 Answer1.

  1. You can get the reason from the output text of the ifconfig command.
  2. We can see that there is not the inet info in the ifconfig output, which means the enp0s3 interface does not have an IP address.
  3. So you can run the command sudo ifconfig enp0s3 <an_ip_address> to assign a static IP address to the interface enp0s3.
  4. If you want the enp0s3 interface to get a dynamic IP address from a DHCP server, you can run the command sudo dhclient enp0s3.

Looking forward to resolve apt-get connect (101 network is unreachable)? We can help you in fixing it. 

The error usually occurs while accessing the network for updating or installing.

At Bobcares, we often get requests from our customers to fix the error network is unreachable as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this problem.

What causes apt-get connect (101 network is unreachable)?

The error mainly occurs due to problems in network connections.

This error indicates that either the IPv6 connection is unstable, or the servers are dead, or the file is not found.

For instance, the error appears as follows.

apt-get connect (101 network is unreachable)

Let’s see how our Support Engineers help the customer to fix this.

Easy way to fix the error

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face error apt-get connect (101 network is unreachable).

Now, let’s see the major reasons and how our Support Engineers fix this error.

Disabling ipv6

Recently one of the customers was getting Update information outdated alert then he applied sudo apt-get update command. Unfortunately, the user got stuck with this error.

On further analysis, we could trace from the logs that the user’s machine was using IPv6 to connect to the internet.

Hence, the reason behind the error was user’s internet service provider does not support IPv6. So we tried disabling IPv6.

To do this system-wide, we edited the file /etc/default/grub by running the below command

sudo nano /etc/default/grub

And added the following.

ipv6.disable=1

To the value of GRUB_CMDLINE_LINUX_DEFAULT.

In a default Ubuntu installation, that line reads

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

so we changed it to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"

Then, we ran the following command.

sudo update-grub

Finally, we rebooted the server.

Finally, the connection problem was then resolved.

Enabling secure port

In addition, in certain cases this error results due to closed port 443.

We then open the secure port and the error get disappeared.

[Having trouble with this error? We’ll fix it for you.]

Conclusion

In short, apt-get connect (101 network is unreachable) occurs due to problems in network connection. Today, we saw how our Support Engineers helped the customer in fixing the error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Kontext
Kontext

Kontext

articleArticles 80

imageDiagrams 20

codeCode 45

chat_bubble_outlineThreads 1

commentComments 6

loyaltyKontext Points 1136

account_circle Profile


visibility 8,644

event 2022-06-13
access_time 9 months ago
language English

more_vert

When upgrading from WSL1 to WSL2 for my Ubuntu 20.04 distro, the virtual machine cannot connect to network. The error messages include: Network is unreachable; Temporary failure resolving; Temporary failure in name resolution, etc. There are many articles on the websites and many of them didn’t resolve the problem. This page summarizes the solution for these issues and hopefully it will save you much time.

Issue context

After installing WSL 2 Ubuntu distro following Install Windows Subsystem for Linux on a Non-System Drive, the following error shows up when trying to update apt:

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Similarly, when ping 8.8.8.8 or any other IP addresses, the following error shows up:

ping: connect: Network is unreachable

When ping any domain name, it shows a different error:

ping: google.com: Temporary failure in name resolution

The environment details are:

  • OS: Windows 10 (10.0.19044)
  • WSL version: 2
  • Distro: Ubuntu 20.04 x64 version or OpenSUSE 42 or any other distros.

When downgrade to WSL 1, these issues are automatically resolved:

wsl --set-verison Ubuntu 1

However when change it back to version 2, the above issues still exist:

wsl --set-verison Ubuntu 2

General fixes

warning Warning — The following approaches probably don’t work for you. Please read through the whole article first before you decide to take any actions. For my scenario, it only works after disable compression for Packages folder. Refer to the last section for more details. 

WSL 2 official documentation and many other websites have suggested the following fix:

  1. Backup and delete auto-generated files in WSL:
    # Backup and delete auto-generated files
    sudo cp /etc/wsl.conf /etc/wsl.conf.bk
    sudo cp /etc/resolv.conf /etc/resolv.conf.bk
    sudo rm /etc/resolv.conf || true
    sudo rm /etc/wsl.conf || true

    If wsl.conf doesn’t exist in your distro, you can ignore it.

  2. Recreate /etc/wsl.conf using the following command:
    sudo bash -c 'cat <<EOF > /etc/wsl.conf
    [network]
    generateResolvConf = false
    EOF'
  3. Recreate /etc/resolv.conf using the following command:
    sudo bash -c 'cat <<EOF > /etc/resolv.conf
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    nameserver 192.168.1.254
    EOF'

    The above commands use Google DNS and also my WIFI network default gateway as DNS server. You can change it accordingly. You can get it from ipconfig command in your Windows Command Prompt:

    ipconfig
    Wireless LAN adapter Wi-Fi:
    
       Connection-specific DNS Suffix  . :
       IPv4 Address. . . . . . . . . . . : 192.168.1.135
       Subnet Mask . . . . . . . . . . . : 255.255.255.0
       Default Gateway . . . . . . . . . : 192.168.1.254
  4. Exist WSL.
  5. Run Command Prompt as Administrator in Windows and execute the following commands:
    wsl --shutdown
    netsh winsock reset
    netsh int ip reset all
    netsh winhttp reset proxy
    ipconfig /flushdns
  6. Use Windows Search for Network reset. As described by itself, it will reinstall your network adapters. Please be aware of this before you take any actions
    2022061375043-image.png
  7. Restart Windows.

Usually after restart, your WSL network should now work. But unfortunately this approach doesn’t work for me. Thus I keep exploring the others options. 

Run ip addr

Run the following command in WSL:

$ ip addr
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether ba:bc:6f:b0:f3:8b brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 36:6f:82:06:6f:9a brd ff:ff:ff:ff:ff:ff
4: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
6: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:15:5d:c2:ee:f9 brd ff:ff:ff:ff:ff:ff

The above texts were printed out in my WSL distro. The problem is that eth0 status is DOWN.

As mentioned earlier, for WSL 1 version, this issue does not exist as the way WSL2 works is different from WSL1:

10: eth0: <> mtu 1500 group default qlen 1
    link/ether 9c:b6:d0:15:31:74
    inet 169.254.143.197/16 brd 169.254.255.255 scope global dynamic
       valid_lft forever preferred_lft forever

Final solution

After I tried all the above steps, none of them worked for me. Finally, I found the solution after tremendous searching on the internet: disable compression for C:Users<your user id>AppDataLocalPackages.

Detailed steps

  • Navigate to  C:Users<your user id>AppDataLocalPackages. Replace the placeholder with your own user ID.
  • Right click and choose Properties and then click Advanced button.
  • Uncheck ‘Compress contents to save disk space‘.
    20220613111559-image.png
  • Click OK button.
  • Apply the changes to the child items and folders too.
  • Shutdown WSL by running command in Windows Terminal or Command Prompt: wsl --shutdown 
  • Restart the computer.

The issue should be gone after restart:

20220613112124-image.png

Enjoy developing with Ubuntu via WSL 2!

I can get to other PCs in my house on the 192 network, but trying to go outside gives me the «network is unreachable» message. p3p1 is up with a good IP Address. Running Fedora 16. What should I do next to troubleshoot?

All other PCs in the house are working (Windows, Mac).

asked Oct 31, 2013 at 1:54

Scott C Wilson's user avatar

Scott C WilsonScott C Wilson

2,3564 gold badges22 silver badges30 bronze badges

9

You say all other pcs in your house have a connection. Then the problem lies only with your linux machine. There are several possibilities:

  1. You do have a connection, but you cannot reach your DNS; you can diagnose this by

    ping -c1 8.8.4.4
    

    if you can reach Google, then you have a connection, and you only need to update your DNS servers. Edit (as sudo) your /etc/resolv.conf file and add these two lines:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    and now you are good to go.

  2. You cannot ping Google, but you can ping your router, or any other pc in your LAN. In this case case, it is possible that you also have problem 1, so you will have to check for that, but first, you need to check your routing table. Print it with

    ip route show default
    

    and check that there is a reply, like this one:

    default via 192.168.11.1 dev wlan0 proto dhcp metric 600
    

    (this is for my laptop). What is important is that the correct IP address of your router is shown exactly where mine (192.168.11.1) is shown. If an incorrect IP address is shown, or, worse, if the ip route show default command receives no reply, then your routing table has been corrupted. You may simply restore it by means of:

    sudo ip route del default (only if the wrong IP address appears)
    sudo ip route add default via IP.address.OfYour.Router
    

    and now we may go step 1.

  3. If you cannot ping any pc on your LAN, then there is another kind of problem, and more questions will need to be asked. But we’ll cross that bridge when we get there.

answered Oct 31, 2013 at 11:46

MariusMatutiae's user avatar

MariusMatutiaeMariusMatutiae

46.4k12 gold badges79 silver badges128 bronze badges

5

I had a similar issue in my home network. I had decided to run my Mac Pro headless for a while — it runs my media server, a wiki server and an ownCloud instance. All of those services were available to machines on the LAN, but from an ssh shell on that machine, I wasn’t able to ping or otherwise reach any hosts outside of our LAN, so I couldn’t (for example) do my «brew update» or other maintenance chores.

I finally gave up network troubleshooting and reattached the monitor, and found that my firewall (in this case, Little Snitch) was prompting me to allow those outgoing connections. Both options of loosening the rules, or disabling the firewall restored that machine’s ability to reach the Internet.

answered Mar 15, 2020 at 5:03

Dylan McNamee's user avatar

The simple procedure that works is to modify the c:users%USERPROFILE%.wslconfig file to be:

[wsl2]
memory=8GB
**swapFile=0**
swap=0

For some reason someone at microsoft changed the name of the swap config parameter.
Stragely, when swapfile is defined. network works like a whistle.

Microsoft: Please decouple swalfile from network. And consider supporting both names for the swap.

answered Sep 2, 2021 at 7:17

Mickey's user avatar

MickeyMickey

211 silver badge3 bronze badges

Понравилась статья? Поделить с друзьями:
  • Udma crc error count как сбросить
  • Udma crc error count как исправить
  • Udma crc error count synology
  • Ubuntu mount error 22 invalid argument
  • Udld error detected