SKYPE
CSN-341, Computer Networks
IIT Roorkee
Prepared by Group 7
Abhishek Jaisingh - 14114002
Akshay Nirwan - 14114005
Amandeep - 14114008
Amit Saharan - 14114010
Tirth Patel - 14114036
1. PEER-TO-PEER ARCHITECTURE
Peer-to-peer architecture (P2P architecture) is a commonly used computer networking
architecture in which each workstation, or node, has the same capabilities and
responsibilities. It is often compared and contrasted to the classic client/server
architecture, in which some computers are dedicated to serving others.
P2P may also be used to refer to a single software program designed so that each
instance of the program may act as both client and server, with the same
responsibilities and status.
P2P networks have many applications, but the most common is for content
distribution. This includes software publication and distribution, content delivery
networks, streaming media and peercasting for multicasting streams, which facilitates
on-demand content delivery. Other applications involve science, networking, search
and communication networks. Even the U.S. Department of Defense has started
researching applications for P2P networks for modern network warfare strategies.
P2P architecture is often referred to as a peer-to-peer network.
There are three models of unstructured P2P computer network architecture:
● Pure P2P
● Hybrid P2P
● Centralized P2P
In structured P2P computer network architecture, workstations (peers), and sometimes
resources as well, are organized according to specific criteria and algorithms. This
leads to overlays with specific topologies and properties.
Assessing some of the advantages and weaknesses of P2P networking involves
comparisons with client/server architecture. P2P networks have clients with resources
such as bandwidth, storage space and processing power. As more demand is put on the
system through each node, the capacity of the whole system increases. (This accounts
for the enormous increase of system security and file verification mechanisms, making
most P2P networks resistant to almost any type of attack.) By comparison, a typical
client/server network shares demands but not resources. As additional clients join the
system, fewer resources become ava​il​able to each one.
2. VOIP
2.1 Introduction
Voice over Internet Protocol (Voice over IP, VoIP) is a methodology and group of
technologies for the delivery of voice communications and multimedia sessions over
Internet Protocol (IP) networks, such as the Internet. The terms Internet telephony,
broadband telephony, and broadband phone service specifically refer to the
provisioning of communications services (voice, fax, SMS, voice-messaging) over the
public Internet, rather than via the public switched telephone network (PSTN).
The steps and principles involved in originating VoIP telephone calls are similar to
traditional digital telephony and involve signaling, channel setup, digitization of the
analog voice signals, and encoding. Instead of being transmitted over a
circuit-switched network; however, the digital information is packetized, and
transmission occurs as IP packets over a packet-switched network. They transport
audio streams using special media delivery protocols that encode audio and video with
audio codecs, and video codecs.
2.2 Protocols Used
Voice over IP has been implemented in various ways using both ​proprietary protocols
and protocols based on ​open standards​. VoIP protocols include:
● Session Initiation Protocol​ (SIP)
● H.323
● Media Gateway Control Protocol (MGCP)
● Gateway Control Protocol (Megaco, H.248)
● Real-time Transport Protocol​ (RTP)
● Real-time Transport Control Protocol​ (RTCP)
● Secure Real-time Transport Protocol​ (SRTP)
● Session Description Protocol​ (SDP)
● Inter-Asterisk eXchange​ (IAX)
● Jingle​ ​XMPP​ VoIP extensions
● Skype protocol
2.3 Quality of Service
Communication on the IP network is perceived as less reliable in contrast to the
circuit-switched public telephone network because it does not provide a
network-based mechanism to ensure that data packets are not lost, and are delivered
in sequential order. It is a best-effort network without fundamental Quality of Service
(QoS) guarantees. Voice, and all other data, travels in packets over IP networks with
fixed maximum capacity. This system may be more prone to congestion and DoS
attacks than traditional circuit switched systems; a circuit switched system of
insufficient capacity will refuse new connections while carrying the remainder
without impairment, while the quality of real-time data such as telephone
conversations on packet-switched networks degrades dramatically. Therefore, VoIP
implementations may face problems with latency, packet loss, and jitter.
2.4 Operational Cost
VoIP has drastically reduced the cost of communication by sharing network
infrastructure between data and voice. A single broad-band connection has the ability
to transmit more than one telephone call. Secure calls using standardized protocols,
such as Secure Real-time Transport Protocol, as most of the facilities of creating a
secure telephone connection over traditional phone lines, such as digitizing and digital
transmission, are already in place with VoIP. It is only necessary to encrypt and
authenticate the existing data stream.
2.5 Working
First, voice is converted from an analog signal to a digital signal. It is then sent
over the Internet in data packets to a location that will be close to the destination.
Then it will be converted back to an analog signal for the remaining distance over a
traditional circuit switched (PSTN) (unless it is VoIP to VoIP). Your call can be
received by traditional telephones worldwide, as well as other VoIP users. VoIP to
VoIP calls can travel entirely over the Internet. Since your voice is changed to digital
(so that it can travel over the Internet), other great features such as voice messages to
email, call forwarding, logs of incoming and outgoing calls, caller ID, etc., can be
included in your basic calling plan all for one low price.
3. SKYPE: WORKING AND ARCHITECTURE
3.1 Skype Network
Skype is one of the largest VoIP providers with over 500 million users. ​Skype was the
first peer-to-peer IP telephony network ​created by the developers of KaZaa.
Skype uses wide-band codec (iLBC, iSAC and iPCM developed by GlobalIPSound ) which
allows it to maintain reasonable call quality at an available bandwidth of 32 kb/s (The
Skype claimed bandwidth usage of 3-16 kilobytes/s) and the minimum and maximum
audible frequency Skype codec allowed to pass-through are 50 Hz and 8,000 Hz
respectively.
The network contains three types of entities: supernodes, ordinary nodes, and the login
server. Each client maintains a host cache with the IP address and port numbers of
reachable supernodes. The Skype user directory is decentralized and distributed
among the supernodes in the network.
Skype Network
3.2 Key Components
● Skype Client (SC): ​Skype application which can be used to place calls, send
messages and etc. The Skype network is an overlay network and thus each SC
needs to build and refresh a table of reachable nodes. In Skype, this table is
called host cache (HC) and it contains IP address and port number of super
nodes. This host cache is stored in an XML file called "shared.xml". Also, NAT
and firewall information is stored in "shared.xml". If this file is not present, SC
tries to establish a TCP connection with each of the seven Skype maintained
default SNs IP address on port 33033.
● Super Node (SN): ​Super nodes are the endpoints where Skype clients connect
to. Any node with a public IP address having sufficient CPU, memory, and
network bandwidth is a candidate to become a super node and a Skype client
cannot prevent itself from becoming a super node. Also, if a SC cannot establish
a TCP connection with a SN then it will report a login failure.
● Skype Authentication Server: This is the only centralized Skype server which
is used to authenticate Skype users. An authenticated user is then announced to
other peers and buddies. If the user saves his/her credentials, authentication
will not be necessary. This server (IP address: 212.72.49.141 [Buddy list] or
195.215.8.141) also stores the buddy list for each user. Note that the buddy list is
also stored locally in an unencrypted file called "config.xml". In addition, if two
SCs have the same buddy, their corresponding config.xml files have a different
four-byte number for the same buddy. Finally, it has been shown that Skype
routes login messages through SNs if the authentication server is blocked.
● Start of Message (SoM) Structure: ​Skype uses the same port to communicate
with the outside world. Therefore, it needs an unencrypted structure in the
beginning of each UDP packet to analyze the sequence and the flows at the
application layer. This structure is called SoM.
3.3 Skype Connections
● Skype to Skype (End to End) (E2E)
Call signalling and media transfer
1. If both caller and receiver are on public IPs and receiver is in the buddy
list of the caller, then they establish a call through a direct TCP
connection with each other and transfer media using UDP.
2. If the caller or receiver is behind a port-restricted NAT then they
establish a call through a few packets initially transferred between
caller, receiver, SN and other hosts and a UDP connection is established
between the caller and receiver which is used to transfer media as well.
3. If caller and receiver are behind a UDP-restricted firewall they will
need a relay (node) in between to establish TCP connection to and then
the traffic (including media) will go through from one side to the other.
For users that are not present in the buddy list, call placement is equal to user
search plus call signalling.
● Skype to PSTN (Public Switched Telephone Network) (SkypeOut)
For Skype out, the application initially contacts the SN and then the PSTN
gateway at port 12340. The gateway servers are a separate part of the
architecture and not a part of the overlay network. In addition, host servers
195.215.8.140 and 212.72.49.155 are only connected when a user tries to call
another user in the PSTN network; therefore, we assume these servers to be
Skype-to-PSTN gateways (SkypeOut) .
3.4 Skype Functions
● Startup
When SC v1.4 was run for the first time after installation, it sent a HTTP 1.1 GET
request to the Skype server (skype.com). The first line of this request contained
the keyword ‘installed’.
● Login
Login is perhaps the most critical function to the Skype operation. It is during
this process a SC authenticates its user name and password with the login
server, advertises its presence to other peers and its buddies, determines the
type of NAT and firewall it is behind, discovers online Skype nodes with public
IP addresses, and checks the availability of latest Skype version.
● User Search
Skype uses its Global Index (GI) technology to search for a user. Skype claims
that search is distributed and is guaranteed to find a user if it exists and has
logged in during the last 72 hours. Extensive testing suggests that Skype was
always able to locate users who logged in using a public or private IP address in
the last 72 hours.
● Call Establishment and Teardown
we consider call establishment for users that are in the buddy list of caller and
for users that are not present in the buddy list. It is important to note that call
signaling is always carried over TCP. For users that are not present in the buddy
list, call placement is equal to user search plus call signaling.
● Media Transfer and Codecs
If both Skype clients (v1.4) were on machines with public IP addresses, then
media traffic flowed directly between them over UDP. The media traffic flowed
to and from the UDP port configured in the options dialog box. The voice packet
size varied between 40 and 120 bytes. For two users connected to Internet over
100 Mbps Ethernet with almost no congestion in the network, roughly 85 voice
packets were exchanged both ways in one second. The total uplink and
downlink bandwidth used for voice traffic was 5 kilobytes/s. This bandwidth
usage agrees with the Skype claim of 3-16 kilobytes/s.
● Conference Calling
During a conference call, the most powerful machine always gets elected as a
conference host and the other clients send their data to that host
4. REFERENCES
1. Skype, Wikipedia - the free encyclopedia,
https://en.wikipedia.org/wiki/Skype
2. How VoIP Works, HowStuffWorks,
http://computer.howstuffworks.com/ip-telephony.htm
3. What is VoIP, a tutorial, VoIP Mechanic,
http://www.voipmechanic.com/what-is-voip.htm
4. Skype Architecture,
http://www1.cs.columbia.edu/~salman/publications/skype1_4.pdf
5. Peer-to-peerNetwork:
https://www.techopedia.com/definition/25777/peer-to-peer-network-p2p-networ
k

