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

end function on last host with inline srv6 option #2

Open
guimvmatos opened this issue Feb 6, 2021 · 0 comments
Open

end function on last host with inline srv6 option #2

guimvmatos opened this issue Feb 6, 2021 · 0 comments

Comments

@guimvmatos
Copy link

Hi, @skorpion17 @StefanoSalsano @cl4u2 @pierpaolo-loreti

I have four hosts with a srv6 inline route.
Host 1 (RAN) -> ip -6 route add fc00::4 encap seg6 mode inline segs fcf0:12::100,fcf0:23::6006 dev enp0s8
Host 2 (NVF1) -> ip -6 route add fcf0:12::100 encap seg6local action End dev enp0s8
Host 3 (NVF2) -> ip -6 route add fcf0:23::6006 encap seg6local action End dev enp0s8
Host 4 (UPF) -> ip -6 route add fc00::4 encap seg6local action ???

If i ping host 4 from host 1, this packet pass through host 2 and 3, and then stop at host 4 with segment left=0 and destination address = fc00::4, that is correct. But I dont know how to desencapsute this packet. .

Below, the complete settings.

#######################

host_1 (RAN)#####

#######################
ip link set dev lo up
ip -6 addr add fc00::1/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p

ip -6 route add fcf0:12::100 via fc00::2
ip -6 route add fc00::4 encap seg6 mode inline segs fcf0:12::100,fcf0:23::6006 dev enp0s8

##################

host_2

##################
ip link set dev lo up
ip -6 addr add fc00::2/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p
ip -6 route add fcf0:23::6006 via fc00::3
ip -6 route add fcf0:12::100 encap seg6local action End dev enp0s8

##################

host_3

##################
ip link set dev lo up
ip -6 addr add fc00::3/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p
ip -6 route add fcf0:23::6006 encap seg6local action End dev enp0s8
ip6tables -t mangle -A POSTROUTING -p icmpv6 --icmpv6-type redirect -j DROP

##################

host_4

##################
ip link set dev lo up
ip -6 addr add fc00::4/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p

ip -6 route add fc00::4 encap seg6local action ???

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

1 participant