What's new

How to assign the same static IP for WIFI & LAN

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

chaitu87

Occasional Visitor
Hi Guys,

Sorry if this is a noob question. I need my laptop to have the same IP if I use either WAN or LAN. I will not be using both simultaneously. I tried DHCP but it assigns uniques IPs based on MAC addresses. Please run me through how to set the Gateway and DNS server settings so that I can statically assign IPs on my network adapters. Thanks in advance!!!
 
The problem lies in that if a computer has both WiFi and wired connection it will have two different MACs, and normally the settings do not allow assigning the same IP address to two different MAC.

The dnsmasq config though does allow if if you manually write your config (for example by using Merlins /jffs/config replacement or amendment).

See the final paragraph for the --dhcp-host option on this page:
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

As a special case, in DHCPv4, it is possible to include more than one hardware address. eg: --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 This allows an IP address to be associated with multiple hardware addresses, and gives dnsmasq permission to abandon a DHCP lease to one of the hardware addresses when another one asks for a lease. Beware that this is a dangerous thing to do, it will only work reliably if only one of the hardware addresses is active at any time and there is no way for dnsmasq to enforce this. It is, for instance, useful to allocate a stable IP address to a laptop which has both wired and wireless interfaces.
 
is not clear to me ......so do you want that your wifi IP be the same as Lan IP?

or you want that every time you connect to the router to have the same ip?
let say 192.168.1.2 for wifi and .3 for lan ?

if you want the later you can assign IP by mac..... http://192.168.1.1/Advanced_DHCP_Content.asp
GO to DHCP server and on the bottom of the page there is manually assign IP option .
 
Sorry if this is a noob question. I need my laptop to have the same IP if I use either WAN or LAN. I will not be using both simultaneously. I tried DHCP but it assigns uniques IPs based on MAC addresses. Please run me through how to set the Gateway and DNS server settings so that I can statically assign IPs on my network adapters.
Hi,

You are on the right track: Not the router can do the job, but on your laptop you can set fixed addresses, which could lead to the same IP address for WLAN and LAN.

It's not too complicated:
1. Open the "Control Pannel"
2. Go to "Network and Sharing Center"
3. Click on "Local Area Connection" (you need to be connected via LAN!)
4. Click on "Properties"
5. Click on "Internet Protocol Version 4 (TCP/IPv4)"
6. Click on "Properties"
7. Click on "Use the following IP address"
- Here you need to know a free internal "IP address" - e.g. 192.168.1.100
- The "subnet mask" is typically 255.255.255.0
- The "default gateway" is your routers IP address - e.g. 192.168.1.1 (you seed the relation to the client IP address? :) )
- Enter the router's IP address also into the "Preferred DNS server" field
8. Repeat step 1- 7 when you are connected to the WLAN!

And you have the same IP settings for LAN and WLAN! :rolleyes:

OK. I was wrong, it is complicated! :)

With kind regards
Joe :cool:
 
Last edited:
It IS possible to have the router assign the same address with DHCP to both WiFi and wired (I have it set up that way at home, the way I posted).

It might however cause problems if you switch often between wired and wireless.
 
Hi,

You are on the right track: Not the router can do the job, but on your laptop you can set fixed addresses, which could lead to the same IP address for WLAN and LAN.

It's not too complicated:
1. Open the "Control Pannel"
2. Go to "Network and Sharing Center"
3. Click on "Local Area Connection" (you need to be connected via LAN!)
4. Click on "Properties"
5. Click on "Internet Protocol Version 4 (TCP/IPv4)"
6. Click on "Properties"
7. Click on "Use the following IP address"
- Here you need to know a free internal "IP address" - e.g. 192.168.1.100
- The "subnet mask" is typically 255.255.255.0
- The "default gateway" is your routers IP address - e.g. 192.168.1.1 (you seed the relation to the client IP address? :) )
- Enter the router's IP address also into the "Preferred DNS server" field
8. Repeat step 1- 7 when you are connected to the WLAN!

And you have the same IP settings for LAN and WLAN! :rolleyes:

OK. I was wrong, it is complicated! :)

With kind regards
Joe :cool:

It didn't work, I am confused about the DNS, WINS settings as well as the gateway setting for the router. Am I supposed to set it or is it default to the values you have mentioned
 
Why not setup 2 IP addresses and assign the network security to both that way it does not matter which IP you are using.
 
It didn't work, I am confused about the DNS, WINS settings as well as the gateway setting for the router. Am I supposed to set it or is it default to the values you have mentioned
Hi,

You need to know the values of your network settings!
The values given from me are the "typical ones", but you need to check your network if they are the same or not.

Who did the setup of your home network and router? He/She can give you the right values... :eek:
Or you go to the router web interface and look-up the values: Under LAN / LAN IP you find the routers IP address and the sub-net mask.

Regarding WINS: I did not say anything about it on purpose! Just forget about it and also about advanced DNS settings. :eek:

With kind regards
Joe :cool:
 
Last edited:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top