createOrgGatewayTemplates
POST https://{{host}}/api/v1/orgs/:org_id/gatewaytemplates
Port Usage
Name | Type | Description |
---|---|---|
speed | string | speed, default is auto to automatically negotiate speed |
duplex | string | link connection mode, choices are auto (default), full, and half |
disable_autoneg | bool | if speed and duplex are specified, whether to disable autonegotiation, default is false |
poe_disabled | bool | whether poe is disabled, default is false |
mtu | int | media maximum transmission unit (MTU) is the largest data unit that can be forwarded without fragmentation. The default value is 1514. |
Request Body
{"name"=>"xxx", "type"=>"standalone", "port_config"=>{"ge-0/0/0"=>{"usage"=>"wan", "name"=>"wan0", "critical"=>false, "description"=>"towards ISP", "wan_type"=>"broadband", "ip_config"=>{"type"=>"dhcp", "pppoe_auth"=>"none", "pppoe_username"=>"u13534", "pppoe_password"=>"foryoureyesonly"}, "wan_ext_ip"=>"64.2.4.3", "wan_source_nat"=>{"nat_pool"=>"64.2.4.0/30", "disabled"=>false}, "vpn_paths"=>{"dc1-broadband.data-center"=>{"role"=>"spoke", "bfd_profile"=>"lte", "bfd_use_tunnel_mode"=>true, "traffic_shaping"=>{"enabled"=>true, "max_tx_kbps"=>3000, "class_percentages"=>[80, 10, 9, 1]}, "preference"=>1}}, "traffic_shaping"=>{"enabled"=>true, "class_percentages"=>[80, 10, 9, 1]}, "svr_port_range"=>"60000-60005", "ssr_no_virtual_mac"=>false, "speed"=>"1g", "duplex"=>"full", "disable_autoneg"=>false, "poe_disabled"=>true, "mtu"=>nil, "disabled"=>false, "wan_arp_policer"=>"recommended"}, "cl-1/0/0"=>{"usage"=>"wan", "name"=>"lte", "wan_type"=>"lte", "lte_apn"=>"5ginternet", "lte_auth"=>"none", "lte_username"=>"user1", "lte_password"=>"pass", "ip_config"=>{"type"=>"dhcp"}}, "at-1/0/0"=>{"usage"=>"wan", "name"=>"dsl", "wan_type"=>"dsl", "dsl_type"=>"adsl", "dsl_vpi"=>0, "dsl_vci"=>35, "ip_config"=>{"type"=>"dhcp"}}, "ge-0/0/1-5"=>{"usage"=>"lan", "networks"=>["default", "guest", "pos"], "perserve_dscp"=>true, "port_network"=>"default"}, "ge-0/0/0.5"=>{"usage"=>"wan", "name"=>"mpls", "vlan_id"=>5, "outer_vlan_id"=>nil, "ip_config"=>{"type"=>"dhcp"}, "vpn_paths"=>{"dc1-mpls.data-center"=>{"role"=>"spoke"}}}}, "oob_ip_config"=>{"vlan_id"=>"xxx", "use_mgmt_vrf"=>true, "use_mgmt_vrf_for_host_out"=>false, "node1"=>{"vlan_id"=>"xxx"}}, "ip_configs"=>{"guest"=>{"ip"=>"192.168.70.1", "netmask"=>"/24", "secondary_ips"=>["192.168.50.1/24", "192.168.60.1/26"]}}, "dhcpd_config"=>{"guest"=>{"type"=>"relay", "ip_start"=>"192.168.70.100", "ip_end"=>"192.168.70.200", "gateway"=>"192.168.70.1", "dns_servers"=>["8.8.8.8", "4.4.4.4"], "dns_suffix"=>[".mist.local", ".mist.com"], "servers"=>["11.2.3.4"]}}, "router_id"=>"10.2.1.10", "path_preferences"=>{"dc_path"=>{"strategy"=>"ordered", "paths"=>[{"type"=>"vpn", "name"=>"dc1-broadband.data-center", "wan_name"=>"wan0", "cost"=>10, "disabled"=>false}, {"type"=>"vpn", "name"=>"dc1-mpls.data-center"}, {"type"=>"vpn", "name"=>"dc2-broadband.data-center"}]}, "local_path"=>{"strategy"=>"ecmp", "paths"=>[{"type"=>"wan", "name"=>"wan0"}, {"type"=>"wan", "name"=>"lte"}, {"type"=>"vpn", "name"=>"dc1-mpls.data-center", "internet_access"=>true}]}, "to_spoke"=>{"strategy"=>"ordered", "paths"=>[{"type"=>"vpn", "name"=>"dc1-broadband.data-center", "wan_name"=>"wan0", "disabled"=>true}]}, "local_breakout"=>{"paths"=>[{"type"=>"tunnel", "name"=>"zscalar"}, {"type"=>"wan", "name"=>"wan0"}]}, "customized"=>{"paths"=>[{"type"=>"local", "networks"=>["guest"], "gateway_ip"=>"192.168.30.5", "target_ips"=>["30.1.2.5"]}]}}, "tunnel_provider_options"=>{"jse"=>{"num_users"=>5, "org_name"=>"JSE_ORG1"}, "zscalar"=>{"use_xff"=>false, "enforce_authentication"=>false, "enable_caution"=>false, "enable_aup"=>false, "aup_acceptance_required"=>true, "aup_ssl_proxy"=>false, "aup_expire"=>2, "download_mbps"=>200, "upload_mbps"=>200, "sub_locations"=>[{"name"=>"guest-wifi", "subnets"=>["172.16.8.0/24", "172.16.32.0/23"], "enforce_authentication"=>false, "enable_caution"=>false, "enable_aup"=>false, "aup_acceptance_required"=>true, "aup_ssl_proxy"=>false, "aup_expire"=>2, "download_mbps"=>200, "upload_mbps"=>200}]}}, "tunnel_configs"=>{"zscalar"=>{"provider"=>"zscaler-ipsec", "local_id"=>"{{ SITE_LOCAL_ID }}", "psk"=>"{{ SITE_PRESHARED_KEY }}", "primary"=>{"hosts"=>["63.1.5.3"], "probe_ips"=>["1.1.1.1"], "wan_names"=>["wan0", "wan1"]}, "secondary"=>{"hosts"=>["63.1.5.4"], "probe_ips"=>["2.2.2.2"], "wan_names"=>["wan1", "wan0"]}, "auto_provision"=>{"enabled"=>true, "latlng"=>{"lat"=>37.295833, "lng"=>-122.032946}, "region"=>"auto", "primary"=>{"num_hosts"=>2, "wan_names"=>["wan0", "wan1"]}, "secondary"=>nil}, "mode"=>"active-standby"}, "zscalar-gre"=>{"provider"=>"zscaler-gre", "primary"=>{"hosts"=>["216.66.5.49"], "intern_ips"=>["172.18.58.121"], "probe_ips"=>["172.18.58.122"], "wan_names"=>["wan0", "wan1"]}, "secondary"=>{"hosts"=>["199.168.149.179"], "intern_ips"=>["172.18.58.125"], "probe_ips"=>["172.18.58.126"], "wan_names"=>["wan0", "wan1"]}, "mode"=>"active-standby"}, "jse-ipsec"=>{"provider"=>"jse-ipsec", "local_id"=>"{{ SITE_LOCAL_ID }}", "psk"=>"{{ SITE_PRESHARED_KEY }}", "primary"=>{"hosts"=>["63.1.5.3"], "probe_ips"=>["1.1.1.1"], "remote_ids"=>["abcd@juniper.net"], "wan_names"=>["wan0", "wan1"]}, "secondary"=>{"hosts"=>["63.1.5.4"], "probe_ips"=>["2.2.2.2"], "remote_ids"=>["edfg@juniper.net"], "wan_names"=>["wan1", "wan0"]}, "mode"=>"active-standby"}, "custom-ipsec"=>{"provider"=>"custom-ipsec", "protocol"=>"ipsec", "local_id"=>"{{ SITE_LOCAL_ID }}", "psk"=>"{{ SITE_PRESHARED_KEY }}", "primary"=>{"hosts"=>["63.1.5.4"], "probe_ips"=>["1.1.1.1"], "wan_names"=>["wan0"]}, "secondary"=>{"hosts"=>["63.1.5.3"], "probe_ips"=>["2.2.2.2"], "wan_names"=>["wan0"]}, "mode"=>"active-standby", "version"=>"2", "ike_mode"=>"main", "ike_proposals"=>[{"auth_algo"=>"sha2", "enc_algo"=>"aes256", "dh_group"=>"2"}], "ike_lifetime"=>3600, "ipsec_proposals"=>[{"auth_algo"=>"sha2", "enc_algo"=>"aes256", "dh_group"=>"2"}], "ipsec_lifetime"=>1800, "networks"=>["ntwk", "protected-net"], "probe"=>{"type"=>"icmp", "interval"=>120, "threshold"=>3, "timeout"=>20}}, "custom-gre"=>{"provider"=>"custom-gre", "protocol"=>"gre", "primary"=>{"hosts"=>["216.66.5.49"], "internal_ips"=>["172.18.58.121"], "probe_ips"=>["172.18.58.122"], "wan_names"=>["wan0", "wan1"]}, "secondary"=>{"hosts"=>["199.168.149.179"], "internal_ips"=>["172.18.58.125"], "probe_ips"=>["172.18.58.126"], "wan_names"=>["wan0", "wan1"]}, "mode"=>"active-standby"}}, "idp_profiles"=>{"relaxed"=>{"base_profile"=>"strict", "overwrites"=>[{"matching"=>{"severity"=>["major"], "attack_name"=>["HTTP:INVALID:HDR-FIELD"], "dst_subnet"=>["63.1.2.0/24"]}, "action"=>"alert"}]}}, "service_policies"=>[{"name"=>"DC-APPs", "tenants"=>["pos.store", "camera.store"], "services"=>["dc-apps"], "action"=>"allow", "idp"=>{"enabled"=>true, "idpprofile_id"=>"89b9d208-84a4-fa8f-af57-78f92c639cf2", "profile"=>"strict", "alert_only"=>false}, "appqoe"=>{"enabled"=>true}, "antivirus"=>{"enabled"=>true, "avprofile_id"=>"5cb2e071-cfc5-4231-b5f8-3543e04dfb55", "profile"=>"default"}, "path_preference"=>"dc_path", "ssl_proxy"=>{"enabled"=>true, "ciphers_catagory"=>"strong"}}, {"servicepolicy_id"=>"dbdf808a-5429-51b7-89ac-1b52d7a4b4b5", "name"=>"Cloud Apps", "tenants"=>["pos.store", "camera.store"], "services"=>["cloud-apps"], "path_preference"=>"local_path"}, {"name"=>"Guest", "tenants"=>["guest"], "service"=>["internet"], "path_preference"=>"local_breakout"}, {"name"=>"Mgmt from DC", "tenants"=>["it.datacenter"], "services"=>["store_servers"], "path_preference"=>"customized"}, {"name"=>"local routing", "tenants"=>["corp", "vendor"], "services"=>["ping"], "local_routing"=>true}], "bgp_config"=>{"local"=>{"type"=>"internal", "networks"=>["corp"], "local_as"=>65000, "auth_key"=>"auth-key", "export_policy"=>"export_policy", "import_policy"=>"import_policy", "neighbors"=>{"10.1.10.5"=>{"disabled"=>false}}, "extended_v4_nexthop"=>true}, "attlink"=>{"type"=>"external", "via"=>"wan", "wan_name"=>"wan0", "networks"=>["corp"], "local_as"=>3000, "neighbor_as"=>3105, "auth_key"=>"auth-key", "disable_bfd"=>false, "bfd_minimum_interval"=>1000, "bfd_multiplier"=>3, "hold_time"=>120, "graceful_restart_time"=>240, "neighbors"=>{"63.1.56.3"=>{"neighbor_as"=>500, "multihop_ttl"=>64, "export_policy"=>"neighbor_specific_export_policy", "import_policy"=>"neighbor_specific_import_policy", "hold_time"=>120, "disabled"=>false}}, "no_readvertise_to_overlay"=>false, "export_policy"=>"export_policy", "import_policy"=>"import_policy"}, "vpn1"=>{"via"=>"vpn", "vpn_name"=>"data-center", "import_policy"=>"import_policy", "export_policy"=>"export_policy"}}, "routing_policies"=>{"sample_import_policy"=>{"terms"=>[{"matching"=>{"prefix"=>["192.168.0.0/16-30"], "as_path"=>["65001,65353"], "protocol"=>["direct"], "community"=>["65001:2"], "vpn_path"=>["dc1-broadband"], "vpn_path_sla"=>{"max_latency"=>1500, "max_loss"=>30, "max_jitter"=>nil}, "vpn_neighbor_mac"=>["7d027e0ffcb9"]}, "actions"=>{"accept"=>true, "local_preference"=>"50", "add_target_vrfs"=>["guest"]}}]}, "sample_export_policy"=>{"terms"=>[{"name"=>"export", "matching"=>{"prefix"=>["192.168.0.0/16-30"], "as_path"=>["65001", "65353"], "protocol"=>["direct"], "community"=>["65001:2"], "route_exists"=>[{"route"=>"192.168.0.0/24", "vrf_name"=>"guest"}]}, "actions"=>{"accept"=>true, "community"=>["65003:10"], "add_community"=>["65003:10"], "exclude_community"=>["65003:10"], "prepend_as_path"=>["65003"], "exclude_as_path"=>["65002"], "local_preference"=>"30"}}]}}, "extra_routes"=>{"it_mgmt"=>{"via"=>"10.2.1.1"}, "172.16.3.0/24"=>{"via"=>"10.2.1.1"}}, "gateway_matching"=>{"enable"=>true}, "additional_config_cmds"=>["set snmp community public2"]}