blob: e37b7095ea9c63f716f3d73b6ab90026f60d4a1a [file] [log] [blame]
Harald Welte8a1e7b82017-09-06 12:35:04 +02001== Configuring OsmoGGSN
2
3All configuration of OsmoGGSN is performed using the VTY. For more
4general information on the VTY interface, see FIXME.
5
6=== Configuring a virtual GGSN instance
7
8OsmoGGSN can run multiple GGSN instances inside one program/process.
9Each GGSN instance binds to its own transport-layer GTP IP address and
10has its own set of APNs and associated IP address pools + tun/gtp
11devices.
12
13In most usage cases, yo will only have a single GGSN instance inside
14your configuration file, like in below example:
15
16.Example: Single GGSN configuration section
17----
18ggsn ggsn0
19 gtp state-dir /tmp
20 gtp bind-ip 127.0.0.6
21 apn internet
22 gtpu-mode tun
23 tun-device tun4
24 type-support v4
25 ip prefix dynamic 176.16.222.0/24
26 ip dns 0 192.168.100.1
27 ip dns 1 8.8.8.8
28 ip ifconfig 176.16.222.0/24
29 no shutdown
30----
31
32
33==== Creating/Editing a GGSN instance
34
35Creating/Editing a GGSN instance can be done by the following sequence
36of VTY commands:
37
38----
39OsmoGGSN> enable <1>
40OsmoGGSN# configure terminal <2>
41OsmoGGSN(config)# ggsn ggsn0 <3>
42OsmoGGSN(config-ggsn)# <4>
43----
44<1> Change into privileged mode
45<2> Enter the interactive configuration mode
46<3> Create or edit the GGSN instance `ggsn0`. The name can be any ASCII
47 string, its significance is only to the local user.
48<4> Your prompt is now in the `ggsn` config node, where you can
49 configure the properties of this GGSN instance.
50
51NOTE:: After creating a new GGSN instance, it is in `shutdown` mode. See
52FIXME to take it out of shutdown, but make sure to configure it fully
53before taking it out of shutdown.
54
55==== Configuring a GGSN instance
56
57The following two mandatory configuration statements have to be given
58for every GGSN instance:
59
60----
61OsmoGGSN(config-ggsn)# gtp state-dir /var/lib/ggsn/ggsn0 <1>
62OsmoGGSN(config-ggsn)# gtp bind-ip 127.0.0.6 <2>
63----
64<1> Store the GSN restart state in the specified directory
65<2> Bind the GGSN instance to the specified local IPv4 address
66
67There are some further configuration statements that can be used at the
68GGSN node, some examples are given below. For a full list, see the
69OpenGGSN VTY reference manual (FIXME).
70
71----
72OsmoGGSN(config-ggsn)# default-apn foobar <1>
73----
74<1> Configure a default APN to be used if the user-requested APN is not
75 found. The named APN must previously be configured
76
77
78==== Deleting a GGSN instance
79
80A GGSN instance can be removed like this
81
82.Example: Deleting a GGSN instance
83----
84OsmoGGSN> enable <1>
85OsmoGGSN# configure terminal <2>
86OsmoGGSN(config)# no ggsn ggsn0 <3>
87----
88<1> Change into privileged mode
89<2> Enter the interactive configuration mode
90<3> Delete the GGSN instance
91
92
93==== Taking a GGSN instance out of shutdown
94
95.Example: Taking a GGSN instance out of shutdown
96----
97OsmoGGSN> enable <1>
98OsmoGGSN# configure terminal <2>
99OsmoGGSN(config)# ggsn ggsn0 <3>
100OsmoGGSN(config-ggsn)# no shutdown ggsn <4>
101----
102<1> Change into privileged mode
103<2> Enter the interactive configuration mode
104<3> Enter the config ndoe of the GGSN instance `ggsn0`
105<4> Take the GGSN instance out of shutdown
106
107
108==== Shutting a GGSN instance down
109
110If you would like to take a GGSN instance out of service, you can
111put it into shutdown mode. This will make the entire GGSN unavailable
112to user traffic and permit you to e.g. reconfigure it before taking it
113out of shutdown again.
114
115.Example: Shutting down a GGSN instance
116----
117OsmoGGSN> enable <1>
118OsmoGGSN# configure terminal <2>
119OsmoGGSN(config)# ggsn ggsn0 <3>
120OsmoGGSN(config-ggsn)# shutdown ggsn <4>
121----
122<1> Change into privileged mode
123<2> Enter the interactive configuration mode
124<3> Enter the config ndoe of the GGSN instance `ggsn0`
125<4> Shut down the GGSN instance
126
127
128=== Configuring an Access Point Name
129
130An Access Point Name (APN) represents a connection to an external packet
131data network, such as the public Internet or private corporate networsk.
132
133APNs are selected by terminals (MS/UE) when establishing PDP contexts.
134
135Each OsmoGGSN GGSN instance can have any number of APNs configured.
136Each APN is identified by a string name.
137
138==== Creating/Editing an APN
139
140.Example: Creating a new APN
141----
142OsmoGGSN> enable <1>
143OsmoGGSN# configure terminal <2>
144OsmoGGSN(config)# ggsn ggsn0 <3>
145OsmoGGSN(config-ggsn)# apn internet <4>
146OsmoGGSN(config-ggsn-apn)# <5>
147----
148<1> Change into privileged mode
149<2> Enter the interactive configuration mode
150<3> Enter the config node of the GGSN instance `ggsn0`
151<4> Create or Edit an APN called `internet`
152<5> Your prompt is now in the `ggsn` config node, where you can
153 configure the properties of this GGSN instance.
154
155NOTE:: The newly-create APN is created in `shutdown` mode. See FIXME to take it
156out of shutdown.
157
158
159==== Configuring an APN
160
161.Example: Configuring an APN
162----
163OsmoGGSN(config-ggsn-apn)# gtpu-mode tun <1>
164OsmoGGSN(config-ggsn-apn)# type-support v4 <2>
165OsmoGGSN(config-ggsn-apn)# ip prefix dynamic 176.16.222.0/24 <3>
166OsmoGGSN(config-ggsn-apn)# ip dns 0 192.168.100.1 <4>
167OsmoGGSN(config-ggsn-apn)# ip dns 1 8.8.8.8 <5>
168OsmoGGSN(config-ggsn-apn)# ip ifconfig 176.16.222.0/24 <6>
169----
170<1> Use the userspace GTP-U handling using a TUN device
171<2> Support (only) IPv4 Addresses
172<3> Specify the pool of dynamic IPv4 addresses to be allocated to PDP
173 contexts
174<4> Specify the primary DNS server to be provided using IPCP/PCO
175<5> Specify the secondary DNS server to be provided using IPCP/PCO
176<6> Request OsmoGGSN to configure the `tun4` device network/netmask
177
178NOTE:: If you use the optional `ip ifconfig` command to set the network
179device address/mask, OsmoGGSN must run with root or `CAP_NET_ADMIN`
180support. It might be better to configure related tun devices at system
181startup and run OsmoGGSN as non-privileged user. See FIXME for more
182details.
183
184
185==== Deleting an APN
186
187An APN configuration can be removed like this
188
189.Example: Deleting an APN
190----
191OsmoGGSN> enable <1>
192OsmoGGSN# configure terminal <2>
193OsmoGGSN(config)# ggsn ggsn0 <3>
194OsmoGGSN(config-ggsn)# no apn internet <4>
195----
196<1> Change into privileged mode
197<2> Enter the interactive configuration mode
198<3> Enter the config node of the GGSN instance `ggsn0`
199<4> Delete the APN `internet`
200
201
202==== Taking an APN out of shutdown
203
204In order to bring a deactived APN in `shutdown` state into active
205operation, use the `no shutdown` command at the APN node as explained in
206the following example:
207
208.Example: Taking an APN out of shutdown
209----
210OsmoGGSN> enable <1>
211OsmoGGSN# configure terminal <2>
212OsmoGGSN(config)# ggsn ggsn0 <3>
213OsmoGGSN(config-ggsn)# apn internet <4>
214OsmoGGSN(config-ggsn-apn)# no shutdown <5>
215----
216<1> Change into privileged mode
217<2> Enter the interactive configuration mode
218<3> Enter the config ndoe of the GGSN instance `ggsn0`
219<4> Enter the config ndoe of the APN `internet`
220<5> Take the APN out of shutdown
221
222
223==== Shutting an APN down
224
225If you would like to take an APN instance out of service, you can
226put it into shutdown mode. This will make the APN unavailable
227to user traffic and permit you to e.g. reconfigure it before taking it
228out of shutdown again.
229
230.Example: Shutting down an APN
231----
232OsmoGGSN> enable <1>
233OsmoGGSN# configure terminal <2>
234OsmoGGSN(config)# ggsn ggsn0 <3>
235OsmoGGSN(config-ggsn)# apn internet <4>
236OsmoGGSN(config-ggsn-apn)# shutdown <5>
237----
238<1> Change into privileged mode
239<2> Enter the interactive configuration mode
240<3> Enter the config ndoe of the GGSN instance `ggsn0`
241<4> Enter the config ndoe of the APN `internet`
242<5> Shut down the APN
243