INET Framework User's Guide Users

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 174

DownloadINET Framework User's Guide Users-guide
Open PDF In BrowserView PDF
INET Framework User’s Guide

OpenSim Ltd.

Jan 30, 2019

CONTENTS

1

Introduction
1.1 What is INET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Designed for Experimentation . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Scope of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
3
3
4

2

Using the INET Framework
2.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Installing INET Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Getting Familiar with INET . . . . . . . . . . . . . . . . . . . . . . . . . . .

5
5
5
6

3

Networks
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Built-in Network Nodes and Other Top-Level Modules
3.3 Typical Networks . . . . . . . . . . . . . . . . . . . .
3.4 Frequent Tasks (How To. . . ) . . . . . . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

7
. 7
. 7
. 9
. 11

Network Nodes
4.1 Overview . . . . . . . .
4.2 Ingredients . . . . . . .
4.3 Node Architecture . . .
4.4 Customizing Nodes . .
4.5 Custom Network Nodes

4

5

6

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

15
15
15
16
17
18

Network Interfaces
5.1 Overview . . . . . . . . . . . . . .
5.2 Built-in Network Interfaces . . . .
5.3 Anatomy of Network Interfaces . .
5.4 The Interface Table . . . . . . . . .
5.5 Wired Network Interfaces . . . . .
5.6 Wireless Network Interfaces . . . .
5.7 Special-Purpose Network Interfaces
5.8 Custom Network Interfaces . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

21
21
21
22
24
24
24
26
27

Applications
6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 TCP applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3 UDP applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29
29
29
32

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

i

6.4
6.5
6.6
7

8

9

IPv4/IPv6 traffic generators . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The PingApp application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Ethernet applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Transport Protocols
7.1 Overview . . .
7.2 TCP . . . . . .
7.3 UDP . . . . .
7.4 SCTP . . . . .
7.5 RTP . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

The IPv4 Protocol Family
8.1 Overview . . . . . .
8.2 Ipv4 . . . . . . . . .
8.3 Ipv4RoutingTable .
8.4 Icmp . . . . . . . .
8.5 Arp . . . . . . . . .
8.6 Igmp . . . . . . . .

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

37
37
37
40
41
41

.
.
.
.
.
.

43
43
44
44
45
45
46

IPv6 and Mobile IPv6
49
9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

10 Other Network Protocols
10.1 Overview . . . . . .
10.2 Protocols . . . . . .
10.3 Address Types . . .
10.4 Address Resolution .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

51
51
52
53
53

11 Internet Routing
11.1 Overview .
11.2 RIP . . . .
11.3 OSPF . . .
11.4 BGP . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

55
55
55
56
57

12 Ad Hoc Routing
12.1 Overview .
12.2 AODV . .
12.3 DSDV . .
12.4 DYMO . .
12.5 GPSR . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

61
61
61
62
62
62

.
.
.
.

63
63
64
65
71

13 Differentiated Services
13.1 Overview . . . . . .
13.2 Architecture of NICs
13.3 Simple modules . .
13.4 Compound modules

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

14 The MPLS Models
75
14.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

ii

14.2 Core Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.3 Classifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
14.4 MPLS-Enabled Router Models . . . . . . . . . . . . . . . . . . . . . . . . . 79
15 Point-to-Point Links
15.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.2 The PPP module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.3 PppInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

81
81
81
82

16 The Ethernet Model
16.1 Overview . . . . . . . .
16.2 Nodes . . . . . . . . . .
16.3 The Physical Layer . . .
16.4 Ethernet Interface . . .
16.5 Components . . . . . .
16.6 Implemented Standards

.
.
.
.
.
.

83
83
83
84
85
85
87

17 The 802.11 Model
17.1 Overview . . .
17.2 MAC . . . . .
17.3 Physical Layer
17.4 Management .
17.5 Agent . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

89
89
90
91
91
91

18 The 802.15.4 Model
18.1 Overview . . . . .
18.2 Network Interfaces
18.3 Physical Layer . .
18.4 MAC Protocol . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

93
93
93
94
94

19 MAC Protocols for Wireless Sensor Networks
19.1 Overview . . . . . . . . . . . . . . . . .
19.2 B-MAC . . . . . . . . . . . . . . . . . .
19.3 L-MAC . . . . . . . . . . . . . . . . . .
19.4 X-MAC . . . . . . . . . . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

95
95
95
95
96

20 The Physical Layer
20.1 Overview . . . . . . . .
20.2 Generic Radio . . . . .
20.3 Components of a Radio
20.4 Layered Radio Models .
20.5 Notable Radio Models .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

97
97
97
98
100
101

.
.
.
.
.

103
103
103
104
105
105

.
.
.
.
.

21 The Transmission Medium
21.1 Overview . . . . . . .
21.2 RadioMedium . . . .
21.3 Propagation Models .
21.4 Path Loss Models . .
21.5 Obstacle Loss Models

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

iii

21.6
21.7
21.8
21.9
21.10
21.11

Background Noise Models
Analog Models . . . . . .
Neighbor Cache . . . . .
Medium Limit Cache . . .
Communication Cache . .
Improving Scalability . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

22 The Physical Environment
22.1 Overview . . . . . . . . . . . . . . . .
22.2 PhysicalEnvironment . . . . . . . . . .
22.3 Physical Objects . . . . . . . . . . . .
22.4 Ground Models . . . . . . . . . . . . .
22.5 Geographic Coordinate System Models
22.6 Object Cache . . . . . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

106
106
107
108
108
108

.
.
.
.
.
.

111
111
111
112
113
113
114

23 Node Mobility
115
23.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
23.2 Built-In Mobility Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
24 Modeling Power Consumption
24.1 Overview . . . . . . . . . .
24.2 Energy Consumer Models .
24.3 Energy Generator Models .
24.4 Energy Storage Models . .
24.5 Energy Management Models

.
.
.
.
.

123
123
123
124
125
125

.
.
.
.

127
127
127
128
128

26 Network Autoconfiguration
26.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26.2 Configuring IPv4 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . .
26.3 Configuring Layer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

131
131
131
142

25 Network Emulation
25.1 Motivation . .
25.2 Overview . . .
25.3 Preparation . .
25.4 Configuring . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

.
.
.
.
.

.
.
.
.

27 Scenario Scripting
143
27.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
27.2 ScenarioManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
28 Modeling Node Failures
145
28.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
28.2 NodeStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
28.3 Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
29 Collecting Results
149
29.1 Recording Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
29.2 Recording PCAP Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

iv

29.3 Recording Routing Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
29.4 Packet Recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
29.5 Eventlog Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
30 Visualization
151
30.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
30.2 Visualizing Network Communication . . . . . . . . . . . . . . . . . . . . . . 151
30.3 Visualizing The Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . 156
31 Instrument Figures
31.1 Overview . . . . . . . . . .
31.2 Instrument Types . . . . . .
31.3 Using Instrument Figures .
31.4 Instrument Figure Attributes

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

159
159
159
161
162

32 Appendix: Author’s Guide
163
32.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
32.2 Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
33 History
165
33.1 IPSuite to INET Framework (2000-2006) . . . . . . . . . . . . . . . . . . . . 165

v

vi

INET Framework User’s Guide
This manual is written for users who are interested in assembling simulations using the components provided by the INET Framework. (In contrast, if you are interested in modifing INET’s
components or plan to extend INET with new protocols or other components using C++, we
recommend the INET Developer’s Guide.)

CONTENTS

1

INET Framework User’s Guide

2

CONTENTS

CHAPTER

ONE

INTRODUCTION

1.1 What is INET Framework
INET Framework is an open-source model library for the OMNeT++ simulation environment.
It provides protocols, agents and other models for researchers and students working with communication networks. INET is especially useful when designing and validating new protocols,
or exploring new or exotic scenarios.
INET supports a wide class of communication networks, including wired, wireless, mobile,
ad hoc and sensor networks. It contains models for the Internet stack (TCP, UDP, IPv4, IPv6,
OSPF, BGP, etc.), link layer protocols (Ethernet, PPP, IEEE 802.11, various sensor MAC protocols, etc), refined support for the wireless physical layer, MANET routing protocols, DiffServ,
MPLS with LDP and RSVP-TE signalling, several application models, and many other protocols and components. It also provides support for node mobility, advanced visualization,
network emulation and more.
Several other simulation frameworks take INET as a base, and extend it into specific directions,
such as vehicular networks, overlay/peer-to-peer networks, or LTE.

1.2 Designed for Experimentation
INET is built around the concept of modules that communicate by message passing. Agents
and network protocols are represented by components, which can be freely combined to form
hosts, routers, switches, and other networking devices. New components can be programmed
by the user, and existing components have been written so that they are easy to understand and
modify.
INET benefits from the infrastructure provided by OMNeT++. Beyond making use of the
services provided by the OMNeT++ simulation kernel and library (component model, parameterization, result recording, etc.), this also means that models may be developed, assembled,
parameterized, run, and their results evaluted from the comfort of the OMNeT++ Simulation
IDE, or from the command line.
INET Framework is maintained by the OMNeT++ team for the community, utilizing patches
and new models contributed by members of the community.

3

INET Framework User’s Guide

1.3 Scope of this Manual
This manual is written for users who are interested in assembling simulations using the components provided by the INET Framework. (In contrast, if you are interested in modifing INET’s
components or plan to extend INET with new protocols or other components using C++, we
recommend the INET Developers Guide.)
This manual does not attempt to be a reference for INET. It concentrates on conveying the
big picture, and does not attempt to cover all components, or try to document the parameters,
gates, statistics or precise operation of individual components. For such information, users
should refer to the INET Reference, a web-based cross-referenced documentation generated
from NED and MSG files.
A working knowledge of OMNeT++ is assumed.

4

Chapter 1. Introduction

CHAPTER

TWO

USING THE INET FRAMEWORK

2.1 Installation
There are several ways to install the INET Framework:
• Let the OMNeT++ IDE download and install it for you. This is the easiest way. Just
accept the offer to install INET in the dialog that comes up when you first start the IDE,
or choose Help → Install Simulation Models any time later.
• From INET Framework web site, http://inet.omnetpp.org. The IDE always installs the
last stable version compatible with your version of OMNeT++. If you need some other
version, they are available for download from the web site. Installation instructions are
also provided there.
• From GitHub. If you have experience with git, clone the INET Framework project
(inet-framework/inet), check out the revision of your choice, and follow the INSTALL file in the project root.

2.2 Installing INET Extensions
If you plan to make use of INET extensions (e.g. Veins or SimuLTE), follow the installation
instructions provided with them.
In the absence of specific instructions, the following procedure usually works:
• First, check if the project root contains a file named .project.
• If it does, then the project can be imported into the IDE (use File → Import → General
→ Existing Project into workspace). Make sure that the project is recognized as an
OMNeT++ project (the Project Properties dialog contains a page titled OMNeT++), and
it lists the INET project as dependency (check the Project References page in the Project
Properties dialog).
• If there is no .project file, you can create an empty OMNeT++ project using the New
OMNeT++ Project wizard in File → New, add the INET project as dependency using the
Project References page in the Project Properties dialog, and copy the source files into
the project.

5

INET Framework User’s Guide

2.3 Getting Familiar with INET
The INET Framework builds upon OMNeT++, and uses the same concept: modules that communicate by message passing. Hosts, routers, switches and other network devices are represented by OMNeT++ compound modules. These compound modules are assembled from
simple modules that represent protocols, applications, and other functional units. A network is
again an OMNeT++ compound module that contains host, router and other modules.
Modules are organized into a directory structure that roughly follows OSI layers:
• src/inet/applications/ – traffic generators and application models
• src/inet/transportlayer/ – transport layer protocols
• src/inet/networklayer/ – network layer protocols and accessories
• src/inet/linklayer/ – link layer protocols and accessories
• src/inet/physicallayer/ – physical layer models
• src/inet/routing/ – routing protocols (internet and ad hoc)
• src/inet/mobility/ – mobility models
• src/inet/power/ – energy consumption modeling
• src/inet/environment/ – model of the physical environment
• src/inet/node/ – preassembled network node models
• src/inet/visualizer/ – visualization components (2D and 3D)
• src/inet/common/ – miscellaneous utility components
The OMNeT++ NED language uses hierarchical packages names. Packages correspond to
directories under src/, so e.g. the src/inet/transportlayer/tcp directory corresponds to the inet.transportlayer.tcp NED package.
For modularity, the INET Framework has about 80 project features (parts of the codebase that
can be disabled as a unit) defined. Not all project features are enabled in the default setup
after installation. You can review the list of available project features in the Project → Project
Features. . . dialog in the IDE. If you want to know more about project features, refer to the
OMNeT++ User Guide.

6

Chapter 2. Using the INET Framework

CHAPTER

THREE

NETWORKS

3.1 Overview
INET heavily builds upon the modular architecture of OMNeT++. It provides numerous domain specific and highly parameterizable components which can be combined in many ways.
The primary means of building large custom network simulations in INET is the composition
of existing models with custom models, starting from small components and gradually forming ever larger ones up until the composition of the network. Users are not required to have
programming experience to create simulations unless they also want to implement their own
protocols, for example.
Assembling an INET simulation starts with defining a module representing the network. Networks are compound modules which contain network nodes, automatic network configurators,
and sometimes additionally transmission medium, physical environment, various visualizer,
and other infrastructure related modules. Networks also contain connections between network
nodes representing cables. Large hierarchical networks may be further organized into compound modules to directly express the hierarchy.
There are no predefined networks in INET, because it is very easy to create one, and because
of the vast possibilities. However, the OMNeT++ IDE provides several topology generator
wizards for advanced scenarios.
As INET is an OMNeT++-based framework, users mainly use NED to describe the model
topology, and ini files to provide configuration.1

3.2 Built-in Network Nodes and Other Top-Level Modules
INET provides several pre-assembled network nodes with carefully selected components. They
support customization via parameters and parametric submodule types, but they are not meant
to be universal. Sometimes it may be necessary to create special network node models for
particular simulation scenarios. In any case, the following list gives a taste of the built-in
network nodes.
1

Some components require additional configuration to be provided as separate files, e.g. in XML.

7

INET Framework User’s Guide

• StandardHost contains the most common Internet protocols: UDP, TCP, IPv4, IPv6, Ethernet, IEEE 802.11. It also supports an optional mobility model, optional energy models,
and any number of applications which are entirely configurable from INI files.
• EtherSwitch models an Ethernet switch containing a relay unit and one MAC unit per
port.
• Router provides the most common routing protocols: OSPF, BGP, RIP, PIM.
• AccessPoint models a Wifi access point with multiple IEEE 802.11 network interfaces
and multiple Ethernet ports.
• WirelessHost provides a network node with one (default) IEEE 802.11 network interface
in infrastructure mode, suitable for using with an AccessPoint.
• AdhocHost is a WirelessHost with the network interface configured in ad-hoc mode and
forwarding enabled.
Network nodes communicate at the network level by exchanging OMNeT++ messages which
are the abstract representations of physical signals on the transmission medium. Signals are
either sent through OMNeT++ connections in the wired case, or sent directly to the gate of
the receiving network node in the wireless case. Signals encapsulate INET-specific packets
that represent the transmitted digital data. Packets are further divided into chunks that provide
alternative representations for smaller pieces of data (e.g. protocol headers, application data).
Additionally, there are components that occur on network level, but they are not models of
physical network nodes. They are necessary to model other aspects. Some of them are:
• A radio medium module such as Ieee80211RadioMedium, ApskScalarRadioMedium and
UnitDiskRadioMedium (there are a few of them) are a required component of wireless
networks.
• PhysicalEnvironment models the effect of the physical environment (i.e. obstacles) on
radio signal propagation. It is an optional component.
• Configurators such as Ipv4NetworkConfigurator, L2NetworkConfigurator and NextHopNetworkConfigurator configure various aspects of the network. For example,
Ipv4NetworkConfigurator assigns IP addresses to hosts and routers, and sets up static
routing. It is used when modeling dynamic IP address assignment (e.g. via DHCP) or
dynamic routing is not of importance. L2NetworkConfigurator allows one to configure
802.1 LANs and provide STP/RSTP-related parameters such as link cost, port priority
and the “is-edge” flag.
• ScenarioManager allows scripted scenarios, such as timed failure and recovery of network nodes.
• Group coordinators are needed for the operation of some group mobility mdels. For
example, MoBanCoordinator is the coordinator module for the MoBAN mobility model.
• Visualizers like PacketDropOsgVisualizer provide graphical rendering of some aspect of
the simulation either in 2D (canvas) or 3D (using OSG or osgEarth). The usual choice is
IntegratedVisualizer which bundles together an instance of each specific visualizer type
in a compound module.

8

Chapter 3. Networks

INET Framework User’s Guide

3.3 Typical Networks
3.3.1 Wired Networks
Wired network connections, for example Ethernet cables, are represented with standard OMNeT++ connections using the DatarateChannel NED type. The channel’s datarate and
delay parameters must be provided for all wired connections. The number of wired interfaces in a host (or router) usually does not need to be manually configured, because it can be
automatically inferred from the actual number of links to neighbor nodes.
The following example shows how straightforward it is to create a model for a simple wired
network. This network contains a server connected to a router using PPP, which in turn is
connected to a switch using Ethernet. The network also contains a parameterizable number of
clients, all connected to the switch forming a star topology. The utilized network nodes are all
predefined modules in INET. To avoid the manual configuration of IP addresses and routing
tables, an automatic network configurator is also included.
network WiredNetworkExample
{
parameters:
int numClients; // number of clients in the network
submodules:
configurator: Ipv4NetworkConfigurator; // network
˓→autoconfiguration
server: StandardHost; // predefined standard host
router: Router; // predefined router
switch: EtherSwitch; // predefined ethernet switch
client[numClients]: StandardHost;
connections: // network level connections
router.pppg++ <--> { datarate = 1GBps; } <--> server.pppg++;
˓→ // PPP
switch.ethg++ <--> Eth1G <--> router.ethg++; //
˓→bidirectional ethernet
for i=0..numClients-1 {
client[i].ethg++ <--> Eth1G <--> switch.ethg++; //
˓→ethernet
}
}

