Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
JimmyKhern
New Contributor

How to set wan ip to always uses wan1 ip address

Hi All,

 

I have dual wan setup on my fortigate. Is there a way to set the "WAN IP" in the system information that always uses wan1 or wan2 ip? Thanks

 

regards

Jimmy

1 Solution
DPadula
Staff
Staff

Hi JimmyKhern,

 

There is, you just need to change the priority of one of the defaults routes. The article: Technical Note : Setting priority on static default routes to create a primary (preferred) and a sec... explain how to do that.

If the solution is what you are looking for, mark the topic as solved to help other members to find the same article.

 

Regards

DPadula

View solution in original post

5 REPLIES 5
dingjerry_FTNT

Hi @JimmyKhern 

 

Could you please show the outputs of this command?

 

# get router info routing-table all

 

You don't have to show all if the table is really long.  I just need the info with the default routes.

Regards,

Jerry
JimmyKhern
New Contributor

Hi @dingjerry_FTNT,

 

Below will be the info. Thanks

 

get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
V - BGP VPNv4
* - candidate default

Routing table for VRF=0
S* 0.0.0.0/0 [1/0] via 118.200.25.254, wan1, [1/0]
[1/0] via 129.126.196.1, wan2, [1/0]
C 118.200.25.0/24 is directly connected, wan1
C 129.126.196.0/24 is directly connected, wan2

 

regards

 

dingjerry_FTNT

Hi @JimmyKhern ,

 

Your two default routes have the same distance and the same priority.

 

If you do not want to change the priority, you may try the following:

 

config system fortiguard

set source-ip x.x.x.x  // This is your wan1 interface IP

end

 

Regards,

Regards,

Jerry
DPadula
Staff
Staff

Hi JimmyKhern,

 

There is, you just need to change the priority of one of the defaults routes. The article: Technical Note : Setting priority on static default routes to create a primary (preferred) and a sec... explain how to do that.

If the solution is what you are looking for, mark the topic as solved to help other members to find the same article.

 

Regards

DPadula

JimmyKhern
New Contributor

Thanks everyone for your help.

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors