# SRv6のパケット観察記録 ![](https://i.imgur.com/UppiCwl.png) こんな感じで設定 ```spec.yml preinit: - cmds: - cmd: modprobe vrf nodes: - name: R1 image: nicolaka/netshoot docker_run_extra_args: --entrypoint bash volume: /tmp/tinet sysctls: - sysctl: net.vrf.strict_mode=1 - sysctl: net.ipv4.ip_forward=1 - sysctl: net.ipv4.conf.all.rp_filter=0 - sysctl: net.ipv4.conf.default.rp_filter=0 - sysctl: net.ipv6.conf.all.forwarding=1 - sysctl: net.ipv6.conf.all.disable_ipv6=0 - sysctl: net.ipv6.conf.all.seg6_enabled=1 - sysctl: net.ipv6.conf.default.forwarding=1 - sysctl: net.ipv6.conf.default.disable_ipv6=0 - sysctl: net.ipv6.conf.default.seg6_enabled=1 interfaces: - { name: net10, type: direct, args: R2#net10 } - { name: net2, type: direct, args: HostA1#net0 } - name: R2 image: nicolaka/netshoot docker_run_extra_args: --entrypoint bash volume: /tmp/tinet sysctls: - sysctl: net.vrf.strict_mode=1 - sysctl: net.ipv4.ip_forward=1 - sysctl: net.ipv4.conf.all.rp_filter=0 - sysctl: net.ipv4.conf.default.rp_filter=0 - sysctl: net.ipv6.conf.all.forwarding=1 - sysctl: net.ipv6.conf.all.disable_ipv6=0 - sysctl: net.ipv6.conf.all.seg6_enabled=1 - sysctl: net.ipv6.conf.default.forwarding=1 - sysctl: net.ipv6.conf.default.disable_ipv6=0 - sysctl: net.ipv6.conf.default.seg6_enabled=1 interfaces: - { name: net10, type: direct, args: R1#net10 } - { name: net2, type: direct, args: HostA2#net0 } - name: HostA1 image: nicolaka/netshoot docker_run_extra_args: --entrypoint bash interfaces: - { name: net0, type: direct, args: R1#net2 } - name: HostA2 image: nicolaka/netshoot docker_run_extra_args: --entrypoint bash interfaces: - { name: net0, type: direct, args: R2#net2 } node_configs: - name: R1 cmds: - cmd: ip addr add 2001:13::1/64 dev net10 - cmd: ip addr add 192.168.0.1/24 dev net2 - cmd: ip link add CUST-A type vrf table 10 - cmd: ip link set CUST-A up - cmd: ip link set net2 vrf CUST-A - cmd: ip route add fc00:2::/64 via 2001:13::2 dev net10 - cmd: ip route add fc00:1::10/128 encap seg6local action End.DT4 vrftable 10 dev CUST-A - cmd: ip route add 192.168.1.0/24 vrf CUST-A nexthop encap seg6 mode encap segs fc00:2::10 dev net10 - name: R2 cmds: - cmd: ip addr add 2001:13::2/64 dev net10 - cmd: ip addr add 192.168.1.1/24 dev net2 - cmd: ip link add CUST-A type vrf table 10 - cmd: ip link set CUST-A up - cmd: ip link set net2 vrf CUST-A - cmd: ip route add fc00:1::10 via 2001:13::1 dev net10 - cmd: ip route add fc00:2::10/128 encap seg6local action End.DT4 vrftable 10 dev CUST-A - cmd: ip route add 192.168.0.0/24 vrf CUST-A nexthop encap seg6 mode encap segs fc00:1::10 dev net10 - name: HostA1 cmds: - cmd: ip addr add 192.168.0.2/24 dev net0 - cmd: ip route add default via 192.168.0.1 - name: HostA2 cmds: - cmd: ip addr add 192.168.1.2/24 dev net0 - cmd: ip route add default via 192.168.1.1 ``` R1側 ![](https://i.imgur.com/rll90TS.png) R2側 dst addrがR2のlocatorになってる ![](https://i.imgur.com/DgCh4My.png)