Você está na página 1de 17

Visvesvaraya Technological University

“Jnana Sangama”, Belagavi- 590-018

Mini project report on


“PERFORMANCE OF GSM ON MAC LAYER”
Submitted in partial fulfilment for the award of Degree in Bachelor of Engineering

Submitted by
SAHANA HM (1VE16EC082)
SUGANDHA SHREE S (1VE16EC097)
SACHIN M (1VE16EC081)
SONAL SINGH (1VE16EC092)
SHUBHARAJ GS (1VE16EC090)

Under the Guidance of


Prof.Pramod MS Prof.Sunil Kumar KN
Assistant Professor Assistant Professor
Dept. E&CE Dept.E&CE
SVCE,Bengaluru SVCE,Bengaluru

Department of Electronics & Communication Engineering


Sri Venkateshwara College of Engineering
Bengaluru- 562157
2019-20
Sri Venkateshwara College of Engineering,
Bengaluru-562 15

Department of Electronics & Communication Engineering

CERTIFICATE
This is to certify that the Mini Project work prescribed by the Visvesvaraya
TechnologicalvUniversity, Belagavi entitled “” was carried out by SAHANA
HM(1VE16EC082),SACHINM(1VE16EC081),SUGANDHASHREE
S(1VE16EC097),SONALSINGH(1VE16EC092),SUBHARAJ(1VE16EC090)
is a bonafide student of VI Semester, Electronics & Communication
Engineering, Sri Venkateshwara College of Engineering. This is in partial
fulfilment for the award of Bachelor of Engineering in the Visvesvaraya
Technological University, Belagavi during the academic year 2018-2019. It is
certified that all corrections / suggestions indicated for mini project internal
assessment have been incorporated in the report. The mini project report has
been approved as it satisfies the academic requirements in the respect of mini
project work prescribed for the said degree.

Prof. Pramod MS Prof.Sunil Kumar KN Dr.Shiva Shankar


Asst.Prof.Dept. Asst.Prof.Dept. Prof.&Head of
of E&CE,SVCE, of E&CE,SVCE, Dept.of,E&CE,SVCE
Bengaluru Bengaluru Bengaluru
INTRODUCTION

MEDIUM ACCESS CONTROL LAYER

In IEEE 802 LAN/MAN standards, the medium access control (MAC) sublayer is the layer that
controls the hardware responsible for interaction with the wired, optical or wireless transmission
medium. The MAC sublayer and the logical link control (LLC) sublayer together make up the data
link layer. Within the data link layer, the LLC provides flow control and multiplexing for the logical
link (i.e.EtherType, 802.1Q VLAN tag etc), while the MAC provides flow control and multiplexing
for the transmission medium.

These two sublayers together correspond to layer 2 of the OSI model. For compatibility reasons,
LLC is optional for implementations of IEEE 802.3 (the frames are then "raw"), but compulsory for
implementations of other IEEE 802 physical layer standards. Within the hierarchy of the OSI model
and IEEE 802 standards, the MAC sublayer provides a control abstraction of the physical layer such
that the complexities of physical link control are invisible to the LLC and upper layers of the
network stack. Thus any LLC sublayer (and higher layers) may be used with any MAC. In turn, the
medium access control block is formally connected to the PHY via a media-independent interface.
Although the MAC block is today typically integrated with the PHY within the same device
package, historically any MAC could be used with any PHY, independent of the transmission
medium.

When sending data to another device on the network, the MAC sublayer encapsulates higher-level
frames into frames appropriate for the transmission medium (i.e. the MAC adds
a syncword preamble and also padding if necessary), adds a frame check sequence to identify
transmission errors, and then forwards the data to the physical layer as soon as the
appropriate channel access methodpermits it. For topologies with a collision domain (bus, ring,
mesh, point-to-multipoint topologies), controlling when data is sent and when to wait is necessary to
avoid collisions. Additionally, the MAC is also responsible for compensating for collisions by
initiating retransmission if a jam signal is detected. When receiving data from the
physical layer, the MAC block ensures data integrity by verifying the sender's frame
check sequences, and strips off the sender's preamble and padding before passing the data up to the
higher layers.

FUNCTIONS PERFORMED BY MAC LAYER

According to IEEE Std 802-2001 section "MAC sublayer", the primary functions performed by the
MAC layer are:

 Frame delimiting and recognition


 Addressing of destination stations (both as individual stations and as groups of stations)
 Conveyance of source-station addressing information
 Transparent data transfer of LLC PDUs, or of equivalent information in the Ethernet sublayer
 Protection against errors, generally by means of generating and checking frame check sequences
 Control of access to the physical transmission medium

In the case of Ethernet, according to 802.3-2002 , the functions required of a MAC are:

 receive/transmit normal frames


 half-duplex retransmission and backoff functions
 append/check FCS (frame check sequence)
 interframe gap enforcement
 discard malformed frames
 prepend(tx)/remove(rx) preamble, SFD (start frame delimiter), and padding
 half-duplex compatibility: append(tx)/remove(rx) MAC address
TYPES OF MAC ADDRESS

1. Unicast – A Unicast addressed frame is only sent out to the interface leading to specific NIC.
If the LSB (least significant bit) of first octet of an address is set to zero, the frame is meant
to reach only one receiving NIC. MAC Address of source machine is always Unicast.

2. Multicast – Multicast address allow the source to send a frame to group of devices. In Layer-
2 (Ethernet) Multicast address, LSB (least significant bit) of first octet of an address is set to
one. IEEE has allocated the address block 01-80-C2-xx-xx-xx (01-80-C2-00-00-00 to 01-80-
C2-FF-FF-FF) for group addresses for use by standard protocols.
3. Broadcast – Similar to Network Layer, Broadcast is also possible on underlying layer( Data
Link Layer). Ethernet frames with ones in all bits of the destination address (FF-FF-FF-FF-
FF-FF) are referred as broadcast address. Frames which are destined with MAC address FF-
FF-FF-FF-FF-FF will reach to every computer belong to that LAN segment.
Introduction to Global System for Mobile Communication (GSM)
Global system for mobile communication (GSM) is wide area wireless communications system that
uses digital radio transmission to provide voice, data, and multimedia communication services. A
GSM system coordinates the communication between a mobile telephones (mobile stations), base
stations (cell sites), and switching systems. Each GSM radio channel is 200 kHz wide channels that
are further divided into frames that hold 8 time slots. GSM was originally named Groupe Special
Mobile. The GSM system includes mobile telephones (mobile stations), radio towers (base
stations), and interconnecting switching systems. The GSM system allows up to 8 to 16 voice users
to share each radio channel and there may be several radio channels per radio transmission site (cell
site).

Figure 1.1 shows an overview of a GSM radio system. This diagram shows that the GSM system
includes mobile communication devices that communicate through base stations (BS) and a mobile
switching center (MSC) to connect to other mobile telephones, public telephones, or to the Internet.
This diagram shows that the MSC connects to databases of customers. This example shows that the
GSM system mobile devices can include mobile telephones or data communication devices such as
laptop computers.
PERFORMANCE OF GSM USING MAC LAYER

PROGRAM

Set ns [new Simulator]


set tf [open out.tr w]
$ns trace-all $tf
set nodes(is) [$ns node]
set nodes(ms) [$ns node]
set nodes(bs1) [$ns node]
set nodes(bs2) [$ns node]
set nodes(lp) [$ns node]
proc cell_topo {} {
global ns nodes
$ns duplex-link $nodes(lp) $nodes(bs1) 3Mbps 10ms DropTail
$ns duplex-link $nodes(bs1) $nodes(ms) 1 1 RED
$ns duplex-link $nodes(ms) $nodes(bs2) 1 1 RED
$ns duplex-link $nodes(bs2) $nodes(is) 3Mbps 50ms DropTail
puts "Cell Topology"
}
proc set_link_params {t} {
global ns nodes bwUL bwDL propUL propDL buf
$ns bandwidth $nodes(bs1) $nodes(ms) $bwDL($t) simplex
$ns bandwidth $nodes(ms) $nodes(bs1) $bwUL($t) simplex
$ns bandwidth $nodes(bs2) $nodes(ms) $bwDL($t) simplex
$ns bandwidth $nodes(ms) $nodes(bs2) $bwUL($t) simplex
$ns delay $nodes(bs1) $nodes(ms) $propDL($t) simplex
$ns delay $nodes(ms) $nodes(bs1) $propDL($t) simplex
$ns delay $nodes(bs2) $nodes(ms) $propDL($t) simplex
$ns delay $nodes(ms) $nodes(bs2) $propDL($t) simplex
$ns queue-limit $nodes(bs1) $nodes(ms) $buf($t)
$ns queue-limit $nodes(ms) $nodes(bs1) $buf($t)
$ns queue-limit $nodes(bs2) $nodes(ms) $buf($t)
$ns queue-limit $nodes(ms) $nodes(bs2) $buf($t)
}
# RED and TCP parameters
Queue/RED set summarystats_ true
Queue/DropTail set summarystats_ true
Queue/RED set adaptive_ $opt(adaptive)
Queue/RED set q_weight_ 0.0
Queue/RED set thresh_ $opt(minth)
Queue/RED set maxthresh_ $opt(maxth)
Queue/DropTail set shrink_drops_ true
Agent/TCP set ecn_ $opt(ecn)
Agent/TCP set window_ $opt(window)
DelayLink set avoidReordering_ true
source web.tcl
#Create topology
switch $opt(type) {
gsm -
gprs -
umts {cell_topo}
}
set_link_params $opt(type) Computer Network Laboratory 2017-18

Dept. of CSE, CIT, Gubbi Page no 28


$ns insert-delayer $nodes(ms) $nodes(bs1) [new Delayer]
$ns insert-delayer $nodes(bs1) $nodes(ms) [new Delayer]
$ns insert-delayer $nodes(ms) $nodes(bs2) [new Delayer]
$ns insert-delayer $nodes(bs2) $nodes(ms) [new Delayer]
# Set up forward TCP connection
if {$opt(flows) == 0} {
set tcp1 [$ns create-connection TCP/Sack1 $nodes(is) TCPSink/Sack1 $nodes(lp) 0]
set ftp1 [[set tcp1] attach-app FTP]
$ns at 0.8 "[set ftp1] start"
}
if {$opt(flows) > 0} {
set tcp1 [$ns create-connection TCP/Sack1 $nodes(is) TCPSink/Sack1 $nodes(lp) 0]
set ftp1 [[set tcp1] attach-app FTP]
$tcp1 set window_ 100
$ns at 0.0 "[set ftp1] start"
$ns at 3.5 "[set ftp1] stop"
set tcp2 [$ns create-connection TCP/Sack1 $nodes(is) TCPSink/Sack1 $nodes(lp) 0]
set ftp2 [[set tcp2] attach-app FTP]
$tcp2 set window_ 3
$ns at 1.0 "[set ftp2] start"
$ns at 8.0 "[set ftp2] stop"
}
proc stop {} {
global nodes opt nf
set wrap $opt(wrap)
set sid [$nodes($opt(srcTrace)) id]
set did [$nodes($opt(dstTrace)) id]
if {$opt(srcTrace) == "is"} {
set a "-a out.tr"
} else {
set a "out.tr"
}
set GETRC "../../../bin/getrc"
set RAW2XG "../../../bin/raw2xg"
exec $GETRC -s $sid -d $did -f 0 out.tr | \
$RAW2XG -s 0.01 -m $wrap -r > plot.xgr
exec $GETRC -s $did -d $sid -f 0 out.tr | \
$RAW2XG -a -s 0.01 -m $wrap >> plot.xgr
exec $GETRC -s $sid -d $did -f 1 out.tr | \
$RAW2XG -s 0.01 -m $wrap -r >> plot.xgr
exec $GETRC -s $did -d $sid -f 1 out.tr | \
$RAW2XG -s 0.01 -m $wrap -a >> plot.xgr
exec ./xg2gp.awk plot.xgr
if {!$opt(quiet)} {
exec xgraph -bb -tk -nl -m -x time -y packets plot.xgr &
}
exit 0
}
$ns at $opt(stop) "stop"
$ns run
TRACE FILE
WAVEFORMS
RESULT
The program performance of GSM on NS2/NS3 (using MAC layer) or equivalent
environment has been studied and implemented using ns simulator tool and respective
waveforms are obtained . Thus global system for mobile communication using medium
access control has been performed .

CONCLUSION
 Mac layer is application specific.
 Mac layer chooses a suitable node based on instantaneous network conditions.
 Evaluating the performance of anycasting through simulations .
 MAC protocols are a crucial ingredient, pivotal for good performance.
 Main categories: collision, collision-free, limited contention.
 Main figure of merit: Throughput, delay, fairness.

Você também pode gostar