Hi Ron,
Handing an IP address to the subscriber is done by the GGSN. For me, that was
the easy part, the hard part being to get packets sent and received through the
tunnel on the GGSN machine.
Here's what I use for osmo-ggsn.cfg and how I set up the APN:
dev="eth0"
apn="apn0"
sudo iptables -t nat -A POSTROUTING -s 192.168.42.0/24 -o $dev -j MASQUERADE
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo ip tuntap add dev $apn mode tun user $USER group $USER
sudo ip addr add 192.168.42.0/24 dev $apn
sudo ip link set $apn up
ggsn ggsn0
apn internet
tun-device apn0
type-support v4
ip dns 0 192.168.0.1
ip dns 1 9.9.9.9
ip prefix dynamic 192.168.42.0/24
no shutdown
default-apn internet
no shutdown ggsn
With this config, the apn0 tun device is set up as root, hence osmo-ggsn
doesn't need to create a tun device itself and can run as a non-privileged
user.
HTH,
~N