cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
551
Views
5
Helpful
4
Replies

is this scenario possible ? - services on host with 2 different IP

SJ K
Level 5
Level 5

Hi guys,

 

I am thinking of a scenario whereby there is a host computer (running linux or window) accessible via 2 different IP (each set on 2 different interfaces/NIC) whereby will there be any issues in terms of using different src addresses when responding back to requests as well as using different gateway for routing the packets

 

Assuming i am running a webservice (port 80) on the computer, 

 

q1) can i access the web service via either x.x.x.x:80  or y.y.y.y:80   (x.x.x.x = ip 1 and y.y.y.y = ip2)

 

q2) is there a possibility that incoming packets with destination address to x.x.x.x will be using y.y.y.y as the source address in the return packet ?

-> Is this portion consider to be a layer 3 process ?
-> Is it control by the application or the operation system ? -> (as on what source address to use for replying back / sending out)

 

q3) assuming the answer on b is yes, will there be a problem on the client side if it send out a request to x.x.x.x but get a respond from y.y.y.y instead ? (i am thinking of that will be a problem if the client is behind some firewall with NAT session/mapping that check against incoming packet src addresses against previously outgoing packet destination addresses and the incoming response cant have a matching entry into the network -- am i right ?)

 

q4) are we able to control routing on the host computer base on source address ? meaning if the src address is x.x.x.x , it will be using the x.x.x.1 gateway, if the src address is y.y.y.y, it will be using the y.y.y.1 gateway ?

 

q5) are we able to send outgoing packet with y.y.y.y src ip address using x.x.x.1 gateway and network ?

 

Thanks.

Regards,
Noob

4 Replies 4

SJ K
Level 5
Level 5

Any advises please :)

 

- is my question illogical ? , why isnt anyone replying.. sigh..

is my question illogical ? , why isnt anyone replying.. sigh.

Hello

q1) can i access the web service via either x.x.x.x:80  or y.y.y.y:80   (x.x.x.x = ip 1 and y.y.y.y = ip2)
Yes
You have two subnets on the same server with each router only adverteising it specfic subnet and not each others so the return path will always been seen to the router it was adverties from

 

As for the DNS  you can create two A records specityig the two address of your server.

 

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi Paul,

Thanks for replying.

As per the discussion thread earlier, how do we guarantee that the return path does not use the wrong gateway on the host/server level ?

 

(e.g. client access server resource via x.x.x.x, how do we make sure that when returning to client, it will use x.x.x.1 gateway instead of y.y.y.1 gateway ?)

 

Regards.
Noob