Нет интернета linux 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 проблемы с обнаружением Ethernet Интернета после установки

Здравствуйте, профессионалы! Сегодня я установил последний Дебиан 64 бита на стационарный компьютер (АМД), подключенный к Интернету через Ethernet-кабель. У соединения нет пароля, то есть достаточно воткнуть шнур, и Интернет работает.

Во время установки Дебиан нормально качал пакеты. А после установки — браузер не подключается к Интернету.

У меня была схожая проблема после установки Дебиан на ноутбук — не обнаруживал вайфай, хотя во время установки нормально качал пакеты по вайфай. Тема обсуждалась тут Debian установился без Интернета. что делать дальше?

Тогда эта проблема, насколько я помню, решилась путём включения Wi-Fi модема в каких-то файлах настроек, то есть видимо вот так Xubuntu, Lubuntu не включают wi-fi и пишут в сетях: wi-fi is disabled by hardware switch (комментарий).

Порекомендуйте мне план действий по настройке Ethernet-подключения к Интернету без пароля в Debian 8.3. Я уже ввёл команду (не помню какую) и увидел, что он обнаруживает сетевую карту Эзернет. И называется она eth1 почему-то, а не eth0.

Мне нужен либо мануал по сабжу, либо волшебная гуи-утилита.

Это лишь предположение, но

некоторые роутеры (если у Вас комп подключен через роутер) плохо работают с линуксом из-за параноидальных настроек фаервола. Например у меня ASUS RT-N10E не работает с ноутом под Xubuntu, хотя ASUS RT-N10 прекрасно пашет.

Читайте также:  Регистрация сети теле2 нет интернета

Чтобы определить, так это или нет, выполните

это стандартный айпишник роутера (у некоторых моделей он другой). Если пакеты теряются, то проблема не с конкретным роутером, а с сетью в целом. Если пишет, что, мол, network is anreachable, то проблемы с конкретым роутером. Мне в этом случае помогла только замена роутера.

хорошо. попробую завтра, отпишусь. но во время установки он нормально качал с Интернета пакеты.

$ ping 192.168.1.1 network is ureachable $ dmesg | grep eth forcedeth: Reverse Engineered nForce ethernet driver. version 0.6.4 forcedeth 0000:00:06.0: ifname eth0, PHY OUI 0x1374 @ 1, addr 00. id. . IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready 

Не знаю

Выхлоп этих команд киньте сюда

P.S. И не забываем про форматирование.

# dmesg | grep eth [ 1.282510] forcedeth: Reverse Engineered nForce ethernet driver. Version 0.64. [ 1.804610] forcedeth 0000:00:06.0: ifname eth0, PHY OUI 0x1374 @ 1, addr 00:1d:60:29:32:69 [ 1.804617] forcedeth 0000:00:06.0: highdma pwrctl mgmt gbit lnktim msi desc-v3 [ 7.944235] systemd-udevd[197]: renamed network interface eth0 to eth1 [ 230.873889] forcedeth 0000:00:06.0: irq 45 for MSI/MSI-X [ 230.873934] forcedeth 0000:00:06.0 eth1: MSI enabled [ 230.874150] forcedeth 0000:00:06.0 eth1: no link during initialization [ 230.874581] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready # ifconfig -a eth1 Link encap:Ethernet HWaddr 00:1d:60:29:32:69 UP BROADCAST 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) 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:33 errors:0 dropped:0 overruns:0 frame:0 TX packets:33 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3492 (3.4 KiB) TX bytes:3492 (3.4 KiB) # ip link 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth1: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:1d:60:29:32:69 brd ff:ff:ff:ff:ff:ff # ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth1: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 00:1d:60:29:32:69 brd ff:ff:ff:ff:ff:ff 

eth1: mtu 1500 qdisc noop state DOWN group default qlen 1000

sudo ifconfig eth1 up
sudo dhclient -r eth1
потом отредактировать /etc/network/interfaces

две команды прописал. отредактировал /etc/network/interfaces всё закомментировал и вставил только это:

 auto eth1 allow-hotplug eth1 iface eth1 inet dhcp
#sudo service networking restart Warning: Unit file of networking.service changed on disk, 'systemctl daemon-reload' recommended #systemctl daemon-reload #sudo service networking restart Warning: Unit file of networking.service changed on disk, 'systemctl daemon-reload' recommended

перезагрузил компьютер, повторил две команды. всё по-старому. браузер не открывает сайты.

Источник

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