> ## Documentation Index
> Fetch the complete documentation index at: https://docs.megaport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting IX With a BGP Session Routing Issue

> This help topic describes the troubleshooting steps and actions to take when a BGP session has a routing issue.

export const Gloss = ({term, anchor, langDir = 'en'}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Gloss -';
  if (typeof term !== 'string') {
    term = String(term);
  }
  if (typeof anchor !== 'string') {
    anchor = String(anchor);
  }
  if (!term || term === 'undefined') {
    console.error(`${errorPrefix} the \`term\` property is required — rendering an empty string instead`);
    return <></>;
  }
  if (!anchor || anchor === 'undefined') {
    console.error(`${errorPrefix} the \`anchor\` property is required — rendering an empty string instead`);
    return <></>;
  }
  const lang = langDir === 'en' ? '/' : '/' + langDir + '/';
  const glossaryPage = lang + 'glossary/#' + anchor;
  return <a href={glossaryPage}>{term}</a>;
};

export const Image = ({src, alt = '', caption, width, height, shadow}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Image -';
  if (typeof src !== 'string') {
    src = String(src);
  }
  if (!src || src === 'undefined') {
    console.error(`${errorPrefix} \`src\` is required — rendering an empty string instead`);
    return <></>;
  }
  const img = <img className={['mega-image-style', shadow ? 'shadow' : ''].join(' ')} src={src} alt={alt} width={width} height={height} style={{
    display: 'block'
  }} />;
  return caption ? <figure>
      {img}
      <figcaption style={{
    textAlign: 'center',
    width
  }}>{caption}</figcaption>
    </figure> : img;
};

When a <Gloss term="BGP" anchor="bgp" /> session on Internet Exchange (IX) is experiencing a routing issue, step through these troubleshooting actions.

<Tip>
  Megaport operates a public, web-accessible MegaIX Looking Glass for peers and network operators to investigate the current routing state. You can query the primary and redundant route servers for live BGP data here: [MegaIX Looking Glass](https://lg.megaport.com).
</Tip>

## Troubleshooting actions

| **Action**                                                      | **Steps**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Verify the BGP configuration**                                | Check the ASN, BGP IP address, and subnet mask.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Verify access to TCP port 179**                               | BGP neighbors establish a TCP session using TCP port 179. <ol> <li> Make sure that a BGP neighbor is not blocking ingress or egress from TCP port 179 and other relevant ephemeral ports. You can view the port number using Wireshark, the **debug ip packet detail** command, or **netstat** in Windows.</li> <li> Make sure that all firewalls and ACLs permit TCP port 179 in both directions.</li></ol>                                                                                                                                                                  |
| **Check the BGP neighbor state**                                | When BGP is configured with a neighbor IP address (route servers, bilateral peers, or both), it goes through several stages before it reaches the Established state. The BGP Neighbor States are Idle, Connect, Active, OpenSent, OpenConfirm, and Established.<Image src="/images/troubleshooting/mcr/bgp-states-neighbor.png" alt="BGP Neighbor States" shadow={true} width={300} />                                                                                                                                                                                        |
| **Check the BGP message type**                                  | BGP packets use these message types:<ul><li>**OPEN** -- Sets up and establishes BGP adjacency.</li><li>**UPDATE** -- Advertises, updates, or withdraws routes.</li><li>**KEEPALIVE** -- Ensures that the BGP neighbor is still alive.</li><li>**NOTIFICATION** -- Indicates an error condition to a BGP neighbor.</li></ul>                                                                                                                                                                                                                                                   |
| **Verify the <Gloss term="MD5" anchor="md5" /> authentication** | <ul><li>Look through the logs for `Invalid MD5 digest`.</li><li>Verify that the correct BGP MD5 password is in use for the <Gloss term="A-End" anchor="a-end" /> and <Gloss term="B-End" anchor="b-end" /> of the VXC.</li> </ul>                                                                                                                                                                                                                                                                                                                                             |
| **Run connectivity tests**                                      | <ul><li>Run a **<Gloss term="ping" anchor="ping" />** test between the A-End <Gloss term="PE router" anchor="pe-router" /> and the B-End PE routers that are connected to route servers to test multilateral peering.</li><li>Run a **ping** test between the A-End PE router and the B-End PE router that is connected to bilateral peer to test the bilateral peering.</li><li>Ask the customer run a **ping** test from their BGP router to the BGP neighbor IP addresses to test end-to-end connectivity.</li><li>Confirm the ARP table entry of the BGP peer.</li> </ul> |
| **Find error conditions in BGP logs**                           | The BGP protocol sends a notification message when it detects an error with the BGP session such as an expiring hold timer, a change to neighbor capabilities, or a request to reset a BGP session. When an error is detected, the BGP session is closed.<br /><br />For example, enter **show log %BGP-xxxxx**.<br /><br />For more information, see [Internet Exchange Overview](/ix).                                                                                                                                                                                      |

## Next steps

If the troubleshooting actions do not resolve your issue, contact support. Before contacting support for assistance, collect the following information:

* All troubleshooting steps taken, in detail. For example, if you place loopbacks, note their location and direction.
* Note the date, time, and time zone in which the issue started.
* Is the BGP session down?
* Is the BGP session flapping? For example, does the peering establish, then drop, re-establish and then drop? Try to pinpoint where the problem might be in the network using **ping**.
* Is there a BGP routing issue?

<Note>
  For more information about when a field service technician is needed onsite at the data center, see [Customer Field Services](/finance/customer-field-services).
</Note>

### Collect essential troubleshooting data

**BGP configuration information**

* Interface settings, including <Gloss term="VLAN" anchor="vlan" /> number
* BGP IP address and subnet mask
* BGP ASN
* BGP network addresses to be advertised
* BGP neighbor IP address and subnet mask
* BGP neighbor ASN
* BGP neighbor network addresses to be received
* BGP authentication between BGP peers
* BGP route filtering and manipulation (if applicable)

**BGP command output and packet capture information**

* Examine the BGP neighbor table and BGP state using the **show IP BGP summary** command
* Examine the BGP neighbor details using the **show IP BGP neighbors** command
* Logs that show BGP-related messages (output from the **show log %BGP-xxxxx** command)
* BGP routing table entries that have BGP routing issues (output from the **show IP BGP** command)
* BGP advertised routes (output from the **show IP BGP neighbors \<neighbor-ip-address> advertised-routes** command)
* BGP received routes (output from the **show IP BGP neighbors \<neighbor-ip-address> routes** command)
* Routing table (output from the **show IP route \<ip-address>** command) at both ends
* **<Gloss term="Traceroute" anchor="traceroute" />** logs between source and destination host
* **Packet capture** logs, if possible (file size can be up to 10 M)
