Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection information - change destination of packet #176

Open
devappforthebest opened this issue Aug 27, 2021 · 2 comments
Open

Redirection information - change destination of packet #176

devappforthebest opened this issue Aug 27, 2021 · 2 comments

Comments

@devappforthebest
Copy link

Hello,

Currently we are using upg-vpp for our project.
Our objective is to change the destination of package by setting the redirect information to an IP x.x.x.x (given). However, in packet trace it is still forwarded to default gateway

My question is:
Are we expected to change destination of UE packet or UPF will handle it ?

Please find below the upf session info and packet trace for more information.

===== UPF Session Info ======

# ./vppctl show upf session
CP F-SEID: 0x0000000000000001 (1) @ 192.168.71.133
UP F-SEID: 0x0000000000000001 (1) @ 192.168.71.202
  PFCP Association: 8
  TEID assignment per choose ID
PDR: 1 @ 0x7f14f00e4a10
  Precedence: 0
  PDI:
    Fields: 0000000d
    Source Interface: Access
    Network Instance: access.oai.org
    Local F-TEID: 1067576152 (0x3fa1eb58)
            IPv4: 192.168.72.202
    UE IP address (source):
      IPv4 address: 12.1.1.2
    SDF Filter [1]:
      permit out ip from any to assigned 
  Outer Header Removal: GTP-U/UDP/IPv4
  FAR Id: 1
  URR Ids: [1] @ 0x7f14f00c2670
  QER Ids: [] @ 0x0
PDR: 2 @ 0x7f14f00e4a90
  Precedence: 0
  PDI:
    Fields: 0000000c
    Source Interface: SGi-LAN
    Network Instance: sgi.oai.org
    UE IP address (destination):
      IPv4 address: 12.1.1.2
    SDF Filter [1]:
      permit out ip from assigned to assigned 
  Outer Header Removal: no
  FAR Id: 2
  URR Ids: [] @ 0x0
  QER Ids: [] @ 0x0
FAR: 1
  Apply Action: 00000002 == [FORWARD]
  Forward:
    Network Instance: sgi.oai.org
    Destination Interface: 2
    Redirect Information: IPv4 to 3.2.3.9
FAR: 2
  Apply Action: 00000002 == [FORWARD]
  Forward:
    Network Instance: access.oai.org
    Destination Interface: 0
    Outer Header Creation: [GTP-U/UDP/IPv4],TEID:9acb0442,IP:192.168.72.141
URR: 1
  Measurement Method: 0002 == [VOLUME]
  Reporting Triggers: 0000 == []
  Status: 0 == []
  Start Time: 2021/08/27 15:13:12:406
  vTime of First Usage:       0.0000 
  vTime of Last Usage:        0.0000 
  Volume
    Up:    Measured:                  252, Theshold:                    0, Pkts:          3
           Consumed:                  252, Quota:                       0
    Down:  Measured:                    0, Theshold:                    0, Pkts:          0
           Consumed:                    0, Quota:                       0
    Total: Measured:                  252, Theshold:                    0, Pkts:          3
           Consumed:                  252, Quota:                       0

===== Packet Trace =====

04:18:20:254118: af-packet-input
  af_packet: hw_if_index 3 next-index 4
    tpacket2_hdr:
      status 0x20000009 len 142 snaplen 142 mac 66 net 80
      sec 0x6128e524 nsec 0x39dcee12 vlan 0 vlan_tpid 0
04:18:20:254121: ethernet-input
  IP4: 02:42:c0:a8:48:8d -> 02:fe:b1:16:c5:82
04:18:20:254122: ip4-input
  UDP: 192.168.72.141 -> 192.168.72.202
    tos 0x00, ttl 64, length 128, checksum 0xe75a dscp CS0 ecn NON_ECN
    fragment id 0x406a, flags DONT_FRAGMENT
  UDP: 2152 -> 2152
    length 108, checksum 0x0000
04:18:20:254124: ip4-lookup
  fib 2 dpo-idx 13 flow hash: 0x00000000
  UDP: 192.168.72.141 -> 192.168.72.202
    tos 0x00, ttl 64, length 128, checksum 0xe75a dscp CS0 ecn NON_ECN
    fragment id 0x406a, flags DONT_FRAGMENT
  UDP: 2152 -> 2152
    length 108, checksum 0x0000
04:18:20:254126: ip4-local
    UDP: 192.168.72.141 -> 192.168.72.202
      tos 0x00, ttl 64, length 128, checksum 0xe75a dscp CS0 ecn NON_ECN
      fragment id 0x406a, flags DONT_FRAGMENT
    UDP: 2152 -> 2152
      length 108, checksum 0x0000
04:18:20:254127: ip4-udp-lookup
  UDP: src-port 2152 dst-port 2152
04:18:20:254129: upf-gtpu4-input
  GTPU decap from gtpu_session0 teid 0x3fa1eb58 next 1 error 0
04:18:20:254131: upf-ip4-flow-process
  upf_session0 cp-seid 0x0000000000000001
  FlowInfo - sw_if_index 3, next_index = 2
  proto 0x1, 12.1.1.2:0 <-> 192.168.73.135:0, seid 0x0000000000000001
  00000000: 01000000000000000000000000000000000000000c0101020000000000000000
  00000020: 00000000c0a849870000000001000000
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 64, length 84, checksum 0x46c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
04:18:20:254141: upf-ip4-input
  upf_session0 cp-seid 0x0000000000000001 pdr 1 far 1
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 64, length 84, checksum 0x46c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
04:18:20:254142: upf-ip4-forward
  upf_session0 cp-seid 0x0000000000000001 pdr 1 far 1
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 64, length 84, checksum 0x46c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
04:18:20:254144: ip4-input
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 64, length 84, checksum 0x46c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
04:18:20:254144: ip4-lookup
  fib 1 dpo-idx 8 flow hash: 0x00000000
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 64, length 84, checksum 0x46c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
04:18:20:254146: ip4-rewrite
  tx_sw_if_index 1 dpo-idx 8 : ipv4 via 192.168.73.135 host-sgi: mtu:1500 next:5 0242c0a8498702feaa11fe200800 flow hash: 0x00000000
  00000000: 0242c0a8498702feaa11fe200800450000541cb200003f0147c50c010102c0a8
  00000020: 49870000f1f5021f000324e5286100000000f1ce0e00000000001011
04:18:20:254146: host-sgi-output
  host-sgi 
  IP4: 02:fe:aa:11:fe:20 -> 02:42:c0:a8:49:87
  ICMP: 12.1.1.2 -> 192.168.73.135
    tos 0x00, ttl 63, length 84, checksum 0x47c5 dscp CS0 ecn NON_ECN
    fragment id 0x1cb2
  ICMP echo_reply checksum 0xf1f5 id 543
@mgumz
Copy link

mgumz commented Jul 4, 2022

@devappforthebest is the issue still reproducable for you?

@RoadRunnr
Copy link
Member

Only Redirect Address Type 2 (URL) is supported and only for HTTP traffic either on port 80 or detected with an ADF rule.

Plain IPv4 or IPv6 redirect targets are not supported, nor is SIP URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants