-
-
Save infinitydon/fc3cc38e77f1ebcd485bc246ccc5df22 to your computer and use it in GitHub Desktop.
Populating VPP with a sample GTPU config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -eu | |
vppctl create host-interface name vpp0 | |
vppctl set interface state host-vpp0 up | |
vppctl set interface ip address host-vpp0 172.16.16.2/24 | |
vppctl create host-interface name vpp1 | |
vppctl set interface state host-vpp1 up | |
vppctl set interface ip address host-vpp1 172.16.17.2/24 | |
vppctl set interface nat44 out host-vpp1 output-feature | |
vppctl nat44 add address 172.16.17.2 | |
vppctl set interface ip gtpu-bypass host-vpp0 | |
vppctl ip table add 1 | |
vppctl create gtpu tunnel src 172.16.16.2 dst 172.16.16.1 teid 100 decap-next ip4 | |
vppctl set interface ip table gtpu_tunnel0 1 | |
vppctl set interface unnumbered gtpu_tunnel0 use host-vpp0 | |
vppctl ip route add 100.64.100.0/24 table 1 via gtpu_tunnel0 | |
vppctl ip route add 0.0.0.0/0 table 1 via 172.16.17.1 host-vpp1 | |
vppctl ip table add 2 | |
vppctl create gtpu tunnel src 172.16.16.2 dst 172.16.16.1 teid 200 decap-next ip4 | |
vppctl set interface ip table gtpu_tunnel1 2 | |
vppctl set interface unnumbered gtpu_tunnel1 use host-vpp0 | |
vppctl ip route add 100.64.100.0/24 table 2 via gtpu_tunnel1 | |
vppctl ip route add 0.0.0.0/0 table 2 via 172.16.17.1 host-vpp1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment