You are on page 1of 28

STUDY OF MAC PROTOCOLS

Objective: This exercise is to study the operations of


different MAC layer protocols.
Description: In this exercise, you will simulate both
wired and wireless related
MAC protocols at the same time over a simple network of
four nodes shown in the following figure.

Procedure:

Step 1: Node placement


Format: nodeAddr 0 (x,y,z)
0 0 (250,250,0)
1 0 (500,250,0)
2 0 (375,500,0)
3 0 (375,750,0)
Step 2: Wired link definition
Format: nodeAddr1 nodeAddr2 bandwidth1 propDelay1
0 2 10000000 1MS
1 2 10000000 1MS
2 3 10000000 1MS
Step 3: Creation of routing table
Format: sourceAddr destAddr nextHop [interfaceId]
0 1 2
0 2 2
0 3 2
1 0 2
1 2 2
1 3 2
2 0 0
2 1 1
2 2 0
2 3 3
3 0 2
3 1 2
3 2 2
Step 4: Application selection For Wired Network
FTP/GENERIC <src> <dest> <items to send> <item size>
<start time> <end
time>
where <src> is the client node.
<dest> is the server node.
<items to send> is how many application layer items to
send.
<item size> is size of each application layer item.
<start time> is when to start FTP/GENERIC during the
simulation.
<end time> is when to terminate FTP/GENERIC during the
simulation.
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S
Step 5: Application Selection For Wireless Network
# Wireless Network
CBR 0 3 100 1024 1S 0S 0S
CBR 1 3 100 1024 1S 0S 0S
# Wired Network
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S
Step 6: Configure the scenario file

Configuration For Wired Network Implementing 802.3:

# Performance comparison of MAC routing Protocols


# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
# wired Networks
MOBILITY NONE
PROPAGATION-LIMIT -111.0
PROPAGATION-PATHLOSS FREE-SPACE
#RADIO-TYPE RADIO-NONOISE
#RADIO-BANDWIDTH 2000000
# Wireless Networks
# NOISE-FIGURE 10.0
# TEMPARATURE 290.0
# RADIO-TYPE RADIO-ACCNOISE
# RADIO-FREQUENCY 2.4e9
# RADIO-BANDWIDTH 2000000
# RADIO-RX-TYPE SNR-BOUNDED
# RADIO-RX-SNR-THRESHOLD 10.0
# RADIO-TX-POWER 15.0
# RADIO-ANTENNA-GAIN 0.0
# RADIO-RX-SENSITIVITY -91.0
# RADIO-RX-THRESHOLD -81.0
# Data Link Layer Setting
# Wireless MAC Protocols
# MAC-PROTOCOL TSMA
# TSMA-MAX-NODE-DEGREE 8
# MAC-PROTOCOL CSMA
# MAC-PROTOCOL 802.11
# Wired MAC Protocols
MAC-PROTOCOL WIRED
WIRED-LINK-FILE wired.conf
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
# Wired Network
ROUTING-PROTOCOL STATIC
STATIC-ROUTE-FILE routing_table.in
# Wireless Network
# ROUTING-PROTOCOL BELLMANFORD
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
TCP-STATISTICS NO
UDP-STATISTICS NO
ROUTING-STATISTICS NO
NETWORK-LAYER-STATISTICS NO
MAC-LAYER-STATISTICS YES
RADIO-LAYER-STATISTICS NO
CHANNEL-LAYER-STATISTICS NO
MOBILITY-STATISTICS NO

Configuration For Wireless network Implementing IEEE


802.11:

# Performance comparison of MAC routing Protocols


# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
# wired Networks
# MOBILITY NONE
# PROPAGATION-LIMIT -111.0
# PROPAGATION-PATHLOSS FREE-SPACE
# RADIO-TYPE RADIO-NONOISE
# RADIO-BANDWIDTH 2000000
# Wireless Networks
NOISE-FIGURE 10.0
TEMPARATURE 290.0
RADIO-TYPE RADIO-ACCNOISE
RADIO-FREQUENCY 2.4e9
RADIO-BANDWIDTH 2000000
RADIO-RX-TYPE SNR-BOUNDED
RADIO-RX-SNR-THRESHOLD 10.0
RADIO-TX-POWER 15.0
RADIO-ANTENNA-GAIN 0.0
RADIO-RX-SENSITIVITY -91.0
RADIO-RX-THRESHOLD -81.0
# Data Link Layer Setting
# Wireless MAC Protocols
# MAC-PROTOCOL TSMA
# TSMA-MAX-NODE-DEGREE 8
# MAC-PROTOCOL CSMA
MAC-PROTOCOL 802.11
# Wired MAC Protocols
# MAC-PROTOCOL WIRED
# WIRED-LINK-FILE wired.conf
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
# Wired Network
# ROUTING-PROTOCOL STATIC
# STATIC-ROUTE-FILE routing_table.in
# Wireless Network
ROUTING-PROTOCOL BELLMANFORD
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
TCP-STATISTICS NO
UDP-STATISTICS NO
ROUTING-STATISTICS NO
NETWORK-LAYER-STATISTICS NO
MAC-LAYER-STATISTICS YES
RADIO-LAYER-STATISTICS NO
CHANNEL-LAYER-STATISTICS NO
MOBILITY-STATISTICS NO
OUTPUT:

Analysis of Wired Mac-Protocol IEEE 802.3:

Node: 0, Layer: NetworkIp, Number of Packet Attepted to be


Sent to MAC: 100
Node: 0, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 0, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 0, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 0, Layer: AppCbrClient, (0) Server address: 3
Node: 0, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 0, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 0, Layer: AppCbrClient, (0) Session status: Closed
Node: 0, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 0, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 0, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 1, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 100
Node: 1, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 1, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 1, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 1, Layer: AppCbrClient, (0) Server address: 3
Node: 1, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 1, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 1, Layer: AppCbrClient, (0) Session status: Closed
Node: 1, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 1, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 1, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 2, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 200
Node: 2, Layer: NetworkIp, Number of Packets Routed For
Another Node: 200
Node: 2, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 2, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 3, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 0
Node: 3, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 3, Layer: NetworkIp, Number of Packets Delivered To
this Node: 200
Node: 3, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 12400
Node: 3, Layer: NetworkIp, Average Hop Count Assuming 64
Inital TTL 2.000000
Node: 3, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 3, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 3, Layer: AppCbrServer, (0) Client address: 1
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 0.007594000
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.007594000
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.007594000
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 102400
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 100
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 8274
Node: 3, Layer: AppCbrServer, (0) Client address: 0
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 0.006730000
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.006730000
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.006730000
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 102400
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 100
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 8274

Analysis of Wireless mac-protocol IEEE 802.11:


Node: 0, Layer: 802.11, pkts from network: 0
Node: 0, Layer: 802.11, UCAST (non-frag) pkts sent to
chanl: 99
Node: 0, Layer: 802.11, BCAST pkts sent to chanl: 10
Node: 0, Layer: 802.11, UCAST pkts rcvd clearly: 0
Node: 0, Layer: 802.11, BCAST pkts rcvd clearly: 33
Node: 0, Layer: 802.11, retx pkts due to CTS timeout:
100
Node: 0, Layer: 802.11, retx pkts due to ACK timeout: 0
Node: 0, Layer: 802.11, pkt drops due to retx limit: 0
Node: 0, Layer: 802.11, RTS Packets ignored due to Busy
Channel 0
Node: 0, Layer: 802.11, RTS Packets ignored due to NAV 0
Node: 1, Layer: 802.11, pkts from network: 0
Node: 1, Layer: 802.11, UCAST (non-frag) pkts sent to
chanl: 99
Node: 1, Layer: 802.11, BCAST pkts sent to chanl: 11
Node: 1, Layer: 802.11, UCAST pkts rcvd clearly: 0
Node: 1, Layer: 802.11, BCAST pkts rcvd clearly: 32
Node: 1, Layer: 802.11, retx pkts due to CTS timeout:
100
Node: 1, Layer: 802.11, retx pkts due to ACK timeout: 0
Node: 1, Layer: 802.11, pkt drops due to retx limit: 0
Node: 1, Layer: 802.11, RTS Packets ignored due to Busy
Channel 0
Node: 1, Layer: 802.11, RTS Packets ignored due to NAV 0
Node: 2, Layer: 802.11, pkts from network: 0
Node: 2, Layer: 802.11, UCAST (non-frag) pkts sent to
chanl: 0
Node: 2, Layer: 802.11, BCAST pkts sent to chanl: 11
Node: 2, Layer: 802.11, UCAST pkts rcvd clearly: 0
Node: 2, Layer: 802.11, BCAST pkts rcvd clearly: 32
Node: 2, Layer: 802.11, retx pkts due to CTS timeout: 0
Node: 2, Layer: 802.11, retx pkts due to ACK timeout: 0
Node: 2, Layer: 802.11, pkt drops due to retx limit: 0
Node: 2, Layer: 802.11, RTS Packets ignored due to Busy
Channel 0
Node: 2, Layer: 802.11, RTS Packets ignored due to NAV 0
Node: 3, Layer: 802.11, pkts from network: 0
Node: 3, Layer: 802.11, UCAST (non-frag) pkts sent to
chanl: 0
Node: 3, Layer: 802.11, BCAST pkts sent to chanl: 11
Node: 3, Layer: 802.11, UCAST pkts rcvd clearly: 198
Node: 3, Layer: 802.11, BCAST pkts rcvd clearly: 32
Node: 3, Layer: 802.11, retx pkts due to CTS timeout: 0
Node: 3, Layer: 802.11, retx pkts due to ACK timeout: 0
Node: 3, Layer: 802.11, pkt drops due to retx limit: 0
Node: 3, Layer: 802.11, RTS Packets ignored due to Busy
Channel 0
Node: 3, Layer: 802.11, RTS Packets ignored due to NAV 0
STUDY OF ROUTING PROTOCOLS

Objective: This exercise is to study the operations of


different Network layer protocols.

Description: In this exercise, you will simulate both


wired and wireless related
MAC protocols at the same time over a simple network of
four nodes shown in the following figure.

Procedure:

Step 1: Node placement


Format: nodeAddr 0 (x,y,z)
0 0 (250,250,0)
1 0 (500,250,0)
2 0 (375,500,0)
3 0 (375,750,0)
Step 2: Wired link definition
Format: nodeAddr1 nodeAddr2 bandwidth1 propDelay1
0 2 10000000 1MS
1 2 10000000 1MS
2 3 10000000 1MS
Step 3: Creation of routing table
Format: sourceAddr destAddr nextHop [interfaceId]
0 1 2
0 2 2
0 3 2
1 0 2
1 2 2
1 3 2
2 0 0
2 1 1
2 2 0
2 3 3
3 0 2
3 1 2
3 2 2

Step 4: Application selection For Wired Network


FTP/GENERIC <src> <dest> <items to send> <item size>
<start time> <end
time>
where <src> is the client node.
<dest> is the server node.
<items to send> is how many application layer items to
send.
<item size> is size of each application layer item.
<start time> is when to start FTP/GENERIC during the
simulation.
<end time> is when to terminate FTP/GENERIC during the
simulation.
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S

Step 5: Application Selection For Wireless Network


# Wireless Network
CBR 0 3 100 1024 1S 0S 0S
CBR 1 3 100 1024 1S 0S 0S
# Wired Network
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S

Step 6: Configure the scenario file


# Performance comparision of Routing Protocols
# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
# wired Networks
MOBILITY NONE
PROPAGATION-LIMIT -111.0
PROPAGATION-PATHLOSS FREE-SPACE
#RADIO-TYPE RADIO-NONOISE
#RADIO-BANDWIDTH 2000000
# Wireless Networks
# NOISE-FIGURE 10.0
# TEMPARATURE 290.0
# RADIO-TYPE RADIO-ACCNOISE
# RADIO-FREQUENCY 2.4e9
# RADIO-BANDWIDTH 2000000
# RADIO-RX-TYPE SNR-BOUNDED
# RADIO-RX-SNR-THRESHOLD 10.0
# RADIO-TX-POWER 15.0
# RADIO-ANTENNA-GAIN 0.0
# RADIO-RX-SENSITIVITY -91.0
# RADIO-RX-THRESHOLD -81.0
# Data Link Layer Setting
# Wireless MAC Protocols
# MAC-PROTOCOL 802.11
# Wired MAC Protocols
MAC-PROTOCOL WIRED
WIRED-LINK-FILE wired.conf
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
# Wired Network
ROUTING-PROTOCOL STATIC
STATIC-ROUTE-FILE routing_table.in
# Wireless Network
# ROUTING-PROTOCOL AODV
# ROUTING-PROTOCOL DSR
# ROUTING-PROTOCOL LAR1
# ROUTING-PROTOCOL WRP
# ROUTING-PROTOCOL ZRP
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
TCP-STATISTICS NO
UDP-STATISTICS NO
ROUTING-STATISTICS YES
NETWORK-LAYER-STATISTICS YES
MAC-LAYER-STATISTICS NO
RADIO-LAYER-STATISTICS NO
CHANNEL-LAYER-STATISTICS NO
MOBILITY-STATISTICS NO

