Hello Wei Ping
OSPF hello packets are sent out by OSPF routers every 10 seconds by default, so it is normal to see syslogs with both sent and receive hello packets. In your output I see that the hello interval has been configured for 5 seconds, so you’ll see them more often. Hello packets are not sent as responses or replies to updates.
When two Cisco OSPF routers initially form an adjacency, they automatically send out a hello packet. As soon as an OSPF router receives such a hello, it responds immediately with a hello, regardless of the hello timer and of the last hello sent. In this case, you can see the following:
*Jul 22 08:05:04.930: OSPF-1 HELLO Gi1: Rcv hello from 2.2.2.2 area 0 12.12.12.2
*Jul 22 08:05:04.930: OSPF-1 HELLO Gi1: Send immediate hello to nbr 2.2.2.2, src address 12.12.12.2
As soon as R1 received a hello, it sends one right back. See the time? It’s exactly the same. This behaviour ensures that an adjacency will be formed as soon as possible without waiting for the hello timer to expire. Imagine having a hello timer set to 60 seconds, you’d have to wait close to a minute to get the OSPF adjacency up.
Now keep in mind that this is not strictly RFC 2328 compliant behaviour, but is specific to Cisco devices. It’s just an enhancement that improves operation and convergence.
I hope this has been helpful!
Laz