is it possible that two PC's connected with same modem have different ip address...?
if yes then how to change their ip address??
Of course its possible, but we must have more details about your question. There is modems-routers with Multi-NAT service inside. Multiple public IP addresses can be used (static or dynamic) on Internet. You didnt specify do you mean on Public or intranet side. Public addresses range must be given by ISP, and intranet or private is based on sysadmin management. Sysadmin can manage router and make policy about usage of IP address resources. Often companies dont have only one public IP address, in some cases company leases pool of 5-15 public addresses, for various purposes, as dedicated mail server, web, VPN,... Modem/router can use several of them, not just one IP address, of course this depends also from modem/router capabilities, he must have that capability to support that.
Also sysadmin can reserve particular public or private IP address for some particular client based on MAC address.
All of this can have security and load balancing reasons for usage. For load balancing,
round-robin, sends each connection to a different IP address in the group, looping back to the beginning once it has gone through every IP. The first incoming connection goes to the first address in the pool, the second to the second address, and so on. You may have problems if using round-robin load balancing for SSL web servers or certain web applications that track user information by IP address.
Random load balancing sends each connection to a random IP address in the pool. This has all of the disadvantages of round-robin load balancing, with the additional restriction that the address pool must be a proper network block instead of just a list of IP addresses.
Source-hash load balancing uses a hash of the IP address to assign connection requests to a pool address. This means that every machine that connects is always assigned to the same address, which will avoid many software problems of round-robin and random load balancing. Using a fixed hash value means that each client gets an identical IP address even across firewall reloads.
You should get some material and read about NAT and TCP/IP header and encapsulation.
:wink: