Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions examples/4g-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@
The goal of this example is to recreate the network topology of a typical 4G network setup using Network Service Mesh.

```
+----------------+ +----------------+ +----------------+
| | | | | |
| MME | | HSS | | PCRF |
s1-mme | | s6a | | | |
+---------> 10.60.1.0/24 <----------+ | | |
| | | | | |
| endpoint | | client | | client |
+--------^-------+ +----------------+ +--------+-------+
| |
| s11 Gx |
| +--------------------------+
| |
+--------+-------+ +--------v-------+ +----------------+
| | | | | |
| S-GW-C | | P-GW-C | | TDF-C |
| | s5s8-c | | | |
| +--------->+ 10.60.2.0/24 | | |
| | | | | |
| client | | endpoint | | client |
Control plane +--------+-------+ +--------^-------+ +--------+-------+
| | |
| Sxa | Sxb | Sxc
+----------------+ +----------------+ +----------------+
| | | | | |
| MME | | HSS | | PCRF |
s1-mme | | s6a | | | |
+---------------> <--------------+ | | |
10.60.1.0/24 | | 10.60.2.0/24 | | | |
| endpoint | | client | | client |
+--------^-------+ +----------------+ +--------+-------+
| |
10.60.3.0/24 | s11 Gx |
| +--------------------------+
| | 10.60.5.0/24
+--------+-------+ +--------v-------+ +----------------+
| | | | | |
| S-GW-C | | P-GW-C | | TDF-C |
| | s5s8-c | | | |
| +--------------> | | |
| | 10.60.4.0/24 | | | |
| client | | endpoint | | client |
Control plane +--------+-------+ +--------^-------+ +--------+-------+
| | |
10.60.8.0/24 | Sxa 10.60.6.0/24 | Sxb 10.60.11.0/24 | Sxc
+--------------------------------------------------------------------------------------------------------+
| | |
| | |
Data plane +--------v-------+ +--------+-------+ +--------v-------+
| | | | | |
| S-GW-U | | P-GW-U | | TDF-U |
s1-u | | s5s8-u | | SGi in | | SGi out
+---------> 10.60.3.0/24 <----------+ +---------> 10.60.4.0/24 +--------->
| | | | | |
| endpoint | | client | | endpoint |
+----------------+ +----------------+ +----------------+
| | |
| | |
Data plane +--------v-------+ +--------+-------+ +--------v-------+
| | | | | |
| S-GW-U | | P-GW-U | | TDF-U |
s1-u | | s5s8-u | | SGi in | | SGi out
+---------> <--------------+ +---------------> +--------->
10.60.7.0/24 | | 10.60.9.0/24 | | 10.60.10.0/24 | |
| endpoint | | client | | endpoint |
+----------------+ +----------------+ +----------------+

```
22 changes: 11 additions & 11 deletions examples/4g-network/k8s/4g-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,77 @@ spec:
matches:
- match:
sourceSelector:
app: s1-mme
link: s1-mme
route:
- destination:
destinationSelector:
app: mme
- match:
sourceSelector:
app: s6a
link: s6a
route:
- destination:
destinationSelector:
app: mme
- match:
sourceSelector:
app: s11
link: s11
route:
- destination:
destinationSelector:
app: mme
- match:
sourceSelector:
app: s5s8-c
link: s5s8-c
route:
- destination:
destinationSelector:
app: p-gw-c
- match:
sourceSelector:
app: gx
link: gx
route:
- destination:
destinationSelector:
app: p-gw-c
- match:
sourceSelector:
app: sxb
link: sxb
route:
- destination:
destinationSelector:
app: p-gw-c
- match:
sourceSelector:
app: s1-u
link: s1-u
route:
- destination:
destinationSelector:
app: s-gw-u
- match:
sourceSelector:
app: sxa
link: sxa
route:
- destination:
destinationSelector:
app: s-gw-u
- match:
sourceSelector:
app: s5s8-u
link: s5s8-u
route:
- destination:
destinationSelector:
app: s-gw-u
- match:
sourceSelector:
app: sgi
link: sgi
route:
- destination:
destinationSelector:
app: tdf-u
- match:
sourceSelector:
app: sxc
link: sxc
route:
- destination:
destinationSelector:
Expand Down
2 changes: 1 addition & 1 deletion examples/4g-network/k8s/client-hss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metadata:
name: "hss"
namespace: default
annotations:
ns.networkservicemesh.io: 4g-network?app=s6a
ns.networkservicemesh.io: 4g-network?link=s6a
2 changes: 1 addition & 1 deletion examples/4g-network/k8s/client-p-gw-u.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metadata:
name: "p-gw-u"
namespace: default
annotations:
ns.networkservicemesh.io: 4g-network?app=sgi,4g-network?app=s5s8-u,4g-network?app=sxb
ns.networkservicemesh.io: 4g-network?link=sgi,4g-network?link=s5s8-u,4g-network?link=sxb
2 changes: 1 addition & 1 deletion examples/4g-network/k8s/client-pcrf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metadata:
name: "pcrf"
namespace: default
annotations:
ns.networkservicemesh.io: 4g-network?app=gx
ns.networkservicemesh.io: 4g-network?link=gx
2 changes: 1 addition & 1 deletion examples/4g-network/k8s/client-s-gw-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metadata:
name: "s-gw-c"
namespace: default
annotations:
ns.networkservicemesh.io: 4g-network?app=s11,4g-network?app=s5s8-c,4g-network?app=sxa
ns.networkservicemesh.io: 4g-network?link=s11,4g-network?link=s5s8-c,4g-network?link=sxa
2 changes: 1 addition & 1 deletion examples/4g-network/k8s/client-tdf-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ metadata:
name: "tdf-c"
namespace: default
annotations:
ns.networkservicemesh.io: 4g-network?app=sxc
ns.networkservicemesh.io: 4g-network?link=sxc
30 changes: 21 additions & 9 deletions examples/4g-network/k8s/endpoint-mme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ spec:
networkservicemesh.io/app: "mme"
template:
metadata:
annotations:
ns.networkservicemesh.io/endpoints: |
{
"name": "4g-network",
"tracerEnabled": true,
"networkServices": [
{"link": "s1-mme", "labels": "app=mme", "ipaddress": "10.60.1.0/24"},
{"link": "s6a", "labels": "app=mme", "ipaddress": "10.60.2.0/24"},
{"link": "s11", "labels": "app=mme", "ipaddress": "10.60.3.0/24"}
]
}
labels:
networkservicemesh.io/app: "mme"
networkservicemesh.io/impl: "4g-network"
Expand All @@ -16,22 +27,23 @@ spec:
- name: sidecar-nse
image: networkservicemesh/4g-network-sidecar-nse:latest
imagePullPolicy: IfNotPresent
env:
- name: ENDPOINT_NETWORK_SERVICE
value: "4g-network"
- name: ENDPOINT_LABELS
value: "app=mme"
- name: TRACER_ENABLED
value: "true"
- name: IP_ADDRESS
value: "10.60.1.0/24"
resources:
limits:
networkservicemesh.io/socket: 1
volumeMounts:
- name: nsm-endpoints
mountPath: /etc/nsminfo
- name: mme
image: alpine:latest
command: ["tail", "-f", "/dev/null"]
imagePullPolicy: IfNotPresent
volumes:
- name: nsm-endpoints
downwardAPI:
items:
- path: endpoints
fieldRef:
fieldPath: metadata.annotations['ns.networkservicemesh.io/endpoints']
metadata:
name: mme
namespace: default
30 changes: 21 additions & 9 deletions examples/4g-network/k8s/endpoint-p-gw-c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ spec:
networkservicemesh.io/app: "p-gw-c"
template:
metadata:
annotations:
ns.networkservicemesh.io/endpoints: |
{
"name": "4g-network",
"tracerEnabled": true,
"networkServices": [
{"link": "s5s8-c", "labels": "app=p-gw-c", "ipAddress": "10.60.4.0/24"},
{"link": "gx", "labels": "app=p-gw-c", "ipAddress": "10.60.5.0/24"},
{"link": "sxb", "labels": "app=p-gw-c", "ipAddress": "10.60.6.0/24"}
]
}
labels:
networkservicemesh.io/app: "p-gw-c"
networkservicemesh.io/impl: "4g-network"
Expand All @@ -16,22 +27,23 @@ spec:
- name: sidecar-nse
image: networkservicemesh/4g-network-sidecar-nse:latest
imagePullPolicy: IfNotPresent
env:
- name: ENDPOINT_NETWORK_SERVICE
value: "4g-network"
- name: ENDPOINT_LABELS
value: "app=p-gw-c"
- name: TRACER_ENABLED
value: "true"
- name: IP_ADDRESS
value: "10.60.2.0/24"
resources:
limits:
networkservicemesh.io/socket: 1
volumeMounts:
- name: nsm-endpoints
mountPath: /etc/nsminfo
- name: p-gw-c
image: alpine:latest
command: ["tail", "-f", "/dev/null"]
imagePullPolicy: IfNotPresent
volumes:
- name: nsm-endpoints
downwardAPI:
items:
- path: endpoints
fieldRef:
fieldPath: metadata.annotations['ns.networkservicemesh.io/endpoints']
metadata:
name: p-gw-c
namespace: default
30 changes: 21 additions & 9 deletions examples/4g-network/k8s/endpoint-s-gw-u.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ spec:
networkservicemesh.io/app: "s-gw-u"
template:
metadata:
annotations:
ns.networkservicemesh.io/endpoints: |
{
"name": "4g-network",
"tracerEnabled": true,
"networkServices": [
{"link": "s1-u", "labels": "app=s-gw-u", "ipAddress": "10.60.7.0/24"},
{"link": "sxa", "labels": "app=s-gw-u", "ipAddress": "10.60.8.0/24"},
{"link": "s5s8-u", "labels": "app=s-gw-u", "ipAddress": "10.60.9.0/24"}
]
}
labels:
networkservicemesh.io/app: "s-gw-u"
networkservicemesh.io/impl: "4g-network"
Expand All @@ -16,22 +27,23 @@ spec:
- name: sidecar-nse
image: networkservicemesh/4g-network-sidecar-nse:latest
imagePullPolicy: IfNotPresent
env:
- name: ENDPOINT_NETWORK_SERVICE
value: "4g-network"
- name: ENDPOINT_LABELS
value: "app=s-gw-u"
- name: TRACER_ENABLED
value: "true"
- name: IP_ADDRESS
value: "10.60.3.0/24"
resources:
limits:
networkservicemesh.io/socket: 1
volumeMounts:
- name: nsm-endpoints
mountPath: /etc/nsminfo
- name: s-gw-u
image: alpine:latest
command: ["tail", "-f", "/dev/null"]
imagePullPolicy: IfNotPresent
volumes:
- name: nsm-endpoints
downwardAPI:
items:
- path: endpoints
fieldRef:
fieldPath: metadata.annotations['ns.networkservicemesh.io/endpoints']
metadata:
name: s-gw-u
namespace: default
29 changes: 20 additions & 9 deletions examples/4g-network/k8s/endpoint-tdf-u.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ spec:
networkservicemesh.io/app: "tdf-u"
template:
metadata:
annotations:
ns.networkservicemesh.io/endpoints: |
{
"name": "4g-network",
"tracerEnabled": true,
"networkServices": [
{"link": "sgi", "labels": "app=tdf-u", "ipAddress": "10.60.10.0/24"},
{"link": "sxc", "labels": "app=tdf-u", "ipAddress": "10.60.11.0/24"}
]
}
labels:
networkservicemesh.io/app: "tdf-u"
networkservicemesh.io/impl: "4g-network"
Expand All @@ -16,22 +26,23 @@ spec:
- name: sidecar-nse
image: networkservicemesh/4g-network-sidecar-nse:latest
imagePullPolicy: IfNotPresent
env:
- name: ENDPOINT_NETWORK_SERVICE
value: "4g-network"
- name: ENDPOINT_LABELS
value: "app=tdf-u"
- name: TRACER_ENABLED
value: "true"
- name: IP_ADDRESS
value: "10.60.4.0/24"
resources:
limits:
networkservicemesh.io/socket: 1
volumeMounts:
- name: nsm-endpoints
mountPath: /etc/nsminfo
- name: tdf-u
image: alpine:latest
command: ["tail", "-f", "/dev/null"]
imagePullPolicy: IfNotPresent
volumes:
- name: nsm-endpoints
downwardAPI:
items:
- path: endpoints
fieldRef:
fieldPath: metadata.annotations['ns.networkservicemesh.io/endpoints']
metadata:
name: tdf-u
namespace: default
Loading