Problem getting local routes from route-server.is.co.za

mystic007

Well-Known Member
Joined
Dec 1, 2003
Messages
492
Reaction score
34
Location
Sandton
I use a CentOS based firewall at home to split my local and international traffic. I have a script that gets a list of local subnets from the IS route server at route-server.is.co.za. I use the following code in the script

Code:
echo -e "terminal length 0\nshow ip bgp\nexit" | /usr/bin/nc route-server.is.co.za 23

This would return a list of all the local subnets. This used to work fine for years until recently.

If I run the above code today all I get is garbage:

Code:
ÿûÿûÿýÿýC

If I telnet to route-server.is.co.za and type the commands in the quotes manually they work fine. I do not understand why the above suddenly stopped working as I have been using it successfully for years. As far as I can tell the last time my script worked was on 18 April 2011.

I also tested this on other linux boxes at work and the result is the same. Can anybody shed any light on this problem? I am totally stumped. :(
 
This is weird.

If I run that command, then I don't get the IP addresses, but when I use telnet and type in 'show ip bgp', then it returns the list correctly!

I'd suggest that you rather use the lists provided by Locality instead: http://developers.locality.co.za/splitting#localroutes
This way you don't have to perform any more actions on the list to reduce the number of routes, like I've done long ago with my DD-WRT script.
 
At least now I know I am not going crazy :D. Thanks for the link Pada. I would still like to know why it stopped working though.
 
It seems like the public-route-server.is.co.za server sends unreadable ASCII characters, which are interpreted as EOF. I have no idea why that server would suddenly do something like that.
You'll see those characters if you just use 'nc public-route.server.is.co.za 23'.

You can specify the '-q 30' parameter for NC to keep it open for another 30 seconds, which would hopefully be enough to download the whole list of routes.

I've stopped using that BGP server, because then you end up with 1400+ route entries, which could be mathematically reduced to like ~600 routes. So instead, I'm no just using Locality's list.
 
I have tried the '-q' option but the version on nc on CentOS does not have such an option. Which OS did you use the -q option on?
 
I'm using Ubuntu 11.04 x64, and it was part of the netcat-openbsd (v1.89-3ubuntu5) package.
 
Top
Sign up to the MyBroadband newsletter
X