Configuration for Wireless routing protocol: AODV

# Performance comparision of Routing Protocols


# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
# wired Networks
# MOBILITY NONE
# PROPAGATION-LIMIT -111.0
# PROPAGATION-PATHLOSS FREE-SPACE
# RADIO-TYPE RADIO-NONOISE
# RADIO-BANDWIDTH 2000000
# Wireless Networks
NOISE-FIGURE 10.0
TEMPARATURE 290.0
RADIO-TYPE RADIO-ACCNOISE
RADIO-FREQUENCY 2.4e9
RADIO-BANDWIDTH 2000000
RADIO-RX-TYPE SNR-BOUNDED
RADIO-RX-SNR-THRESHOLD 10.0
RADIO-TX-POWER 15.0
RADIO-ANTENNA-GAIN 0.0
RADIO-RX-SENSITIVITY -91.0
RADIO-RX-THRESHOLD -81.0
# Data Link Layer Setting
# Wireless MAC Protocols
MAC-PROTOCOL 802.11
# Wired MAC Protocols
# MAC-PROTOCOL WIRED
# WIRED-LINK-FILE wired.conf
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
# Wired Network
# ROUTING-PROTOCOL STATIC
# STATIC-ROUTE-FILE routing_table.in
# Wireless Network
ROUTING-PROTOCOL AODV
# ROUTING-PROTOCOL DSR
# ROUTING-PROTOCOL LAR1
# ROUTING-PROTOCOL WRP
# ROUTING-PROTOCOL ZRP
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
TCP-STATISTICS NO
UDP-STATISTICS NO
ROUTING-STATISTICS YES
NETWORK-LAYER-STATISTICS YES
MAC-LAYER-STATISTICS NO
RADIO-LAYER-STATISTICS NO
CHANNEL-LAYER-STATISTICS NO
MOBILITY-STATISTICS NO

OUTPUT:
Analysis of Static Routing Protocol for Wired network:

Node: 0, Layer: NetworkIp, Number of Packet Attepted to be


Sent to MAC: 100
Node: 0, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 0, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 0, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 0, Layer: AppCbrClient, (0) Server address: 3
Node: 0, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 0, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 0, Layer: AppCbrClient, (0) Session status: Closed
Node: 0, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 0, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 0, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 1, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 100
Node: 1, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 1, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 1, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 1, Layer: AppCbrClient, (0) Server address: 3
Node: 1, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 1, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 1, Layer: AppCbrClient, (0) Session status: Closed
Node: 1, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 1, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 1, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 2, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 200
Node: 2, Layer: NetworkIp, Number of Packets Routed For
Another Node: 200
Node: 2, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 2, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 3, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 0
Node: 3, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 3, Layer: NetworkIp, Number of Packets Delivered To
this Node: 200
Node: 3, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 12400
Node: 3, Layer: NetworkIp, Average Hop Count Assuming 64
Inital TTL 2.000000
Node: 3, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 3, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 3, Layer: AppCbrServer, (0) Client address: 1
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 0.007594000
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.007594000
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.007594000
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 102400
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 100
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 8274
Node: 3, Layer: AppCbrServer, (0) Client address: 0
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 0.006730000
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.006730000
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.006730000
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 102400
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 100
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 8274

Analysis of wireless Routing Protocol: A0DV

Node: 0, Layer: RoutingAodv, Number of Route Requests Txed =


37
Node: 0, Layer: RoutingAodv, Number of Replies Txed = 0
Node: 0, Layer: RoutingAodv, Number of Route Errors (RERR)
Txed = 0
Node: 0, Layer: RoutingAodv, Number of Route Errors (RERR)
Re-sent = 0
Node: 0, Layer: RoutingAodv, Number of CTRL Packets Txed = 37
Node: 0, Layer: RoutingAodv, Number of Routes Selected = 0
Node: 0, Layer: RoutingAodv, Number of Hop Counts = 0
Node: 0, Layer: RoutingAodv, Number of Data Txed = 0
Node: 0, Layer: RoutingAodv, Number of Data Packets
Originated = 0
Node: 0, Layer: RoutingAodv, Number of Data Packets Received
= 0
Node: 0, Layer: RoutingAodv, Number of Packets Dropped or
Left waiting for Route = 100
Node: 0, Layer: RoutingAodv, Number of Broken Links = 0
Node: 0, Layer: RoutingAodv, Number of Broken Link Retries =
0
Node: 0, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 37
Node: 0, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 0, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 0, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 0, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 0, Layer: AppCbrClient, (0) Server address: 3
Node: 0, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 0, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 0, Layer: AppCbrClient, (0) Session status: Closed
Node: 0, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 0, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 0, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 1, Layer: RoutingAodv, Number of Route Requests Txed =
37
Node: 1, Layer: RoutingAodv, Number of Replies Txed = 0
Node: 1, Layer: RoutingAodv, Number of Route Errors (RERR)
Txed = 0
Node: 1, Layer: RoutingAodv, Number of Route Errors (RERR)
Re-sent = 0
Node: 1, Layer: RoutingAodv, Number of CTRL Packets Txed = 37
Node: 1, Layer: RoutingAodv, Number of Routes Selected = 0
Node: 1, Layer: RoutingAodv, Number of Hop Counts = 0
Node: 1, Layer: RoutingAodv, Number of Data Txed = 0
Node: 1, Layer: RoutingAodv, Number of Data Packets
Originated = 0
Node: 1, Layer: RoutingAodv, Number of Data Packets Received
= 0
Node: 1, Layer: RoutingAodv, Number of Packets Dropped or
Left waiting for Route = 100
Node: 1, Layer: RoutingAodv, Number of Broken Links = 0
Node: 1, Layer: RoutingAodv, Number of Broken Link Retries =
0
Node: 1, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 37
Node: 1, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 1, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 1, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 1, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 1, Layer: AppCbrClient, (0) Server address: 3
Node: 1, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 1, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 1, Layer: AppCbrClient, (0) Session status: Closed
Node: 1, Layer: AppCbrClient, (0) Total number of bytes sent:
102400
Node: 1, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 1, Layer: AppCbrClient, (0) Throughput (bits per
second): 8274
Node: 2, Layer: RoutingAodv, Number of Route Requests Txed =
0
Node: 2, Layer: RoutingAodv, Number of Replies Txed = 0
Node: 2, Layer: RoutingAodv, Number of Route Errors (RERR)
Txed = 0
Node: 2, Layer: RoutingAodv, Number of Route Errors (RERR)
Re-sent = 0
Node: 2, Layer: RoutingAodv, Number of CTRL Packets Txed = 0
Node: 2, Layer: RoutingAodv, Number of Routes Selected = 0
Node: 2, Layer: RoutingAodv, Number of Hop Counts = 0
Node: 2, Layer: RoutingAodv, Number of Data Txed = 0
Node: 2, Layer: RoutingAodv, Number of Data Packets
Originated = 0
Node: 2, Layer: RoutingAodv, Number of Data Packets Received
= 0
Node: 2, Layer: RoutingAodv, Number of Packets Dropped or
Left waiting for Route = 0
Node: 2, Layer: RoutingAodv, Number of Broken Links = 0
Node: 2, Layer: RoutingAodv, Number of Broken Link Retries =
0
Node: 2, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 0
Node: 2, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 2, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 2, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 2, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0
Node: 3, Layer: RoutingAodv, Number of Route Requests Txed =
0
Node: 3, Layer: RoutingAodv, Number of Replies Txed = 0
Node: 3, Layer: RoutingAodv, Number of Route Errors (RERR)
Txed = 0
Node: 3, Layer: RoutingAodv, Number of Route Errors (RERR)
Re-sent = 0
Node: 3, Layer: RoutingAodv, Number of CTRL Packets Txed = 0
Node: 3, Layer: RoutingAodv, Number of Routes Selected = 0
Node: 3, Layer: RoutingAodv, Number of Hop Counts = 0
Node: 3, Layer: RoutingAodv, Number of Data Txed = 0
Node: 3, Layer: RoutingAodv, Number of Data Packets
Originated = 0
Node: 3, Layer: RoutingAodv, Number of Data Packets Received
= 0
Node: 3, Layer: RoutingAodv, Number of Packets Dropped or
Left waiting for Route = 0
Node: 3, Layer: RoutingAodv, Number of Broken Links = 0
Node: 3, Layer: RoutingAodv, Number of Broken Link Retries =
0
Node: 3, Layer: NetworkIp, Number of Packet Attepted to be
Sent to MAC: 0
Node: 3, Layer: NetworkIp, Number of Packets Routed For
Another Node: 0
Node: 3, Layer: NetworkIp, Number of Packets Delivered To
this Node: 0
Node: 3, Layer: NetworkIp, Total of the TTL's of Delivered
Packets: 0
Node: 3, Layer: NetworkIp, Number Fragments dropped because
Node was Unreachable: 0
Node: 3, Layer: NetworkIp, Number Fragments dropped because
TTL expired: 0

