Debian сеть есть интернета нет

How do I troubleshoot networking on Debian

It looks like I have an IPv6 address but not an IPv4 address? I would expect eth0 to have a line starting with inet addr: , but it doesn’t.

So how do I obtain an IP address?

Here’s some more information that may (or may not) be helpful:

$ uname -a Linux mocha 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU_Linux 
$ lspci | grep -i eth 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06) 

I would try booting from a CD and see if it connects, to make sure this is the Debian configuration that is at fault.

The Debian configuration is not at fault. I’ve been running it for months with networking. Networking just broke after a recent restart.

3 Answers 3

connect: Network is unreachable points to a missing route to that network (the default route in this case).

To display the current routing table. There must be a route that looks like this:

Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 UG 0 0 0 eth0 

Notice that, is the ip address of your router/gateway. And Iface may also be different, when you have multiple network interfaces in your system.

However, add the default route manually with this command:

My setup has no routes and when I tried to add a default route, I get an error SIOCADDRT: No such process

I would (all this commands as root) ifconfig -a to check if the interface has an IP address, if it doesn’t you have found your problem, if it does, then I would netstat -rn to check if the routes are right. If they are, I would iptables -L to check if there is a firewall rule that is not letting me out. If they are all OK then maybe your IP address doesn’t belong to the router network.

Could you please indicate how to fix the problems, e.g. if the interface has no IP address or if the routes are wrong.

If you have no IP you can either assign one manually, in which case you should know the network segment where the router is and use a free IP from that range ( ifconfig eth0 192.168.1.15/24 replacing eth0 for your interface and 192.168.1.15/24 for your address and networkmask) if you want to try to get an IP from the DCHP server dhclient should get an address for you. But it would be better to specify what you want in /etc/network/interfaces and you will have your network connection up and running whenever you start your machine. route add command will allow you to set routes.

Читайте также:  Тормозит интернет нет скорости

What happens if you assign one manually and it still has no network access? (No cabling issues, ports work on other booted OSs)

The issue here is that your wired interface (eth0) does not have an IPv4 address. You have manually added an IPv4 route but, without having an IPv4 address, traffic cannot get routed as it cannot assign an IP address for (your system’s) source IP.

Without knowing more information of your environment (Are you using a DSL connection? Are you in an corporate network? Who should be providing you an IP address?) I would guess that before the reboot you either have a staticly configured IP address or a working DHCP server. If you had a staticly configured address (which your configuration does not show) it was lost after the reboot.

You see an IPv6 address because that address is «auto-configured». Since you have not configured it the wired interface just creates one that can be used to communicate with the local network.

From the ifconfig information you provided it seems that your network card is receiving Ethernet packets, but not sending any. Strangely, it is also showing many dropped packets.

For starters, I would suggest you do the following:

  1. Get information of your network IP addressing scheme. Ask your network administrator, or check the information provided by your ISP. Alternatively, (if you are bold) you can listen to the network traffic on the network by running tcpdump -ni eth0 and try to guess your internal network addressing based on the packets your system receives. From now on lets assume that your network is in a private IP address range, since this is quite common. Many networks nowadays are pre-configured in the 192.168.1.0/24 space range which means that the IP addresses start in 192.168.1.1 and end in 192.168.1.254
  2. Configure your network interface with a static IP address and a gateway using either Network Manager (i.e. through the desktop) or configuring /etc/network/interfaces properly. This is described fully here in the Debian Wiki. Note: You can also configure it manually running ip addr add 192.168.1.15 dev eth0; ip route add default via 192.168.1.1 . But this will not survive a system reboot.
  3. Try to see if you reach the gateway by sending it packets. This can be done simply, assuming your gateway is 192.168.1.1 by running ping -c 10 192.168.1.1 . If the command returns that all 10 tests worked OK then you can see your gateway.
  4. Then try to access a well known public IP address. For example a Google DNS server, doing ping -c 10 8.8.8.8 . If this does not work then try to run a tracing test using traceroute -n 8.8.8.8 to see where your packets are being dropped.
  5. Finally, ensure that you can do DNS resolution properly by running host www.google.com or ping -c 10 www.google.com
Читайте также:  Толи есть доступ сети интернет

