Guard posted by railway (6)
I believe the answer is:
sentry
'guard' is the definition.
(sentry is a kind of guard)
'posted by railway' is the wordplay.
'posted' becomes 'sent' ('send' can be a synonym of 'post').
'by' means one lot of letters go next to another.
'railway' becomes 'ry' (abbreviation for railway).
'sent'+'ry'='SENTRY'
(Other definitions for sentry that I've seen before include "Soldier posted to keep watch" , "Military guard" , "One keeps watch" , "Soldier on guard" , "Lookout person" .)