STUDY OF TRANSPORT LAYER PROTOCOLS - TCP AND UDP


Objective: This exercise is to simulate the data
transfer services of the two Internet
transport layer protocols - TCP and UDP.
Description: In this exercise, you will simulate both
FTP/TCP and CBR/UDP traffic at
the same time over a simple wired network of four nodes
refer in the figure 2.

Figure 3. Topology

Procedure:

Procedure:

Step 1: Node placement


Format: nodeAddr 0 (x,y,z)
0 0 (250,250,0)
1 0 (500,250,0)
2 0 (375,500,0)
3 0 (375,750,0)
Step 2: Wired link definition
Format: nodeAddr1 nodeAddr2 bandwidth1 propDelay1
0 2 10000000 1MS
1 2 10000000 1MS
2 3 10000000 1MS
Step 3: Creation of routing table
Format: sourceAddr destAddr nextHop [interfaceId]
0 1 2
0 2 2
0 3 2
1 0 2
1 2 2
1 3 2
2 0 0
2 1 1
2 2 0
2 3 3
3 0 2
3 1 2
3 2 2
Step 4: Application selection For Wired Network
FTP/GENERIC <src> <dest> <items to send> <item size>
<start time> <end
time>
where <src> is the client node.
<dest> is the server node.
<items to send> is how many application layer items to
send.
<item size> is size of each application layer item.
<start time> is when to start FTP/GENERIC during the
simulation.
<end time> is when to terminate FTP/GENERIC during the
simulation.
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S
Step 5: Application Selection For Wireless Network
# Wireless Network
CBR 0 3 100 1024 1S 0S 0S
CBR 1 3 100 1024 1S 0S 0S
# Wired Network
FTP/GENERIC 0 3 100 1024 0S 0S
FTP/GENERIC 1 3 100 1024 0S 0S

Step 6: Configure the scenario file


# Performance comparision of MAC routing Protocols
# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
MOBILITY NONE
PROPAGATION-LIMIT -111.0
PROPAGATION-PATHLOSS FREE-SPACE
RADIO-TYPE RADIO-NONOISE
RADIO-BANDWIDTH 2000000
# Data Link Layer Setting
# Wired MAC Protocols
MAC-PROTOCOL WIRED
WIRED-LINK-FILE wired.conf
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
ROUTING-PROTOCOL STATIC
STATIC-ROUTE-FILE routing_table.in
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
TCP-STATISTICS YES

Cofiguration File for UDP Statistics:

# Performance Study of UDP Protocol


