Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I currently only have wired internet via a cable modem connected to an Airlink 101 ASW105 switch. It works fine for my wife's mac. However, my laptop does not connect; I've tried connecting via eth0 and tried creating a new wired connection- but both fail to connect.

It's not a hardware problem with my cables or the network hardware, as my wife's machine has been used to test all cables and ports etc, other than that of my laptop.

So, how can I go about connecting to this network via commands on the terminal?

If you need more information please fire away.

Edit: I added some more info based on the comments. I have only added the Wired devices comments for nm-tool.

ping -c2 4.2.2.2
connect: Network is unreachable


nm-tool
enter code here
Device eth0----------------------------
Type:       Wired
Driver:     tg3
State:      disconnected
Default:    no
HW Address: 00:22:19:F2:36:3B

Capabilities:
  Carrier Detect: yes
  Speed:          100 MB/s

Wired Properties
  Carrier:        on
share|improve this question
    
Are you trying to connect using the network manager? What is the output of nm-tool in the terminal? Do ping -c2 4.2.2.2 works? When you connect the cable, some light in the laptop turns on? –  Braiam Sep 19 '13 at 18:38
    
@RaduRădeanu that is for wireless connections –  Will Sep 19 '13 at 20:02
2  
possible duplicate of How to connect to Wired internet connection through terminal? –  Radu Rădeanu Sep 19 '13 at 20:51
    
@RaduRădeanu no, his problem is more profound than this. NM don't detect the cable at all. –  Braiam Sep 20 '13 at 16:27
    
Could you get the output of sudo lspci -nnk | grep -A8 -i network and ifconfig? –  Braiam Sep 20 '13 at 16:28
show 2 more comments

1 Answer

First of all be sure cable is connected to your laptop (I mean Ubuntu detects that cable is connected)

Second enable eth0 by ifconfig eth0 up.

Wait about 30 second and then see output of ifconfig eth0. If you have not IP address (appears in front of inet addr), use dhclient eth0 to force getting address from DHCP server. If it cannot get IP address use following command to set IP address manually:

ifconfig eth0 192.168.0.10/24

IP address must be in the range of your network address. To find out network address range, see your wife IP address (ifconfig works on MAC OSX too).

Now try to ping your default gateway. If no error occurs, you are connected and have suitable IP address. Just specify your default gateway address by:

route add default gw 192.168.0.1

Don't forget to set DNS server by changing /etc/resolv.conf.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.