LinuxQuestions.org
Review your favorite Linux distribution.
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 11-28-2016, 09:45 AM   #1
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Rep: Reputation: Disabled
IPv6 routing across Debian interfaces


Hello,


I am a newbie when it comes to Linux so I am hoping the answer is simple here. I am testing VOIP traffic across a wireless mesh network using different routing protocols. For some reason one of the protocols will not route between interfaces on the edge devices. I tried static routing without the protocol and it suffers the same problem. I am assuming there is some security feature that the first two protocols disable that the third does not.

Topology

ClientA-----wired------AP01-------wireless-------AP02-----wired------ClientB

ClientA eth0 - 2002::2/64
AP01 eth0 - 2002::1/64
AP01 wlan0 - 2001::1/64
AP02 wlan0 - 2001::5/64
AP02 eth0 - 2003::1/64
ClientB eth0 - 2003::2/64

Client A default gateway is 2002::1/64
Client B default gateway is 2003::1/64
AP01 has a static route to the network 2003::/64 with next hop 2001::5/64
AP02 has a static route to the network 2002::/64 with next hop 2001::1/64
Note: This is when I configure it statically. The routing protocol add the routes when I configure it

ClientA can ping both interfaces of AP01 but no further
ClientB can ping both interfaces of AP02 but no further
AP01 can ping Client A and both interfaces of AP02
AP02 can ping Client B and both interfaces of AP01

ClientA and ClientB are IBM desktops running Debian Jessie
AP01 and AP02 are Raspberry Pi3 devices running Rasbian Wheezy

When the mesh is configured using BMX6 or OLSR I can ping end to end.
When the mesh is configured using Babel or using static routes I hit the problem.

All devices are configured as dual stack with IPv4 addresses on eth0 used for management traffic. The IPv4 network is a flat network 172.20.20.0/24 which I do not believe should be relevant but I have included it here for completeness.

I have confirmed that the correct interfaces are being used to reach each network.

Thank you in advance for reading my post and hopefully somebody can help.

Last edited by 1ontheriver; 12-06-2016 at 11:11 AM. Reason: Updated IP address of AP02 to match current config
 
Old 12-02-2016, 03:31 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
In AP01, what's default gateway?
 
Old 12-02-2016, 03:34 PM   #3
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
Im not an ipv6 expert, but perhaps this link may help

http://lists.alioth.debian.org/piper...ry/001868.html
 
Old 12-05-2016, 07:03 AM   #4
camp0
Member
 
Registered: Dec 2016
Location: Dublin
Distribution: Fedora
Posts: 70

Rep: Reputation: 4
Hi,

Can you paste the output of the command route of each component?
 
Old 12-06-2016, 10:52 AM   #5
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
In AP01, what's default gateway?
None set however it has a route to all networks and I can ping at least 1 IP in each

***EDIT*** Formatting is not clear so please see attached screenshots

pi@AP-1:~ $ route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
2001::5/128 fe80::34fb:11b6:29f6:916b UG 1024 1 3052 wlan1
2001::/64 :: U 256 0 0 wlan1
2002::/64 :: U 256 2 6 eth0
2003::1/128 fe80::34fb:11b6:29f6:916b UG 1024 0 0 wlan1
fe80::/64 :: U 256 0 0 eth0
fe80::/64 :: U 256 0 0 wlan1
::/0 fe80::5ef9:6aff:fe1a:1426 UG 202 0 0 eth0
::/0 :: !n -1 1 3059 lo
::1/128 :: Un 0 4 4 lo
2001::/128 :: Un 0 1 0 lo
2001::1/128 :: Un 0 2 3 lo
2002::/128 :: Un 0 1 0 lo
2002::1/128 :: Un 0 2 116 lo
fe80::/128 :: Un 0 1 0 lo
fe80::/128 :: Un 0 1 0 lo
fe80::86ab:4558:ee67:3b75/128 :: Un 0 2 153 lo
fe80::95a2:f7a5:dfa7:c4eb/128 :: Un 0 2 133 lo
ff00::/8 :: U 256 3 36 eth0
ff00::/8 :: U 256 1 4 wlan0
ff00::/8 :: U 256 3 4210 wlan1
::/0 :: !n -1 1 3059 lo
pi@AP-1:~ $
Attached Thumbnails
Click image for larger version

