Duplicate wifi connection but with different gateway

trucmuche2005

New member
Local time
4:05 AM
Messages
7
Hello !

My computer is connected using wifi to my access point. It connects fine, automatically at startup. But I would like to duplicate the network connection to be able to connect sometimes to the same access point with same parameters BUT the gateway.

Is this possible to duplicate the connections in order to be able to connect automatically at startup with gateway 192.168.0.1 and sometimes to connect to my access point with gateway 192.168.0.10 ?

Ideally, I would like to duplicate my wifi profile in Control Panel > Network and Internet > Manage Wireless Networks but here I cannot change the route settings of one profile without changing it for all profiles.Is there a solution ?

Thank you very much for your help and advices !

Trucmuche

ps. oh, please forgive my poor english, I do my best ;-)
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
You have one wireless adaptor right, if so you can only connect to one wifi at a time on that adapter. If you want to be able to connect to two different networks with different gateways, you need two different routers to first create the two networks (each router is basically a gateway), and second use wired connection to one and wireless connected to another. Uness you have a way to use your wifi adapter to connect to two different wireless networks you won't be able to do what you want to do.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
Thank you for your answer, aem !

Yes, you're right : I have only one wireless card and I want to connect to ONE wifi at a time. I don't want to connect to two access points simultaneously. I would like to be able to connect to my own and unique wifi access point, sometimes with gateway 192.168.0.1 and sometimes with gateway 192.168.0.10.

Of course I could go to the control panel and modify the TCP-IP v4 settings everytime I want to modify the gateway, but I would prefer a kind of shortcut... This is what I'm asking for...

Many thanks again !
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
Your default gateway is generally your router and is the first Ip on your network. I don't know how you can have two different IPs on the same device (ie your router).
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
Well, so I have to explain why I ask the question... The reason is simple :

Most of the time, I do NOT want Windows to be connected to the internet (and my technique is to configure voluntarily a "BAD" gateway). I only want him to connect to the WIFI AP and get an IP address because I use linux inside VMWare and allow linux to get himself an IP (different from the windows host) and correctly set the gateway to access the web inside Linux. This works perfectly.

But SOMETIMES, at particular moments, I would like Windows to have access to the internet and in these cases, I have to connect to my wifi AP and allow him to set a correct gateway !

So I would like to have two connection profiles for the same interface and the same access point, only different by the configuration of the gateway !

This is why... Do you know how ? :-)

Many thanks !
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
If I understand you correctly, you have two wireless routers. One has internet access. The other does not. Is that right?
 

My Computer My Computer

OS
Win 7
If you do not want Windows to connect to the internet, why do you need to connect to the router, or the network?

If you want to connect to the wifi whenever YOU want to only, why not create the wifi network SSID which is not broadcasting. You can still connect to this non broadcasting wifi by selecting Other Network and put in the SSID and passphase manually. After you are don just disconnect and remove the SSID from the list.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
No... I have ONE wifi access point (vdsl modem+router). This vdsl modem is ALWAYS connected to the internet.
I would like to connect to it and get an IP address, but I set myself an incorrect gateway address vonluntarily most of the time to connect my Windows to the Wifi access point WITHOUT allowing it to have internet access. And I would like to have another "connexion profile" to my wifi AP which allows Windows to set himself the correct gateway (192.168.0.1, which is the vdsl modem's IP).
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
If you do not want Windows to connect to the internet, why do you need to connect to the router, or the network?
I have it because I virtualize Linux and I want LINUX (but NOT the windows host) to access internet.

I have to get my windows host connected to my wifi AP, letting him to get a local IP address but an incorrect gateway to stop traffic between windows and internet.
My Linux virtualized machine then connects to my wifi AP, negociate himself an local IP address AND a correct gateway. This ALREADY WORKS.

I would like to be able to set SOMETIMES the correct gateway in Windows to connect it to internet. I can do it manually in the TCP-IP properties of the control panel, but I only would like to create a SHORTCUT which allows me in one click to set and unset the correct gateway in Windows...

Please, I have my own reasons to do that strange thing, I know this is strange... I only want to know HOW to do this... if this is possible...

Thank you for your comprehension !
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
You can create shortcuts to your wifi connection, but once you change the gateway details in ipv4, it changes for all the shortcuts. Try it and you'll see.

The other way i think might be possible is if you create two hardware profiles for your machine, each with a different ipv4 setup. At startup you can choose which profile to use and that should give access to the nominated wifi settings.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
I didn't tried basic shortcuts because I saw that the TCP-IP modifications alter ALL the network interfaces. This is precisely why I'm asking the question here...

Creating two hardware profiles is not a solution because I don't want to reboot each time I start & stop the correct gateway under windows...
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
I didn't tried basic shortcuts because I saw that the TCP-IP modifications alter ALL the network interfaces. This is precisely why I'm asking the question here...

Then you have the answer you are looking for. No can do what you wanted done.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
As aem said, what you want really can't be done.

I have to wonder why you're trying to do this - allowing your Linux system to have an Internet connection but preventing Windows from having one. Doesn't make much sense to me, I sense some paranoia here. Why is it so important for you to keep Windows away from the 'net?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
OK, simple.

Create a script that uses the "route" command. (I usually write shell scripts using Cygwin, a Unix-like environment that runs on Windows. Much more powerful than DOS-type scripting.)

Start by running "route print". That produces a listing of your existing route table ... including the Internet-accessible gateway information. Save that and turn it into a script (as a series of "route" commands). Whenever you run that script, it will produce the desired routing, with internet access.

Make a copy of the script, and change the copy: Leave the "local" network routes alone, but change any address range that points to the proper internet gateway so that it instead points to a bogus address in your subnet. Whenever you run that script, internet access will not be available.

Create a shortcut for the first script, and call it "Internet", or similar.
Create a shortcut for the second script, and call it "No Internet".
 

My Computer My Computer

OS
Win 7
Thank you all for your interest in my question !

@ Corazon : You're wondering why I want to do this. Why people can't usually admit that, sometimes, the man who asks a question has a good reason to ask it ? I explained my technical reason but I don't want to explain my entire life to discuss whether or not something can technically be done in window. Should I ? You talk about "paranoia". This is not the case BUT even if it was, why does it matter for you ? I WANT to do this, what kind of authority you got about me to discuss the reason ? You think that there is no reason to keep windows off internet ? I got one and I don't have to share it with you... I'm looking for a solution, not for a psychanalist, I don't need that...

@ lhorwinkle : THANK YOU !! I should have think about this solution myself !! Thank you very very much ! So easy... :-)

I'll test it and if ok, mark this question as solved ;-)

Thank you all !
 

My Computer My Computer

OS
Windows 7 SP1 Ultimate 64 bits
CPU
Q9550 quad core @ 2.8Ghz
Motherboard
Asus P5Q Turbo
Memory
4Gb DDR2 @ 1066 Mhz
Graphics Card(s)
Zotac GTX260 896 Mb
Sound Card
integrated to MB
Monitor(s) Displays
LG W2600HP
Hard Drives
2 x Samsung HD103UJ 1Tb
2 x Samsung HD103SJ 1Tb
Run "route print" ...

MY FIRST COMPUTER, WIN XP: Its IP is 192.168.1.65
Code:
ignore--> INTERFACE LIST
ignore--> 0x1 ........................... MS TCP Loopback interface
ignore--> 0x2 ...00 1b 38 80 af 54 ...... Intel 82566MM Gigabit Network Connection
ignore--> 0x3 ...00 ff d0 c2 8d 88 ...... Juniper Network Connect Virtual Adapter

                   ACTIVE ROUTES:
                   NETWORK DESTINATION       NETMASK         GATEWAY     INTERFACE    METRIC
CHANGE THIS       -->         0.0.0.0          0.0.0.0   192.168.1.254  192.168.1.65     20
loopback          -->       127.0.0.0        255.0.0.0       127.0.0.1     127.0.0.1      1
local LAN address -->     192.168.1.0    255.255.255.0    192.168.1.65  192.168.1.65     20
local LAN address -->    192.168.1.65  255.255.255.255       127.0.0.1     127.0.0.1     20
local LAN address -->   192.168.1.255  255.255.255.255    192.168.1.65  192.168.1.65     20
special           -->       224.0.0.0        240.0.0.0    192.168.1.65  192.168.1.65     20
special           --> 255.255.255.255  255.255.255.255    192.168.1.65  192.168.1.65      1
my router         --> DEFAULT GATEWAY:   192.168.1.254
MY SECOND COMPUTER, WIN 7: Its IP is 192.168.1.65
This computer is 192.168.1.64
Code:
ignore--> INTERFACE LIST
ignore-->  11...70 71 bc b8 9d 7f ......Intel 82567V-2 Gigabit Network Connection
ignore-->   1...........................Software Loopback Interface 1
ignore-->  12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
ignore-->  10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter

                   ACTIVE ROUTES:
                   NETWORK DESTINATION       NETMASK         GATEWAY     INTERFACE    METRIC
CHANGE THIS       -->         0.0.0.0          0.0.0.0   192.168.1.254  192.168.1.64     20
loopback          -->       127.0.0.0        255.0.0.0       On-link       127.0.0.1    306
loopback          -->       127.0.0.1  255.255.255.255       On-link       127.0.0.1    306
loopback          --> 127.255.255.255  255.255.255.255       On-link       127.0.0.1    306
local LAN address -->     192.168.1.0    255.255.255.0       On-link    192.168.1.64    276
local LAN address -->    192.168.1.64  255.255.255.255       On-link    192.168.1.64    276
local LAN address -->   192.168.1.255  255.255.255.255       On-link    192.168.1.64    276
special           -->       224.0.0.0        240.0.0.0       On-link       127.0.0.1    306
special           -->       224.0.0.0        240.0.0.0       On-link    192.168.1.64    276
special           --> 255.255.255.255  255.255.255.255       On-link       127.0.0.1    306
special           --> 255.255.255.255  255.255.255.255       On-link    192.168.1.64    276
For both computers, look at the line I marked "CHANGE THIS".
As it stands, this maps my internet through my router (GATEWAY 192.168.1.254).
If I change the GATEWAY to, say, my loopback address 127.0.0.1, then internet traffic would be blocked.

For the script that allows internet access:
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 ROUTER metric 20

where ROUTER is the IP of your local internet router

For the script that denies internet access:
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 127.0.0.1 metric 20


Note: I do this sort of thing on that first computer (running Win XP). I've not tried it on the second computer (running Win 7).
 
Last edited:

My Computer My Computer

OS
Win 7
@ Corazon : You're wondering why I want to do this. Why people can't usually admit that, sometimes, the man who asks a question has a good reason to ask it ? I explained my technical reason but I don't want to explain my entire life to discuss whether or not something can technically be done in window. Should I ? You talk about "paranoia". This is not the case BUT even if it was, why does it matter for you ? I WANT to do this, what kind of authority you got about me to discuss the reason ? You think that there is no reason to keep windows off internet ? I got one and I don't have to share it with you... I'm looking for a solution, not for a psychanalist, I don't need that...

Sensitive much? I just wanted to understand your desire for keeping Windows out of the Internet, that's all. Trust me, I'm not interested in psychoanalyzing you :P
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom-built
OS
Windows 7 Professional SP1 32-bit
CPU
Intel Core 2 Duo E6600 2.4GHz
Motherboard
Asus PL5D2
Memory
4GB DDR2-667 (4x1GB in dual-channel config)
Graphics Card(s)
nVidia GeForce 9800 GT
Sound Card
Creative X-Fi XtremeMusic
Monitor(s) Displays
Acer P236H
Screen Resolution
1920x1200 (DVI)
Hard Drives
OCZ SSD Vertex Plus 60GB SATA (Firmware 3.55), 64MB cache
Hitachi HD321KJ SATA, 320GB, 7200rpm, 16MB cache
PSU
Antec TruePower 2.0
Case
Cooler Master Centurion
Cooling
Too many fans
Keyboard
Standard
Mouse
Microsoft wireless optical mouse
Internet Speed
AT&T U-verse (18mbit/sec)
Antivirus
Microsoft Security Essentials
Browser
Firefox
Other Info
Other devices:
Compaq CQ-60 laptop
Google Nexus 7 (2012) tablet
Nvidia SHIELD tablet (US/LTE)
Hardkernel ODROID-XU single-board computer (Samsung Exynos 5420)
Well i tested it and it it didn't work. What is the exact code do not put in Change this etc.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
Well i tested it and it it didn't work. What is the exact code do not put in Change this etc.
In my earlier post, look at the results from the "route print" command. There's only one route that needs to be changed for Internet vs. No Internet.

So, to enable internet, run these two commands (from a command prompt) ...
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 ROUTER metric 20

... be sure to replace ROUTER with the IP of your local internet router (DSL modem or cable modem). In the example, mine is 192.168.1.254, but yours might be different.

To disable internet ...
route delete 0.0.0.0 mask 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 127.0.0.1 metric 20
 

My Computer My Computer

OS
Win 7
It disconnects the internet but when you Disconnect and Reconnect your wifi, it back to normal.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo ThinkPad T60
OS
Windows 7 Ultimate 64Bit
CPU
GenuineIntel Intel(R) Core(TM) DuoCore T2400 @ 1.83GHz
Motherboard
Intel(R) 82801G (ICH7 Family)
Memory
2.00 GB
Graphics Card(s)
Mobile Intel(R) 945 Express Chipset
Sound Card
SoundMAX Integrated Digital HD Audio
Monitor(s) Displays
ThinkPad Display
Screen Resolution
1400x1050
Hard Drives
100Gb SATA
Keyboard
Standard Keyboard
Mouse
HID-compliant Mouse
Internet Speed
Cable Broadband - 54Mbps
Other Info
Intel(R) PRO/1000 PL Network Connection
11a/b/g Wireless LAN Mini PCI Express Adapter
Back
Top