I have Ubuntu Server 12.04 installed with no GUI. I installed ownCloud and webmin a few months ago with no problem, so I know my internet used to work. The power went out while the PC was on one day 2 months ago and I did not turn the PC back on until yesterday. Now I have no internet connection. Does anyone know how I can fix this, or should I just reinstall Ubuntu?
this is the output of ifconfig -a
:
eth0 link encap:Ethernet HWaddr 00:06:4f:4a:66:f0
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)
eth1 link encap:Ethernet HWaddr 00:16:ec:05:c8:9c
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:1800 errors:0 dropped:0 overruns:0 frame:0
Tx packets:1800 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:143896 (143.b KB) TX bytes:143896 (143.8 KB)
I have a wired connection.
Here are the contents of etc/network/interfaces
:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
I tried assigning a static IP to eth2, which is a adapter I just added, and now when I run ifconfig it shows a inet addr of 192.168.1.100. So I have an ip now. When trying to add the default gateway, I typed route add default ge 192.168.1.1
, and it said,
Usage: inet route [-vF] del {-host|-net} Target[/prefix] [gw GW] [metric M] [[dev] if]
There are 5 more lines of writing associated with this route error, but I do not want to type all that out unless it is needed. Does anyone know what to do?
Looking at your ifconfig output, I don't see any IP address assigned, there are many ways of troubleshooting this issue, assuming you have your cable connected to the first Ethernet port eth0 on your server.
send new DHCP request
Try and assign static IP if DHCP request failed.
then add default gw