BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

TCP maximum segment size

Want to summarize with AI?

Log in

Overview

Describes TCP maximum segment size as a negotiated attribute that optimizes data transfer efficiency by controlling the largest unfragmented TCP segment size based on interface MTU.

Maximum Segment Size (MSS) is a TCP attribute that

  • determines the largest amount of data that a device can receive in a single, unfragmented TCP segment

  • is limited by the Maximum Transmission Unit (MTU) of an interface, and

  • is negotiated during the TCP setup process between a source and destination.

The MSS ensures efficient data transfer by optimizing the size of transmitted packets, especially for protocols like BGP. Each direction of data flow can use a different MSS value based on the MTU of the source and destination interfaces.

Key attributes of MSS

These are some of the key attributes of MSS:

  • The closer the MSS is to the MTU, the more efficient the data transfer.

  • The MSS is announced during the TCP setup process.

  • The default TCP MSS value is 536 octets or 1,460 bytes. This means that TCP segments the data in the transmit queue into 1460-byte chunks before passing the packets to the IP layer.

Per neighbor TCP MSS

Per neighbor TCP MSS is a mechanism in BGP configuration that

  • allows creating unique TCP MSS profiles for each neighbor

  • supports configuration in two modes: neighbor group and session group, and

  • overrides the global TCP MSS setting for specific neighbors.

Key attributes of per neighbor TCP MSS

These are some of the key attributes of per neighbor TCP MSS:

  • You can enable or disable TCP MSS configuration for specific neighbors.

  • MSS value can be reset to its default using the inheritance-disable command.

  • The configuration range for MSS values is from 68 to 10,000.


Configure per neighbor TCP MSS

The purpose of this task is to configure a TCP MSS value for a specific neighbor in BGP.

Before you begin

Identify the desired MSS value.

Procedure

1.

Enter BGP configuration mode and set up the neighbor group.

Example:

Router# configure
Router#(config)# router bgp 10
Router#(config-bgp)# address-family ipv4 unicast
Router#(config-bgp-af)# exit
Router#(config-bgp)# neighbor-group n1
Router#(config-bgp-nbrgrp)# tcp mss 500
Router#(config-bgp-nbrgrp)# address-family ipv4 unicast
Router#(config-bgp-nbrgrp-af)# exit
Router#(config-bgp-nbrgrp)# exit
2.

Configure a specific neighbor and inherit settings from the neighbor group.

Example:

Router#(config-bgp)# neighbor 10.0.0.2
Router#(config-bgp-nbr)# remote-as 1
Router#(config-bgp-nbr)# use neighbor-group n1
Router#(config-bgp-nbr)# address-family ipv4 unicast
Router#(config-bgp-nbr-af)# 
3.

Save the configuration.

Example:

Router#(config-bgp-nbr-af)# commit
4.

Verify the running configuration on the system.

Example:

Router# show running-config
router bgp 10
 address-family ipv4 unicast
 !
 neighbor-group n1
  tcp mss 500
  address-family ipv4 unicast
  !
 !
 neighbor 10.0.0.2
  remote-as 1
  use neighbor-group n1
  address-family ipv4 unicast
  !
 !        
!
end
5.

Use the show bgp neighbor command to view the neighbor configuration and status.

Example:

Router# show bgp neighbor 10.0.0.2
BGP neighbor is 10.0.0.2
 Remote AS 1, local AS 10, external link
 Remote router ID 0.0.0.0
  BGP state = Idle (No best local address found)
  ...
  Minimum time between advertisement runs is 30 secs
  Configured TCP Maximum Segment Size 500
  Inbound message logging enabled, 3 messages buffered
  Outbound message logging enabled, 3 messages buffered
  ...
 For Address Family: IPv4 Unicast
  BGP neighbor version 0
  Update group: 0.1 Filter-group: 0.0  No Refresh request being processed
  eBGP neighbor with no inbound or outbound policy; defaults to 'drop'
  ...
6.

Use the show tcp brief command to check TCP connection endpoints.

Example:

Router# show tcp brief
   PCB             VRF-ID     Recv-Q Send-Q Local Address          Foreign Address        State
0x000055e27958c800 0x60000000      0      0  :::179                 :::0                   LISTEN
0x000055e27958b850 0x00000000      0      0  :::179                 :::0                   LISTEN
0x00007f2a80002050 0x60000000      0      0  0.0.0.0:179            0.0.0.0:0              LISTEN
0x00007f2a840380d0 0x00000000      0      0  0.0.0.0:179            0.0.0.0:0              LISTEN

This information helps verify the correct configuration and troubleshoot connectivity issues.

Use the show tcp command to view detailed TCP connection information.

The TCP MSS is configured for the specified neighbor.


Disable the per neighbor TCP MSS

The purpose of this task is to disable the TCP MSS configuration for a specific neighbor.

Follow these steps to disable the per neighbor TCP MSS:

Before you begin

Ensure the neighbor group or session group is already configured.

Procedure

1.

Enter BGP configuration mode.

Example:

Router# configure
Router#(config)# router bgp 10
Router#(config-bgp)#
2.

Disable MSS inheritance for the neighbor group.

Example:


Router#(config-bgp)# address-family ipv4 unicast
Router#(config-bgp-af)# exit
Router#(config-bgp)# neighbor-group n1
Router#(config-bgp-nbrgrp)# tcp mss inheritance-disable
Router#(config-bgp-nbrgrp)# address-family ipv4 unicast
Router#(config-bgp-nbrgrp-af)# exit
Router#(config-bgp-nbrgrp)# exit
3.

Configure a specific neighbor and disable MSS inheritance for the neighbor.

Example:

Router#(config-bgp)# neighbor 10.0.0.2
Router#(config-bgp-nbr)# remote-as 1
Router#(config-bgp-nbr)# use neighbor-group n1
Router#(config-bgp-nbr)# tcp mss inheritance-disable
Router#(config-bgp-nbr)# commit
4.

Verify the running configuration on the system.

Example:

Router# show running-config
router bgp 10
 address-family ipv4 unicast
 !
 neighbor-group n1
  tcp mss inheritance-disable
  address-family ipv4 unicast
  !
 !
 neighbor 10.0.0.2
  remote-as 1
  use neighbor-group n1
  tcp mss inheritance-disable
  address-family ipv4 unicast
  !       
 !
!

TCP MSS is disabled for the specified neighbor.


Summary of key commands for per neighbor TCP MSS

Table 1. Key commands

Command

Description

show bgp neighbor

Displays BGP neighbor details, including the configured MSS value.

show tcp brief

Lists active TCP connections and their states.

show tcp pcb <pcb-value>

Provides detailed TCP connection information for a specific PCB.