Skype

  • 1.
    SKYPE CSN-341, Computer Networks IITRoorkee Prepared by Group 7 Abhishek Jaisingh - 14114002 Akshay Nirwan - 14114005 Amandeep - 14114008 Amit Saharan - 14114010 Tirth Patel - 14114036
  • 2.
    1. PEER-TO-PEER ARCHITECTURE Peer-to-peerarchitecture (P2P architecture) is a commonly used computer networking architecture in which each workstation, or node, has the same capabilities and responsibilities. It is often compared and contrasted to the classic client/server architecture, in which some computers are dedicated to serving others. P2P may also be used to refer to a single software program designed so that each instance of the program may act as both client and server, with the same responsibilities and status. P2P networks have many applications, but the most common is for content distribution. This includes software publication and distribution, content delivery networks, streaming media and peercasting for multicasting streams, which facilitates on-demand content delivery. Other applications involve science, networking, search and communication networks. Even the U.S. Department of Defense has started researching applications for P2P networks for modern network warfare strategies. P2P architecture is often referred to as a peer-to-peer network. There are three models of unstructured P2P computer network architecture: ● Pure P2P ● Hybrid P2P ● Centralized P2P In structured P2P computer network architecture, workstations (peers), and sometimes resources as well, are organized according to specific criteria and algorithms. This leads to overlays with specific topologies and properties. Assessing some of the advantages and weaknesses of P2P networking involves comparisons with client/server architecture. P2P networks have clients with resources such as bandwidth, storage space and processing power. As more demand is put on the system through each node, the capacity of the whole system increases. (This accounts for the enormous increase of system security and file verification mechanisms, making most P2P networks resistant to almost any type of attack.) By comparison, a typical client/server network shares demands but not resources. As additional clients join the system, fewer resources become ava​il​able to each one.
  • 3.
    2. VOIP 2.1 Introduction Voiceover Internet Protocol (Voice over IP, VoIP) is a methodology and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. The terms Internet telephony, broadband telephony, and broadband phone service specifically refer to the provisioning of communications services (voice, fax, SMS, voice-messaging) over the public Internet, rather than via the public switched telephone network (PSTN). The steps and principles involved in originating VoIP telephone calls are similar to traditional digital telephony and involve signaling, channel setup, digitization of the analog voice signals, and encoding. Instead of being transmitted over a circuit-switched network; however, the digital information is packetized, and transmission occurs as IP packets over a packet-switched network. They transport audio streams using special media delivery protocols that encode audio and video with audio codecs, and video codecs. 2.2 Protocols Used Voice over IP has been implemented in various ways using both ​proprietary protocols and protocols based on ​open standards​. VoIP protocols include: ● Session Initiation Protocol​ (SIP) ● H.323 ● Media Gateway Control Protocol (MGCP) ● Gateway Control Protocol (Megaco, H.248) ● Real-time Transport Protocol​ (RTP) ● Real-time Transport Control Protocol​ (RTCP) ● Secure Real-time Transport Protocol​ (SRTP) ● Session Description Protocol​ (SDP) ● Inter-Asterisk eXchange​ (IAX) ● Jingle​ ​XMPP​ VoIP extensions ● Skype protocol
  • 4.
    2.3 Quality ofService Communication on the IP network is perceived as less reliable in contrast to the circuit-switched public telephone network because it does not provide a network-based mechanism to ensure that data packets are not lost, and are delivered in sequential order. It is a best-effort network without fundamental Quality of Service (QoS) guarantees. Voice, and all other data, travels in packets over IP networks with fixed maximum capacity. This system may be more prone to congestion and DoS attacks than traditional circuit switched systems; a circuit switched system of insufficient capacity will refuse new connections while carrying the remainder without impairment, while the quality of real-time data such as telephone conversations on packet-switched networks degrades dramatically. Therefore, VoIP implementations may face problems with latency, packet loss, and jitter. 2.4 Operational Cost VoIP has drastically reduced the cost of communication by sharing network infrastructure between data and voice. A single broad-band connection has the ability to transmit more than one telephone call. Secure calls using standardized protocols, such as Secure Real-time Transport Protocol, as most of the facilities of creating a secure telephone connection over traditional phone lines, such as digitizing and digital transmission, are already in place with VoIP. It is only necessary to encrypt and authenticate the existing data stream. 2.5 Working First, voice is converted from an analog signal to a digital signal. It is then sent over the Internet in data packets to a location that will be close to the destination. Then it will be converted back to an analog signal for the remaining distance over a traditional circuit switched (PSTN) (unless it is VoIP to VoIP). Your call can be received by traditional telephones worldwide, as well as other VoIP users. VoIP to VoIP calls can travel entirely over the Internet. Since your voice is changed to digital (so that it can travel over the Internet), other great features such as voice messages to email, call forwarding, logs of incoming and outgoing calls, caller ID, etc., can be included in your basic calling plan all for one low price.
  • 5.
    3. SKYPE: WORKINGAND ARCHITECTURE 3.1 Skype Network Skype is one of the largest VoIP providers with over 500 million users. ​Skype was the first peer-to-peer IP telephony network ​created by the developers of KaZaa. Skype uses wide-band codec (iLBC, iSAC and iPCM developed by GlobalIPSound ) which allows it to maintain reasonable call quality at an available bandwidth of 32 kb/s (The Skype claimed bandwidth usage of 3-16 kilobytes/s) and the minimum and maximum audible frequency Skype codec allowed to pass-through are 50 Hz and 8,000 Hz respectively. The network contains three types of entities: supernodes, ordinary nodes, and the login server. Each client maintains a host cache with the IP address and port numbers of reachable supernodes. The Skype user directory is decentralized and distributed among the supernodes in the network.
  • 6.
    Skype Network 3.2 KeyComponents ● Skype Client (SC): ​Skype application which can be used to place calls, send messages and etc. The Skype network is an overlay network and thus each SC needs to build and refresh a table of reachable nodes. In Skype, this table is called host cache (HC) and it contains IP address and port number of super nodes. This host cache is stored in an XML file called "shared.xml". Also, NAT and firewall information is stored in "shared.xml". If this file is not present, SC
  • 7.
    tries to establisha TCP connection with each of the seven Skype maintained default SNs IP address on port 33033. ● Super Node (SN): ​Super nodes are the endpoints where Skype clients connect to. Any node with a public IP address having sufficient CPU, memory, and network bandwidth is a candidate to become a super node and a Skype client cannot prevent itself from becoming a super node. Also, if a SC cannot establish a TCP connection with a SN then it will report a login failure. ● Skype Authentication Server: This is the only centralized Skype server which is used to authenticate Skype users. An authenticated user is then announced to other peers and buddies. If the user saves his/her credentials, authentication will not be necessary. This server (IP address: 212.72.49.141 [Buddy list] or 195.215.8.141) also stores the buddy list for each user. Note that the buddy list is also stored locally in an unencrypted file called "config.xml". In addition, if two SCs have the same buddy, their corresponding config.xml files have a different four-byte number for the same buddy. Finally, it has been shown that Skype routes login messages through SNs if the authentication server is blocked. ● Start of Message (SoM) Structure: ​Skype uses the same port to communicate with the outside world. Therefore, it needs an unencrypted structure in the beginning of each UDP packet to analyze the sequence and the flows at the application layer. This structure is called SoM. 3.3 Skype Connections ● Skype to Skype (End to End) (E2E) Call signalling and media transfer 1. If both caller and receiver are on public IPs and receiver is in the buddy list of the caller, then they establish a call through a direct TCP connection with each other and transfer media using UDP. 2. If the caller or receiver is behind a port-restricted NAT then they establish a call through a few packets initially transferred between
  • 8.
    caller, receiver, SNand other hosts and a UDP connection is established between the caller and receiver which is used to transfer media as well. 3. If caller and receiver are behind a UDP-restricted firewall they will need a relay (node) in between to establish TCP connection to and then the traffic (including media) will go through from one side to the other. For users that are not present in the buddy list, call placement is equal to user search plus call signalling. ● Skype to PSTN (Public Switched Telephone Network) (SkypeOut) For Skype out, the application initially contacts the SN and then the PSTN gateway at port 12340. The gateway servers are a separate part of the architecture and not a part of the overlay network. In addition, host servers 195.215.8.140 and 212.72.49.155 are only connected when a user tries to call another user in the PSTN network; therefore, we assume these servers to be Skype-to-PSTN gateways (SkypeOut) . 3.4 Skype Functions ● Startup When SC v1.4 was run for the first time after installation, it sent a HTTP 1.1 GET request to the Skype server (skype.com). The first line of this request contained the keyword ‘installed’. ● Login Login is perhaps the most critical function to the Skype operation. It is during this process a SC authenticates its user name and password with the login server, advertises its presence to other peers and its buddies, determines the type of NAT and firewall it is behind, discovers online Skype nodes with public IP addresses, and checks the availability of latest Skype version. ● User Search Skype uses its Global Index (GI) technology to search for a user. Skype claims that search is distributed and is guaranteed to find a user if it exists and has logged in during the last 72 hours. Extensive testing suggests that Skype was always able to locate users who logged in using a public or private IP address in
  • 9.
    the last 72hours. ● Call Establishment and Teardown we consider call establishment for users that are in the buddy list of caller and for users that are not present in the buddy list. It is important to note that call signaling is always carried over TCP. For users that are not present in the buddy list, call placement is equal to user search plus call signaling. ● Media Transfer and Codecs If both Skype clients (v1.4) were on machines with public IP addresses, then media traffic flowed directly between them over UDP. The media traffic flowed to and from the UDP port configured in the options dialog box. The voice packet size varied between 40 and 120 bytes. For two users connected to Internet over 100 Mbps Ethernet with almost no congestion in the network, roughly 85 voice packets were exchanged both ways in one second. The total uplink and downlink bandwidth used for voice traffic was 5 kilobytes/s. This bandwidth usage agrees with the Skype claim of 3-16 kilobytes/s. ● Conference Calling During a conference call, the most powerful machine always gets elected as a conference host and the other clients send their data to that host 4. REFERENCES 1. Skype, Wikipedia - the free encyclopedia, https://en.wikipedia.org/wiki/Skype 2. How VoIP Works, HowStuffWorks, http://computer.howstuffworks.com/ip-telephony.htm 3. What is VoIP, a tutorial, VoIP Mechanic, http://www.voipmechanic.com/what-is-voip.htm 4. Skype Architecture, http://www1.cs.columbia.edu/~salman/publications/skype1_4.pdf 5. Peer-to-peerNetwork: https://www.techopedia.com/definition/25777/peer-to-peer-network-p2p-networ
  • 10.