I use free5gc n3iwf to link to our core, and use free5gc ue simulator TestNon3GPPUE in non3gpp_test.go, now the ue registration and pdu session establishment is passed, I will do icmp ping to remote DN.
Bu the ping is failed, I see that in TestNon3GPPUE, create gre tunnel 0 interface, and allocate the UE ip to it, and I follow the same method, but looks like invalid.
The ping gtp(icmp) not send out, since I have not capture the ping echo request, I do not know why. I chenged the non3gpp_test.go like this:
// Set GRE interface up
if err := netlink.LinkSetUp(linkGRE); err != nil {
t.Fatal(err)
}
// Add route
upRoute := &netlink.Route{
LinkIndex: linkGRE.Attrs().Index,
Dst: &net.IPNet{
IP: net.IPv4zero,
Mask: net.IPv4Mask(0, 0, 0, 0),
},
}
t.Logf("#### upRoute: %+v", upRoute)
if err := netlink.RouteAdd(upRoute); err != nil {
t.Fatal(err)
}
defer func() {
_ = netlink.LinkSetDown(linkGRE)
_ = netlink.LinkDel(linkGRE)
}()
// Ping remote, remote ip mask is configured in UPF???
pinger, err := ping.NewPinger("172.20.231.101")
if err != nil {
t.Fatal(err)
}