In order to run a simulation using the above network, an OMNeT++ INI file must be created.
The INI file selects the network, sets its number of clients parameter, and configures a simple
TCP application for each client. The server is configured to have a TCP application which
echos back all data received from the clients individually.
network = WiredNetworkExample
*.numClients = 10 # number of clients in network
*.client[*].numApps = 1 # number of applications on clients
*.client[*].app[0].typename = "TcpSessionApp" # client application
˓→type
(continues on next page)

3.3. Typical Networks

9

INET Framework User’s Guide

(continued from previous page)

*.client[*].app[0].connectAddress = "server" # destination address
*.client[*].app[0].connectPort = 1000 # destination port
*.client[*].app[0].sendBytes = 1MB # amount of data to send
*.server.numApps = 1 # number of applications on server
*.server.app[0].typename = "TcpEchoApp" # server application type
*.server.app[0].localPort = 1000 # TCP server listen port

When the above simulation is run, each client application connects to the server using a TCP
socket. Then each one of them sends 1MB of data, which in turn is echoed back by the server,
and the simulation concludes. The default statistics are written to the results folder of the
simulation for later analysis.

3.3.2 Wireless Networks
Wireless network connections are not modeled with OMNeT++ connections due the dynamically changing nature of connectivity. For wireless networks, an additional module, one that
represents the transmission medium, is required to maintain connectivity information.
network WirelessNetworkExample
submodules:
configurator: Ipv4NetworkConfigurator;
radioMedium: Ieee80211ScalarRadioMedium;
host1: WirelessHost { @display("p=200,100"); }
host2: WirelessHost { @display("p=500,100"); }
accessPoint: AccessPoint { @display("p=374,200"); }
}

In the above network, positions in the display strings provide positions for the transmission
medium during the computation of signal propagation and path loss.
In addition, host1 is configured to periodically send UDP packets to host2 over the AP.
network = WirelessNetworkExample
*.host1.numApps = 1
*.host1.app[0].typename = "UdpBasicApp"
*.host1.app[0].destAddresses = "host2"
*.host1.app[0].destPort = 1000
*.host1.app[0].messageLength = 100Byte
*.host1.app[0].sendInterval = 100ms
*.host2.numApps = 1
*.host2.app[0].typename = "UdpSink"
*.host2.app[0].localPort = 1000
**.arp.typename = "GlobalArp"
**.netmaskRoutes = ""

3.3.3 Mobile Ad hoc Networks

10

Chapter 3. Networks

INET Framework User’s Guide

network MobileAdhocNetworkExample
{
parameters:
int numHosts; // number of nodes in the network
submodules:
configurator: Ipv4NetworkConfigurator; // network
˓→autoconfiguration
radioMedium: Ieee80211ScalarRadioMedium; // 802.11 physical
˓→medium
host[numHosts]: AdhocHost; // ad-hoc wifi nodes
}
network = MobileAdhocNetworkExample
*.numHosts = 10 # number of hosts in the MANET
*.host[*].mobility.typename = "MassMobility" # stochastic mobility
˓→model
*.host[*].mobility.initFromDisplayString = false # ignore display
˓→string
*.host[*].mobility.changeInterval = truncnormal(2s, 0.5s) # between
˓→turns
*.host[*].mobility.angleDelta = normal(0deg, 30deg) # random turn
*.host[*].mobility.speed = truncnormal(20mps, 8mps) # random speed
*.host[*].numApps = 1 # number of applications on hosts
*.host[*].app[0].typename = "PingApp" # application type for all
˓→hosts
*.host[*].app[0].destAddr = "host[0]" # ping destination
*.host[*].app[0].startTime = uniform(1s,5s) # to avoid
˓→synchronization
*.host[*].app[0].printPing = true # print usual ping results to
˓→stdout

3.4 Frequent Tasks (How To. . . )
This section contains quick and somewhat superficial advice to many practical tasks.

3.4.1 Automatic Wired Interfaces
In many wired network simulations, the number of wired interfaces need not be manually
configured, because it can be automatically inferred from the actual number of connections
between network nodes.
router1.ethg++ <--> Eth1G <--> router2.ethg++; // automatic
˓→interfaces

3.4. Frequent Tasks (How To. . . )

11

INET Framework User’s Guide

3.4.2 Multiple Wireless Interfaces
All built-in wireless network nodes support multiple wireless interfaces, but only one is enabled
by default.
*.host[*].numWlanInterfaces = 2 # number of wireless network
˓→interfaces
*.host[*].wlan[0].agent.defaultSsid = "alpha" # connects to alpha
˓→network
*.host[*].wlan[1].agent.defaultSsid = "bravo" # connects to bravo
˓→network

3.4.3 Specifying Addresses
Nearly all application layer modules, but several other components as well, have parameters
that specify network addresses. They typically accept addresses given with any of the following
syntax variations:
• literal IPv4 address: "186.54.66.2"
• literal IPv6 address: "3011:7cd6:750b:5fd6:aba3:c231:e9f9:6a43"
• module name: "server", "subnet.server[3]"
• interface of a host or router: "server/eth0", "subnet.server[3]/eth0"
• IPv4 or IPv6 address of a host or router:
server[3](ipv6)"

"server(ipv4)", "subnet.

• IPv4 or IPv6 address of an interface of a host or router: "server/eth0(ipv4)",
"subnet.server[3]/eth0(ipv6)"

3.4.4 Node Failure and Recovery
3.4.5 Enabling Dual IP Stack
All built-in network nodes support dual Internet protocol stacks, that is both IPv4 and IPv6
are available. They are also supported by transport layer protocols, link layer protocols, and
most applications. Only IPv4 is enabled by default, so in order to use IPv6, it must be enabled
first, and an application supporting IPv6 (e.g., PingApp must be used). The following example
shows how to configure two ping applications in a single node where one is using an IPv4 and
the other is using an IPv6 destination address.
*.host[*].hasIpv4 = true # enable IPv4 protocol
*.host[*].hasIpv6 = true # enable IPv6 protocol
*.host[*].numApps = 2 # number of applications on hosts
*.host[*].app[*].typename = "PingApp" # type for both applications
(continues on next page)

12

Chapter 3. Networks

INET Framework User’s Guide

(continued from previous page)

*.host[*].app[0].destAddr = "host[0](ipv4)" # uses IPv4 detination
˓→address
*.host[*].app[1].destAddr = "host[0](ipv6)" # uses IPv6 detination
˓→address

