diff --git a/docker-compose/core-network.sh b/docker-compose/core-network.sh index e9518d9f51e9a7c67fa8a6cb6e4b853eb5adad70..b3f238fd2069c8a2609ac67b12b42bd0bf33f192 100755 --- a/docker-compose/core-network.sh +++ b/docker-compose/core-network.sh @@ -20,6 +20,9 @@ if [[ $1 == 'start' ]]; then if [[ $2 == 'nrf' ]]; then echo -e "${BLUE}Starting 5gcn components in the order nrf, mysql, amf, smf, spgwu${NC}..." docker-compose -f docker-compose.yaml -p 5gcn up -d + elif [[ $2 == 'gnbsim' ]]; then + echo -e "${BLUE}Starting gnbsim ${NC}..." + docker-compose -f docker-compose-gnbsim.yaml up -d gnbsim$3 else echo -e "${BLUE}Starting 5gcn components in the order mysql, amf, smf, spgwu${NC}..." docker-compose -f docker-compose-no-nrf.yaml -p 5gcn up -d @@ -29,20 +32,29 @@ if [[ $1 == 'start' ]]; then mysql_health=$(docker inspect --format='{{json .State.Health.Status}}' mysql) if [[ $2 == 'nrf' ]]; then nrf_health=$(docker inspect --format='{{json .State.Health.Status}}' oai-nrf) + elif [[ $2 == 'gnbsim' ]]; then + gnbsim_health=$(docker inspect --format='{{json .State.Health.Status}}' gnbsim) fi amf_health=$(docker inspect --format='{{json .State.Health.Status}}' oai-amf) smf_health=$(docker inspect --format='{{json .State.Health.Status}}' oai-smf) spgwu_health=$(docker inspect --format='{{json .State.Health.Status}}' oai-spgwu) - if [[ ${mysql_health} == '"healthy"' && ${amf_health} == '"healthy"' && ${smf_health} == '"healthy"' && ${spgwu_health} == '"healthy"' && $2 != 'nrf' ]]; then + if [[ ${mysql_health} == '"healthy"' && ${amf_health} == '"healthy"' && ${smf_health} == '"healthy"' && ${spgwu_health} == '"healthy"' && $2 != 'nrf' && $2 != 'gnbsim' ]]; then echo -e "\n${GREEN}All components are healthy${NC}..." STATUS=0 break + elif [[ $2 == 'gnbsim' ]]; then + echo -ne "gnbsim : $gnbsim_health\033[0K\r" + if [[ ${gnbsim_health} == '"healthy"' ]]; then + STATUS=0 + break + fi + sleep 2 elif [[ ${mysql_health} == '"healthy"' && ${amf_health} == '"healthy"' && ${smf_health} == '"healthy"' && ${spgwu_health} == '"healthy"' && ${nrf_health} == '"healthy"' && $2 == 'nrf' ]]; then echo -e "\n${GREEN}All components are healthy${NC}..." STATUS=0 break elif [[ $2 != 'nrf' ]]; then - echo -ne "mysql : $mysql_health, oai-amf : $amf_health, oai-smf : $smf_health, oai-spgwu : $spgwu_health\033[0K\r" + echo -ne "here mysql : $mysql_health, oai-amf : $amf_health, oai-smf : $smf_health, oai-spgwu : $spgwu_health\033[0K\r" STATUS=1 sleep 2 else @@ -63,6 +75,8 @@ if [[ $1 == 'start' ]]; then else echo -e "${GREEN}SMF and UPF are registered to NRF${NC}..." fi + elif [[ $2 == 'gnbsim' && $STATUS == 0 ]]; then + echo -e "${GREEN}#### gnbsim is healthy - gnb & ue is conncted to core network now !! #####${NC}" else echo -e "${BLUE}Checking if SMF is able to connect with UPF${NC}" upf_logs=$(docker logs oai-spgwu | grep 'Received SX HEARTBEAT RESPONSE') @@ -84,13 +98,15 @@ if [[ $1 == 'start' ]]; then fi elif [[ $1 == 'stop' ]]; then - echo -e "${BLUE}Stopping the core network${NC}..." + echo -e "${RED}Stopping service $2 ${NC}..." if [[ $2 == 'nrf' ]]; then docker-compose -f docker-compose.yaml -p 5gcn down - else + elif [[ $2 == 'gnbsim' ]]; then + docker-compose -f docker-compose-gnbsim.yaml down + else docker-compose -f docker-compose-no-nrf.yaml -p 5gcn down fi - echo -e "${GREEN}Core network stopped${NC}" + echo -e "${GREEN}Service $2 is stopped${NC}" else echo -e "Only use the following options\n\n${RED}start${NC}: start the 5gCN\n${RED}stop${NC}: stops the 5gCN\n${RED}nrf${NC}: nrf should be used\n${RED}no-nrf${NC}: nrf should not be used\nExample: ./core-network.sh start nrf" fi diff --git a/docker-compose/docker-compose-gnbsim.yaml b/docker-compose/docker-compose-gnbsim.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d5d6b6f6ae77fae04f4633138818c772e7318988 --- /dev/null +++ b/docker-compose/docker-compose-gnbsim.yaml @@ -0,0 +1,185 @@ +version: '3.8' +services: + gnbsim: + container_name: gnbsim + image: gnbsim:develop + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=1 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000031 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - NGAPPeerAddr=192.168.70.132 + - GTPuLocalAddr=192.168.70.136 + - GTPuIFname=eth0 + networks: + public_net: + ipv4_address: 192.168.70.136 + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 + + gnbsim2: + container_name: gnbsim2 + image: gnbsim:develop + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=2 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000032 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - NGAPPeerAddr=192.168.70.132 + - GTPuLocalAddr=192.168.70.137 + - GTPuIFname=eth0 + networks: + public_net: + ipv4_address: 192.168.70.137 + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 + + gnbsim3: + container_name: gnbsim3 + image: gnbsim:develop + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=3 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000033 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - NGAPPeerAddr=192.168.70.132 + - GTPuLocalAddr=192.168.70.138 + - GTPuIFname=eth0 + networks: + public_net: + ipv4_address: 192.168.70.138 + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 + + gnbsim4: + container_name: gnbsim4 + image: gnbsim:develop + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=4 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000034 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - NGAPPeerAddr=192.168.70.132 + - GTPuLocalAddr=192.168.70.139 + - GTPuIFname=eth0 + networks: + public_net: + ipv4_address: 192.168.70.139 + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 + + gnbsim5: + container_name: gnbsim5 + image: gnbsim:develop + privileged: true + environment: + - MCC=208 + - MNC=95 + - GNBID=5 + - TAC=0x00a000 + - SST=222 + - SD=00007b + - PagingDRX=v32 + - RANUENGAPID=0 + - IMEISV=35609204079514 + - MSIN=0000000035 + - RoutingIndicator=1234 + - ProtectionScheme=null + - KEY=0C0A34601D4F07677303652C0462535B + - OPc=63bfa50ee6523365ff14c1f45f88737d + - DNN=default + - URL=http://www.asnt.org:8080/ + - NRCellID=1 + - NGAPPeerAddr=192.168.70.132 + - GTPuLocalAddr=192.168.70.140 + - GTPuIFname=eth0 + networks: + public_net: + ipv4_address: 192.168.70.140 + healthcheck: + test: /bin/bash -c "ifconfig gtp-gnb" + interval: 10s + timeout: 5s + retries: 5 + +networks: + public_net: + external: + name: demo-oai-public-net +# Incase the user wants docker-compose to create a bridge rather than creating the bridge manually then uncomment the below lines +# public_net: +# driver: bridge +# name: demo-oai-public-net +# ipam: +# config: +# - subnet: 192.168.70.128/26 +# driver_opts: +# com.docker.network.bridge.name: "demo-oai" diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index 830a5ff1561546515d4b2e86a756873840d4804a..a8165eacf337a7813e35b3a8d7185190b225b009 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -175,7 +175,7 @@ services: privileged: true container_name: oai-ext-dn entrypoint: /bin/bash -c \ - "apt update; apt install -y iptables iproute2 iputils-ping;"\ + "apt update; apt install -y iptables iproute2 iperf3 iputils-ping;"\ "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\ "ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity" command: ["/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"] diff --git a/docker-compose/oai_db.sql b/docker-compose/oai_db.sql index 67d867abb09271ce36ba019d5940dd95556dbcfd..1762a5725c7a60d096e232f54e049043a02d72ed 100755 --- a/docker-compose/oai_db.sql +++ b/docker-compose/oai_db.sql @@ -190,8 +190,17 @@ CREATE TABLE `users` ( LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; -INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+ÖEŸ‚ų\0•,IHÿH',0,0,00000000000000000096,'Px¼X \Z1¡Éx™ß','^œ¤K¬îòˆÕØFeUÿ—à'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ç4øs@ÖÅÎz€ž~œ'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012416,'`ÏF®Ý†ôéD¢¼Ï›‰Á¼','ç4øs@ÖÅÎz€ž~œ'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n\r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L‹*\\º”›±^Ýù]ö '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000020471,'\0 \n\r','ç4øs@ÖÅÎz€ž~œ'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012343,'\0 \n\r','ç4øs@ÖÅÎz€ž~œ'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204937234,'\0 \n\r','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000000000000006103,'ebd07771ace8677a','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006263,'¦SNÜ’’Ivãèe¯6','ç4øs@ÖÅÎz€ž~œ'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000000000,'3536663032363164','ç4øs@ÖÅÎz€ž~œ'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204934762,'~?03îu-%ÞeyÖyý','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'&”‚@xg€]ÿôÄ\nœÛVp','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'269482407867805d','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'3236393438323430','Ä$I6;ºÐ+fÑkÉu×|Á'); +INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+�E��ų\0�,IH��H',0,0,00000000000000000096,'Px�X \Z1��x��','^��K�����FeU���'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','�4�s@���z��~�'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012416,'`�F�݆��D��ϛ���','�4�s@���z��~�'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n\r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L�*\\�����^��]� '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000020471,'\0 \n\r','�4�s@���z��~�'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012343,'\0 \n\r','�4�s@���z��~�'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'��wq��gzW�Ð��Z]','�4�s@���z��~�'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204937234,'\0 \n\r','�$I6;��+f�k�u�|�'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000000000000006103,'ebd07771ace8677a','�$I6;��+f�k�u�|�'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006103,'ebd07771ace8677a','�4�s@���z��~�'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000006263,'�SNܒ�Iv��e�6','�4�s@���z��~�'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000012215,'56f0261d9d051063','�4�s@���z��~�'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'��G?/����� |hb',1,0,00000000000000000000,'3536663032363164','�4�s@���z��~�'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204934762,'~?03�u-%�ey�y�','�$I6;��+f�k�u�|�'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'&��@xg�]���\n��Vp','�$I6;��+f�k�u�|�'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'269482407867805d','�$I6;��+f�k�u�|�'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'��k��p~Љu{�K�',1,0,00000281044204935293,'3236393438323430','�$I6;��+f�k�u�|�'); INSERT INTO `users` VALUES ('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000032','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000033','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000034','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000035','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000036','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000037','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000038','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000039','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); +INSERT INTO `users` VALUES ('208950000000040','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/docs/BUILD_IMAGES.md b/docs/BUILD_IMAGES.md index 2b4e55afbb4cd4599ae1ff66fc12fac055d83f62..5b3996e7b3c71d22af3163c9b5cd900001c45845 100644 --- a/docs/BUILD_IMAGES.md +++ b/docs/BUILD_IMAGES.md @@ -95,7 +95,7 @@ oai-amf develop f478bafd7a06 1 minute ago ```bash $ docker build --target oai-smf --tag oai-smf:develop \ - --file component/oai-smf/docker/Dockerfile.ubuntu.18.04 \ + --file component/oai-smf/docker/Dockerfile.ubuntu18.04 \ --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" \ component/oai-smf $ docker image prune --force diff --git a/docs/DEPLOY_HOME.md b/docs/DEPLOY_HOME.md index 445625974bc87bd6af162bbc4334dc24ebc3cf99..b40f3430442ffc699fe9bfc7c1ea78896b0891a6 100644 --- a/docs/DEPLOY_HOME.md +++ b/docs/DEPLOY_HOME.md @@ -18,4 +18,5 @@ 1. [Pre-requisites](./DEPLOY_PRE_REQUESITES.md) 2. [Building the Docker Images](./BUILD_IMAGES.md) 3. [Configuring the Containers](./CONFIGURE_CONTAINERS.md) -4. [Tutorial: 5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md) \ No newline at end of file +4. [Tutorial: 5G Core Network Deployment and Testing with dsTest](./DEPLOY_SA5G_WITH_DS_TESTER.md) +5. [Tutorial: 5G Core Network Deployment and Testing with gnbsim](./DEPLOY_SA5G_WITH_GNBSIM.md) diff --git a/docs/DEPLOY_SA5G_WITH_GNBSIM.md b/docs/DEPLOY_SA5G_WITH_GNBSIM.md new file mode 100644 index 0000000000000000000000000000000000000000..8ea6cef0888fb818a9083a2b48efb460999d00b0 --- /dev/null +++ b/docs/DEPLOY_SA5G_WITH_GNBSIM.md @@ -0,0 +1,302 @@ +<table style="border-collapse: collapse; border: none;"> + <tr style="border-collapse: collapse; border: none;"> + <td style="border-collapse: collapse; border: none;"> + <a href="http://www.openairinterface.org/"> + <img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150> + </img> + </a> + </td> + <td style="border-collapse: collapse; border: none; vertical-align: center;"> + <b><font size = "5">OpenAirInterface 5G Core Network Deployment and Testing with gnbsim</font></b> + </td> + </tr> +</table> + + + +**TABLE OF CONTENTS** + +1. Pre-requisites +2. Building Container Images +3. Configuring Host Machines +4. Configuring OAI 5G Core Network Functions +5. Deploying OAI 5G Core Network +6. [Configuring gnbsim Scenario](#6-configuring-gnbsim-scenario) +7. [Executing gnbsim Scenario](#7-executing-the-gnbsim-scenario) +8. [Analysing Scenario Results](#8-analysing-the-scenario-results) +9. [Trying some advanced stuff](#9-trying-some-advanced-stuff) + +* In this demo the image tags and commits which were used are listed below, follow the [Building images](./BUILD_IMAGES.md) to build images with below tags. + +| CNF Name | Branch Name | Commit at time of writing | Ubuntu 18.04 | RHEL8 | +| ----------- |:----------------------- | ------------------------------------------ | ------------ | ---------------| +| AMF | `develop` | `82ca64fe8d79dbadbb1a495124ee26352f81bd7a` | X | X | +| SMF | `develop` | `0dba68d6a01e1dad050f47437647f62d40acaec6` | X | X | +| NRF | `develop` | `0e877cb5b80a9c74fa6abca60b95e2d3d22f7a52` | X | X | +| SPGW-U-TINY | `gtp_extension_header` | `b628036d2e6060da8ba77c5e4cdde35bf18a62a5` | X | Releasing soon | + +<br/> + +This tutorial is a extension of previous tutorial of [testing with dsTester](./docs/DEPLOY_SA5G_WITH_DS_TESTER.md). In previous tutorial we have seen the advanced testing tool dsTester, which is useful for validating even more complex scenarios. Moreover, there are various other opensource gnb/ue simulator tools are available for SA5G test. In this tutorial we use opensource simulator tool called gnbsim. With the help of gnbsim tool, we can perform very basic SA5G test by simulating one gnb and one ue. + +##### About gnbsim - +[Gnbsim](https://github.com/hhorai/gnbsim) is a 5G SA gNB/UE (Rel. 16) simulator for testing 5G System. It 3rd party opensource tool written in golang and more information can be found [here.](https://github.com/hhorai/gnbsim) Gnbsim simulates NGAP, NAS and GTPU protocols. Current version of gnbsim simulates one gnb and one ue. + +Let's begin !! +* Steps 1 to 5 are similar as previous tutorial. Please follow these steps to deploy OAI 5G core network components. +* We depoloy gnbsim docker service on same host as of core network, so there is no need to create additional route as +we did for dsTest-host. +* Before we procced further for end to end SA5G test, make sure you have healthy docker services for OAI cn5g - +```bash +oai-cn5g-fed/docker-compose$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +c25db05aa023 ubuntu:bionic "/bin/bash -c ' apt …" 23 seconds ago Up 22 seconds oai-ext-dn +31b6391a3a41 oai-amf:develop "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +753ae61f715f oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 23 seconds ago Up 22 seconds (healthy) 2152/udp, 8805/udp oai-spgwu +84c164ab8136 oai-smf:develop "/bin/bash /openair-…" 23 seconds ago Up 22 seconds (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +6f0ce91e4efb oai-nrf:develop "/bin/bash /openair-…" 24 seconds ago Up 23 seconds (healthy) 80/tcp, 9090/tcp oai-nrf +565617169b42 mysql:5.7 "docker-entrypoint.s…" 24 seconds ago Up 23 seconds (healthy) 3306/tcp, 33060/tcp mysql +rohan@rohan:~/gitrepo/oai-cn5g-fed/docker-compose$ +``` + +## 6. Configuring gnbsim Scenario ## +* Build gnbsim docker image +```bash +$ git clone https://gitlab.eurecom.fr/kharade/gnbsim.git +$ cd gnbsim +$ docker build --tag gnbsim:develop --target gnbsim --file docker/Dockerfile.ubuntu.18.04 . +``` + +## 7. Executing the gnbsim Scenario ## +* The configuration parameters, are preconfigured in [docker-compose.yaml](../docker-compose/docker-compose.yaml) and [docker-compose-gnbsim.yaml](../docker-compose/docker-compose-gnbsim.yaml) and one can modify it for test. +* Launch gnbsim docker service +```bash +oai-cn5g-fed/docker-compose$ ./core-network.sh start gnbsim + +Creating gnbsim ... done +``` +* After launching gnbsim, make sure all services status are healthy - +```bash +oai-cn5g-fed/docker-compose$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +2ad428f94fb0 gnbsim:develop "/gnbsim/bin/entrypo…" 33 seconds ago Up 32 seconds (healthy) gnbsim +c25db05aa023 ubuntu:bionic "/bin/bash -c ' apt …" 4 minutes ago Up 4 minutes oai-ext-dn +31b6391a3a41 oai-amf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +753ae61f715f oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 4 minutes ago Up 4 minutes (healthy) 2152/udp, 8805/udp oai-spgwu +84c164ab8136 oai-smf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +6f0ce91e4efb oai-nrf:develop "/bin/bash /openair-…" 4 minutes ago Up 4 minutes (healthy) 80/tcp, 9090/tcp oai-nrf +565617169b42 mysql:5.7 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes (healthy) 3306/tcp, 33060/tcp mysql +``` +Now we are ready to perform some traffic test. +* Ping test <br/> +Here we ping UE from external DN container. +```bash +$ docker exec -it oai-ext-dn ping -c 3 12.1.1.2 +PING 12.1.1.2 (12.1.1.2) 56(84) bytes of data. +64 bytes from 12.1.1.2: icmp_seq=1 ttl=64 time=0.235 ms +64 bytes from 12.1.1.2: icmp_seq=2 ttl=64 time=0.145 ms +64 bytes from 12.1.1.2: icmp_seq=3 ttl=64 time=0.448 ms + +--- 12.1.1.2 ping statistics --- +3 packets transmitted, 3 received, 0% packet loss, time 2036ms +rtt min/avg/max/mdev = 0.145/0.276/0.448/0.127 ms +rohan@rohan:~/gitrepo/oai-cn5g-fed/docker-compose$ +``` +* Iperf test <br/> +Here we do iperf traffic test between gnbsim UE and external DN node. We can make any node as iperf server/client.<br/> +Running iperf server on external DN container +```bash +$ docker exec -it oai-ext-dn iperf3 -s +----------------------------------------------------------- +Server listening on 5201 +----------------------------------------------------------- +Accepted connection from 12.1.1.2, port 43339 +[ 5] local 192.168.70.135 port 5201 connected to 12.1.1.2 port 55553 +[ ID] Interval Transfer Bandwidth +[ 5] 0.00-1.00 sec 73.8 MBytes 619 Mbits/sec +[ 5] 1.00-2.00 sec 76.3 MBytes 640 Mbits/sec +[ 5] 2.00-3.00 sec 77.8 MBytes 653 Mbits/sec +[ 5] 3.00-4.00 sec 66.7 MBytes 560 Mbits/sec +[ 5] 4.00-5.00 sec 71.9 MBytes 603 Mbits/sec +[ 5] 5.00-6.00 sec 80.2 MBytes 673 Mbits/sec +[ 5] 6.00-7.00 sec 76.5 MBytes 642 Mbits/sec +[ 5] 7.00-8.00 sec 78.6 MBytes 659 Mbits/sec +[ 5] 8.00-9.00 sec 74.5 MBytes 625 Mbits/sec +[ 5] 9.00-10.00 sec 75.5 MBytes 634 Mbits/sec +[ 5] 10.00-10.01 sec 740 KBytes 719 Mbits/sec +- - - - - - - - - - - - - - - - - - - - - - - - - +[ ID] Interval Transfer Bandwidth +[ 5] 0.00-10.01 sec 0.00 Bytes 0.00 bits/sec sender +[ 5] 0.00-10.01 sec 753 MBytes 631 Mbits/sec receiver +----------------------------------------------------------- +Server listening on 5201 +----------------------------------------------------------- +``` +Running iperf client on gnbsim +```bash +$ docker exec -it gnbsim iperf3 -c 192.168.70.135 -B 12.1.1.2 +Connecting to host 192.168.70.135, port 5201 +[ 5] local 12.1.1.2 port 55553 connected to 192.168.70.135 port 5201 +[ ID] Interval Transfer Bitrate Retr Cwnd +[ 5] 0.00-1.00 sec 77.6 MBytes 651 Mbits/sec 29 600 KBytes +[ 5] 1.00-2.00 sec 76.2 MBytes 640 Mbits/sec 0 690 KBytes +[ 5] 2.00-3.00 sec 77.5 MBytes 650 Mbits/sec 4 585 KBytes +[ 5] 3.00-4.00 sec 66.2 MBytes 556 Mbits/sec 390 354 KBytes +[ 5] 4.00-5.00 sec 72.5 MBytes 608 Mbits/sec 0 481 KBytes +[ 5] 5.00-6.00 sec 80.0 MBytes 671 Mbits/sec 0 598 KBytes +[ 5] 6.00-7.00 sec 76.2 MBytes 640 Mbits/sec 7 684 KBytes +[ 5] 7.00-8.00 sec 78.8 MBytes 661 Mbits/sec 3 578 KBytes +[ 5] 8.00-9.00 sec 75.0 MBytes 629 Mbits/sec 1 670 KBytes +[ 5] 9.00-10.00 sec 75.0 MBytes 629 Mbits/sec 5 554 KBytes +- - - - - - - - - - - - - - - - - - - - - - - - - +[ ID] Interval Transfer Bitrate Retr +[ 5] 0.00-10.00 sec 755 MBytes 633 Mbits/sec 439 sender +[ 5] 0.00-10.00 sec 753 MBytes 631 Mbits/sec receiver + +iperf Done. +``` +* Note:- The iperf test is just for illustration purpose and results of the test may vary based on resources available for the docker services + +## 8. Analysing the Scenario Results ## + +| Container | Ip-address | +| ------------- |:-------------- | +| mysql | 192.168.70.131 | +| oai-amf | 192.168.70.132 | +| oai-smf | 192.168.70.133 | +| oai-nrf | 192.168.70.130 | +| oai-spgwu | 192.168.70.134 | +| oai-ext-dn | 192.168.70.135 | +| Host Machine | 192.168.70.129 | +| gnbsim gNB | 192.168.70.136 | + +| Pcap/log files | +|:------------------------------------------------------------------------------------------ | +| [5gcn-deployment-gnbsim.pcap](./results/pcap/5gcn-deployment-gnbsim.pcap) | +| [amf.log](./results/logs/amf.log), [initialmessage.log](./results/logs/initialmessage.log) | +| [smf.log](./results/logs/smf.log) | +| [nrf.log](./results/logs/nrf.log) | +| [spgwu.log](./results/logs/spgwu.log) + +* For detailed analysis of messages, please refer previous tutorial of [testing with dsTester](./docs/DEPLOY_SA5G_WITH_DS_TESTER.md). + +## 8. Trying Some Advanced Stuff ## + +Here we try some scaling test with gnbsim. There are additional IMSIs are added into database (208950000000031-208950000000040). Now we create few more gnbsim instances (4 more for now). We use same script to generate additional instance as follow - +```bash +oai-cn5g-fed/docker-compose$ ./core-network.sh start gnbsim 2 +Creating gnbsim2 ... done +``` +So here basically, minimum configuration parameters that need to change is gnbid, imsi and container ip address in docker-compose-gnbsim.yaml. +Please make sure status of instance is healthy before creating one more instance. Now here we have deployed all 5 gnbsim intances - +```bash +$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +a25174c51297 gnbsim:develop "/gnbsim/bin/entrypo…" 3 minutes ago Up 3 minutes (healthy) gnbsim5 +00c6207b0064 gnbsim:develop "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim4 +ed440f95fb19 gnbsim:develop "/gnbsim/bin/entrypo…" 4 minutes ago Up 4 minutes (healthy) gnbsim3 +8c4e4098955d gnbsim:develop "/gnbsim/bin/entrypo…" 14 minutes ago Up 14 minutes (healthy) gnbsim2 +895b1838c62a gnbsim:develop "/gnbsim/bin/entrypo…" 15 minutes ago Up 15 minutes (healthy) gnbsim +d48135fd045c ubuntu:bionic "/bin/bash -c ' apt …" 16 minutes ago Up 16 minutes oai-ext-dn +5e98a708d12b oai-amf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 38412/sctp oai-amf +c64ae3c7f7c6 oai-spgwu-tiny:gtp-ext-header "/openair-spgwu-tiny…" 16 minutes ago Up 16 minutes (healthy) 2152/udp, 8805/udp oai-spgwu +1cd8319bddb0 oai-smf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp, 8805/udp oai-smf +9cda92a46be4 mysql:5.7 "docker-entrypoint.s…" 16 minutes ago Up 16 minutes (healthy) 3306/tcp, 33060/tcp mysql +cc407925adf2 oai-nrf:develop "/bin/bash /openair-…" 16 minutes ago Up 16 minutes (healthy) 80/tcp, 9090/tcp oai-nrf + +``` +* Let's verify all gnb and ue are registered at our 5G core - +```bash +$ docker logs oai-amf +truncated output +[2021-05-17T12:17:28.539943] [AMF] [amf_app] [info ] +[2021-05-17T12:17:28.539998] [AMF] [amf_app] [info ] |----------------------------------------------------------------------------------------------------------------| +[2021-05-17T12:17:28.540009] [AMF] [amf_app] [info ] |----------------------------------------------------gNBs' information-------------------------------------------| +[2021-05-17T12:17:28.540031] [AMF] [amf_app] [info ] | Index | Status | Global ID | gNB Name | PLMN | +[2021-05-17T12:17:28.540046] [AMF] [amf_app] [info ] | 1 | Connected | 0x400 | | 208, 95 | +[2021-05-17T12:17:28.540056] [AMF] [amf_app] [info ] | 2 | Connected | 0x800 | | 208, 95 | +[2021-05-17T12:17:28.540065] [AMF] [amf_app] [info ] | 3 | Connected | 0xc00 | | 208, 95 | +[2021-05-17T12:17:28.540077] [AMF] [amf_app] [info ] | 4 | Connected | 0x1000 | | 208, 95 | +[2021-05-17T12:17:28.540086] [AMF] [amf_app] [info ] | 5 | Connected | 0x1400 | | 208, 95 | +[2021-05-17T12:17:28.540094] [AMF] [amf_app] [info ] |----------------------------------------------------------------------------------------------------------------| +[2021-05-17T12:17:28.540102] [AMF] [amf_app] [info ] +[2021-05-17T12:17:28.540108] [AMF] [amf_app] [info ] |----------------------------------------------------------------------------------------------------------------| +[2021-05-17T12:17:28.540118] [AMF] [amf_app] [info ] |----------------------------------------------------UEs' information--------------------------------------------| +[2021-05-17T12:17:28.540131] [AMF] [amf_app] [info ] | Index | 5GMM state | IMSI | GUTI | RAN UE NGAP ID | AMF UE ID | PLMN |Cell ID| +[2021-05-17T12:17:28.540146] [AMF] [amf_app] [info ] | 1| 5GMM-REGISTERED| 208950000000031| | 0| 1| 208, 95 | 262160| +[2021-05-17T12:17:28.540169] [AMF] [amf_app] [info ] | 2| 5GMM-REGISTERED| 208950000000032| | 0| 2| 208, 95 | 524304| +[2021-05-17T12:17:28.540185] [AMF] [amf_app] [info ] | 3| 5GMM-REGISTERED| 208950000000033| | 0| 3| 208, 95 | 786448| +[2021-05-17T12:17:28.540197] [AMF] [amf_app] [info ] | 4| 5GMM-REGISTERED| 208950000000034| | 0| 4| 208, 95 |1048592| +[2021-05-17T12:17:28.540211] [AMF] [amf_app] [info ] | 5| 5GMM-REGISTERED| 208950000000035| | 0| 5| 208, 95 |1310736| +[2021-05-17T12:17:28.540219] [AMF] [amf_app] [info ] |----------------------------------------------------------------------------------------------------------------| +[2021-05-17T12:17:28.540227] [AMF] [amf_app] [info ] + +``` +* Finally lets ping UE from external DN node - +```bash +$ docker exec -it oai-ext-dn ping -c 2 12.1.1.2 +PING 12.1.1.2 (12.1.1.2) 56(84) bytes of data. +64 bytes from 12.1.1.2: icmp_seq=1 ttl=64 time=0.416 ms +64 bytes from 12.1.1.2: icmp_seq=2 ttl=64 time=0.763 ms + +--- 12.1.1.2 ping statistics --- +2 packets transmitted, 2 received, 0% packet loss, time 1008ms +rtt min/avg/max/mdev = 0.416/0.589/0.763/0.175 ms +$ docker exec -it oai-ext-dn ping -c 2 12.1.1.3 +PING 12.1.1.3 (12.1.1.3) 56(84) bytes of data. +64 bytes from 12.1.1.3: icmp_seq=1 ttl=64 time=0.328 ms +64 bytes from 12.1.1.3: icmp_seq=2 ttl=64 time=0.620 ms + +--- 12.1.1.3 ping statistics --- +2 packets transmitted, 2 received, 0% packet loss, time 1005ms +rtt min/avg/max/mdev = 0.328/0.474/0.620/0.146 ms +$ docker exec -it oai-ext-dn ping -c 2 12.1.1.4 +PING 12.1.1.4 (12.1.1.4) 56(84) bytes of data. +64 bytes from 12.1.1.4: icmp_seq=1 ttl=64 time=0.408 ms +64 bytes from 12.1.1.4: icmp_seq=2 ttl=64 time=0.694 ms + +--- 12.1.1.4 ping statistics --- +2 packets transmitted, 2 received, 0% packet loss, time 1032ms +rtt min/avg/max/mdev = 0.408/0.551/0.694/0.143 ms +$ docker exec -it oai-ext-dn ping -c 2 12.1.1.5 +PING 12.1.1.5 (12.1.1.5) 56(84) bytes of data. +64 bytes from 12.1.1.5: icmp_seq=1 ttl=64 time=0.289 ms +64 bytes from 12.1.1.5: icmp_seq=2 ttl=64 time=0.233 ms + +--- 12.1.1.5 ping statistics --- +2 packets transmitted, 2 received, 0% packet loss, time 1004ms +rtt min/avg/max/mdev = 0.233/0.261/0.289/0.028 ms +``` + +Last thing is to remove all services - <br/> + +* Undeploy the gnbsim +```bash +/oai-cn5g-fed/docker-compose$ ./core-network.sh stop gnbsim +Stopping service gnbsim ... +Stopping gnbsim ... done +Removing gnbsim ... done +Network demo-oai-public-net is external, skipping +Service gnbsim is stopped +``` + +* Undeploy the core network +```bash +/oai-cn5g-fed/docker-compose$ ./core-network.sh stop nrf +Stopping service nrf ... +Stopping oai-amf ... done +Stopping oai-ext-dn ... done +Stopping oai-smf ... done +Stopping oai-spgwu ... done +Stopping oai-nrf ... done +Stopping mysql ... done +Removing oai-amf ... done +Removing oai-ext-dn ... done +Removing oai-smf ... done +Removing oai-spgwu ... done +Removing oai-nrf ... done +Removing mysql ... done +Network demo-oai-public-net is external, skipping +Service nrf is stopped +``` + diff --git a/docs/images/5gCN_gnbsim.jpg b/docs/images/5gCN_gnbsim.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a143bf56895e114c65ec4d6e48bd8280319c8d43 Binary files /dev/null and b/docs/images/5gCN_gnbsim.jpg differ diff --git a/docs/results/pcap/5gcn-deployment-gnbsim.pcap b/docs/results/pcap/5gcn-deployment-gnbsim.pcap new file mode 100755 index 0000000000000000000000000000000000000000..e3189cb82a4f3f5c623aec52e959fb573ab3499e Binary files /dev/null and b/docs/results/pcap/5gcn-deployment-gnbsim.pcap differ