Subject: Re: [44net] AMPRNet Interoperability with BGP From: "Cory (NQ1E)" cory@nq1e.hm Date: 06/17/2015 11:02 PM
To: AMPRNet working group 44net@hamradio.ucsd.edu
On Wed, Jun 17, 2015 at 1:17 PM, Marius Petrescumarius@yo2loj.ro wrote:
NO GATEWAY SHOULD EVER HAVE A DEFAULT 44/8 ROUTE TO UCSD BECAUSE IT DOESN'T WORK AND IS POINTLESS.
Whoa... no need to yell:)
Indeed... I was never talking about a 44/8 route, it is a 0.0.0.0/0 route.
I'm finally taking a look at the wiki doc he referred to: http://wiki.ampr.org/index.php/Ubuntu_Linux_Gateway_Example
It does mention creating a new routing table with the default route (0/0, not 44/8) pointed at the UCSD gateway. This makes sense as you may want to generate packets with a 44 source and a non-44 destination on the internet. The gateway will forward those correctly.
That is why it is there! it is required for IPIP gateways on a source address filtered connection.
it would also do it for non-tunneled 44 nets if we didn't have the upstream routing issue at UCSD that started this thread.
The problem seems to be with the traffic that gets flagged to use the alternate routing table:
## Configure Policy Based routing # Packets to 44/8 network use routing table 44 ip rule add to 44.0.0.0/8 table 44 priority 44
# Packets from our 44 subnet use table 44 (put your AMPRNet Subnet here) ip rule add from 44.128.10.0/24 table 44 priority 45
The second ip rule makes sense to me. You want all packets sourced from your 44 net to use the alternate routing table so they can egress through UCSD and keep their source IP without NAT. However, the first ip rule (all packets with 44 destinations) seems unneeded and troublesome. Packets that aren't sourced from your own 44 net, but happen to have a 44 destinations shouldn't be forced to use your tunnel.
The reason that it is there: when you make an outgoing connect from a socket that is not bound to a specific address, the kernel will decide on the local address based on the route. When you do nothing, traffic to 44.0.0.0/8 will be routed to your normal default route to your ISP, and the source address will be your public IP. The traffic will be routed "outside" via UCSD or a BGP-announcing gateway. Of course you want to make such connections via a tunnel, so there is the first rule that will match the 44.0.0.0/8 destinations, select table 44, and find the tunnel routes there. Then, your 44.x.x.x source address will be selected.
Rob