3.4.6 Enabling Packet Forwarding
In general, network nodes don’t forward packets by default, only Router and the like do. Nevertheless, it’s possible to enable packet forwarding as simply as flipping a switch.
*.host[*].forwarding = true

3.4. Frequent Tasks (How To. . . )

13

INET Framework User’s Guide

14

Chapter 3. Networks

CHAPTER

FOUR

NETWORK NODES

4.1 Overview
Hosts, routers, switches, access points, mobile phones, and other network nodes are represented
in INET with compound modules. The previous chapter has introduced a few node types like
StandardHost, Router, and showed how to put together networks from them. In this chapter,
we look at the internals of such node models, in order to provide a deeper understanding of
their customization possibilities and to give some guidance on how custom nodes models can
be assembled.

4.2 Ingredients
Node models are assembled from other modules which represent applications, communication protocols, network interfaces, routing tables, mobility models, energy models, and other
functionality. These modules fall into the following broad categories:
• Applications often model the user behavior as well as the application program (e.g.,
browser), and the application layer protocol (e.g., HTTP). Applications typically use
transport layer protocols (e.g., TCP and/or UDP), but they may also directly use lower
layer protocols (e.g., IP or Ethernet) via sockets.
• Routing protocols are provided as separate modules: OSPF, BGP, or AODV for MANET
routing. These modules use TCP, UDP, and IPv4, and manipulate routes in the
Ipv4RoutingTable module.
• Transport layer protocols are connected to applications and network layer protocols.
They are most often represented by simple modules, currently TCP, UDP, and SCTP
are supported. TCP has several implementations: Tcp is the OMNeT++ native implementation; TcpLwip module wraps the lwIP TCP stack; and TcpNsc module wraps the
Network Simulation Cradle library.
• Network layer protocols are connected to transport layer protocols and network interfaces. They are usually modeled as compound modules: Ipv4NetworkLayer for IPv4,
and Ipv6NetworkLayer for IPv6. The Ipv4NetworkLayer module contains several protocol modules: Ipv4, Arp, Icmp and Icmpv6.

15

INET Framework User’s Guide

• Network interfaces are represented by compound modules which are connected to the
network layer protocols and other network interfaces in the wired case. They are often modeled as compound modules containing separate modules for queues, classifiers,
MAC, and PHY protocols.
• Link layer protocols are usually simple modules sitting in network interface modules.
Some protocols, for example IEEE 802.11 MAC, are modeled as a compound module
themselves due to the complexity of the protocol.
• Physical layer protocols are compound modules also being part of network interface
modules.
• Interface table maintains the set of network interfaces (e.g. eth0, wlan0) in the network node. Interfaces are registered dynamically during initialization of network interfaces.
• Routing tables maintain the list of routes for the corresponding network protocol (e.g.,
Ipv4RoutingTable for Ipv4). Routes are added by automatic network configurators or
routing protocols. Network protocols use the routing tables to find out the best matching
route for datagrams.
• Mobility modules are responsible for moving around the network node in the simulated
scene. The mobility model is mandatory for wireless simulations even if the network
node is stationary. The mobility module stores the location of the network node which
is needed to compute wireless propagation and path loss. Different mobility models are
provided as different modules. Network nodes define their mobility submodule with a
parametric type, so the mobility model can be changed in the configuration.
• Energy modules model energy storage mechanisms, energy consumption of devices and
software processes, energy generation of devices, and energy management processes
which shutdown and startup network nodes.
• Status (NodeStatus) keeps track of the status of the network node (up, down, etc.)
• Other modules with particular functionality such as PcapRecorder are also available.

4.3 Node Architecture
Within network nodes, OMNeT++ connections are used to represent communication opportunities between protocols. Packets and messages sent on these connections represent software
or hardware activity.
Although protocols may also be connected to each other directly, in most cases they are connected via dispatcher modules. Dispatchers (MessageDispatcher) are small, low-overhead
modules that allow protocol components to be connected in one-to-many and many-to-many
fashion, and ensure that messages and packets sent from one component end up being delivered
to the correct component. Dispatchers need no manual configuration, as they use discovery and
peek into packets.
In there pre-assembled node models, dispatchers allow arbitrary protocol components to talk
directly to each other, i.e. not only to ones in neighboring layers.

16

Chapter 4. Network Nodes

INET Framework User’s Guide

4.4 Customizing Nodes
The built-in network nodes are written to be as versatile and customizable as possible. This is
achieved in several ways:

4.4.1 Submodule and Gate Vectors
One way is the use of gate vectors and submodule vectors. The sizes of vectors may come
from parameters or derived by the number of external connections to the network node. For
example, a host may have an arbitrary number of wireless interfaces, and it will automatically
have as many Ethernet interfaces as the number of Ethernet devices connected to it.
For example, wireless interfaces for hosts are defined like this:
wlan[numWlanInterfaces]:  // wlan interfaces in StandardHost
˓→etc al.

Where numWlanInterfaces is a module parameter that defaults to either 0 or 1 (this is
different for e.g. StandardHost and WirelessHost.) To configure a host to have two interfaces,
add the following line to the ini file:
**.hostA.numWlanInterfaces = 2

4.4.2 Conditional Submodules
Submodules that are not vectors are often conditional. For example, the TCP protocol module
in hosts is conditional on the hasTcp parameter. Thus, to disable TCP support in a host (it is
enabled by default), use the following ini file line:
**.hostA.hasTcp = false

4.4.3 Parametric Types
Another often used way of customization is parametric types, that is, the type of a submodule
(or a channel) may be specified as a string parameter. Almost all submodules in the built-in
node types have parametric types. For example, the TCP protocol module is defined like this:
tcp:  like ITcp if hasTcp;

The tcpType parameter defaults to the default implementation, Tcp. To use another implementation instead, add the following line to the ini file:
**.host*.tcpType = "TcpLwip"

# use lwIP's TCP implementation

Submodule vectors with parametric types are defined without the use of a module parameter to
allow elements have different types. An example is how applications are defined in hosts:
4.4. Customizing Nodes

17

INET Framework User’s Guide

app[numApps]: <> like IApp;

// applications in StandardHost et al.

And applications can be added in the following way:
**.hostA.numApps = 2
**.hostA.apps[0].typename = "UdpBasicApp"
**.hostA.apps[1].typename = "PingApp"

4.4.4 Inheritance
Inheritance can be use to derive new, specialized node types from existing ones. A derived
NED type may add new parameters, gates, submodules or connections, and may set inherited
unassigned parameters to specific values.
For example, WirelessHost is derived from StandardHost in the following way:
module WirelessHost extends StandardHost
{
@display("i=device/wifilaptop");
numWlanInterfaces = default(1);
}

4.5 Custom Network Nodes
Despite the many pre-assembled network nodes and the several available customization options, sometimes it is just easier to build a network node from scratch. The following example
shows how easy it is to build a simple network node.
This network node already contains a configurable application and several standard protocols.
It also demonstrates how to use the packet dispatching mechanism which is required to connect
multiple protocols in a many-to-many relationship.
module NetworkNodeExample
{
parameters:
gates:
inout ethg; // ethernet interface connector
input radioIn; // incoming radio frames from physical medium
submodules:
app: <> like IApp; // configurable application
tcp: Tcp; // standard TCP protocol
ip: Ipv4; // standard IP protocol
md: MessageDispatcher; // connects multiple interfaces to IP
wlan: Ieee80211Interface; // standard wifi interface
eth: EthernetInterface; // standard ethernet interface
interfaceTable: InterfaceTable;
(continues on next page)

18

Chapter 4. Network Nodes

INET Framework User’s Guide

(continued from previous page)

connections: // network node internal connections
app.socketOut --> tcp.appIn; // application sends data
˓→stream
app.socketIn <-- tcp.appOut; // application receives data
˓→stream
tcp.ipOut --> ip.transportIn; // TCP sends segments
tcp.ipIn <-- ip.transportOut; // TCP receives segments
ip.queueOut --> md.in++; // IP sends datagrams
ip.queueIn <-- md.out++; // IP receives datagrams
md.out++ --> wlan.upperLayerIn;
md.in++ <-- wlan.upperLayerOut;
md.out++ --> eth.upperLayerIn;
md.in++ <-- eth.upperLayerOut;
eth.phys <--> ethg; // Ethernet sends frames to cable
radioIn --> wlan.radioIn; // IEEE 802.11 sends frames to
˓→medium
}

4.5. Custom Network Nodes

19

INET Framework User’s Guide

20

Chapter 4. Network Nodes

CHAPTER

FIVE

NETWORK INTERFACES

5.1 Overview
In INET simulations, network interface modules are the primary means of communication
between network nodes. They represent the required combination of software and hardware
elements from an operating system point-of-view.
Network interfaces are implemented with OMNeT++ compound modules that conform to the
INetworkInterface module interface. Network interfaces can be further categorized as wired
and wireless; they conform to the IWiredInterface and IWirelessInterface NED types, respectively, which are subtypes of INetworkInterface.

5.2 Built-in Network Interfaces
INET provides pre-assembled network interfaces for several standard protocols, protocol tunneling, hardware emulation, etc. The following list gives the most commonly used network
interfaces.
• EthernetInterface represents an Ethernet interface
• PppInterface is for wired links using PPP
• Ieee80211Interface represents a Wifi (IEEE 802.11) interface
• Ieee802154NarrowbandInterface and Ieee802154UwbIrInterface represent a IEEE
802.15.4 interface
• BMacInterface, LMacInterface, XMacInterface provide low-power wireless sensor MAC
protocols along with a simple hypothetical PHY protocol
• TunInterface is a tunneling interface that can be directly used by applications
• LoopbackInterface provides local loopback within the network node
• ExtInterface represents a real-world interface, suitable for hardware-in-the-loop simulations

21

INET Framework User’s Guide

5.3 Anatomy of Network Interfaces
Network interfaces in the INET Framework are OMNeT++ compound modules that contain
many more components than just the corresponding layer 2 protocol implementation. Most of
these components are optional, i.e. absent by default, and can be added via configuration.
Typical ingredients are:
• Layer 2 protocol implementation. For some interfaces such as PppInterface this is a single
module; for others like Ethernet and Wifi it consists of separate modules for MAC, LLC,
and possibly other subcomponents.
• PHY model. Some interfaces also contain separate module(s) that implement the physical
layer. For example, Ieee80211Interface contains a radio module.
• Output queue. This module is optional and absent by default, because most MAC protocol implementations already contain an internal queue which is more efficient to work
with. The possibility to plug in an external queue module allows one to experiment with
different queueing policies and implement QoS, RED, etc.
• Traffic conditioners allow traffic shaping and policing elements to be added to the interface, for example to implement a Diffserv router.
• Hooks allow extra modules to be inserted in the incoming and outgoing paths of packets.

5.3.1 Internal vs External Output Queue
Network interfaces usually have the external queue module defined with a parametric type like
this:
queue:  like IOutputQueue if queueType != "";

When queueType is empty (this is the default), the external queue module is absent, and the
MAC (or equivalent L2) protocol will use its internal queue object. Conceptually, the internal
queue is of inifinite size, but for better diagnostics one can often specify a hard limit for the
queue length in a module parameter – if this is exceeded, the simulation stops with an error.
When queueType is not empty, it must name a NED type that implements the IOutputQueue
interface. The external queue module model allows modeling a finite buffer, or implement
various queueing policies for QoS and/or RED.
The most frequently used module type for external queue is DropTailQueue, a finite-size FIFO
that drops overflowing packets). Other queue types that implement queueing policies can be
created by assembling compound modules from DiffServ components (see chapter Differentiated Services). An example of such compound modules is DiffservQueue.
An example ini file fragment that installs drop-tail queues of size 10 on PPP interfaces:
**.ppp[*].queueType = "DropTailQueue"
**.ppp[*].queue.frameCapacity = 10

22

Chapter 5. Network Interfaces

INET Framework User’s Guide

5.3.2 Traffic Conditioners
Many network interfaces contain optional traffic conditioner submodules defined with parametric types, like this:
ingressTC:  like ITrafficConditioner if
˓→ingressTCType != "";
egressTC:  like ITrafficConditioner if egressTCType !
˓→= "";

Traffic conditioners allow one to implement the policing and shaping actions of a Diffserv
router. They are added to the input or output packets paths in the network interface. (On the
output path they are added before the queue module.)
Traffic conditioners must implement the ITrafficConditioner module interface. Traffic conditioners can be assembled from DiffServ components (see chapter Differentiated Services).
There is no preassembled traffic conditioner in INET, but you can find some in the example
simulations.
An example configuration with fictituous types:
**.ppp[*].ingressTCType = "CustomIngressTC"
**.ppp[*].egressTCType = "CustomEgressTC"

5.3.3 Hooks
Several network interfaces allow extra modules to be inserted in the incoming and outgoing
paths of packets at the top of the netwok interface. Hooks are added as a submodule vector
with parametric type, like this:
outputHook[numOutputHooks]:  like IHook if
˓→numOutputHooks>0;
inputHook[numInputHooks]:  like IHook if
˓→numInputHooks>0;

This allows any number of hook modules to be added. The hook modules are chained in their
numeric order.
Modules inserted as hooks may act as probes (for measuring or recording traffic) or as means
of modifying or perturbing the packet flow for experimentation. Module types implementing
the IHook NED interface include ThruputMeter, Delayer, OrdinalBasedDropper, and OrdinalBasedDuplicator.
The following ini file fragment inserts two hook modules into the output paths of PPP interfaces, a delayer and a throughput meter:
**.ppp[*].numOutputHooks = 2
**.ppp[*].outputHook[0].typename = "Delayer"
**.ppp[*].outputHook[1].typename = "ThruputMeter"
**.ppp[*].outputHook[0].delay = 3ms

5.3. Anatomy of Network Interfaces

23

INET Framework User’s Guide

5.4 The Interface Table
Network nodes normally contain an InterfaceTable module. The interface table is a sort of
registry of all the network interfaces in the host. It does not send or receive messages, other
modules access it via C++ function calls. Contents of the interface table can also be inspected
e.g. in Qtenv.
Network interfaces register themselves in the interface table at the beginning of the simulation.
Registration is usually the task of the MAC (or equivalent) module.

5.5 Wired Network Interfaces
Wired interfaces have a pair of special purpose OMNeT++ gates which represent the capability
of having an external physical connection to another network node (e.g. Ethernet port). In
order to make wired communication work, these gates must be connected with special connections which represent the physical cable between the physical ports. The connections must
use special OMNeT++ channels (e.g. DatarateChannel) which determine datarate and delay
parameters.
Wired network interfaces are compound modules that implement the IWiredInterface interface.
INET has the following wired network interfaces.

5.5.1 PPP
Network interfaces for point-to-point links (PppInterface) are described in chapter Point-toPoint Links. They are typically used in routers.

5.5.2 Ethernet
Ethernet interfaces (EthernetInterface), alongside with models of Ethernet devices such as
switches and hubs, are described in chapter The Ethernet Model.

5.6 Wireless Network Interfaces
Wireless interfaces use direct sending1 for communication instead of links, so their compound
modules do not have output gates at the physical layer, only an input gate dedicated to receiving.
Another difference from the wired case is that wireless interfaces require (and collaborate with)
a transmission medium module at the network level. The medium module represents the shared
transmission medium (electromagnetic field or acoustic medium), is responsible for modeling
physical effects like signal attenuation, and maintains connectivity information. Also, while
wired interfaces can do without explicit modeling of the physical layer, a PHY module is an
indispensable part of a wireless interface.
1

24

OMNeT++ sendDirect() calls

Chapter 5. Network Interfaces

INET Framework User’s Guide

Wireless network interfaces are compound modules that implement the IWirelessInterface interface. In the following sections we give an overview of the wireless interfaces available in
INET.

5.6.1 Generic Wireless Interface
The WirelessInterface compound module is a generic implementation of IWirelessInterface.
In this network interface, the types of the MAC protocol and the PHY layer (the radio) are
parameters:
mac:  like IMacProtocol;
radio:  like IRadio if radioType != "";

There are specialized versions of WirelessInterface where the MAC and the radio modules are
fixed to a particular value. One example is BMacInterface, which contains a BMac and an
ApskRadio.

5.6.2 IEEE 802.11
IEEE 802.11 or Wifi network interfaces (Ieee80211Interface), alongside with models of devices
acting as access points (AP), are covered in chapter The 802.11 Model.

5.6.3 IEEE 802.15.4
Ieee802154NarrowbandInterface is covered in a separate chapter, see The 802.15.4 Model.

5.6.4 Wireless Sensor Networks
MAC protocols for wireless sensor networks (WSNs) and the corresponding network interfaces
are covered in chapter MAC Protocols for Wireless Sensor Networks.

5.6.5 CSMA/CA
CsmaCaMac implements an imaginary CSMA/CA-based MAC protocol with optional acknowledgements and a retry mechanism. With the appropriate settings, it can approximate
basic 802.11b ad-hoc mode operation.
CsmaCaMac provides a lot of room for experimentation: acknowledgements can be turned
on/off, and operation parameters like inter-frame gap sizes, backoff behaviour (slot time, minimum and maximum number of slots), maximum retry count, header and ACK frame sizes, bit
rate, etc. can be configured via NED parameters.
CsmaCaInterface interface is a WirelessInterface with the MAC type set to CsmaCaMac.

5.6. Wireless Network Interfaces

25

INET Framework User’s Guide

5.6.6 Acking MAC
Not every simulation requires a detailed simulation of the lower layers. AckingWirelessInterface is a highly abstracted wireless interface that offers simplicity for scenarios where Layer
1 and 2 effects can be completely ignored, for example testing the basic functionality of a
wireless ad-hoc routing protocol.
AckingWirelessInterface is a WirelessInterface parameterized to contain a unit disk radio (UnitDiskRadio) and a trivial MAC protocol (AckingMac).
The most important parameter UnitDiskRadio accepts is the transmission range. When a radio transmits a frame, all other radios within transmission range are able to receive the frame
correctly, and radios that are out of range will not be affected at all. Interference modeling
(collisions) is optional, and it is recommended to turn it off with AckingMac.
AckingMac implements a trivial MAC protocol that has packet encapsulation and decapsulation, but no real medium access procedure. Frames are simply transmitted on the wireless
channel as soon as the transmitter becomes idle. There is no carrier sense, collision avoidance,
or collison detection. AckingMac also provides an optional out-of-band acknowledgement
mechanism (using C++ function calls, not actual wirelessly sent frames), which is turned on
by default. There is no retransmission: if the acknowledgement does not arrive after the first
transmission, the MAC gives up and counts the packet as failed transmission.

5.6.7 Shortcut
ShortcutMac implements error-free “teleportation” of packets to the peer MAC entity, with
some delay computed from a transmission duration and a propagation delay. The physical
layer is completely bypassed. The corresponding network interface type, ShortcutInterface,
does not even have a radio model.
ShortcutInterface is useful for modeling wireless networks where full connectivity is assumed,
and Layer 1 and Layer 2 effects can be completely ignored.

5.7 Special-Purpose Network Interfaces
5.7.1 Tunnelling
TunInterface is a virtual network interface that can be used for creating tunnels, but it is more
powerful than that. It lets an application-layer module capture packets sent to the TUN interface
and do whatever it pleases with it (including sending it to a peer entity in an UDP or plain IPv4
packet.)
To set up a tunnel, add an instance of TunnelApp to the node, and specify the protocol (IPv4 or
UDP) and the remote endpoint of the tunnel (address and port) in parameters.

26

Chapter 5. Network Interfaces

INET Framework User’s Guide

5.7.2 Local Loopback
LoopbackInterface provides local loopback within the network node.

5.7.3 External Interface
ExtInterface represents a real-world interface, suitable for hardware-in-the-loop simulations.
External interfaces are explained in chapter Network Emulation.

5.8 Custom Network Interfaces
It’s also possible to build custom network interfaces, the following example shows how to build
a custom wireless interface.
module WirelessInterfaceExample
{
gates:
input upperLayerIn; // packets from network layer in the
˓→same host
output upperLayerOut; // packets to network layer in the
˓→same host
input radioIn; // incoming packets from other hosts in the
˓→network
submodules:
mac: AckingMac; // simple MAC supporting ACKs
radio: ApskScalarRadio; // simple radio supporting many
˓→modulations
connections: // network interface internal connections
mac.upperLayerOut --> upperLayerOut;
mac.upperLayerIn <-- upperLayerIn;
radio.upperLayerOut --> mac.lowerLayerIn;
radio.upperLayerIn <-- mac.lowerLayerOut;
radioIn --> radio.radioIn;
}

The above network interface contains very simple hypothetical MAC and PHY protocols. The
MAC protocol only provides acknowledgment without other services (e.g., carrier sense, collision avoidance, collision detection), the PHY protocol uses one of the predefined APSK modulations for the whole signal (preamble, header, and data) without other services (e.g., scrambling, interleaving, forward error correction).

5.8. Custom Network Interfaces

27

INET Framework User’s Guide

28

Chapter 5. Network Interfaces

CHAPTER

SIX

APPLICATIONS

6.1 Overview
This chapter describes application models and traffic generators. All applications implement
the IApp module interface to ease configuring the StandardHost module.

6.2 TCP applications
This sections describes the applications using the TCP protocol. These applications use GenericAppMsg objects to represent the data sent between the client and server. The client message
contains the expected reply length, the processing delay, and a flag indicating that the connection should be closed after sending the reply. This way intelligence (behaviour specific to
the modelled application, e.g. HTTP, SMB, database protocol) needs only to be present in the
client, and the server model can be kept simple and dumb.

6.2.1 TcpBasicClientApp
Client for a generic request-response style protocol over TCP. May be used as a rough model
of HTTP or FTP users.
The model communicates with the server in sessions. During a session, the client opens a single
TCP connection to the server, sends several requests (always waiting for the complete reply to
arrive before sending a new request), and closes the connection.
The server app should be TcpGenericServerApp; the model sends GenericAppMsg messages.
Example settings:
FTP:
numRequestsPerSession = exponential(3)
requestLength = truncnormal(20,5)
replyLength = exponential(1000000)

HTTP:

29

INET Framework User’s Guide

numRequestsPerSession = 1 # HTTP 1.0
numRequestsPerSession = exponential(5)
requestLength = truncnormal(350,20)
replyLength = exponential(2000)

# HTTP 1.1, with keepalive

Note that since most web pages contain images and may contain frames, applets etc, possibly
from various servers, and browsers usually download these items in parallel to the main HTML
document, this module cannot serve as a realistic web client.
Also, with HTTP 1.0 it is the server that closes the connection after sending the response, while
in this model it is the client.

6.2.2 TcpSinkApp
Accepts any number of incoming TCP connections, and discards whatever arrives on them.

6.2.3 TcpGenericServerApp
Generic server application for modelling TCP-based request-reply style protocols or applications.
The module accepts any number of incoming TCP connections, and expects to receive messages of class GenericAppMsg on them. A message should contain how large the reply should
be (number of bytes). TcpGenericServerApp will just change the length of the received message accordingly, and send back the same message object. The reply can be delayed by a
constant time (replyDelay parameter).

6.2.4 TcpEchoApp
The TcpEchoApp application accepts any number of incoming TCP connections, and sends
back the data that arrives on them, The byte counts are multiplied by echoFactor before
echoing. The reply can also be delayed by a constant time (echoDelay parameter).

6.2.5 TcpSessionApp
Single-connection TCP application: it opens a connection, sends the given number of bytes,
and closes. Sending may be one-off, or may be controlled by a “script” which is a series of
(time, number of bytes) pairs. May act either as client or as server. Compatible with both IPv4
and IPv6.
Opening the connection
Depending on the type of opening the connection (active/passive), the application may be either
a client or a server. In passive mode, the application will listen on the given local local port,
30

Chapter 6. Applications

INET Framework User’s Guide

and wait for an incoming connection. In active mode, the application will bind to given local
local address and local port, and connect to the given address and port. It is possible to use an
ephemeral port as local port.
Even when in server mode (passive open), the application will only serve one incoming connection. Further connect attempts will be refused by TCP (it will send RST) for lack of LISTENing
connections.
The time of opening the connection is in the tOpen parameter.
Sending data
Regardless of the type of OPEN, the application can be made to send data. One way of specifying sending is via the tSend, sendBytes parameters, the other way is sendScript. With
the former, sendBytes bytes will be sent at tSend. When using sendScript, the format
of the script is: