BGP and OSPF

Do you have a loopback address configured on the router and set as the router ID for ospf and bgp?