Showing results for 
Search instead for 
Did you mean: 
Join Customer Connection to register!

2 WAN ips on a single server


I have a single DL 380 G5 server with 2 NIC , i have 2 applications which run on 2 separate WAN static ip addresses

my query is that can i install both the applications on a single server ?

secondly can i assign 2 different WAN static ips on the 2 NIC of the same server ?

if yes then how it will be done i.e whether gateway will be given to both the NIC or only a single one

Harish Balakrishnan

Hello Rahul,

To my knowledge you can use 2 WAN IP's in 2 LAN cards, but you can not have 2 default gateway. What best you can do is, you can install both the applicaton in the same server ( i hope they are using different ports) then you can give a private IP on the server and do a NAT/Port forwarding on the upstream device




Depending on the operating system you could be creating subinterfaces on the server. Each interface can be assigned its own IP address and gateway.

Thanks for the reply...

actually my both applications are mapped to static wan ip addresses thts why there is a limitation to use only them , and i too am concerned about the same issue that if i can assign separate ips on 2 NIC of the same server ...i can give gateway in only one of them.

Dont know then it will work or not

In Linux for example you can configure eth0 and eth0.1 to have completely separate configurations. Including the gateway. The only thing you would have to keep in mind is that the switchport allows communication from both vlans. In that case the server should support 802.1q tagging and tag the traffic with the correct vlan. The switchport should be configured as a trunk.

However, when both IP addresses are in the same vlan this isn't necessary. You would be able to configure the interfaces with their gateway. In this case it shouldn't even matter whether you could configure the gateway for each subinterface individually as it's the same.


Hi Rahul,

If both the WAN IP's are in the same subnet, you can assign a secondary address to the NIC, giving you two addresses on one interface.



HTH Paul ****Please rate useful posts****

no both wan ips are in different subnets.and both of them have 2 different applications connected to them.

is it possible to configure two different wan ips on two NIC of a single server , if yes then gateway can be assigned to both of them or only as single card ???

Guess, tow different applications are working on single server thats why you have configured two different NIC on same server, but question is how WAN IP connected directly from ISP to Server, is this via Router / Firewall?

guessing is, it might connected via Router/Firewall, and if so then use Private IP on server and do the NAT/PAT on Router/Firewall for two different ISPs with Servers Private IP.

Hi Rahul,

If an interface does not have a default gateway then it can not communicate with devices outside of it's local subnet. So if you only put a default gateway on one NIC, the NIC that does not have the default gateway can not communicate with the outside world.

You would need to assign private IP addresses to the NICs and use NAT on an upstream router/firewall if you want to use WAN IPs from a different subnet.



HTH Paul ****Please rate useful posts****

You can use Virtual Machines. Create two VMs on your server - run an app on each.

Linux server can be configured as a router. If traffic is mostly incoming to your server, you don't have to worry about traffic leaving the server as it would use correct source. For connections originated from server you will need to make sure they pick correct source address.


2 many replies thanks to all

But let me clear my scenario

We have 4 servers with four different applications all of them having 4 static WAN ips. the cables for each ip are connected to the NICs directly.

Now we want to configure all 4 applications in a single server , but that server has 2 NICs

So how can i configure all 4 applications to work in a single server with 2 NICs

is it possible or not ??

My server is windows

You can configure multiple IP addresses on a Windows server and multiple default gateways (although Windows may warn you that multiple default gateways are not recommended).

Go to network settings, TCP/IP (make sure you have assigned a manual IP address, then the Advanced button.  You will then be able to configure multiple IPs and DGs.  I cannot tell you the exact buttons to press as it depends on your version of Windows.

However, you will then need to use the route add command (from a command prompt) to force the correct destination network out of the correct default gateway - otherwise Windows will not know which DG to use for a network not on its subnet.  Make sure that you use the -p option to make the route permanent.