I am confused as what is the use of update-source with ebgp and ibgp.
I have performed some test in lab with
> configured bgp session between directly connected link ..peering is loopback to loopback..not configured any update-source at either end but still bgp is up
ip address 10.0.0.81 255.255.255.255
router bgp 1234
neighbor 10.100.66.2 remote-as 4567
neighbor 10.100.66.2 ebgp-multihop 3
neighbor 10.100.66.2 activate
ip address 10.100.66.2 255.255.255.255
ip address 18.104.22.168 255.255.255.255
no ip directed-broadcast
router bgp 4567
neighbor 10.0.0.81 remote-as 1234
neighbor 10.0.0.81 ebgp-multihop 3
neighbor 10.0.0.81 activate
> Also I have shutdown the directly connected link and route traffic to some other link but still bgp is up even though update-source is not configured.
> Same behavior observed when I configured IBGP session between two routers...bgp is up
Any idea as what exactly use of update-source
It seems that for some reason, your routers were using the Loopback interfaces. This is from your output:
Local host: 10.0.0.81, Local port: 30492
Foreign host: 10.100.66.2, Foreign port: 179
Local host: 10.100.66.2, Local port: 179
Foreign host: 10.0.0.81, Foreign port: 30492
I guess that if you just removed the update-source command after the BGP peering was already established, it did not cause the session to reset, so it simply continued working. I guess that is logical... when you create a socket in an operating system, you can assign it a local address (using the bind() call). After that, when you establish the connection, the local socket address is maintained even if the next socket would be assigned a different address. Perhaps if you totally cleared the BGP process, or deconfigured the neighbor entirely and then put it back without the update-source command, the adjacency would not go up until you used the update-source again.
That's my guess about it right now.