* [gentoo-user] Slighty confused about net connections
@ 2014-11-28 18:35 meino.cramer
2014-11-28 19:37 ` [gentoo-user] " James
2014-11-28 23:21 ` [gentoo-user] " thegeezer
0 siblings, 2 replies; 10+ messages in thread
From: meino.cramer @ 2014-11-28 18:35 UTC (permalink / raw
To: Gentoo
Hi,
I am /slightly/ confused about a specific net setup:
There are two small (technically identical) embedded
gentoo "systems" (too small to call them without thos "s).
Both run the same Gentoo.
Both do ethernet over usb.
Both are configured to have different IPs of the same subnet
and do have different MACs.
Both are connected to the same usb hub of the motherboard of
my PC (shich runs Gentoo...).
I setup one usb0 interface on my PC.
But regardless in which order I plug in the USB cables to
those little boards: I cannot ssh to the second board.
When used alone there are no problems, so both boards
are technically ok.
Do I really need two interfaces isb0 and usb1 with different
subnets here?
Or do I miss something?
Best regards,
Meino
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Slighty confused about net connections
2014-11-28 18:35 [gentoo-user] Slighty confused about net connections meino.cramer
@ 2014-11-28 19:37 ` James
2014-11-28 23:21 ` [gentoo-user] " thegeezer
1 sibling, 0 replies; 10+ messages in thread
From: James @ 2014-11-28 19:37 UTC (permalink / raw
To: gentoo-user
<meino.cramer <at> gmx.de> writes:
> Both run the same Gentoo.
> Both do ethernet over usb.
>
> Both are configured to have different IPs of the same subnet
> and do have different MACs.
So you can ping each one (the separate IP addresses), not from the
system where they are connecto to the usb hub on the mobo, but
a seccond system on your local ethernet?
> Both are connected to the same usb hub of the motherboard of
> my PC (shich runs Gentoo...).
Try to connect one to a different system's usb.
man lsusb to get the options you need for lsusb
> But regardless in which order I plug in the USB cables to
> those little boards: I cannot ssh to the second board.
put it on a second PC's usb buss. Let's get that working first
before you put them on the same PC, OK?
> When used alone there are no problems, so both boards
> are technically ok.
> Do I really need two interfaces isb0 and usb1 with different
> subnets here?
No, you should not. They can be attached to (2) different PCs that
are on the same subnet. Try that first.
James
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-28 18:35 [gentoo-user] Slighty confused about net connections meino.cramer
2014-11-28 19:37 ` [gentoo-user] " James
@ 2014-11-28 23:21 ` thegeezer
2014-11-29 2:20 ` meino.cramer
1 sibling, 1 reply; 10+ messages in thread
From: thegeezer @ 2014-11-28 23:21 UTC (permalink / raw
To: gentoo-user
On 2014-11-28 18:35, meino.cramer@gmx.de wrote:
> Do I really need two interfaces isb0 and usb1 with different
> subnets here?
>
> Or do I miss something?
howdy,
yes you do.
i.e.
PC has real-eth0="192.168.1.1/24"
PC has usb-eth0="192.168.2.1/24"
PC has usb-eth1="192.168.2.2/24"
sysA has usb-eth0="192.168.2.101/24"
sysB has usb-eth0="192.168.2.102/24"
from PC you want to ping 192.168.2.101, ok it pings
then you want to ping 192.168.2.102 and you have a cached route for
192.168.2.0/24 dev usb-eth0
you can get around this using policy routing but that is a bit much for
what you want.
you can always use smaller ranges for example:
PC usb-eth0="192.168.2.1/25"
PC usb-eth1="192.168.2.129/25"
sysA usb-eth0="192.168.2.101/25"
sysB usb-eth1"192.168.2.254/25"
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-28 23:21 ` [gentoo-user] " thegeezer
@ 2014-11-29 2:20 ` meino.cramer
2014-11-29 3:25 ` covici
2014-11-29 5:03 ` [gentoo-user] " James
0 siblings, 2 replies; 10+ messages in thread
From: meino.cramer @ 2014-11-29 2:20 UTC (permalink / raw
To: gentoo-user
thegeezer@thegeezer.net <thegeezer@thegeezer.net> [14-11-29 02:56]:
> On 2014-11-28 18:35, meino.cramer@gmx.de wrote:
> >Do I really need two interfaces isb0 and usb1 with different
> >subnets here?
> >Or do I miss something?
>
>
> howdy,
> yes you do.
> i.e.
> PC has real-eth0="192.168.1.1/24"
> PC has usb-eth0="192.168.2.1/24"
> PC has usb-eth1="192.168.2.2/24"
> sysA has usb-eth0="192.168.2.101/24"
> sysB has usb-eth0="192.168.2.102/24"
>
> from PC you want to ping 192.168.2.101, ok it pings
> then you want to ping 192.168.2.102 and you have a cached route for
> 192.168.2.0/24 dev usb-eth0
> you can get around this using policy routing but that is a bit much for
> what you want.
> you can always use smaller ranges for example:
>
> PC usb-eth0="192.168.2.1/25"
> PC usb-eth1="192.168.2.129/25"
> sysA usb-eth0="192.168.2.101/25"
> sysB usb-eth1"192.168.2.254/25"
>
>
Hi James, hi thegeezer
I want to summerize here what works, what dont work and what I tried
-- sorry I am no natie english speaker and my english is not exact
enough for such things...but well...lets see..
Current setup
PC:
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255
ether ee:6c:bc:6c:03:79 txqueuelen 1000 (Ethernet)
Arietta A:
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
ether 00:15:f2:18:b0:30 txqueuelen 1000 (Ethernet)
Arietta B:
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
ether 00:15:f2:18:b0:31 txqueuelen 1000 (Ethernet)
Tried:
(I only have one PC...)
Only Arietta A connected to PC: Works fine -- ssh login ok
Only Arietta B connected to PC: Works fine -- ssh login ok
Arietta A connected to PC, after it has booted Arietta B connected
to the same (motherboard internal) usb-hub of the PC: Cant ssh to Arietta B but
can ssh to Arietta A.
Switch result if connecting done in opposite order.
Question:
Is one usb_0 interface on the PC enough?
Is there something else wrong with my setup?
Thanks a lot for any help in advance!
Best regards,
Meino
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-29 2:20 ` meino.cramer
@ 2014-11-29 3:25 ` covici
2014-11-29 6:14 ` meino.cramer
2014-11-29 5:03 ` [gentoo-user] " James
1 sibling, 1 reply; 10+ messages in thread
From: covici @ 2014-11-29 3:25 UTC (permalink / raw
To: gentoo-user
meino.cramer@gmx.de wrote:
> thegeezer@thegeezer.net <thegeezer@thegeezer.net> [14-11-29 02:56]:
> > On 2014-11-28 18:35, meino.cramer@gmx.de wrote:
> > >Do I really need two interfaces isb0 and usb1 with different
> > >subnets here?
> > >Or do I miss something?
> >
> >
> > howdy,
> > yes you do.
> > i.e.
> > PC has real-eth0="192.168.1.1/24"
> > PC has usb-eth0="192.168.2.1/24"
> > PC has usb-eth1="192.168.2.2/24"
> > sysA has usb-eth0="192.168.2.101/24"
> > sysB has usb-eth0="192.168.2.102/24"
> >
> > from PC you want to ping 192.168.2.101, ok it pings
> > then you want to ping 192.168.2.102 and you have a cached route for
> > 192.168.2.0/24 dev usb-eth0
> > you can get around this using policy routing but that is a bit much for
> > what you want.
> > you can always use smaller ranges for example:
> >
> > PC usb-eth0="192.168.2.1/25"
> > PC usb-eth1="192.168.2.129/25"
> > sysA usb-eth0="192.168.2.101/25"
> > sysB usb-eth1"192.168.2.254/25"
> >
> >
> Hi James, hi thegeezer
>
> I want to summerize here what works, what dont work and what I tried
> -- sorry I am no natie english speaker and my english is not exact
> enough for such things...but well...lets see..
>
> Current setup
> PC:
> usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255
> ether ee:6c:bc:6c:03:79 txqueuelen 1000 (Ethernet)
>
> Arietta A:
> usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255
> inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
> ether 00:15:f2:18:b0:30 txqueuelen 1000 (Ethernet)
>
> Arietta B:
> usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255
> inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
> ether 00:15:f2:18:b0:31 txqueuelen 1000 (Ethernet)
>
>
> Tried:
> (I only have one PC...)
> Only Arietta A connected to PC: Works fine -- ssh login ok
> Only Arietta B connected to PC: Works fine -- ssh login ok
>
> Arietta A connected to PC, after it has booted Arietta B connected
> to the same (motherboard internal) usb-hub of the PC: Cant ssh to Arietta B but
> can ssh to Arietta A.
> Switch result if connecting done in opposite order.
>
> Question:
> Is one usb_0 interface on the PC enough?
> Is there something else wrong with my setup?
You can't have the same ethernet card connected to two different things
-- you have the same ethernet address on both boards, so the poor
thing can only do the first one, you need another interface with a
different ethernet address.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Slighty confused about net connections
2014-11-29 2:20 ` meino.cramer
2014-11-29 3:25 ` covici
@ 2014-11-29 5:03 ` James
2014-11-29 6:21 ` meino.cramer
1 sibling, 1 reply; 10+ messages in thread
From: James @ 2014-11-29 5:03 UTC (permalink / raw
To: gentoo-user
<meino.cramer <at> gmx.de> writes:
>
> I want to summerize here what works, what dont work and what I tried
Meino,
I read your email. I have not tried what you are trying before
and do not have those boards: maybe I should get a pair?
Or are you almost done?
What I would suggest is read up on "IP aliasing"
and "Network Address Translation".
Maybe all you have to do is put the 2 devices on separate
USB_busses on your PC. "lsusb" should identify how many
differnet usb busses you have on your pc hardware. You
motherboard book (online if you don't have one) should
also tell you about the different usb busses on your motherboard.
Some older PC just have one USB buss.
You are going to have to experiment. Check your routing table
after you set things up. Also install net-analyzer/macchanger
and see if that helps. If you grope long enough, you should
find a solution. Hopefully others have some ideas.
"netstat" and "arp" are also commands you should look at their
options as tools to gain insight into what you are doing, and
why what you try, fails.
[1] http://en.qi-hardware.com/wiki/Ethernet_over_USB
hth,
James
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-29 3:25 ` covici
@ 2014-11-29 6:14 ` meino.cramer
2014-11-29 6:30 ` Alan McKinnon
0 siblings, 1 reply; 10+ messages in thread
From: meino.cramer @ 2014-11-29 6:14 UTC (permalink / raw
To: gentoo-user
covici@ccs.covici.com <covici@ccs.covici.com> [14-11-29 04:28]:
> meino.cramer@gmx.de wrote:
>
> > thegeezer@thegeezer.net <thegeezer@thegeezer.net> [14-11-29 02:56]:
> > > On 2014-11-28 18:35, meino.cramer@gmx.de wrote:
> > > >Do I really need two interfaces isb0 and usb1 with different
> > > >subnets here?
> > > >Or do I miss something?
> > >
> > >
> > > howdy,
> > > yes you do.
> > > i.e.
> > > PC has real-eth0="192.168.1.1/24"
> > > PC has usb-eth0="192.168.2.1/24"
> > > PC has usb-eth1="192.168.2.2/24"
> > > sysA has usb-eth0="192.168.2.101/24"
> > > sysB has usb-eth0="192.168.2.102/24"
> > >
> > > from PC you want to ping 192.168.2.101, ok it pings
> > > then you want to ping 192.168.2.102 and you have a cached route for
> > > 192.168.2.0/24 dev usb-eth0
> > > you can get around this using policy routing but that is a bit much for
> > > what you want.
> > > you can always use smaller ranges for example:
> > >
> > > PC usb-eth0="192.168.2.1/25"
> > > PC usb-eth1="192.168.2.129/25"
> > > sysA usb-eth0="192.168.2.101/25"
> > > sysB usb-eth1"192.168.2.254/25"
> > >
> > >
> > Hi James, hi thegeezer
> >
> > I want to summerize here what works, what dont work and what I tried
> > -- sorry I am no natie english speaker and my english is not exact
> > enough for such things...but well...lets see..
> >
> > Current setup
> > PC:
> > usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> > inet 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255
> > ether ee:6c:bc:6c:03:79 txqueuelen 1000 (Ethernet)
> >
> > Arietta A:
> > usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> > inet 192.168.10.10 netmask 255.255.255.0 broadcast 192.168.10.255
> > inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
> > ether 00:15:f2:18:b0:30 txqueuelen 1000 (Ethernet)
> >
> > Arietta B:
> > usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> > inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255
> > inet6 fe80::215:f2ff:fe18:b030 prefixlen 64 scopeid 0x20<link>
> > ether 00:15:f2:18:b0:31 txqueuelen 1000 (Ethernet)
> >
> >
> > Tried:
> > (I only have one PC...)
> > Only Arietta A connected to PC: Works fine -- ssh login ok
> > Only Arietta B connected to PC: Works fine -- ssh login ok
> >
> > Arietta A connected to PC, after it has booted Arietta B connected
> > to the same (motherboard internal) usb-hub of the PC: Cant ssh to Arietta B but
> > can ssh to Arietta A.
> > Switch result if connecting done in opposite order.
> >
> > Question:
> > Is one usb_0 interface on the PC enough?
> > Is there something else wrong with my setup?
>
> You can't have the same ethernet card connected to two different things
> -- you have the same ethernet address on both boards, so the poor
> thing can only do the first one, you need another interface with a
> different ethernet address.
>
> --
> Your life is like a penny. You're going to lose it. The question is:
> How do
> you spend it?
>
> John Covici
> covici@ccs.covici.com
>
Hi John,
After your email I read the output of dmesg more precisely ... and now
knowing (due to your post :) what to look for and found that
the detection of another usb-ethernet-device attached to my PC created
another usb<n> (first: usb0, second: usb1).
I put the first Arietta into the net 192.168.10.x and the second
Arietta into net 192.168.11.x and do two different ifconfig for usb0
and the other one for usb1 and TADA! - I could ssh into both!
This is not THAT elegant (wasting a complete subnet), but it proofes,
that both boards are /relly/ ok...
This becomes especially important for me since I had soldered three
"""PCB connectors""" (<<--- this is bloody typical "german English"...
hopefully netherless at least half understandable) to both boards...
and soldering such tiny things on very limited space is not what I
do like most... ;)
So nothing is damaged, and I am happy...until the next
"""challange""".
Thanks a lot for your help!!!
Best regards,
Meino
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: Slighty confused about net connections
2014-11-29 5:03 ` [gentoo-user] " James
@ 2014-11-29 6:21 ` meino.cramer
0 siblings, 0 replies; 10+ messages in thread
From: meino.cramer @ 2014-11-29 6:21 UTC (permalink / raw
To: gentoo-user
Hi James,
...got it running!
I really need two usb devices *usb0 and usb1), each
for one Arietta board.
I got NAT runnig for the Arietta before (need that for updateing
Gentoo 8)) with one board. I did the same on the other one and it works.
I assigned different MACs (and checked that) via /etc/conf.d/net
before. Two devices with the same MAC can cause some "weird results"
;)
Thanks for the Link, James! :)
Will read that!
Best regards,
Meino
updateing Gentoo 8)
James <wireless@tampabay.rr.com> [14-11-29 06:08]:
> <meino.cramer <at> gmx.de> writes:
>
>
> >
> > I want to summerize here what works, what dont work and what I tried
>
>
> Meino,
>
> I read your email. I have not tried what you are trying before
> and do not have those boards: maybe I should get a pair?
> Or are you almost done?
>
> What I would suggest is read up on "IP aliasing"
> and "Network Address Translation".
>
>
> Maybe all you have to do is put the 2 devices on separate
> USB_busses on your PC. "lsusb" should identify how many
> differnet usb busses you have on your pc hardware. You
> motherboard book (online if you don't have one) should
> also tell you about the different usb busses on your motherboard.
> Some older PC just have one USB buss.
>
>
> You are going to have to experiment. Check your routing table
> after you set things up. Also install net-analyzer/macchanger
> and see if that helps. If you grope long enough, you should
> find a solution. Hopefully others have some ideas.
>
> "netstat" and "arp" are also commands you should look at their
> options as tools to gain insight into what you are doing, and
> why what you try, fails.
>
> [1] http://en.qi-hardware.com/wiki/Ethernet_over_USB
>
> hth,
> James
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-29 6:14 ` meino.cramer
@ 2014-11-29 6:30 ` Alan McKinnon
2014-11-29 6:43 ` meino.cramer
0 siblings, 1 reply; 10+ messages in thread
From: Alan McKinnon @ 2014-11-29 6:30 UTC (permalink / raw
To: gentoo-user
On 29/11/2014 08:14, meino.cramer@gmx.de wrote:
> After your email I read the output of dmesg more precisely ... and now
> knowing (due to your post :) what to look for and found that
> the detection of another usb-ethernet-device attached to my PC created
> another usb<n> (first: usb0, second: usb1).
>
> I put the first Arietta into the net 192.168.10.x and the second
> Arietta into net 192.168.11.x and do two different ifconfig for usb0
> and the other one for usb1 and TADA! - I could ssh into both!
>
> This is not THAT elegant (wasting a complete subnet), but it proofes,
> that both boards are /relly/ ok...
In truth you are not wasting a complete subnet (whatever that is), you
have merely specified a range 256 times larger than what you want to have.
In networking you are not limited to ranges that end on an octet
boundary (we got rid of *that* limitation 10+ years ago). Instead just
do this:
board #1: 192.168.0.100/32
board #2: 192.168.0.101/32
Now you have specified "subnet" that are each exactly one ip address
wide. All modern software know what to do with this.
Adapt the addresses to your own network design and you should be good to go.
Alan
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Slighty confused about net connections
2014-11-29 6:30 ` Alan McKinnon
@ 2014-11-29 6:43 ` meino.cramer
0 siblings, 0 replies; 10+ messages in thread
From: meino.cramer @ 2014-11-29 6:43 UTC (permalink / raw
To: gentoo-user
Alan McKinnon <alan.mckinnon@gmail.com> [14-11-29 07:32]:
> On 29/11/2014 08:14, meino.cramer@gmx.de wrote:
>
> > After your email I read the output of dmesg more precisely ... and now
> > knowing (due to your post :) what to look for and found that
> > the detection of another usb-ethernet-device attached to my PC created
> > another usb<n> (first: usb0, second: usb1).
> >
> > I put the first Arietta into the net 192.168.10.x and the second
> > Arietta into net 192.168.11.x and do two different ifconfig for usb0
> > and the other one for usb1 and TADA! - I could ssh into both!
> >
> > This is not THAT elegant (wasting a complete subnet), but it proofes,
> > that both boards are /relly/ ok...
>
>
> In truth you are not wasting a complete subnet (whatever that is), you
> have merely specified a range 256 times larger than what you want to have.
>
> In networking you are not limited to ranges that end on an octet
> boundary (we got rid of *that* limitation 10+ years ago). Instead just
> do this:
>
> board #1: 192.168.0.100/32
> board #2: 192.168.0.101/32
>
> Now you have specified "subnet" that are each exactly one ip address
> wide. All modern software know what to do with this.
>
> Adapt the addresses to your own network design and you should be good to go.
>
>
>
>
> Alan
>
>
> --
> Alan McKinnon
> alan.mckinnon@gmail.com
>
>
Hi Alan,
thanks a lot for that ! 8)
Best regards,
Meino
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-11-29 6:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-28 18:35 [gentoo-user] Slighty confused about net connections meino.cramer
2014-11-28 19:37 ` [gentoo-user] " James
2014-11-28 23:21 ` [gentoo-user] " thegeezer
2014-11-29 2:20 ` meino.cramer
2014-11-29 3:25 ` covici
2014-11-29 6:14 ` meino.cramer
2014-11-29 6:30 ` Alan McKinnon
2014-11-29 6:43 ` meino.cramer
2014-11-29 5:03 ` [gentoo-user] " James
2014-11-29 6:21 ` meino.cramer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox