Monday, November 04, 2013

I wanted a bash prompt that changed based on if I was user or root, but without specifying the username becasue my username is rather long a more compact prompt would be nice. On the mac the hostname changes with dhcp so I just specified what I wanted the machine ot appear as in my prompt.

settled on:

PS1='$(if [[ $USER == root ]]; then  echo "\[\033[0;91m\]R\[\033[0;0m\]@\[\033[0;33m\]mb-aye\[\033[0m\]:\W#"; else echo "\[\033[0;92m\]J\[\033[0;0m\]@\[\033[0;33m\]mb-aye\[\033[0m\]:\W$"; fi)'



Friday, July 12, 2013

Private ASNs

currently in the RFC editer queue expands the private ASN range by adding:

   "The end
   of the "32-bit Autonomous System Numbers" range will be reserved for
   Private Use, and a size of 94,967,295 (value to replace TBD1 below)
   corresponding to the range of 4200000000 (value to replace TBD2
   below) to 4294967294 (value to replace TBD3 below)."

This is over and above what exists today:

   IANA has reserved, for Private Use, a contiguous block of 1023
   Autonomous System numbers from the "16-bit Autonomous System Numbers"
   registry, namely 64512 - 65534 inclusive.
the documentation ranges are:

Thursday, May 23, 2013

OSX juniper network connect client has littered your ipv4 routing table with corrupt entries and you need a usable machine again.

sudo -s -- 'killall Network\ Connect ; networksetup -setv4off Wi-FI ; networksetup -setdhcp Wi-Fi'

will do the business...

that murders off the current network connect client

flushes the ipv4 routing table and all ipv4 state associated with the wifi interface and starts it back up again. Oddly this is a big improvement over rebooting twice a week. (and no shutting off the wifi and doing a route -n flush is not suffient).