Name:	AP01.JPG
Views:	72
Size:	44.9 KB
ID:	23687   Click image for larger version

Name:	AP02.JPG
Views:	53
Size:	38.2 KB
ID:	23688   Click image for larger version

Name:	Client 1.JPG
Views:	39
Size:	31.4 KB
ID:	23689   Click image for larger version

Name:	Client 2.JPG
Views:	31
Size:	34.2 KB
ID:	23690  

Last edited by 1ontheriver; 12-06-2016 at 11:04 AM.
 
Old 12-06-2016, 10:55 AM   #6
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camp0 View Post
Hi,

Can you paste the output of the command route of each component?
****EDIT**** Formatting was lost so please see attached screenshots

Client 1
root@Client1:/home/pi/Documents# route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
2002::/64 :: U 256 0 1 eth0
fe80::/64 :: U 256 0 0 eth0
::/0 2002::1 UG 1 0 0 eth0
::/0 :: !n -1 1 3059 lo
::1/128 :: Un 0 1 6 lo
2002::2/128 :: Un 0 1 6 lo
fe80::216:e6ff:fef6:bd1d/128 :: Un 0 1 239 lo
ff00::/8 :: U 256 0 0 eth0
::/0 :: !n -1 1 3059 lo

AP01
pi@AP-1:~ $ route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
2001::5/128 fe80::34fb:11b6:29f6:916b UG 1024 1 3052 wlan1
2001::/64 :: U 256 0 0 wlan1
2002::/64 :: U 256 2 6 eth0
2003::1/128 fe80::34fb:11b6:29f6:916b UG 1024 0 0 wlan1
fe80::/64 :: U 256 0 0 eth0
fe80::/64 :: U 256 0 0 wlan1
::/0 fe80::5ef9:6aff:fe1a:1426 UG 202 0 0 eth0
::/0 :: !n -1 1 3059 lo
::1/128 :: Un 0 4 4 lo
2001::/128 :: Un 0 1 0 lo
2001::1/128 :: Un 0 2 3 lo
2002::/128 :: Un 0 1 0 lo
2002::1/128 :: Un 0 2 116 lo
fe80::/128 :: Un 0 1 0 lo
fe80::/128 :: Un 0 1 0 lo
fe80::86ab:4558:ee67:3b75/128 :: Un 0 2 153 lo
fe80::95a2:f7a5:dfa7:c4eb/128 :: Un 0 2 133 lo
ff00::/8 :: U 256 3 36 eth0
ff00::/8 :: U 256 1 4 wlan0
ff00::/8 :: U 256 3 4310 wlan1
::/0 :: !n -1 1 3059 lo

AP02
pi@AP-2:~ $ route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
2001::1/128 fe80::86ab:4558:ee67:3b75 UG 1024 1 3 wlan1
2001::/64 :: U 256 0 0 wlan1
2002::1/128 fe80::86ab:4558:ee67:3b75 UG 1024 1 3 wlan1
2003::/64 :: U 256 1480555 eth0
fe80::/64 :: U 256 0 0 eth0
fe80::/64 :: U 256 2 3 wlan1
::/0 fe80::5ef9:6aff:fe1a:1426 UG 202 4 6249 eth0
::/0 :: !n -1 1965180 lo
::1/128 :: Un 0 4 5 lo
2001::/128 :: Un 0 1 0 lo
2001::5/128 :: Un 0 2 2976 lo
2003::/128 :: Un 0 1 0 lo
2003::1/128 :: Un 0 2 4347 lo
fe80::/128 :: Un 0 1 0 lo
fe80::/128 :: Un 0 1 0 lo
fe80::34fb:11b6:29f6:916b/128 :: Un 0 2 151 lo
fe80::cdf9:b2a5:629e:f201/128 :: Un 0 2 13513 lo
ff00::/8 :: U 256 4 5396 eth0
ff00::/8 :: U 256 4 4500 wlan1
::/0 :: !n -1 1965180 lo
pi@AP-2:~ $


Client 1
root@Client2:~# route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
2003::/64 :: U 256 0 1 eth0
fe80::/64 :: U 256 0 0 eth0
::/0 2003::1 UG 1 0 0 eth0
::/0 :: !n -1 1 15337 lo
::1/128 :: Un 0 1 40 lo
2003::/128 :: Un 0 1 0 lo
2003::2/128 :: Un 0 1 5335 lo
fe80::/128 :: Un 0 1 0 lo
fe80::216:e6ff:fef6:bdaf/128 :: Un 0 1 29478 lo
ff00::/8 :: U 256 0 0 eth0
::/0 :: !n -1 1 15337 lo
root@Client2:~#
Attached Thumbnails
Click image for larger version

Name:	AP01.JPG
Views:	23
Size:	44.9 KB
ID:	23691   Click image for larger version

Name:	AP02.JPG
Views:	13
Size:	38.2 KB
ID:	23692   Click image for larger version

Name:	Client 1.JPG
Views:	13
Size:	31.4 KB
ID:	23693   Click image for larger version

Name:	Client 2.JPG
Views:	13
Size:	34.2 KB
ID:	23694  

Last edited by 1ontheriver; 12-06-2016 at 11:06 AM.
 
Old 12-06-2016, 10:59 AM   #7
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Some further information.

A friend pointed me in the direction of IPTABLES. I don't understand how it works but I tried the following commands on AP01 and AP02

sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.all.proxy_ndp=1
sudo sysctl -w net.ipv6.conf.all.autoconf=0
sudo sysctl -w net.ipv6.conf.all.accept_ra=0

sudo ip6tables -A INPUT -i eth0 -j ACCEPT
sudo ip6tables -A INPUT -i wlan1 -j ACCEPT

sudo ip6tables -A FORWARD -i eth0 -o wlan1 -j ACCEPT
sudo ip6tables -A FORWARD -i wlan1 -o eth0 -j ACCEPT


Below are the outputs showing the current IP6TABLES configuration

AP01

