Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got a Debian 7 linux machine and a TP-link MR3020 router attached to it via ethernet cable at eth0 interface, working in WISP mode meant to make it a client rather than an access point:

enter image description here

I also have a separate router connected to ISP and nicely providing wi-fi. My linux machine lacks built-in wi-fi adapter and I want to use WISP mode router instead of external USB wi-fi adapter cause those are very unstable (tried 3 of them, 2 don't work, 1 glitches).

My trouble is that seemingly, my Linux machine can't associate IP address of WISP router with its MAC address:

I used to utilize network manager for eth0, my settings were

gateway ip 192.168.1.1
mask /24
static ip 192.168.1.2 (for my Debian machine itself)

but now I entered them right in /etc/network/interfaces (see below)

When I ping 192.168.1.1, it says From 192.168.1.2 icmp_seq=1 Destination Host Unreachable.

I found out that arp doesn't know MAC address for this ip: 192.168.1.1 corresponds to HWaddress [incomplete].

Do you have any advice of how to troubleshoot this? Should I manually assign IP to MAC?


INFORMATION UPDATE:

My /etc/network/interfaces now contains the eth0 interface as primary:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

ifconfig data:

$ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr 40:e5:49:32:a2:50
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::52e5:49ff:fe32:a240/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68643 errors:0 dropped:0 overruns:0 frame:0
          TX packets:53708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:81335250 (77.5 MiB)  TX bytes:5438226 (5.1 MiB)
          Interrupt:40 Base address:0xe000

route data:

$ sudo route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

Capture of packets by wireshark upon ping 192.168.1.1 contains only spam of tons of ARP packages, all of the same structure:

Source Giga-Byt_something
Destination Broadcast
Protocol Arp
Length 42
Info Who has 192.168.1.1 Tell 192.168.1.2

Arp frame details:
Address Resolution Protocol (request)
Hardware type: Ethernet (1)
Protocol type: IP (0x0800)
Hardware size: 6
Protocol size: 4
Opcode: request (1)
Sender MAC address: Giga-Byt_something (40:e5:49:32:a2:50)
Sender IP address: 192.168.1.2
Target MAC address:  00:00:00_00:00:00 (00:00:00:00:00:00)
Targe IP address: 192.168.1.1 (192.168.1.1)

At the same time router's LAN LED is blinking, indicating that transfer of data is happening.

Router quick manual, contains illustrations on WISP mode: http://www.tp-link.com/resources/document/TL-MR3020_V1_QIG_7106503718.pdf

EDIT:

The problem with arp was solved by setting gateway to 192.168.0.254. Current state is that my Linux machine sees the WISP tp-link router, but WISP router doesn't see the main d-link router in access point mode:

enter image description here

I'm not really sure, if it is possible to have a LAN within LAN. Tomorrow I'll try to associate the router in WISP mode with Windows machine and wireshark the negotiations between tp-link and d-link routers to find out, how tp-link WISP mode router tries to associate itself with 192.168.1.* LAN.

$ sudo route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.254   0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
share|improve this question
    
Look at this with wireshark. Following your ping there is a request arp who has 192.168.1.1, but noone is answering. What's your gateway's real address? –  ott-- Sep 9 '13 at 20:46
    
@ott-- Thanks for suggestion. I'm reading tutorials on wireshark now. What do you mean by "gateway's real address" - WAN (external) IP; MAC or something else? To clarify, do you mean client router or access point router by gateway? Client router, right? –  Bob Sep 9 '13 at 22:53
    
@Bob fancy graphic, what'd you use to make it? –  strugee Sep 9 '13 at 23:10
1  
@strugee used Dia diagram editor. It has various shapes, including Cisco and Electrical Engineering ones. –  Bob Sep 10 '13 at 7:14
    
it might be a VLAN issue. can you show ifconfig? –  Kerim Oguzcan Yenidunya Sep 10 '13 at 7:37
show 10 more comments

2 Answers

You need an Ethernet config of some kind, at present you only seem to have loop back configured:

auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.8.4

Before you do this and reboot however, try this:

ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up

Then type in:

route add default gw 192.168.1.1

See if you can ping now

share|improve this answer
add comment

If pinging your local router doesn't work, there really aren't many possibilities:

  1. You've made a config error and confused it. I'm pretty sure from that manual that its intended that you have (for example) 192.168.0.2/24 on the WiFi side and 192.168.1.1/24 on the Ethernet side—different networks. And the wireless side would be configured to route to 192.168.0.1 (your Wi-Fi AP). [Or, if your wireless network uses DHCP, you'd just set it to DHCP instead of static.]

  2. You've made a config error on your computer, and you're running on the wrong IP address as far as the router is concerned. Try switching your computer to DHCP (ifdown eth0; ifconfig eth0 up; dhclient eth0 ought to be enough to test).

  3. Its possible it has weird behavior if the WiFi link isn't up. Confirm that the link is up. (E.g., maybe it only brings up its Ethernet once the WiFi link is up.)

  4. Your Ethernet cable is defective. Try a different one (yes, this can happen, and you can still get a link, and even unidirectional traffic flow)

  5. Related to above, your Ethernet cable isn't fully seated. Can happen if the prong gets bent down. Gently bend the prong back out, make sure it clicks in securely.

  6. You have a bad Ethernet port—physically or electrically, on either your computer or the router. Test with a different device (computer to a laptop and router to a laptop, for example)

  7. the Linux Ethernet driver for your NIC doesn't work. Test by connecting your computer to a different device.

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.