{"id":1553,"date":"2018-04-29T20:43:16","date_gmt":"2018-04-29T12:43:16","guid":{"rendered":"https:\/\/networkingnotesblog.wordpress.com\/?p=1553"},"modified":"2018-04-29T20:43:16","modified_gmt":"2018-04-29T12:43:16","slug":"ipv6-over-ipv4-in-srx","status":"publish","type":"post","link":"http:\/\/notes4it.com\/?p=1553","title":{"rendered":"IPv6 over IPv4 in SRX"},"content":{"rendered":"<p>IPv6 is another up coming trend on the internet. Since most of the ISPs do not provide the IPv6 service, how do we enjoy or experience the IPv6 benefit??<br \/>\nThere are some IPv6 brokers on the internet that we can use IPv6 service over the existing IPv4 service. Some of the brokers are Hurricane Electric, Hinet, and etc&#8230;.<br \/>\nThere are some sample setup guide are already included in their website already, but their guide makes the SRX to route the IPv6 packets without policy restrictions capability. So I will attach mine as a reference for using IPv6 in flow mode.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-1563 aligncenter\" src=\"https:\/\/networkingnotesblog.files.wordpress.com\/2018\/04\/srx-ipip.png\" alt=\"SRX-IPIP\" width=\"363\" height=\"303\" srcset=\"http:\/\/notes4it.com\/wp-content\/uploads\/2018\/04\/srx-ipip.png 363w, http:\/\/notes4it.com\/wp-content\/uploads\/2018\/04\/srx-ipip-300x250.png 300w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><br \/>\n<!--more--><\/p>\n<table>\n<tbody>\n<tr>\n<th>Syntax<\/th>\n<th>definition<\/th>\n<\/tr>\n<tr>\n<td>set security forwarding-options family inet6 mode flow-based<\/td>\n<td>This command is to enable IPv6 support under the SRX. Although most of the sample config suggest to route mode, but we can use flow mode with 6in4.<br \/>\nApplying this requires a reboot!!!<\/td>\n<\/tr>\n<tr>\n<td>set interfaces ip-0\/0\/0 unit 0 tunnel source 138.19.XXX.XXX<br \/>\nset interfaces ip-0\/0\/0 unit 0 tunnel destination 209.51.161.14<br \/>\nset interfaces ip-0\/0\/0 unit 0 family inet6 address 2001:470:<span style=\"color:#ff0000;\">1f06<\/span>:XXXX::2\/64<\/td>\n<td>The tunnel source is the SRX external IPv4 address.<br \/>\nThe destination is the HE.net IPv6 broker IPv4 address.<br \/>\nThe IPv6\u00a0 address is the subnet used for the IP IP tunnel.<\/td>\n<\/tr>\n<tr>\n<td>set interfaces ge-0\/0\/3 unit 0 description &#8220;guest vlan &#8211; 172.16.2.64\/27&#8221;<br \/>\nset interfaces ge-0\/0\/3 unit 0 family inet address 172.16.2.65\/27<br \/>\nset interfaces ge-0\/0\/3 unit 0 family inet6 address 2001:470:<span style=\"color:#ff0000;\">1f07<\/span>:XXXX::0041\/123<\/td>\n<td>The ge-0\/0\/3 is the interface for my guest vlan at home.<br \/>\nThis IPv6 address is using another route-able subnet provided by HE.net, and we can notice the different of this subnet is not part of the subnet that is being used in the IP IP tunnel.<br \/>\nThe tunnel is using 1f06, but the guest vlan is using 1f07 as highlighted in red.<\/td>\n<\/tr>\n<tr>\n<td>set routing-options <span style=\"color:#ff0000;\">rib inet6.0<\/span> static route ::\/0 next-hop 2001:470:1f06:XXXX::1<\/td>\n<td>This is the default route for inet.6, aka IPv6. However, the static route needs to be applied into the inet6.0 table, therefore we have to apply the static route under &#8220;<span style=\"color:#ff0000;\">rib inet6.0<\/span>&#8220;.<\/td>\n<\/tr>\n<tr>\n<td>set access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 prefix 2001:470:1f07:XXXX::0040\/123<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 range vlan36-Guest-pool low 2001:470:1f07:XXXX::0043\/128<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 range vlan36-Guest-pool high 2001:470:1f07:XXXX::004f\/128<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 dhcp-attributes maximum-lease-time 120<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 dhcp-attributes grace-period 3600<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 dhcp-attributes dns-server 2001:4860:4860::8888<br \/>\nset access address-assignment pool vlan36-Guest-pool-ipv6-pool family inet6 dhcp-attributes dns-server 2001:4860:4860::8844set security zones security-zone guest interfaces ge-0\/0\/3.0 host-inbound-traffic system-services dhcpv6<\/td>\n<td>This is the IPv6 DHCP setup for my guest vlan, and we have allowed the machines under guest zone to take obtain IPv6 addresses via DHCPv6 .<\/td>\n<\/tr>\n<tr>\n<td>set security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp match source-address any<br \/>\nset security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp match destination-address any<br \/>\nset security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp match application junos-icmp6-all<br \/>\nset security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp then permit<br \/>\nset security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp then log session-init<br \/>\nset security policies from-zone guest to-zone untrust policy 05-guest_to_untrust-icmp then log session-close<\/td>\n<td>This is a sample policy for IPv6. The any being used in both source and destination includes IPv4 and IPv6.<\/td>\n<\/tr>\n<tr>\n<td>set security zones security-zone untrust interfaces ip-0\/0\/0.0 host-inbound-traffic system-services ping<\/td>\n<td>This is to assign the IP-0\/0\/0.0 into the untrust zone.<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I have attached the snapshot of the traceroute to yahoo.com s IPv6 address. The latency of the traceroute is quite high since my SRX is in Hong Kong and the tunnel terminated in New York.<\/p>\n<table>\n<tbody>\n<tr>\n<td>traceroute to yahoo.com (2001:4998:58:1836::10) from 2001:470:1f07:XXXX::42, 30 hops max, 24 byte packets<br \/>\n1 2001:470:1f07:XXXX::41 9.41 ms 43.74 ms 12.935 ms<br \/>\n2 2001:470:1f07:XXXX::ffff:fffc 2.594 ms 13.369 ms 3.548 ms<br \/>\n3 2001:470:1f06:XXXX::1 260.973 ms 255.072 ms 250.282 ms<br \/>\n4 2001:470:0:5d::1 246.005 ms 245.525 ms 245.68 ms<br \/>\n5 2001:504:f::18 247.207 ms 302.59 ms 247.257 ms<br \/>\n6 2001:4998:f023:207:: 314.722 ms 266.338 ms 258.913 ms<br \/>\n7 2001:4998:f023:201::1 257.497 ms 277.118 ms 264.542 ms<br \/>\n8 2001:4998:124:fc05::1 259.676 ms 267.003 ms 258.725 ms<br \/>\n9 2001:4998:58:f809::1 271.751 ms 265.128 ms 260.707 ms<br \/>\n10 2001:4998:58:1836::10 265.884 ms 261.349 ms 260.75 ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The traceroute from SRX to yahoo.com IPv6.<\/p>\n<table>\n<tbody>\n<tr>\n<td>awong@SRX12-Gateway&gt; traceroute no-resolve yahoo.com<br \/>\ntraceroute6: Warning: yahoo.com has multiple addresses; using 2001:4998:58:1836::10<br \/>\ntraceroute6 to yahoo.com (2001:4998:58:1836::10) from 2001:470:1f06:XXXX::2, 64 hops max, 12 byte packets<br \/>\n1 2001:470:1f06:XXXX::1 269.804 ms 262.395 ms 257.647 ms<br \/>\n2 2001:470:0:5d::1 285.519 ms 247.535 ms 267.457 ms<br \/>\n3 2001:504:f::18 268.754 ms 266.716 ms 255.840 ms<br \/>\n4 2001:4998:f023:204:: 257.244 ms 293.790 ms 2001:4998:f023:207:: 266.000 ms<br \/>\n5 2001:4998:f023:20b::1 265.909 ms 2001:4998:f023::1 285.568 ms 2001:4998:f023:203::1 269.768 ms<br \/>\n6 2001:4998:58:fc1a::1 275.205 ms 2001:4998:58:fe1e::1 265.732 ms 2001:4998:124:fc05::1 292.157 ms<br \/>\n7 2001:4998:58:fa09::1 259.627 ms 2001:4998:58:19f9::1 265.526 ms 2001:4998:58:fa09::1 285.432 ms<br \/>\n8 2001:4998:58:1836::10 270.869 ms 266.211 ms 265.356 ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IPv6 is another up coming trend on the internet. Since most of the ISPs do not provide the IPv6 service, how do we enjoy or experience the IPv6 benefit?? There are some IPv6 brokers on the internet that we can use IPv6 service over the existing IPv4 service. Some of the brokers are Hurricane Electric, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[9,46,51,81,86,87,94,169],"class_list":["post-1553","post","type-post","status-publish","format-standard","hentry","category-networking","tag-6in4-en","tag-firewall-en","tag-flow-mode-en","tag-ip-ip-tunnel-en","tag-ipv6-en","tag-ipv6-over-ipv4-tunnel-en","tag-junos-en","tag-srx-en"],"_links":{"self":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts\/1553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1553"}],"version-history":[{"count":0,"href":"http:\/\/notes4it.com\/index.php?rest_route=\/wp\/v2\/posts\/1553\/revisions"}],"wp:attachment":[{"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1553"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/notes4it.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}