Insert flags and ip address