Ethernet cable does not connect internet.
Hi,
Expected: Want to connect to internet using Ethernet cable. Observed: Unable to connect to internet using Ethernet connection. I am new to linux, below I have mentioned few configuration details. ifcongif -a docker0 Link encap:Ethernet HWaddr 02:42:cd:46:e3:2b inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) enp0s26u1u2 Link encap:Ethernet HWaddr 02:06:57:00:39:36 inet addr:192.168.42.150 Bcast:192.168.42.255 Mask:255.255.255.0 inet6 addr: 2405:204:738a:23e1:7d3f:6a02:f893:4af7/64 Scope:Global inet6 addr: 2405:204:738a:23e1:3cc7:85b1:125b:e7b2/64 Scope:Global inet6 addr: fe80::165b:c9f7:a4db:c53d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1951 errors:0 dropped:0 overruns:0 frame:0 TX packets:2066 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1061262 (1.0 MB) TX bytes:382706 (382.7 KB) enp4s0f2 Link encap:Ethernet HWaddr 08:9e:01:96:60:cc UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:342 errors:1 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:62060 (62.0 KB) 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:82421 errors:0 dropped:0 overruns:0 frame:0 TX packets:82421 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:4555644 (4.5 MB) TX bytes:4555644 (4.5 MB) virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 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) virbr0-nic Link encap:Ethernet HWaddr 52:54:00:6e:9a:ad 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) sudo nano /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback other details: OS: Linux Peppermint 7 My computer does not have any WiFi adapter attached, so basically I connect my system through USB tethering from my phone. Now I want to use Ethernet connection. Thanks, Mohan |
It looks like you are not getting a gateway with your first network connection (docker0).
What are you plugging your ethernet into on the other end? (eg. a router) Which ethernet interface are you using to try and get a connection? Are you trying to use a virtual machine for Internet browsing? |
Other End is router only
I am not sure about the name of my ethernet interface, but might be this enp4s0f2 or I dont know. I have been using docker container for the GNS3 app for network simulation but no VM installed separately. Quote:
|
What does the output of the following commands tell you? (post the output, using CODE tags)
Code:
ping 8.8.8.8 Code:
ping google.com |
ping google.com
ping: unknown host google.com ping 8.8.8.8 connect: Network is unreachable |
Quote:
|
Router working fine as I connected this ethernet cable with another windows machine, network working fine. In my linux system only its not connecting, ant fix would be helpful.
|
Quote:
Edit: If you are, this could cause problems. |
Yes, I have plugged one side to router and other to the linux machine. In my linux machine the network icon loading and not connecting .
|
Quote:
|
There's many aspects to having a connection. The physical part you've covered with the cable (assuming that it's plugged in). The driver for the ethernet device likely exists and works under linux. Then you need an IP assigned and a ROUTE. DHCP can do most of this for you. Along with DNS entries to translate names to IPs (the /etc/resolv.conf file), also filled out with DHCP.
# dhclient -4 -v enp4s0f2 # ping -c 2 8.8.8.8 # ping -c 2 google.com $ ip addr show $ ip link show $ ip route show # netstat -r # route -n And various other ways, some deprecated, to get the deets on your setup. But throw in virtualization and docker and the methods get "different". |
Quote:
|
Quote:
Are you sure your PC has only one ethernet card? Can you post the model and brand of your PC? |
Quote:
I basically use USB tethering for internet connection as my laptop dont have WiFi adapter. Was it because of that another ethernet interface shows. |
Have you tried this:
Linux renew ip command The -r flag explicitly releases the current lease, and once the lease has been released, the client exits. For example, open terminal and type the command: $ sudo dhclient -r Now obtain fresh IP: $ sudo dhclient Above text from this link: https://www.cyberciti.biz/faq/howto-...nt-ip-address/ |
All times are GMT -5. The time now is 03:04 PM. |