cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1826
Views
0
Helpful
2
Replies

What is relationship between ping and tcp in BGP ?

yangfrank
Level 1
Level 1

Dear All, As we know, BGP peer relation needs reachability  of tcp 179. But usually if the two peer neighbors can ping each other, we can consider the tcp 179 is working well. So what is relationship between ping and tcp in BGP in this situation ? Thank you !

1 Accepted Solution

Accepted Solutions

Nick Cutting
Level 1
Level 1

Ping is a tool in the ICMP suite, and doesn't use ports. It uses codes.  TCP is a different protocol, and does use ports.  In the case of BGP, once the process is started (and you have at least one neighbor command) it will open port 179.  Who is the client and who is the server in the neighborship, does not matter.  If you have issues with BGP neighbors being formed, and you believe the configuration is correct - Telnet to the port to be sure that it is working.  Also, if they are not directly connected, you may need to enable multihop.  Check Access lists also.

Pinging the other router it is unrelated to the BGP TCP process. - Here is an example pinging fine, but before the BGP process has opened port 179.

There is just two routers on a /30 segment - 10.19.2.2 and 10.19.2.1

 

LON-ROUTER#ping 10.19.2.1      
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.19.2.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/9/12 ms

Pings fine.


LON-ROUTER#

LON-ROUTER#telnet 10.19.2.1 179
Trying 10.19.2.1, 179 ... 
% Connection refused by remote host

 

Enable BGP on the neighbor:

LON-CORE(config)#router bgp 65000
LON-CORE(config-router)#neighbor 10.19.2.2 remote-as 65001   
LON-CORE(config-router)#

 

try the TCP connection again

LON-ROUTER#
LON-ROUTER#telnet 10.19.2.1 179
Trying 10.19.2.1, 179 ... Open

 

The connection now works, as the port is open on the neighbor.

View solution in original post

2 Replies 2

Nick Cutting
Level 1
Level 1

Ping is a tool in the ICMP suite, and doesn't use ports. It uses codes.  TCP is a different protocol, and does use ports.  In the case of BGP, once the process is started (and you have at least one neighbor command) it will open port 179.  Who is the client and who is the server in the neighborship, does not matter.  If you have issues with BGP neighbors being formed, and you believe the configuration is correct - Telnet to the port to be sure that it is working.  Also, if they are not directly connected, you may need to enable multihop.  Check Access lists also.

Pinging the other router it is unrelated to the BGP TCP process. - Here is an example pinging fine, but before the BGP process has opened port 179.

There is just two routers on a /30 segment - 10.19.2.2 and 10.19.2.1

 

LON-ROUTER#ping 10.19.2.1      
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.19.2.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/9/12 ms

Pings fine.


LON-ROUTER#

LON-ROUTER#telnet 10.19.2.1 179
Trying 10.19.2.1, 179 ... 
% Connection refused by remote host

 

Enable BGP on the neighbor:

LON-CORE(config)#router bgp 65000
LON-CORE(config-router)#neighbor 10.19.2.2 remote-as 65001   
LON-CORE(config-router)#

 

try the TCP connection again

LON-ROUTER#
LON-ROUTER#telnet 10.19.2.1 179
Trying 10.19.2.1, 179 ... Open

 

The connection now works, as the port is open on the neighbor.

Thank you for your reply.