12-16-2018 03:55 PM
Hi,
i am currently learning for BGP,
i tried a small lab in GNS3 to test keep-alive with TCP connection between two peers BGP
I used 7200 platform with "c7200-adventerprisek9-mz.152-4.S7.image"
R1---------f0/0--R2--f0/1-----------R3
A peer BGP relation is established between R1 l0 (1.1.1.1) and R3 l0 (3.3.3.3) in the same AS
I used static routes to have IP connectivity between 1.1.1.1 and 3.3.3.3
The TCP transaction is established between a port client on R1 and port 179 on R3
On R3, i set service tcp-keepalives-in and service tcp-keepalives-out
Then, I shut f0/0 on R2
I hoped to see keepalive in action in R3
So i look up the output of
- show tcp brief
- show tcp tcb [ID]
- debug ip tcp transactions
But...
nothing happens with keepalive
BGP itself ends the TCP connection: i don't see anything related to keepalive
Please, can you give me an explanation why keepalive did nothing behind the scene ?
Regards
Solved! Go to Solution.
12-16-2018 10:10 PM
Hi,
tcp-keepalives-in (out) is used for telnet sessions. It has no effect on BGP sessions. BGP keepalive are controlled under "router BGP"
Thanks
John
12-16-2018 05:11 PM
Hi,
The commands "service tcp-keepalives-in and service tcp-keepalives-out" are used for connections to the swicth or router. They are used to kill stale connections. If you telnet/ssh to a router/switch and disconnect without logging out, the switch/router will still maintain connection settings. This is resource wasteful and can eventually lead to resource starvation on the affected device. The "service tcp-keepalives-in" command helps to kill all stall connections to the device. "service tcp-keepalives-out" works the same for connections from the device.
You configure keepalives under the under the bgp confgiuration
router bgp xxxx
timers bgp 3 15
You can see the keepalives sent/received using the "show ip bgp neighbors" command.
You can use the "debug ip bgp keepalives" if you would like to debug keepalives.
Thanks
John
12-16-2018 09:00 PM
hi John,
thank you very much and I accept your reply
But could you be a little more explicit ?
So, does tcp-keepalives-in (out) work only for telnet (and ssh i suppose) ?
Why connection TCP 179 on R3 might not be a stale connection when you shut f0/0 on R2 ?
Regards
12-16-2018 10:10 PM
Hi,
tcp-keepalives-in (out) is used for telnet sessions. It has no effect on BGP sessions. BGP keepalive are controlled under "router BGP"
Thanks
John
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide