How to setup ethernet on Ubuntu Server 16.04
I solved the problem after 8 hrs struggle. I know some one like me can face the same issue later. That's I am giving my solution. Everything was good in my setting but still I was not getting any internet. So I thought may be it is my Gigabyte 990 FX UD3 motherboard. So I found inside the bios of MOBO, there is a feature called IOMMU, just turn it enable then save the settings of the mobo. Start the server..Done. Internet is working like a charm.
Related videos on Youtube
mlhazan
Updated on September 18, 2022Comments
-
mlhazan over 1 year
I just installed ubuntu server 16.04 lts to my local pc. I have a cable internet with no static ip. I am using a wireless router but first I am trying to get wired connection to start with. As I have no internet all my output here I have typed using my laptop so pls do consider any typo.
ifconfig -a
enp5s0 Link encap:Ethernet HWaddr 94:de:80:c3:af:60 inet6 addr:fe80::96de:80ff:fec3:af60/64 Scope:link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric;1 RX packets:1 error:0 dropped:0 overruns:0 frame:0 TX packets:0 error:0 dropped:47 overruns:0 carrier:0 collision:0 txqueuelen:1000 RX bytes:215 (215.0 B) TX Bytes:0 (0.0B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBAK RUNNING MTU:65536 Metric;1 RX packets:3481 error:0 dropped:0 overruns:0 frame:0 TX packets:3481 error:0 dropped:47 overruns:0 carrier:0 collision:0 txqueuelen:1000 RX bytes:258425 (258.4 kB) TX Bytes:258425 (258.4 kB) wlp6s0 Link encap:Ethernet HWaddr c0:4a:00:2c:34:f2 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:1 error:0 dropped:0 overruns:0 frame:0 TX packets:0 error:0 dropped:47 overruns:0 carrier:0 collision:0 txqueuelen:1000 RX bytes:215 (215.0 B) TX Bytes:0 (0.0B)
sudo lshw -C network
*-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co.,Ltd physical id: 0 bus info: pci@0000:05:00.0 logical name: enp5s0 version: 06 serial: 94:de:80:c3:af:60 capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI firmware=rtl8168e-3_0.0.4 03/27/12 latency=0 link=YES multicast=yes port=MII speed=100Mbit/s resources: irq:31 memory: d00004000-d0004fff memory:40000000-d0003ffff ioport:b000(size=256) +-network DISABLED description:Wireless interface .....
sudo nano /etc/network/interfaces
# The loopback network interface auto lo iface lo inet loopback auto enp5s0 #iface enp5s0 inet dhcp iface enp5s0 inet static address 192.168.0.107 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1 8.8.8.8
Here are host details: /etc/hostname
kronos
/etc/hosts
127.0.0.1 localhost 127.0.1.1 kronos
Here is the router details:
Wirelesss: DESKTOP-LDN5UMS 192.168.0.100 android-9b185c2fe6197052 192.168.0.106 Wired: nothing there even though ubuntu server is connected LAN Mac address:XXXXXXXXX ip address: 192.168.0.1 subnet mask: 255.255.255.0 DHCP:on
sudo ifdown enp5s0
ifdown: interface enp5s0 not configured
Still no internet
-
chili555 over 6 yearsPlease clarify. Is the router you are connected to 192.168.1.1 or 192.168.0.1 or 192.168.56.1? Your results above are confusing.
-
mlhazan over 6 yearscan you please check now? I edited my post cause it was hard to read
-
chili555 over 6 yearsAhh! If your router is 192.168.0.1, I shall edit my answer to conform.
-
-
mlhazan over 6 yearsPlease read the post again I simplified it and it is now easy to read
-
mlhazan over 6 yearsthanks for your reply. I really don't understand why it is not working.Here is the snap shop now: [link]imgur.com/a/Y3Fui any help will be appreciated.
-
chili555 over 6 yearsStopping and restarting networking is deprecated. Please do not do so! Please reboot and show us:
ip addr show
and also:ping -c3 192.168.0.1
Finally, are you sure that the address you used, 192.168.0.108, is outside the DHCP pool in the router? -
mlhazan over 6 yearsok I logged in to my router and found the range :192.168.0.100-199 [link]imgur.com/toXyBys
-
chili555 over 6 yearsI suggest that you change the
interfaces
file to specify an address outside that range; 192.168.0.50, for instance. Reboot.