generate script to differentiate bandwidth

all,
I have one text file that consist of local IP addresses (local route in my country, and it is more than 1000 lines), how can i generate the script to differentiate bandwidth to local and overseas ? i already tried MT Howto for this but it didn’t work. Pls help