LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-02-2010, 12:19 AM   #1
syseeker
Member
 
Registered: Aug 2003
Posts: 66

Rep: Reputation: 15
Thumbs up PC Router between wireless and Ethernet interface


Hi,

I tried to setup a connection as below but face some problem (probably route table setting incorrect). Hope if anyone could shed the light...

Basically, I have a PC1 (.1) and PC2 (.130) connected via a PC router. PC router has 2 interfaces: wireless (.2) and ethernet (.129). PC1 connects to PC router via LAN cable/wireless interface, while PC2 connects to PC router via cable. This settings try to simulate 1 wireless connection along the path (and because PC2 is too old to support wireless interface, we need a PC router). These interfaces are all under same 172.16.130.x subnet.

[PC1](.1)--ethernet--[wireless AP]--wireless--(.2)[PC router](.129)--ethernet--[dummy switch]--ethernet-- (.130)[PC2]


I tried to check the settings at PC router by PING.
The problem is
(a) PING success from .1 to .129,
(b) PING fail from .129 to .1.
(c) PING success from .130 to .2
(d) PING fail from .2 to .130.
(e) PING fail from .1 to .130 (ICMP request from .1 reach .2 but does not forward to .129)
(f) PING fail from .130 to .1 (ICMP request from .130 reach .129 but does not forward to .2)
(g) PING success between adjacent interface (eg. .1 to .2 and vice versa, .129 to .130 and vice versa).
(h) PING fail between .129<>.2 using non loopback fail (expected since no conn btw 2 interface).



My question is why PING A -> B success, but PING B->A fail??


--------------------------------------------
Below are the settings of Ubuntu 9.04 at PC Router
--------------------------------------------

root@atdg-desktop:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.130.128 0.0.0.0 255.255.255.128 U 1 0 0 eth0
172.16.130.0 0.0.0.0 255.255.255.0 U 2 0 0 ra0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 172.16.130.2 0.0.0.0 UG 0 0 0 ra0
0.0.0.0 172.16.130.129 0.0.0.0 UG 0 0 0 eth0

-----------------------

root@atdg-desktop:~# sysctl -a | grep forward
error: "Invalid argument" reading key "fs.binfmt_misc.register"
error: permission denied on key 'net.ipv4.route.flush'
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.eth0.forwarding = 1
net.ipv4.conf.eth0.mc_forwarding = 0
net.ipv4.conf.eth1.forwarding = 1
net.ipv4.conf.eth1.mc_forwarding = 0
net.ipv4.conf.ra0.forwarding = 1
net.ipv4.conf.ra0.mc_forwarding = 0
net.ipv4.conf.pan0.forwarding = 1
net.ipv4.conf.pan0.mc_forwarding = 0
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.lo.forwarding = 0
error: permission denied on key 'net.ipv6.route.flush'
net.ipv6.conf.eth0.forwarding = 0
net.ipv6.conf.eth1.forwarding = 0
net.ipv6.conf.ra0.forwarding = 0
net.ipv6.conf.pan0.forwarding = 0

----------------------------------

root@atdg-desktop:~# cat /proc/sys/net/ipv4/ip_forward
1

----------------------------------

root@atdg-desktop:~# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


----------------------------------

root@atdg-desktop:~# arp -n
Address HWtype HWaddress Flags Mask Iface
172.16.130.130 ether [CorrectMAC] CM ra0
172.16.130.130 ether [CorrectMAC] C eth0
172.16.130.1 ether [CorrectMAC] CM ra0
172.16.130.1 ether [CorrectMAC] C eth0

Last edited by syseeker; 09-02-2010 at 01:30 AM.
 
Old 09-02-2010, 12:35 AM   #2
syseeker
Member
 
Registered: Aug 2003
Posts: 66

Original Poster
Rep: Reputation: 15
Also with wireshark trace, I have found that

PING fail from .1 to .130 >> ICMP request from .1 reach .2 but does not forward to .129
PING fail from .130 to .1 >> ICMP request from .130 reach .129 but does not forward to .2
 
Old 09-02-2010, 03:41 PM   #3
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,323

Rep: Reputation: 100Reputation: 100
How is your networking setup, you want a wireless bridge? Are your eth0 and Wireless bridged together? or are you trying to use it like a router? Does your wireless card support Master mode, needed to have an infrastructure AP, does the firmware/driver you are using for wireless support using the wireless card as a router? Have you considered an alternative of actually buying a hardware access point and just plugging it into an ethernet port on your router or into a switch?

Some wireless cards just won't relay requests not originating from them, I had this problem when I used virtualization on my old laptop, I had to use a proxy on the host for web browsing because the wireless wouldn't send the requests from my VM. Do you have a client connected via wireless and not plugged into the router or network physically? Run wireshark or iftop on that and see if you see the ping coming to it, if not your wireless card is not transmitting the data.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless G or N Router Networking, Ethernet, Wireless Adaptor and Connection Issues. RenCat General 1 02-06-2010 10:27 AM
Cannot access to web interface of wireless ethernet bridge Belkin F5D7330 probabil1ty Linux - Wireless Networking 6 01-24-2007 01:14 PM
Linux router 2x ethernet and 2x wireless Glugolian Linux - Wireless Networking 2 05-23-2005 09:49 AM
Wireless in, ethernet out to router? mj_b90 Linux - Wireless Networking 2 03-12-2005 09:21 PM
[Newbie] Intel pro/wireless 2200 recognized as ethernet interface in FC3 thordivel Linux - Wireless Networking 6 02-06-2005 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration