Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #199156 > unrolled thread
| Started by | Eric S Fraga <e.fraga@ucl.ac.uk> |
|---|---|
| First post | 2018-08-21 17:50 +0200 |
| Last post | 2018-08-24 22:10 +0200 |
| Articles | 10 — 6 participants |
Back to article view | Back to linux.debian.user
connecting to two networks simultaneously on buster Eric S Fraga <e.fraga@ucl.ac.uk> - 2018-08-21 17:50 +0200
Re: connecting to two networks simultaneously on buster Eric S Fraga <e.fraga@ucl.ac.uk> - 2018-08-21 18:20 +0200
Re: connecting to two networks simultaneously on buster David Wright <deblis@lionunicorn.co.uk> - 2018-08-21 18:20 +0200
Re: connecting to two networks simultaneously on buster Glenn English <ghe2001@gmail.com> - 2018-08-21 19:00 +0200
Re: connecting to two networks simultaneously on buster Eric S Fraga <e.fraga@ucl.ac.uk> - 2018-08-22 00:10 +0200
Re: connecting to two networks simultaneously on buster Zenaan Harkness <zenaan@freedbms.net> - 2018-08-22 02:30 +0200
Re: connecting to two networks simultaneously on buster David Wright <deblis@lionunicorn.co.uk> - 2018-08-23 02:20 +0200
Re: connecting to two networks simultaneously on buster Vincent Lefevre <vincent@vinc17.net> - 2018-08-24 14:10 +0200
Re: connecting to two networks simultaneously on buster David Wright <deblis@lionunicorn.co.uk> - 2018-08-24 18:10 +0200
Re: connecting to two networks simultaneously on buster Lee <ler762@gmail.com> - 2018-08-24 22:10 +0200
| From | Eric S Fraga <e.fraga@ucl.ac.uk> |
|---|---|
| Date | 2018-08-21 17:50 +0200 |
| Subject | connecting to two networks simultaneously on buster |
| Message-ID | <wph4R-4iD-7@gated-at.bofh.it> |
Hello, I have a laptop running buster (testing) which connects to my wireless network (192.xxx). I also have a new Gemini PDA (also running Debian but stretch in this case) which connects to the same network. So far, so normal. However, I can connect the Gemini PDA via USB cable to the laptop and both systems will have two different networks available, with the USB one being 10.xxx. I can then ssh, say, from either system to the other using IP addresses in either 192 or 10 networks. On my desktop computer, connected by Ethernet cable to the same network (192.xxx), plugging the USB cable from the Gemini to the desktop does not lead to a new connection being made on the desktop computer. I can connect to the USB network (nmcli device connect ...) but it disconnects me from the wireless (and vice versa). Would somebody please point me to the right magical incantation that would allow my desktop computer to have both connections active simultaneously? Thanks, eric -- Eric S Fraga via Emacs 27.0.50 & org 9.1.13 on Debian buster/sid
[toc] | [next] | [standalone]
| From | Eric S Fraga <e.fraga@ucl.ac.uk> |
|---|---|
| Date | 2018-08-21 18:20 +0200 |
| Message-ID | <wphxU-4Iu-21@gated-at.bofh.it> |
| In reply to | #199156 |
On Tuesday, 21 Aug 2018 at 11:12, David Wright wrote: [...] > If NM is like wicd, it can only handle one connection at a time. But the strange thing is that both my desktop and the laptop are using NM. I don't understand why they behave differently. > What I would do is to set up your 10.xxx connection in /e/n/i which Yes, I should be able to do this. Thanks. Been a long time since I manually defined a network, mind you... Thanks again, eric -- Eric S Fraga via Emacs 27.0.50 & org 9.1.13 on Debian buster/sid
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-08-21 18:20 +0200 |
| Message-ID | <wphxU-4Iu-23@gated-at.bofh.it> |
| In reply to | #199156 |
On Tue 21 Aug 2018 at 16:39:13 (+0100), Eric S Fraga wrote: > Hello, > > I have a laptop running buster (testing) which connects to my wireless > network (192.xxx). I also have a new Gemini PDA (also running Debian > but stretch in this case) which connects to the same network. So far, > so normal. > > However, I can connect the Gemini PDA via USB cable to the laptop and > both systems will have two different networks available, with the USB > one being 10.xxx. I can then ssh, say, from either system to the other > using IP addresses in either 192 or 10 networks. > > On my desktop computer, connected by Ethernet cable to the same network > (192.xxx), plugging the USB cable from the Gemini to the desktop does > not lead to a new connection being made on the desktop computer. I can > connect to the USB network (nmcli device connect ...) but it disconnects > me from the wireless (and vice versa). > > Would somebody please point me to the right magical incantation that > would allow my desktop computer to have both connections active > simultaneously? If NM is like wicd, it can only handle one connection at a time. What I would do is to set up your 10.xxx connection in /e/n/i which should mean that NM doesn't know about it or touch it. I assume you'll need a route as you can't go through the gateway. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Glenn English <ghe2001@gmail.com> |
|---|---|
| Date | 2018-08-21 19:00 +0200 |
| Message-ID | <wpiaD-4VN-25@gated-at.bofh.it> |
| In reply to | #199156 |
On Tue, Aug 21, 2018 at 3:39 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > Would somebody please point me to the right magical incantation that > would allow my desktop computer to have both connections active > simultaneously? I've done that on a couple boxes here -- a laptop (WiFi and an Ethernet) and a workstation (2 Ethernets) On both of them, I wrote a /etc/network/interfaces script to give an IP to the Ethernet and start at boot. The others are DHCP and don't come on at boot. I wrote a little shell script that ifup's the DHCP, and enters a few things into the routing table (the DHCP is to Comcast, so I have to do a little cleaning up afterward to replace the garbage Comcast puts on my computers). The machines run reliably with both connections up: Comcast for blistering speed from the mirrors in the apt/sources lists, and my T1 for the real 'Net. I'm on Buster too, BTW. -- Glenn English
[toc] | [prev] | [next] | [standalone]
| From | Eric S Fraga <e.fraga@ucl.ac.uk> |
|---|---|
| Date | 2018-08-22 00:10 +0200 |
| Message-ID | <wpn0B-81G-1@gated-at.bofh.it> |
| In reply to | #199169 |
On Tuesday, 21 Aug 2018 at 16:58, Glenn English wrote: > On Tue, Aug 21, 2018 at 3:39 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > >> Would somebody please point me to the right magical incantation that >> would allow my desktop computer to have both connections active >> simultaneously? > > I've done that on a couple boxes here -- a laptop (WiFi and an > Ethernet) and a workstation (2 Ethernets) > > On both of them, I wrote a /etc/network/interfaces script to give an > IP to the Ethernet and start at boot. The others are DHCP and don't > come on at boot. Thanks. I added a few lines to /e/n/i and everything works just fine now. The actual lines are ,---- | # the USB network for my Gemini | auto enp0s29u1u1 | iface enp0s29u1u1 inet static | address 10.15.19.80 `---- and I simply "sudo ifup enp0s29u1u1" when I need it. But I still do not understand why it works automatically on one of the systems but not the other. One of those mysteries, I guess. -- Eric S Fraga via Emacs 27.0.50 & org 9.1.13 on Debian buster/sid
[toc] | [prev] | [next] | [standalone]
| From | Zenaan Harkness <zenaan@freedbms.net> |
|---|---|
| Date | 2018-08-22 02:30 +0200 |
| Message-ID | <wppc5-L2-11@gated-at.bofh.it> |
| In reply to | #199201 |
On Tue, Aug 21, 2018 at 11:08:10PM +0100, Eric S Fraga wrote: > On Tuesday, 21 Aug 2018 at 16:58, Glenn English wrote: > > On Tue, Aug 21, 2018 at 3:39 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > > > >> Would somebody please point me to the right magical incantation that > >> would allow my desktop computer to have both connections active > >> simultaneously? > > > > I've done that on a couple boxes here -- a laptop (WiFi and an > > Ethernet) and a workstation (2 Ethernets) > > > > On both of them, I wrote a /etc/network/interfaces script to give an > > IP to the Ethernet and start at boot. The others are DHCP and don't > > come on at boot. > > Thanks. I added a few lines to /e/n/i and everything works just fine > now. The actual lines are > > ,---- > | # the USB network for my Gemini > | auto enp0s29u1u1 > | iface enp0s29u1u1 inet static > | address 10.15.19.80 > `---- > > and I simply "sudo ifup enp0s29u1u1" when I need it. > > But I still do not understand why it works automatically on one of the > systems but not the other. One of those mysteries, I guess. Static configuration is by necessity (basically) custom setup - i.e. requires manual intervention. Automatic means the above /e/n/i lines would look like this instead: # the USB network for my Gemini auto enp0s29u1u1 iface enp0s29u1u1 inet dhcp But of course for network-manager, it would by default use dhcp, and you would not manually configure for DHCP in your /e/n/i file. Always remember you can do an in-foreground one shot DHCP like so: sudo dhclient -d enp0s29u1u1 which has the benefit that you can easily kill it as desired with a CTRL-c, AND you can monitor its output immediately, AND you will see immediately if you got the device/ interface name wrong. What's not to like? Good luck,
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-08-23 02:20 +0200 |
| Message-ID | <wpLvX-5Fp-1@gated-at.bofh.it> |
| In reply to | #199208 |
On Wed 22 Aug 2018 at 10:29:01 (+1000), Zenaan Harkness wrote: > On Tue, Aug 21, 2018 at 11:08:10PM +0100, Eric S Fraga wrote: > > On Tuesday, 21 Aug 2018 at 16:58, Glenn English wrote: > > > On Tue, Aug 21, 2018 at 3:39 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote: > > > > > >> Would somebody please point me to the right magical incantation that > > >> would allow my desktop computer to have both connections active > > >> simultaneously? > > > > > > I've done that on a couple boxes here -- a laptop (WiFi and an > > > Ethernet) and a workstation (2 Ethernets) > > > > > > On both of them, I wrote a /etc/network/interfaces script to give an > > > IP to the Ethernet and start at boot. The others are DHCP and don't > > > come on at boot. > > > > Thanks. I added a few lines to /e/n/i and everything works just fine > > now. The actual lines are > > > > ,---- > > | # the USB network for my Gemini > > | auto enp0s29u1u1 > > | iface enp0s29u1u1 inet static > > | address 10.15.19.80 > > `---- > > > > and I simply "sudo ifup enp0s29u1u1" when I need it. > > > > But I still do not understand why it works automatically on one of the > > systems but not the other. One of those mysteries, I guess. > > Static configuration is by necessity (basically) custom setup - i.e. > requires manual intervention. > > Automatic means the above /e/n/i lines would look like this instead: > > # the USB network for my Gemini > auto enp0s29u1u1 > iface enp0s29u1u1 inet dhcp > > > But of course for network-manager, it would by default use dhcp, and > you would not manually configure for DHCP in your /e/n/i file. > > Always remember you can do an in-foreground one shot DHCP like so: > > sudo dhclient -d enp0s29u1u1 > > which has the benefit that you can easily kill it as desired with a > CTRL-c, AND you can monitor its output immediately, AND you will see > immediately if you got the device/ interface name wrong. What's not > to like? I'm not sure I understand using DHCP to get the ipaddr for the network running through the USB connection. Could you explain? Aside: I will get my knuckles rapped if I explain how I do this sort of connection using the IPv6 link addresses which means I don't have to ifup anything before I can transfer files. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Date | 2018-08-24 14:10 +0200 |
| Message-ID | <wqj4B-mN-3@gated-at.bofh.it> |
| In reply to | #199256 |
On 2018-08-22 19:09:24 -0500, David Wright wrote: > On Wed 22 Aug 2018 at 10:29:01 (+1000), Zenaan Harkness wrote: > > Static configuration is by necessity (basically) custom setup - i.e. > > requires manual intervention. > > > > Automatic means the above /e/n/i lines would look like this instead: > > > > # the USB network for my Gemini > > auto enp0s29u1u1 > > iface enp0s29u1u1 inet dhcp > > > > > > But of course for network-manager, it would by default use dhcp, and > > you would not manually configure for DHCP in your /e/n/i file. > > > > Always remember you can do an in-foreground one shot DHCP like so: > > > > sudo dhclient -d enp0s29u1u1 > > > > which has the benefit that you can easily kill it as desired with a > > CTRL-c, AND you can monitor its output immediately, AND you will see > > immediately if you got the device/ interface name wrong. What's not > > to like? > > I'm not sure I understand using DHCP to get the ipaddr for the > network running through the USB connection. Could you explain? That's the usual way to do it, because you don't necessarily know what IP address you should get, and it can entirely be dynamic. Moreover, one often wants to do this to use the phone's modem, and this will also set up a default route automatically (but this is not what you want, AFAIK). -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-08-24 18:10 +0200 |
| Message-ID | <wqmOR-2yL-5@gated-at.bofh.it> |
| In reply to | #199314 |
I don't think I understand any part of your answer as it has too many
promouns (this and thats) and not enough nouns (specifics).
On Fri 24 Aug 2018 at 13:50:50 (+0200), Vincent Lefevre wrote:
> On 2018-08-22 19:09:24 -0500, David Wright wrote:
> > On Wed 22 Aug 2018 at 10:29:01 (+1000), Zenaan Harkness wrote:
> > > Static configuration is by necessity (basically) custom setup - i.e.
> > > requires manual intervention.
> > >
> > > Automatic means the above /e/n/i lines would look like this instead:
> > >
> > > # the USB network for my Gemini
> > > auto enp0s29u1u1
> > > iface enp0s29u1u1 inet dhcp
> > >
> > >
> > > But of course for network-manager, it would by default use dhcp, and
> > > you would not manually configure for DHCP in your /e/n/i file.
> > >
> > > Always remember you can do an in-foreground one shot DHCP like so:
> > >
> > > sudo dhclient -d enp0s29u1u1
> > >
> > > which has the benefit that you can easily kill it as desired with a
> > > CTRL-c, AND you can monitor its output immediately, AND you will see
> > > immediately if you got the device/ interface name wrong. What's not
> > > to like?
> >
> > I'm not sure I understand using DHCP to get the ipaddr for the
> > network running through the USB connection. Could you explain?
>
> That's the usual way to do it,
Where is the DHCP server running that hands out the dynamic address?
If it's the wireless router, what does that know about a direct link
between the workstation and the laptop that doesn't pass through it?
> because you don't necessarily know
> what IP address you should get, and it can entirely be dynamic.
Where does "should" come into this? The example used the address
10.15.19.80 at one end (we aren't told the other end). This has
no relationship to the wireless network that both devices are
connected to (reported as 192[.168].xxx).
> Moreover, one often wants to do this to use the phone's modem,
> and this will also set up a default route automatically (but this
> is not what you want, AFAIK).
So "this" process, whatever it is, doesn't do the correct thing. and
yet we were asked "What's not to like?". Nevertheless, I'd like to
know what "this" process is as it should be the answer to my
knuckle-rapping problem which is very similar to the OP's:
. two computers connected to a wireless router with IPv4,
. a direct link between the two computers (CAT5 cable in my case),
. the direct link must (de)configure itself when the cable is (dis)connected,
. the direct link must never get set up as the default route,
. that's Never, even if the computers are booted while the CAT5 cable
is attached but the router's wireless signal is temporarily absent.
I do this very simply, just by using IPv6 over the cable:
https://lists.debian.org/debian-user/2018/02/msg01214.html
but what's being discussed in this thread should be able to do
what was demanded by the anti-IPv6linklocals. I posted my logs
of my failure, but the problem with their method wasn't diagnosed.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Lee <ler762@gmail.com> |
|---|---|
| Date | 2018-08-24 22:10 +0200 |
| Message-ID | <wqqz8-4ID-15@gated-at.bofh.it> |
| In reply to | #199317 |
On 8/24/18, David Wright <deblis@lionunicorn.co.uk> wrote: > I don't think I understand any part of your answer as it has too many > promouns (this and thats) and not enough nouns (specifics). > > On Fri 24 Aug 2018 at 13:50:50 (+0200), Vincent Lefevre wrote: >> On 2018-08-22 19:09:24 -0500, David Wright wrote: >> > On Wed 22 Aug 2018 at 10:29:01 (+1000), Zenaan Harkness wrote: >> > > Static configuration is by necessity (basically) custom setup - i.e. >> > > requires manual intervention. >> > > >> > > Automatic means the above /e/n/i lines would look like this instead: >> > > >> > > # the USB network for my Gemini >> > > auto enp0s29u1u1 >> > > iface enp0s29u1u1 inet dhcp >> > > >> > > >> > > But of course for network-manager, it would by default use dhcp, and >> > > you would not manually configure for DHCP in your /e/n/i file. >> > > >> > > Always remember you can do an in-foreground one shot DHCP like so: >> > > >> > > sudo dhclient -d enp0s29u1u1 >> > > >> > > which has the benefit that you can easily kill it as desired with a >> > > CTRL-c, AND you can monitor its output immediately, AND you will see >> > > immediately if you got the device/ interface name wrong. What's not >> > > to like? >> > >> > I'm not sure I understand using DHCP to get the ipaddr for the >> > network running through the USB connection. Could you explain? >> >> That's the usual way to do it, > > Where is the DHCP server running that hands out the dynamic address? There isn't one. DHCP client requests an address, doesn't get one, falls back to rfc-3927 Dynamic Configuration of IPv4 Link-Local Addresses caveat: I just tried it on my laptop running debian & not only did it not work, it declared the ethernet interface down & removed the ipv6 link-local address!!! But my experience w/ debian is measured in days, so hopefully it's just something I've got configured wrong & not an OS deficiency. >> because you don't necessarily know >> what IP address you should get, and it can entirely be dynamic. > > Where does "should" come into this? I'm guessing that "should" is that you need an unused address on the correct subnet. DHCP can figure that out for you & "should" fall back to a link-local address (ipv4: 169.254.0.0/16) if the dhcp client doesn't get an address. If anyone knows how to make that happen on Debian, please share >> Moreover, one often wants to do this to use the phone's modem, >> and this will also set up a default route automatically (but this >> is not what you want, AFAIK). > > So "this" process, whatever it is, doesn't do the correct thing. and > yet we were asked "What's not to like?". If debian can get you an ipv4 link-local address if dhcp fails _and_ you can configure an interface route metric to prefer wireless routes.. yeah, it ain't all that bad. > Nevertheless, I'd like to > know what "this" process is as it should be the answer to my > knuckle-rapping problem which is very similar to the OP's: > > . two computers connected to a wireless router with IPv4, > . a direct link between the two computers (CAT5 cable in my case), > . the direct link must (de)configure itself when the cable is > (dis)connected, which is normal auto-sense > . the direct link must never get set up as the default route, Can you configure an interface route metric such that wireless routes are used for everything except the ethernet interface subnet? (works for me on windows) Maybe you'll never use the ethernet connection for internet access, but I do sometimes & it's nice when everything Just Works: wireless routes take precedence but when there's no wireless and dhcp gets me an address on the ethernet connection I can still get out to the internet without having to do or change anything. > . that's Never, even if the computers are booted while the CAT5 cable > is attached but the router's wireless signal is temporarily absent. > > I do this very simply, just by using IPv6 over the cable: > https://lists.debian.org/debian-user/2018/02/msg01214.html > but what's being discussed in this thread should be able to do > what was demanded by the anti-IPv6linklocals. If I couldn't get an ipv6 assignment @work then yes, https://tools.ietf.org/html/rfc5375#section-2.2 is the way to go. But @home?? unless there's some other motivation for using a globally unique address, it's totally not worth the effort. get out the popcorn time: Want to watch the anti-IPv6linklocals explode? Have them read rfc 7404 Using Only Link-Local Addressing inside an IPv6 Network Regards, Lee
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web