ASN uniquely identifies each network on the Internet
Hosted by Ken Fallon on 2014-12-04 is flagged as Clean and is released under a CC-BY-SA license.
Tags: Autonomous System Number,ASN,geoiplookup.
Listen in ogg,
mp3 format. | Comments (1)
I have a laptop and I want it to use different configurations depending on where I am. If I’m on wifi at home, I don’t want my NAS mounted, but if I’m on a wired connection I do. If I’m at work I want to connect to various servers there. If I’m in the train I want to setup a vpn tunnel. You get the idea.
My solution to this was to approach it from the laptop and go out. So to look around and see what network I was on. There are a few ways to approach this, you could look at your IP address, the arp tables, try and ping a known server in each location. The issue with looking at an IP address is that most networks use Private Networks. Very soon you will find that the wifi coffee shop happens to have picked the same range as you use at home and now your laptop is trying to backup to their cash register.
Then I was thinking that I’m approaching this problem from the wrong angle. Why not start with my public IP address range, which has to be unique, and work back from there to my laptop. From there I was planning on maintaining a look-up table of public IP addresses, along the lines of the GeoIP tools developed by MaxMind.
By Accident I found out that geoiplookup supports AS Number
From WikiPedia: Autonomous System (Internet)
ISP must have an officially registered autonomous system number (ASN). A unique ASN is allocated to each AS for use in BGP routing. AS numbers are important because the ASN uniquely identifies each network on the Internet.
So what that is saying is that every network in the Inter(connected)Net(work), must have it’s own unique AS Number. From there I was able to write a script to easily manage my laptops behaviour based on both location and connection type
See http://kenfallon.com/scripts-based-on-your-network-location/ for the complete article and scripts.
Comment #1 posted on 2015-01-08T04:47:09Z by Klaatu
This is the kind of show I love: hard facts provided as straight-forward information in plain english. Well done, sir!
<< First, < Previous, Next >, Latest >>
Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.
Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).