You are not logged in.

#1 2017-10-02 00:57:05

highway
Member
Registered: 2012-07-28
Posts: 81

[Networking] Connecting two wifi cards to different networks

I took a look around, and this seemed to be the best place for this question.

I have two networks, one is my main network (with internet), and the second is a local sandbox with vulnerable machines (no internet).

Is there a way to connect my laptop (with two wifi cards) to both networks at the same time? My goal is to have internet access from the main network, and be able to test/access machines on the sandbox from the same machine.

The IP of the main network is 192.168.1.1 and the sandbox is 192.168.10.1

I have tried setting up static IPs for both interfaces, but it seems that my default card is set to the other wireless interface.

Thank you for the help!

Offline

#2 2017-10-02 01:53:35

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: [Networking] Connecting two wifi cards to different networks

There's... a forum area for networking. Why choose GNU/Linux Discussion?

Also you're missing important information. Firstly, how are you connecting to the network(s) in the first place? There's a variety of tools which do this, so that's some pretty information right from the start which is missing.

Also yes, this is in fact possible. Can't say anything else due to a lack of information in your post.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2017-10-02 21:51:48

highway
Member
Registered: 2012-07-28
Posts: 81

Re: [Networking] Connecting two wifi cards to different networks

ngoonee wrote:

There's... a forum area for networking. Why choose GNU/Linux Discussion?

Also you're missing important information. Firstly, how are you connecting to the network(s) in the first place? There's a variety of tools which do this, so that's some pretty information right from the start which is missing.

Also yes, this is in fact possible. Can't say anything else due to a lack of information in your post.

Sorry, I thought that was only for questions that were related to arch, packages, or the install. I can request to have this moved there if that is the correct place for it.

I have two wireless NICs. Do you know what other information is required? There are two different SSIDs, and two different gateways. I have static IPs set up on both of the connections to each network.

Offline

#4 2017-10-02 22:18:55

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Networking] Connecting two wifi cards to different networks

It could be that your default route needs changing.

When connected to both networks can you post the output of...

ip route show

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2017-10-03 22:27:16

highway
Member
Registered: 2012-07-28
Posts: 81

Re: [Networking] Connecting two wifi cards to different networks

slithery wrote:

It could be that your default route needs changing.

When connected to both networks can you post the output of...

ip route show
:~# ip route show
default via 192.168.10.1 dev wlan1 proto static metric 600 
default via 192.168.1.1 dev wlan0 proto static metric 601 
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.12 metric 600 
192.168.10.0/24 dev wlan1 proto kernel scope link src 192.168.10.101 metric 600

Offline

#6 2017-10-10 16:08:19

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [Networking] Connecting two wifi cards to different networks

Your laptop is connected to both networks at the same time. In fact, you don't even need 2 cards for that because linux happily assigns multiple IP addresses to one network interface (card).

If you wonder why you can't access the internet from your laptop, it's because you have low-metric default route to the 192.168.10.0/24 network which has no internet connection...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#7 2017-11-02 19:55:01

marakasmalan
Member
Registered: 2017-05-02
Posts: 15

Re: [Networking] Connecting two wifi cards to different networks

Leonid.I wrote:

<snip> linux happily assigns multiple IP addresses to one network interface (card). <snip>

Can you please direct to the wiki page or any other litarature/links where one can peruse this matter in more detail?

Thanks!

Offline

#8 2017-11-03 15:58:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: [Networking] Connecting two wifi cards to different networks

marakasmalan wrote:
Leonid.I wrote:

<snip> linux happily assigns multiple IP addresses to one network interface (card). <snip>

Can you please direct to the wiki page or any other litarature/links where one can peruse this matter in more detail?

man ip-address


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB