SIP INVITE: To & From headers

The To and From are two mandatory headers of a SIP INVITE request. This post describes the format of these headers and how they are used during the signaling process.

The To header field contains the contact information/address-of-record of the recipient of this request. According to RFC 3261 the user specified in the To header may or may not be the end-party of the call. The To header consists of a display name (optional) and the SIP URI of the recipient and it must not contain a tag parameter for out-of-dialog requests (such as an INVITE request for the establishment of a new session). Continue reading

How to Troubleshoot Packet Loss with Ping Command

Packet loss is a common problem in the IP networks. Ping, although simple, is an excellent tool in order to troubleshoot packet loss issues. This post describes how we can detect packet loss in a network using the ping command.

One good way to troubleshoot packet loss issues is to define a large number of ping counts (for example 500) when using the ping command. In this way, it is more possible to catch random packet loss and its pattern will be clearly distinguished by the dots among the exclamation marks. An example of a ping output with packet loss in a Cisco router is shown in the picture below: Continue reading

SIP Transactions vs. Dialogs

During the establishment, maintenance and termination of a SIP session, signaling messages are exchanged between the two SIP endpoints. There are two different kinds of signaling “conversations” that those messages take part in: transactions and dialogs.

A transaction is a SIP message exchange between two user-agents that starts with a request and ends with its final response (it can also contain zero or more provisional responses in between). For example, during the termination of a SIP session, one user releases the call by sending a BYE request and the other party replies back with a 200 OK response. This message exchange is called a transaction.

But what happens in the case of the INVITE request? Continue reading

Switch Learning and Forwarding

A switch is a layer 2 device, which means that it processes frames and forwards them based on MAC addresses. But how does a switch actually think and take forwarding decisions?

A switch learns MAC addresses from the frames it receives and then stores this information in an internal table. Every time a switch receives a new frame, it stores the source MAC address of that frame along with the port from where it received it in its table. That means that next time the switch receives a frame with this MAC address as a destination, it will know –by looking in its address table- to which port to forward that frame.

What happens though when the switch receives a frame with a destination MAC address that is not included in the table? Continue reading

How to Configure an IBGP Session

Internal BGP (IBGP) is the protocol used for establishing BGP sessions between routers that belong to the same AS. As mentioned in an earlier post, in order to run IBGP within an AS domain, IP connectivity is needed between the routers via an IGP or static routing.

The picture below presents a configuration example of an IBGP session between two Cisco routers in the same AS: Continue reading

SIP INVITE Request-line & R-URI

The INVITE is the first SIP message that a caller will send to the recipient in order to establish a call. This post focuses in the first line of the INVITE and describes its components and usage.

This first line is actually called “Request-line” and it consists of three components: the method name, Request-URI (R-URI), and the protocol version.

Assuming that A calls B, the Request-line of A’s INVITE will look like this: Continue reading

A Basic SIP Call Flow

There are many different SIP scenarios and call flows in a VoIP environment. This post describes a very basic SIP call flow case where A is the caller and B is the recipient. Users A and B probably have a SIP proxy server each handling the signaling on behalf of them.

When A wants to initiate a new call, it sends an initial INVITE to B. This INVITE contains various headers with signaling information such as A’s and B’s addresses/phone numbers, SIP path information, etc. The INVITE also carriers a Session Description Protocol (SDP) body with information regarding the media settings that A supports/prefers e.g. codecs and media addresses. Continue reading

Introduction to BGP

The Border Gateway Protocol (BGP) is the main protocol used for inter-domain traffic (inter-AS traffic) and therefore the protocol that Internet is built upon today.

There are two types of the BGP protocol: Internal BGP (IBGP) which is used when two routers are connected within the same AS domain, and External BGP (EBGP) which is used when two routers from different ASs are connected. Any BGP connection between two routers is called a BGP session or BGP peering, whereas the routers themselves are called BGP neighbors or peers. Continue reading