If all goes well up to step 5 I would suggest that, in order to diagnose future problems, you install the ifupdown-extra package. This installs the network-test tool which does many of the network tests listed above (and more) in order to diagnose if there is a network problem or misconfiguration.

Once you can connect using a static IP address. Try to go back with what you previously had which probably was a dynamic IP configuration using DHCP.

  1. Reconfigure the interface to use a dynamic IP address.
  2. Wait for Network Manager to do its job. You will see in your Desktop environment if it fails (or not) but you can also get detailed information in the System logs. More specifically /var/log/syslog . Filtering for Network Manager logs will tell you quite a lot of information, just run grep NetworkManager /var/log/syslog and review the output.
  3. Run network-test to see if you are properly connected
  4. If you are not connected to the network try to manually ask for an IP address running dhclient eth0 and see if that provides you with an IP address.

Based on the above tests you should have a better knowledge of what broke and what works in your network and configure your system accordingly.

Источник

Debian 8.1.0 нет подключения к интернету.

Стоит базавая система. Ни networkmanager, ни wicd не установлены. Автоматически сеть (во время установки) не определил (в Debian wheezy такой проблемы не было). Пробовал настроить вручную со статическим IP, не помогло.

Настраиваешь wifi соединение или ethernet? Шлюз пингуется?

DNS гугла пингуется. Доменное имя не разрешается.

DNS гугла пингуется. Доменное имя не разрешается.

Отсюда вывод, что вы не указали DNS сервер.

Читайте также:  Пропадает интернет самсунг а50

А ты уверен, что у него resolvconf не работает?

А ты уверен, что у него resolvconf не работает?

же. А вообще да, такие вещи надо иметь ввиду.

у меня та-же проблема. шлюз пингуется 8.8.8.8 и ya.ru — нет. debian 8.1 устанавливался с сети — сам все прекрасно находил, но после установки в интернет выходить не хочет. как я уже писал, сетевая настроилась локалка и шлюз в ней видны но инета нет

resolv.conf все прописано. не пингуются не имена ни ip

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default mechanik.local 0.0.0.0 UG 1024 0 0 eth0 169.254.182.0 * 255.255.255.0 U 0 0 0 eth0

eth0 Link encap:Ethernet HWaddr 44:87:fc:ec:4c:21 inet addr:169.254.182.4 Bcast:169.254.182.255 Mask:255.255.255.0 inet6 addr: fe80::4687:fcff:feec:4c21/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:16351 errors:0 dropped:553 overruns:0 frame:0 TX packets:9076 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17981653 (17.1 MiB) TX bytes:838913 (819.2 KiB)

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:15488 errors:0 dropped:0 overruns:0 frame:0 TX packets:15488 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8450664 (8.0 MiB) TX bytes:8450664 (8.0 MiB)

Кто же шлюз указывает через доменное имя. В таком случае пропиши DNS сервер, который может разрешить это доменное имя. Но лучше шлюз укажи через IP адрес.

Почитай вот это: www.linux.org.ru/help/lorcode.md для оформления сообщений.

Выкладывать выводы команд нужно так, что бы они читались:

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default mechanik.local 0.0.0.0 UG 1024 0 0 eth0 169.254.182.0 * 255.255.255.0 U 0 0 0 eth0 eth0 Link encap:Ethernet HWaddr 44:87:fc:ec:4c:21 inet addr:169.254.182.4 Bcast:169.254.182.255 Mask:255.255.255.0 inet6 addr: fe80::4687:fcff:feec:4c21/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:16351 errors:0 dropped:553 overruns:0 frame:0 TX packets:9076 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17981653 (17.1 MiB) TX bytes:838913 (819.2 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:15488 errors:0 dropped:0 overruns:0 frame:0 TX packets:15488 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8450664 (8.0 MiB) TX bytes:8450664 (8.0 MiB) 

kostik87 ★★★★★ ( 21.08.15 08:38:27 MSK )
Последнее исправление: kostik87 21.08.15 08:42:06 MSK (всего исправлений: 3)

так я везде IP прописываю, он сам его преобразовал в имя. сам шлюз пингуется и по имени и по IP. Вообще не пойму как он выходил в инет при установке системы и не выходит после установки. Через DHCP сам все настройки втянул а тут не фурычит

Источник

Оцените статью
Adblock
detector