Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to setup a wifi access point with my Ubuntu server. I am having some trouble getting everything working correctly. Mainly the problem appears to be with routing or iptables but I cannot say for certain.

My network is setup like so;

Server is NS01 (Ubuntu 11.10 server amd64)

Interfaces: eth0 (primary), br0 (bridges eth1 and wlan0) and , tun0 (OpenVPN).

What does work: When I bring the access point online the bridge comes up and my laptop can phone get an IP address lease from my DHCP server.

What does not work: When I try to ping the new host (my phone or laptop) from my workstation I get a reply back of Destination host unreachable icmp_seq=1. I have checked iptables and I pretty sure that is working fine, I have INPUT and OUTPUT set to ACCEPT so iptables is pretty permissive.

I am thinking it is a routing issue but the routing table looks "ok" to me.

Can anyone give me some insight to what I may need to look at, I am so close to getting this thing working.

share|improve this question
    
What are the addresses and masks on the interfaces and hosts? –  blankabout Nov 21 '11 at 4:27
    
The addresses are eth0 = 10.0.0.15/24 and br0 = 10.0.0.16/24 my android phone got a lease of 10.0.0.138/24 I want the wireless to be an extension of my LAN not a seperate network. –  Solignis Nov 21 '11 at 4:29
    
I suspect then the problem is that you have an address on eth0 but it should be in the bridge if it is possible to add another interface. –  blankabout Nov 21 '11 at 4:39
    
I can't do that, eth0 is for my DNS, LDAP, DHCP and OpenVPN service(s). Unless adding eth0 to the bridge will not interupt traffic because I was aware it would which is why I am using eth1 instead. –  Solignis Nov 21 '11 at 4:45
    
I'm not posting this as an answer because I am not 100% sure, but I am fairly certain that you need to put your bridge/eth1 interface and your eth0 interface into separate subnets otherwise you are trying to route within the same subnet and I can't see how that could work. –  blankabout Nov 21 '11 at 4:48

1 Answer 1

up vote 1 down vote accepted

Since your network is flat you shouldn't need iptables (you may, but I don't think so). The first thing to ensure is that your kernel will forward ipv4 packets by checking on the following kernel parameter:

cat /proc/sys/net/ipv4/ip_forward

You will either get a 1 or a 0, 1 being forwarding enabled. If you get a 0 try running the command:

echo 1 > /proc/sys/net/ipv4/ip_forward

And trying to ping from your client again. If it still does not work I would open two terminals on the Ubuntu bridge machine and run tcpdump listening for icmp on each interface:

terminal 1

tcpdump -i eth0 icmp

terminal 2

tcpdump -i br0 icmp

And then try pinging from your workstation inside interface (eth0 10.0.0.15) and see if you see packets hit both interfaces. You may need to do some tweaking with brctl but you shouldn't need to have any specific routes since the network is flat. I would also check to make sure that your wifi card is in the correct mode, probably infrastructure or possibly ad-hoc with iwconfig. As strange as it may seem this may be easier to do with different networks and some iptables/routing foo, at least it will make it easier to identify where the traffic is being dropped.

share|improve this answer
    
Traffic is not showing up when I run tcpdump -i br0 icmp its like that data is not making even to the bridge. On the other hand my gateway is constantly in chat with my eth0 interface but I think that is unrelated. –  Solignis Nov 21 '11 at 5:47
    
If you run tcpdump -i br0 do you see any traffic at all? I think you should at least see arp whois packets traversing that interface when you ping. –  d34dh0r53 Nov 21 '11 at 5:57
    
yeah I see a huge amount of ARP requests, all of them are coming from my workstation VMADMIN. All of the request though are for my 10.0.0.0/24 subnet not the 10.0.1.0/24 which is my wireless. –  Solignis Nov 21 '11 at 5:59
    
I just want to make sure I have this clear: eth0 is on 10.0.0.0/24, eth1 is on 10.0.0.0/24, br0 is on 10.0.0.0/24, wlan0 is on 10.0.1.0/24 and your "client (android/laptop)" is getting a 10.0.1.0/24 address? Is my understanding of your network correct? –  d34dh0r53 Nov 21 '11 at 6:05
    
No, eth0 = 10.0.0.0/24, eth1 = bridge slave, wlan0 = bridge slave, br0 = 10.0.1.0/24. My Android/Laptop are getting leases for 10.0.1.0/24 –  Solignis Nov 21 '11 at 6:10

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.