Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

There are two application servers(IIS). There is a switch or a virtual IP which load balances requests for the 2 servers.

I need to track requestor(client) IP address from my .NET application.

The code Request.ServerVariables["REMOTE_ADDR"] is giving the switch IP address.

The request first hits switch then request is diverted to either of the server, in this process my application is getting switch IP address for that code and client IP is masked.

how to make the switch populate the x-forwarded-for header?

share|improve this question
2  
You're going to have to tell us which product it is that's load balancing the incoming requests. –  EightBitTony May 4 '12 at 10:56

1 Answer 1

By definition, a network switch operates between layers 2 and 3 of the OSI stack. Network switches usually do not touch HTTP header information.

Sounds like you're using a load balancer that operates at layer 7. The load balancer should be able to move the original client IP address to the xff. It's a fairly common feature with most load balancing solutions.

If you need more details, then please add more details to the question.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.