ZTree.com  | ZEN  | About...  

 Index   Back

[OT] Real ChatGPT transcript assisting me in special home networking challenge   [OT]

By: Laurent Duchastel     Montréal, Québec  
Date: Jan 15,2023 at 02:38
In Response to: [OT] ChatGPT makes homework officially dead? (Slobodan Vujnovic)

Laurent : Can a Windows PC be connected to two networks having both Internet access, but my PC will user one one network for Internet and the other only for local LAN ressources ?

Yes, a Windows PC can be connected to two networks simultaneously and can be configured to use one network for internet access and the other network for local LAN resources. This can be done by setting up a default gateway and metric for each network connection in the network adapter settings. The default gateway with the lower metric will be used for internet access, while the network with the higher metric will be used for local LAN resources. It's also possible to use Windows Routing and Remote Access Services to achieve this.

So, NIC for which I want Internet+LAN access is 192.168.1.200 on router with DNS 192.168.1.1, and the NIC for which I want LAN access only (although it provides Internet access too) is 192.168.0.200 on router with DNS 192.168.0.1. How I configure everything on Windows ?

To configure your Windows PC to use one network connection for internet access and the other for local LAN resources, you will need to follow these steps:

1. Open the Control Panel and navigate to the Network and Sharing Center.

2. Click on "Change adapter settings" to view the available network connections.

3. Right-click on the network connection you want to use for internet access and select "Properties".

4. In the Properties window, navigate to the "Internet Protocol Version 4 (TCP/IPv4)" option and click on "Properties".

5. In the Internet Protocol Version 4 (TCP/IPv4) Properties window, select "Use the following IP address" and enter the following information:


IP address: 192.168.1.200
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.1
Preferred DNS server: 192.168.1.1
Click on "OK" to save the changes.


6. Repeat steps 3-6 for the network connection you want to use for local LAN resources, but use the following information:

IP address: 192.168.0.200
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
Preferred DNS server: 192.168.0.1


Go to the Advanced Tab on both NICs and set the metric as per your priority, Lower metric will be used first

Now go to the route table and check if there are any routes added for both NICs, If yes, remove the route for the NIC which you want to use for LAN only.

This should configure your Windows PC to use one network connection for internet access and the other for local LAN resources. Make sure to check if the NICs are able to ping each other and the internet using the new IPs, if not then check the firewall settings.


where is route table ?

You can access the route table on a Windows PC by using the Command Prompt. To open the Command Prompt, press the Windows key + R, type "cmd" and press Enter.

Then, type "route print" in the Command Prompt and press Enter. This will display the current route table, which contains information about the IP routes that are currently in use by the system.

In the route table, you can find the information of the NIC you want to use for internet and LAN access and NIC you want to use for LAN only, like destination, mask, gateway and NIC name. You can use the "route delete" command to delete any route that you don't need.

You can also use the "route add" command to add a new route to the table if needed.

Please make sure to run the command prompt as an administrator.


Ok. This is what is says below. What do I do with that ?


===========================================================================
Liste d'Interfaces
17...00 e0 42 68 1d 51 ......Realtek Gaming 2.5GbE Family Controller
16...2c f0 5d 8c ab bd ......Realtek PCIe 2.5GbE Family Controller #2
10...0a 00 27 00 00 0a ......VirtualBox Host-Only Ethernet Adapter
13...ac 12 03 9f 5b 46 ......Intel(R) Wi-Fi 6 AX200 160MHz
14...ac 12 03 9f 5b 47 ......Microsoft Wi-Fi Direct Virtual Adapter
15...ae 12 03 9f 5b 46 ......Microsoft Wi-Fi Direct Virtual Adapter #2
4...ac 12 03 9f 5b 4a ......Bluetooth Device (Personal Area Network)
1...........................Software Loopback Interface 1
===========================================================================

IPv4 Table de routage
===========================================================================
Itinéraires actifs :
Destination réseau Masque réseau Adr. passerelle Adr. interface Métrique
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.200 257
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.200 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.200 266
192.168.0.200 255.255.255.255 On-link 192.168.0.200 266
192.168.0.255 255.255.255.255 On-link 192.168.0.200 266
192.168.1.0 255.255.255.0 On-link 192.168.1.200 257
192.168.1.200 255.255.255.255 On-link 192.168.1.200 257
192.168.1.255 255.255.255.255 On-link 192.168.1.200 257
192.168.56.0 255.255.255.0 On-link 192.168.56.1 281
192.168.56.1 255.255.255.255 On-link 192.168.56.1 281
192.168.56.255 255.255.255.255 On-link 192.168.56.1 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.56.1 281
224.0.0.0 240.0.0.0 On-link 192.168.1.200 257
224.0.0.0 240.0.0.0 On-link 192.168.0.200 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.56.1 281
255.255.255.255 255.255.255.255 On-link 192.168.1.200 257
255.255.255.255 255.255.255.255 On-link 192.168.0.200 266
===========================================================================
Itinéraires persistants :
Adresse réseau Masque réseau Adresse passerelle Métrique
0.0.0.0 0.0.0.0 192.168.1.1 Par défaut
0.0.0.0 0.0.0.0 192.168.0.1 10
===========================================================================

IPv6 Table de routage
===========================================================================
Itinéraires actifs :
If Metric Network Destination Gateway
1 331 ::1/128 On-link
16 281 fd0d:cc45:910f::/64 fe80::e0:45bb:1c51:ba34
16 281 fdaa:f468:5cec:4e04::/64 On-link
16 281 fdaa:f468:5cec:4e04:49a1:4693:8789:d11f/128
On-link
16 281 fdaa:f468:5cec:4e04:fbe3:d949:8f3d:e44e/128
On-link
10 281 fe80::/64 On-link
17 281 fe80::/64 On-link
16 281 fe80::/64 On-link
10 281 fe80::5807:1054:3e0e:823b/128
On-link
17 281 fe80::9931:9d3:bc14:11d6/128
On-link
16 281 fe80::a079:b058:60f:8b69/128
On-link
1 331 ff00::/8 On-link
10 281 ff00::/8 On-link
17 281 ff00::/8 On-link
16 281 ff00::/8 On-link
===========================================================================
Itinéraires persistants :
Aucun


The output you provided is the result of the "route print" command you ran in the Command Prompt. This shows the current route table of your Windows PC, which contains information about the IP routes that are currently in use.

From the output, you can see that there are two active routes with destination 0.0.0.0 and mask 0.0.0.0. The first one is using the gateway 192.168.1.1 and the interface 192.168.1.200 with metric 257. The second one is using the gateway 192.168.0.1 and the interface 192.168.0.200 with metric 20.

The metric number is used by the operating system to determine the priority of routes, lower metric will be used first. So as you want to use the first NIC for Internet+LAN access, the metric should be lower than the second one.

You can also see that there are several other routes in the table that are not relevant to your current configuration.

To remove the route for the NIC which you want to use for LAN only, you can use the "route delete" command with the appropriate destination and mask, for example:

route delete 0.0.0.0 mask 0.0.0.0 192.168.0.1

This will remove the route that uses the gateway 192.168.0.1 and interface 192.168.0.200.

Please make sure to run the command prompt as an administrator.
It's also advisable to reboot your PC after making these changes to ensure that the new configuration takes effect.


~~~

Took 2 min.
It works.


Laurent Duchastel

52 views      
 

Messages in this Thread

 
96,194 Postings in 12,153 Threads, 350 registered users, 27 users online (1 registered, 26 guests)
Index | Admin contact |   Forum Time: Jan 27, 2023 - 12:54 am UTC  |  Hits:53,203,525  (758 Today )
RSS Feed