Answer the question
In order to leave comments, you need to log in
How to connect a computer to a router with a static address?
I have a router with a static IP address. Can I connect a computer to it and set the same static address?
Answer the question
In order to leave comments, you need to log in
Technically yes, but there is no practical sense, especially if this is the only IP of the PC.
No, you can’t, for some reason you have a unique number in your passport, on a credit card, too, and your fingerprints are unique, so your ip must be set on the PC
Not exactly the right question. In fact, you can assign absolutely any address to the computer, and the network will even work - but for correct operation (and access to other networks / the Internet), the computer must have an address from the subnet that is allowed in the router.
If you have a router, then it has at least two addresses - WAN and LAN (the exception is the bridge, but apparently not this option here).
If the router has a DHCP server, look at the settings - usually the LAN has 192.168.1.1/24, which means that clients are given addresses 192.168.1.2-254. Accordingly, you can assign a static address from this range - but it is worth considering that if this address is already occupied by someone, then a conflict will arise - and stable operation will not work. So it's worth using DHCP or having a table of addresses for the entire network on hand. By the way, now many routers (even household ones) can have a static IP over MAC in DHCP - perhaps this is what you need?
And now an exhaustive answer =)
The router in your case uses NAT technology. Thanks to it, we can all use one common external address and access the Internet from many computers behind it. Address translation replaces the outgoing address and outgoing port with the address of the router (from the WAN network) + a random port allocated on the outgoing interface, then sends the packet to the destination server address, when the packet returns, the reverse substitution of the details will take place and the packet will be delivered to the computer on the local network.
The second important point is that in one IP network, the uniqueness of IP addresses (as well as link-level addresses, but this has nothing to do with the case) must always be respected, i.e. there cannot be two nodes\computers\servers\devices with the same address (the exception, perhaps, is the balancing scheme, when each device has its own address and they share one common address).
As a result, you will not be able to assign the same address from your internal network on your computer, because. then the IP network will stop working, more precisely, packets from this address and to this address will go with errors or stop going at all. Also, you cannot assign an external address from the Internet on your computer, which is assigned to your router, because. it is hidden for you behind NAT and your local network does not know anything about this address, it is in a different segment, which means that traffic will not go to it.
Solution: 1. use a bridge, not a router, or do not use an intermediate device at all. 2. Use the "DMZ" functionality of home routers (which is actually not a real DMZ) or port forwarding\Virtual server\Port trigger, then the necessary traffic will get to your computer (for example, you can expose a web server this way). 3. Buy an IP subnet and route a real DMZ with white addresses, then each server you need will receive an external public address and be able to freely receive traffic to it (this way you can set up or make a VPN server or SIP server work) - but the router must be able to do this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question