pi@AP-1:~ $ sudo ip6tables -L -nv
Chain INPUT (policy ACCEPT 364 packets, 42290 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
711 73944 ACCEPT all eth0 wlan1 ::/0 ::/0
0 0 ACCEPT all wlan1 eth0 ::/0 ::/0

Chain OUTPUT (policy ACCEPT 402 packets, 47473 bytes)
pkts bytes target prot opt in out source destination
pi@AP-1:~ $

AP02

pi@AP-2:~ $ sudo ip6tables -L -nv
Chain INPUT (policy ACCEPT 1782 packets, 189K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 3 packets, 288 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all eth0 wlan1 ::/0 ::/0
0 0 ACCEPT all wlan1 eth0 ::/0 ::/0

Chain OUTPUT (policy ACCEPT 1827 packets, 196K bytes)
pkts bytes target prot opt in out source destination
pi@AP-2:~ $
 
Old 12-06-2016, 11:10 AM   #8
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu_penguin View Post
Im not an ipv6 expert, but perhaps this link may help

http://lists.alioth.debian.org/piper...ry/001868.html
Hello

Thank you for your input. The redistribution was done using the following command

sudo babeld -D wlan1 -C 'redistribute proto 11 ip 2003::/64 metric 256'

I am confident that this is not a routing issue since all devices appear to have a path to each network. The clients have a default gateway pointing at their closest AP. Each AP is either directly connected or learning the networks from the routing protocol.

Further evidence is that AP01 can ping 2003::1 which is through 2001::5 but it cannot ping 2003::2 which is one hop further.

***EDIT*** and of course, like I said, I get the same problem when I use static routing so it is not the routing protocol either

Last edited by 1ontheriver; 12-06-2016 at 11:13 AM. Reason: Clarified that it is not a routing issue
 
Old 12-06-2016, 12:41 PM   #9
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
Okay I have some points to say.

1. you dont need this

Quote:
sudo ip6tables -A INPUT -i eth0 -j ACCEPT
sudo ip6tables -A INPUT -i wlan1 -j ACCEPT

sudo ip6tables -A FORWARD -i eth0 -o wlan1 -j ACCEPT
sudo ip6tables -A FORWARD -i wlan1 -o eth0 -j ACCEPT
if you have enabled this :

Quote:
sudo sysctl -w net.ipv6.conf.all.forwarding=1
if your default policy is to set to DROP for INPUT then the first two lines make sense.


2. you have to do # sysctl -p
to load the settings , just -w is not enough

3. If you sure routing is correct and protocols are correct too, then you should check the firewall settings.


If you still think its a routing issue , set your default INPUT policy to ACCEPT try this :

# ip6tables -F
# iptables -F (for ipv4)
# echo 1 > /proc/sys/net/ipv4/ip_forward (for ipv4)
# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

those first 2 lines clear the firewall rules , so save your firewall rules if any before you try.
the last 2 lines enable kernel level forwarding, so if your networks are properly configured , the routing should happen automatically.
 
Old 12-06-2016, 12:51 PM   #10
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
I have a feeling routing works in your case, since other protocols are working.

If routing did not work, I think all protocols would have failed.

You could have recieved a destination unreachable or something similar.

Maybe you can check if there is some incorrect configuration with babel, or overlooking something simple ?

I am afraid I can help you little in this , as I have very little experience in ipv6.
 
Old 12-06-2016, 02:41 PM   #11
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
The default gateway in AP01 should point to wlan0, not eth0. The eth0 will point back to clientA itself.
 
Old 12-07-2016, 03:08 AM   #12
camp0
Member
 
Registered: Dec 2016
Location: Dublin
Distribution: Fedora
Posts: 70

Rep: Reputation: 4
I suggest also use tcpdump on the different interfaces that you have in order to verify that ping6 command(for example) are recevied on each interface.

But with all the information that is on the thread you should be able to communicate both clients.
 
Old 12-07-2016, 12:35 PM   #13
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
OK, we are making progress.

What I did was I changed the network back to one of the protocols that worked and recorded a number of outputs. Then I set up Babel and recorded the same outputs for comparison. I spotted a mistake in the routing table. The route learned through redistribution contains just one IP address, not the whole range. There was a problem with the redistribution command. When I corrected it the correct route is learned however, a new problem has reared its ugly head.

Note how in the original post I said that all devices have management connections to the same switch. I am separating test traffic from management traffic by using different IP stacks. The problem is that the edge devices are now seeing each other over BOTH wired and wireless. TWO routes are learned and the devices are preferring the wired connection. I have attached screenshots showing that the correct routes are there but a few seconds later the wired routes take over.

Does anyone know how I can force it to prefer the wireless routes? I need to the traffic to go over the mesh as it is the mesh I am testing. I cannot disconnect the management cables during testing as this is how the clients reach the edge devices in the first place
Attached Thumbnails
Click image for larger version

Name:	Ap1 routes.JPG
Views:	67
Size:	70.8 KB
ID:	23709   Click image for larger version

Name:	Ap1 routes when converged.JPG
Views:	40
Size:	65.6 KB
ID:	23710  
 
Old 12-07-2016, 02:48 PM   #14
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
If all device connect to same switch, you need use VLAN on switch to separate different network range.
 
Old 12-08-2016, 12:50 AM   #15
1ontheriver
LQ Newbie
 
Registered: Nov 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
If all device connect to same switch, you need use VLAN on switch to separate different network range.
This would require a layer 3 switch and to configure inter-vlan routing. I only have a layer 2 switch in this lab. I wonder if there is a way I can use IP6TABLES to prevent AP01 & AP02 from talking to anything else on their eth0 interface other than their client?
 
  


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
Deleting global unicast ipv6 addresses on an interfaces does not remove neigbors/direct connect ipv6 hosts from kernel nd_tbl haldermi Linux - Networking 1 06-07-2016 02:28 PM
Linux IPV6 routing issue with 2 interfaces dr.x Linux - Networking 30 09-30-2015 02:41 PM
IPv6 on Debian VPS (Routing Issue) Cinos Linux - Networking 0 07-26-2012 02:00 PM
Routing issues with dual interfaces on debian server flybob Linux - Networking 9 09-28-2009 07:41 AM
Two interfaces routing problem, Debian, kernel 2.4 clintp Linux - Networking 4 10-31-2008 12:24 AM

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

All times are GMT -5. The time now is 01:59 PM.

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