# General Setting
SIMULATION-TIME 100S
SEED 1
TERRAIN-DIMENSIONS (1000, 1000)
NUMBER-OF-NODES 4
NODE-PLACEMENT FILE
NODE-PLACEMENT-FILE ./nodes.input
# Physical Layer Setting
MOBILITY NONE
PROPAGATION-LIMIT -111.0
PROPAGATION-PATHLOSS TWO-RAY
NOISE-FIGURE 10.0
TEMPARATURE 290.0
RADIO-TYPE RADIO-ACCNOISE
RADIO-FREQUENCY 2.4e9
RADIO-BANDWIDTH 2000000
RADIO-RX-TYPE SNR-BOUNDED
RADIO-RX-SNR-THRESHOLD 10.0
RADIO-TX-POWER 15.0
RADIO-ANTENNA-GAIN 0.0
RADIO-RX-SENSITIVITY -91.0
RADIO-RX-THRESHOLD -81.0
# Data Link Layer Setting
# Wireless MAC Protocols
MAC-PROTOCOL 802.11
# Network Layer Setting
NETWORK-PROTOCOL IP
NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 10
ROUTING-PROTOCOL BELLMANFORD
# Application Layer Setting
APP-CONFIG-FILE ./application.conf
# Statistics
APPLICATION-STATISTICS YES
UDP-STATISTICS YES
NETWORK-LAYER-STATISTICS NO

OUTPUT:
Analysis of TCP Performance:

Node: 0, Layer: TransportTcp, total packets sent to nw = 204


Node: 0, Layer: TransportTcp, data packets sent = 201
Node: 0, Layer: TransportTcp, data packets in sequence = 200
Node: 0, Layer: TransportTcp, data packets retransmitted = 1
Node: 0, Layer: TransportTcp, ack-only packets sent = 2
Node: 0, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets sent = 1

Node: 0, Layer: TransportTcp, window update-only packets sent


= 0
Node: 0, Layer: TransportTcp, window probes sent = 0
Node: 0, Layer: TransportTcp, total packets received from nw =
154
Node: 0, Layer: TransportTcp, data packets received = 0
Node: 0, Layer: TransportTcp, in sequence ack packets received
= 147
Node: 0, Layer: TransportTcp, duplicate ack packets received =
5
Node: 0, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets received = 2
Node: 0, Layer: TransportTcp, window update-only packets
received = 0
Node: 0, Layer: TransportTcp, window probes received = 0
Node: 0, Layer: TransportTcp, total packets with error = 0
Node: 0, Layer: TransportTcp, packets received with ccksum
errs = 0
Node: 0, Layer: TransportTcp, packets received with bad offset
= 0
Node: 0, Layer: TransportTcp, packets received too short = 0
Node: 0, Layer: AppGenFtpClient, from 0 to 3 (cid = 1), start =
10233400 ns, end = 251364862 ns (closed), bytes sent = 102400 B,
throughput = 3397316 bps
Node: 1, Layer: TransportTcp, total packets sent to nw = 230
Node: 1, Layer: TransportTcp, data packets sent = 227
Node: 1, Layer: TransportTcp, data packets in sequence = 200
Node: 1, Layer: TransportTcp, data packets retransmitted = 27
Node: 1, Layer: TransportTcp, ack-only packets sent = 2
Node: 1, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets sent = 1

Node: 1, Layer: TransportTcp, window update-only packets sent


= 0
Node: 1, Layer: TransportTcp, window probes sent = 0
Node: 1, Layer: TransportTcp, total packets received from nw =
130
Node: 1, Layer: TransportTcp, data packets received = 0
Node: 1, Layer: TransportTcp, in sequence ack packets received
= 106
Node: 1, Layer: TransportTcp, duplicate ack packets received =
22
Node: 1, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets received = 2
Node: 1, Layer: TransportTcp, window update-only packets
received = 0
Node: 1, Layer: TransportTcp, window probes received = 0
Node: 1, Layer: TransportTcp, total packets with error = 0
Node: 1, Layer: TransportTcp, packets received with ccksum
errs = 0
Node: 1, Layer: TransportTcp, packets received with bad offset
= 0
Node: 1, Layer: TransportTcp, packets received too short = 0
Node: 1, Layer: AppGenFtpClient, from 1 to 3 (cid = 1), start =
10291000 ns, end = 1808450037 ns (closed), bytes sent = 102400 B,
throughput = 455577 bps
Node: 3, Layer: TransportTcp, total packets sent to nw = 284
Node: 3, Layer: TransportTcp, data packets sent = 0
Node: 3, Layer: TransportTcp, data packets in sequence = 0
Node: 3, Layer: TransportTcp, data packets retransmitted = 0
Node: 3, Layer: TransportTcp, ack-only packets sent = 132
Node: 3, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets sent = 4

Node: 3, Layer: TransportTcp, window update-only packets sent


= 148
Node: 3, Layer: TransportTcp, window probes sent = 0
Node: 3, Layer: TransportTcp, total packets received from nw =
414
Node: 3, Layer: TransportTcp, data packets received = 408
Node: 3, Layer: TransportTcp, in sequence ack packets received
= 4
Node: 3, Layer: TransportTcp, duplicate ack packets received =
8
Node: 3, Layer: TransportTcp, pure control (SYN|FIN|RST)
packets received = 2
Node: 3, Layer: TransportTcp, window update-only packets
received = 0
Node: 3, Layer: TransportTcp, window probes received = 0
Node: 3, Layer: TransportTcp, total packets with error = 0
Node: 3, Layer: TransportTcp, packets received with ccksum
errs = 0
Node: 3, Layer: TransportTcp, packets received with bad offset
= 0
Node: 3, Layer: TransportTcp, packets received too short = 0
Node: 3, Layer: AppGenFtpServer, from 1 to 3 (cid = 3), start =
15400800 ns, end = 1828201837 ns (closed) bytes recv = 102400 B,
throughput = 451897 bps
Node: 3, Layer: AppGenFtpServer, from 0 to 3 (cid = 2), start =
15343200 ns, end = 265181862 ns (closed) bytes recv = 102400 B,
throughput = 3278916 bps
Analysis of UDP protocol:

Node: 0, Layer: TransportUdp, Number of pkts from application


110.
Node: 0, Layer: TransportUdp, Number of pkts to application
22.
Node: 0, Layer: AppCbrClient, (0) Server address: 3
Node: 0, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 0, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 0, Layer: AppCbrClient, (0) Session status: Closed
Node: 0, Layer: AppCbrClient, (0) Total number of bytes sent:
51200
Node: 0, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 0, Layer: AppCbrClient, (0) Throughput (bits per
second): 4137
Node: 1, Layer: TransportUdp, Number of pkts from application
111.
Node: 1, Layer: TransportUdp, Number of pkts to application
21.
Node: 1, Layer: AppCbrClient, (0) Server address: 3
Node: 1, Layer: AppCbrClient, (0) First packet sent at [s]:
0.000000000
Node: 1, Layer: AppCbrClient, (0) Last packet sent at [s]:
99.000000000
Node: 1, Layer: AppCbrClient, (0) Session status: Closed
Node: 1, Layer: AppCbrClient, (0) Total number of bytes sent:
51200
Node: 1, Layer: AppCbrClient, (0) Total number of packets
sent: 100
Node: 1, Layer: AppCbrClient, (0) Throughput (bits per
second): 4137
Node: 2, Layer: TransportUdp, Number of pkts from application
11.
Node: 2, Layer: TransportUdp, Number of pkts to application
33.
Node: 3, Layer: TransportUdp, Number of pkts from application
12.
Node: 3, Layer: TransportUdp, Number of pkts to application
209.
Node: 3, Layer: AppCbrServer, (0) Client address: 1
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 1.014217491
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.014417491
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.011033777
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 50688
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 99
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 4137
Node: 3, Layer: AppCbrServer, (0) Client address: 0
Node: 3, Layer: AppCbrServer, (0) First packet received at
[s]: 1.010562159
Node: 3, Layer: AppCbrServer, (0) Last packet received at [s]:
99.011082159
Node: 3, Layer: AppCbrServer, (0) Average end-to-end delay
[s]: 0.012844398
Node: 3, Layer: AppCbrServer, (0) Session status: Closed
Node: 3, Layer: AppCbrServer, (0) Total number of bytes
received: 50688
Node: 3, Layer: AppCbrServer, (0) Total number of packets
received: 99
Node: 3, Layer: AppCbrServer, (0) Throughput (bits per
second): 4137

You might also like