Skip to content

feat(pipelined): Router Advertisement issue fix for 5G UE IPv6#13020

Merged
pshelar merged 13 commits intomagma:masterfrom
prabinakpattnaik:IPv6_Router_Adver_5G
Aug 16, 2022
Merged

feat(pipelined): Router Advertisement issue fix for 5G UE IPv6#13020
pshelar merged 13 commits intomagma:masterfrom
prabinakpattnaik:IPv6_Router_Adver_5G

Conversation

@prabinakpattnaik
Copy link
Copy Markdown
Contributor

@prabinakpattnaik prabinakpattnaik commented Jun 18, 2022

Signed-off-by: prabina pattnaik [email protected]

Summary

Router Advertisement not getting generated for 5G UE IPv6 [Issue ID #12871 ]

Below are functionality supported in this PR:
For 4g and 5g controller ID is different value used.
So, ipv6 solicitation flows are inserted into table 3 with Action value different based on cotroller ID
For 5g, output of table=3:

vagrant@magma-dev-focal:~/magma/lte/gateway$ sudo ovs-ofctl -O OpenFlow13 dump-flows gtp_br0 table=3
 cookie=0x0, duration=52.337s, table=3, n_packets=0, n_bytes=0, priority=10,icmp6,reg1=0x1,ipv6_src=fe80::/10,icmp_type=133 actions=controller(reason=action_set,max_len=0,id=5),CONTROLLER:65535
 cookie=0x0, duration=52.320s, table=3, n_packets=0, n_bytes=0, priority=10,icmp6,reg1=0x1,ipv6_src=fe80::/10,icmp_type=135 actions=controller(reason=action_set,max_len=0,id=5),CONTROLLER:65535
 cookie=0x0, duration=52.318s, table=3, n_packets=0, n_bytes=0, priority=10,icmp6,reg1=0x10,ipv6_dst=ff02::1:ff00:0/104,icmp_type=135 actions=controller(reason=action_set,max_len=0,id=5),CONTROLLER:65535

Need to add GNB IP address in "/etc/network/interfaces.d/gtp" at port gtp0 for sending the Router adverstisemnt message to target device:

        Port gtp0
            Interface gtp0
                type: gtpu
                options: {key=flow, remote_ip="192.168.60.20"}

Test Plan

Using UERANSIM simulator, we have verified this functionality.

Additional Information

Logs:
IP Address Allocated for IPv6:

Jun 17 20:39:21 magma-dev-focal mobilityd[183930]: INFO:root:Allocated IP fdee:5:6c:2db6:dcb0:b4af:481d:1f1 for sid IMSI901700000000001 for apn internet
Jun 17 20:39:21 magma-dev-focal policydb[184001]: INFO:root:Creating a session for subscriber ID: IMSI901700000000001

IPV6SolicitationController logs when received Router Solicitation from UE:

Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:magma.pipelined.openflow.flows:flowmod: version=None,msg_type=None,msg_len=None,xid=None,OFPFlowStatsRequest(cookie=0,cookie_mask=0,flags=0,match=OFPMatch(oxm_fields={}),out_group=4294967295,out_port=4294967295,table_id=14,type=1) (table 14)
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:Received PKT -> on port 32768 tun_id: 2147483647 tun_id_dst: 1
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:ethernet(dst='ff:ff:ff:ff:ff:ff',ethertype=34525,src='02:00:00:00:00:01')
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:ipv6(dst='ff02::2',ext_hdrs=[],flow_label=0,hop_limit=255,nxt=58,payload_length=8,src='fe80::dcb0:b4af:481d:1f1',traffic_class=0,version=6)
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:icmpv6(code=0,csum=41416,data=nd_router_solicit(option=None,res=0),type_=133)
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:Received router solicitation MSG
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:RA pkt response ->
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:ethernet(dst='33:33:00:00:00:01',ethertype=34525,src='08:00:27:eb:e7:39')
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:ipv6(dst='fe80::dcb0:b4af:481d:1f1',ext_hdrs=[],flow_label=0,hop_limit=255,nxt=58,payload_length=0,src='fe80::a00:27ff:fe90:db2c',traffic_class=0,version=6)
Jun 17 20:42:38 magma-dev-focal pipelined[184051]: DEBUG:IPV6SolicitationController:icmpv6(code=0,csum=0,data=nd_router_advert(ch_l=255,options=[nd_option_sla(data=None,hw_src='08:00:27:eb:e7:39',length=0), nd_option_pi(length=0,pl=64,pre_l=4294967295,prefix='fdee:5:6c:2db6::',res1=6,res2=0,val_l=4294967295)],rea_t=0,res=0,ret_t=0,rou_l=65535),type_=134)

@prabinakpattnaik prabinakpattnaik requested review from a team June 18, 2022 14:04
@prabinakpattnaik prabinakpattnaik requested a review from a team as a code owner June 18, 2022 14:04
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines. label Jun 18, 2022
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: agw Access gateway-related issue label Jun 18, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 18, 2022

Oops! Looks like you failed the Python Format Check.

Howto

♻️ Updated: ✅ The check is passing the Python Format Check after the last commit.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 18, 2022

dp-workflow

13 tests   13 ✔️  2m 46s ⏱️
  1 suites    0 💤
  1 files      0

Results for commit 9be14cb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 18, 2022

feg-workflow

    2 files  203 suites   40s ⏱️
374 tests 374 ✔️ 0 💤 0
388 runs  388 ✔️ 0 💤 0

Results for commit 9be14cb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 18, 2022

cloud-workflow

1 009 tests   1 009 ✔️  2m 12s ⏱️
   356 suites         0 💤
       7 files           0

Results for commit 9be14cb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 18, 2022

agw-workflow

615 tests   611 ✔️  3m 46s ⏱️
    2 suites      4 💤
    2 files        0

Results for commit 9be14cb.

♻️ This comment has been updated with latest results.

@pull-request-size pull-request-size bot added size/XL Denotes a Pull Request that changes 500-999 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Jun 18, 2022
@github-actions github-actions bot added the component: orc8r Orchestrator-related issue label Jun 18, 2022
Copy link
Copy Markdown
Contributor

@nstng nstng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will continue when first set of comments is addressed.

Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py Outdated
Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py
Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py Outdated
Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py Outdated
Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py Outdated
Comment thread lte/gateway/python/magma/pipelined/app/ipv6_solicitation.py Outdated
ipv6_src=ipv6_src,
ll_addr=config_dict['virtual_mac'],
prefix_len=self.DEFAULT_PREFIX_LEN,
ng_service_enabled=ng_service,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ng_service_enabled True is not tested in test_ipv6_solicitation. Does a test make sense here? What is expected if it is True, but classifier_controller_id is not set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The classifier_controller_id value set to 5 in pipelined.yml.
This value used for 5G RYU controller set value for packetIN events.

Comment thread lte/gateway/python/magma/pipelined/tests/test_ipv6_solicitation.py
@prabinakpattnaik prabinakpattnaik force-pushed the IPv6_Router_Adver_5G branch 2 times, most recently from 4bbb4df to dc9aa5f Compare June 28, 2022 13:40
self.uplink_port_name,
)
else:
self._uplink_port = OFPP_LOCAL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is trying to implement two different functionality.

  1. Non-NAT
  2. Add support for IPv6.

Please separate it in two separate PRs with its own unit tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pshelar , we have fixed it as per your suggestion.

  1. Created PR Support for Non-NAT mode in 5G-SA feat(pipelined): Support for Non-NAT mode in 5G-SA #13288 and merged into master.
  2. Rebased with master and added UT for ipv6 solicitation
    python/magma/pipelined/tests/test_ipv6_solicitation_5g.py

We have verified with UERANSIM for below functionality and along with end-to-end traffic flows:
Router Solicitation
Router Advertisement
IPv6 traffic with TCP.

Attached logs and pcap file for same.

tc2.txt
IPv6_Traffic_flows.zip

@panyogesh panyogesh requested a review from pshelar July 25, 2022 08:16
far_rule = FARRuleEntry(
far_entry.far_action_to_apply[0],
o_teid, fwd_gnb_ip_addr,
fwd_gnb_ip_addr,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Argument 2 to "FARRuleEntry" has incompatible type "Optional[Any]"; expected "str" [arg-type]

@prabinakpattnaik prabinakpattnaik requested a review from a team August 11, 2022 19:24
@maxhbr
Copy link
Copy Markdown
Member

maxhbr commented Aug 11, 2022

please rebase and fix Bazel Build & Test

@prabinakpattnaik
Copy link
Copy Markdown
Contributor Author

@pshelar , @maxhbr , now all required checks are passed and fixed the rebase check as well. Could you please push the changes into master.

@nstng nstng self-requested a review August 16, 2022 12:45
Copy link
Copy Markdown
Contributor

@nstng nstng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel changes lgtm

Copy link
Copy Markdown
Contributor

@GANESH-WAVELABS GANESH-WAVELABS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sessiond Changes LGTM

@pshelar pshelar merged commit 02aa0bb into magma:master Aug 16, 2022
github-actions bot pushed a commit that referenced this pull request Aug 17, 2022
* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

Signed-off-by: prabina pattnaik <[email protected]>
(cherry picked from commit 02aa0bb)
@github-actions
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
v1.8

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

maxhbr pushed a commit that referenced this pull request Aug 17, 2022
… (#13632)

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

* feat(pipelined): Router Advertisement issue fix for 5G UE IPv6

Signed-off-by: prabina pattnaik <[email protected]>

Signed-off-by: prabina pattnaik <[email protected]>
(cherry picked from commit 02aa0bb)

Co-authored-by: prabinakpattnaik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apply-v1.8 backported-v1.8 component: agw Access gateway-related issue component: orc8r Orchestrator-related issue size/XL Denotes a Pull Request that changes 500-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants