Hello, im getting errors: 1) Err [address] Cannot initiate the connection to [address] - connect (101: Network is unreachable) [ IP: [ip] ] 2) W: Failed to fetch [address] Cannot initiate the connection to [address][port] ([ip]). - connect (101: Network is unreachable) [IP: [ip] ] So do you guys know what can cause that problem ?
It seems as if the network configuration is wrong on the Ubuntu system. What's in /etc/network/interfaces and /etc/resolv.conf, and what are the outputs of Code: ifconfig and Code: route -nee ? What's your router's local IP?
Yes, you were right! After lookup, i saw that my netmask was wrong. Thanks for pointing me at wrong config. now im getting errors like: temporary failure resolving 'security.ubuntu.com' what the hell can cause that now? Note, also when i put on /etc/network/interface --> dhcp, it started to work, but with static ( and correct data for addres, netmask, network, broadcast and getaway, it was all correct it didn't work. )
ifconfig result: kristjan@server1:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:60:b0:56:e8:d4 inet addr:192.168.10.106 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::260:b0ff:fe56:e8d4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:73625 errors:0 dropped:0 overruns:0 frame:0 TX packets:73413 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9699311 (9.6 MB) TX bytes:39762692 (39.7 MB) 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:16436 Metric:1 RX packets:51516 errors:0 dropped:0 overruns:0 frame:0 TX packets:51516 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3307932 (3.3 MB) TX bytes:3307932 (3.3 MB) and route -nee result kristjan@server1:~$ route -nee Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt 192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0 0 0 0.0.0.0 192.168.10.1 0.0.0.0 UG 100 0 0 eth0 0 0 0
interfaces is right now default so it means set to: dhcp! and resolv is: nameserver 192.168.10.1 domain TRENDnet search TRENDnet
here it is: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp
Answer for ping -c4 192.168.10.1: PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_seq=1 ttl=255 time=4.30 ms 64 bytes from 192.168.10.1: icmp_seq=2 ttl=255 time=1.16 ms 64 bytes from 192.168.10.1: icmp_seq=3 ttl=255 time=1.51 ms 64 bytes from 192.168.10.1: icmp_seq=4 ttl=255 time=1.15 ms --- 192.168.10.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 1.158/2.035/4.308/1.320 ms Answer for ping -c4 google.com PING google.com (209.85.149.104) 56(84) bytes of data. 64 bytes from 209.85.149.104: icmp_seq=1 ttl=52 time=69.5 ms 64 bytes from 209.85.149.104: icmp_seq=2 ttl=52 time=83.7 ms 64 bytes from 209.85.149.104: icmp_seq=3 ttl=52 time=84.3 ms 64 bytes from 209.85.149.104: icmp_seq=4 ttl=52 time=76.2 ms --- google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 69.517/78.472/84.375/6.072 ms Answer for ping -c4 209.85.149.105: PING 209.85.149.105 (209.85.149.105) 56(84) bytes of data. 64 bytes from 209.85.149.105: icmp_seq=1 ttl=52 time=75.5 ms 64 bytes from 209.85.149.105: icmp_seq=2 ttl=52 time=82.0 ms 64 bytes from 209.85.149.105: icmp_seq=3 ttl=52 time=66.3 ms 64 bytes from 209.85.149.105: icmp_seq=4 ttl=52 time=74.5 ms --- 209.85.149.105 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 66.357/74.607/82.041/5.577 ms
So your Internet connection and name resolution are both working. Maybe it was just a temporary problem. I think you should try apt again.
Now its working, but if you are reading my first message, you can see that when i try to use static IP, then it will not work!
If i set it to static the interfaces will look like this: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.10.106 netmask 255.255.255.240 network 192.168.10.0 broadcast 192.168.10.255 gateway 192.168.10.1
Are the lines after iface eth0 inet static indented? The file must look like this: Code: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.10.106 netmask 255.255.255.240 network 192.168.10.0 broadcast 192.168.10.255 gateway 192.168.10.1