Page 1 of 1

How to Connect Eth0 and Eth 1 at the same time?

Posted: Sat Oct 30, 2021 5:44 am
by defort

Hello Everybody~
I use puppy linux Slacko 4.4.249

I can't connect eth0 and eth1 at the same time, in another linux distro in same PC, automatically i can connect 2 ethernet (eth0, eth1, etc) if it was plugged at the same time
but in puppy linux, i need re-configuration and switch network interfaces first, only one of multiple of ethernets is active
if i connect eth0, eth1 is not active
if i connect eth1, eth0 is not active
eth0 and eth1 have diffrent ip btw

how to fix it? how can i have multiple network interfaces? how to use eth0 and eth1 at the same time?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Sat Oct 30, 2021 2:23 pm
by snoring_cat

I tested with Puppy Linux's built in network configuration tools, and have the same results as you. Until there is a better solution, what you can do is manually turn on the interfaces by typing the following in a console window

Code: Select all

dhcpcd eth0
dhcpcd eth1
ifconfig

You can close the console window after these commands finish. This is just a quick hack for now, since this solution doesn't handle things like routing and priorities.

Below is an example of the output you could expect.

eth.jpg
eth.jpg (146.34 KiB) Viewed 1136 times

Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Sun Oct 31, 2021 12:29 am
by rerwin
defort wrote: Sat Oct 30, 2021 5:44 am

how can i have multiple network interfaces? how to use eth0 and eth1 at the same time?

I think Frisbee will allow multiple interfaces to be active but chooses one for connecting to the internet. The other interface may also get an IP address.

If the second connection can use a static IP address, you can set that up in Frisbee. How are you using the second connection?

Some time ago, there were postings about setting up a Puppy server or access point or hotspot, probably in the old forum. You need some way to operate the second interface.

Richard


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 01, 2021 12:42 pm
by defort
snoring_cat wrote: Sat Oct 30, 2021 2:23 pm

I tested with Puppy Linux's built in network configuration tools, and have the same results as you. Until there is a better solution, what you can do is manually turn on the interfaces by typing the following in a console window

Code: Select all

dhcpcd eth0
dhcpcd eth1
ifconfig

You can close the console window after these commands finish. This is just a quick hack for now, since this solution doesn't handle things like routing and priorities.

Below is an example of the output you could expect.

eth.jpg

Hello, thanks for your reply

this solution will make 2 networks can be seen in the "ifconfig' commands also in IP info
but the connection still in one interface
i realized it, when i connected on eth1 and then try to ping another computer with eth0
no response, the computer is still on 1 interface even when it shows both of them on terminal


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 01, 2021 12:51 pm
by defort
rerwin wrote: Sun Oct 31, 2021 12:29 am
defort wrote: Sat Oct 30, 2021 5:44 am

how can i have multiple network interfaces? how to use eth0 and eth1 at the same time?

I think Frisbee will allow multiple interfaces to be active but chooses one for connecting to the internet. The other interface may also get an IP address.

If the second connection can use a static IP address, you can set that up in Frisbee. How are you using the second connection?

Some time ago, there were postings about setting up a Puppy server or access point or hotspot, probably in the old forum. You need some way to operate the second interface.

Richard

Hello thanks for you reply.

yep, to connect the second connection, i need to switch it every time.
not just the internet, but i can't ping to second ip with second connection when the one interface is active.
can i set both of them to become active at first boot?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 01, 2021 1:29 pm
by mikewalsh

Y'know, I don't understand the logic behind this.

Why would you want multiple connections to be running concurrently? Won't they conflict with each other in some way?

Any given browser or other app that needs an internet connection can only USE one at any given moment. And CPU multi-threading enables multiple applications to use processes simultaneously by simply switching between processes way faster than most folks can even blink an eye, thus giving the impression that multiple items are running simultaneously.

My own Pentium Gold, for instance. Its clock speed of 3.7 GHz equates to 3,700,000,000 cycles per second.....every one of which can execute a single instruction.

If there was an advantage to be gained from enabling multiple connections, I could perhaps understand it. It can't be bandwidth, because no matter how many connections you have, they can only share the total bandwidth available at the router.

No makee sense to me.

Mike. :?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 01, 2021 2:32 pm
by rockedge

I am using a DELL PowerEdge R210 II server to experiment with some Puppy Linux ideas and WeeDog built distros. This machine has both eth0 and eth1. Systems like Manjaro, and some Ubuntu's will automatically connect both to my network.
One is 192.168.0.XX and the other is 192.168.1.XX. Being a machine purpose built as a commercial grade rack server it can communicate simultaneously over both eth0 and eth1.

I personally don't really need it but I can run 2 different web servers doing completely different things at the same time from one machine. It also can do extremely heavy traffic as a business file server balancing network traffic loads between the 2 LAN connections. For one reason or another I can also use this machine as a DNS server or run Hiawatha or NGINX and Apache2 on completely different IP's if I had more than one phone/internet connection and modem/routers to match.

Most important I suppose is the ability to remotely connect to the machine via SSH on one network card and control the machine or do work while the rest of the machine is doing file server for the rest of the world completely separately or blended on the other network connection. On a Zoneminder camera security system one could have all the network cameras communicate via eth1 which would be inaccessible from the network traffic coming and going on eth0.

Stuff like that in the big world of headless (no physical monitor, keyboard or mouse connected to it) network servers.

I got it for free and use it as a regular desktop so most of those capabilities are not used and I connected the usual monitors, keyboards and mice to it. Sure it's loud it has 9 fans in it.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 01, 2021 10:16 pm
by snoring_cat

Hi again defort,

That's great that you can enable both eth0 and eth1. My example is correct and working correctly for you. The issue that you are having has to do with how you want to use both ethernet devices. Here are some examples.

  • You want the machine to act like a firewall, lettting all traffic first go through one ethernet, data auhorized and then content allowed into your internet network

  • You want to do masquerading allowing one computer with 2 network devices to share it's internet connection

  • You want to segregate traffic, making it easier to administer, especially with firewall rules

  • You want to double your network speed by bonding multiple network connections into one big one

  • You want redundancy, in case one network device fails

  • you want to bridge networks

There are many alternatives to using multiple network devices. Can you please clarify your goal for using multiple ethernet devices.

The reason why you are having problems getting your network traffic to work with both devices is probably due to them not being configured yet to tell how to route traffic amongst network devices, and setting priority/metrics as to which device to use for situations. Your computer is assuming how to send traffic, and usually will hijack one network device to do so, until told otherwise.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Wed Nov 03, 2021 12:46 pm
by defort
snoring_cat wrote: Mon Nov 01, 2021 10:16 pm

Hi again defort,

That's great that you can enable both eth0 and eth1. My example is correct and working correctly for you. The issue that you are having has to do with how you want to use both ethernet devices. Here are some examples.

  • You want the machine to act like a firewall, lettting all traffic first go through one ethernet, data auhorized and then content allowed into your internet network

  • You want to do masquerading allowing one computer with 2 network devices to share it's internet connection

  • You want to segregate traffic, making it easier to administer, especially with firewall rules

  • You want to double your network speed by bonding multiple network connections into one big one

  • You want redundancy, in case one network device fails

  • you want to bridge networks

There are many alternatives to using multiple network devices. Can you please clarify your goal for using multiple ethernet devices.

The reason why you are having problems getting your network traffic to work with both devices is probably due to them not being configured yet to tell how to route traffic amongst network devices, and setting priority/metrics as to which device to use for situations. Your computer is assuming how to send traffic, and usually will hijack one network device to do so, until told otherwise.

eth0 for internet connection connected to the router
eth1 just lan between 2 computers for samba share

i did it many times on ubuntu and debian.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Wed Nov 03, 2021 2:27 pm
by rcrsn51

Here is a related example. You get your internet over wired eth0. But you also connect to a wifi-direct printer via wlan0.

Some connection managers will automatically drop the eth0 connection when they detect that the wlan0 interface has come up.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Wed Nov 03, 2021 3:20 pm
by rerwin

defort,
Here is a link to the thread in the old forum for "ShareInternet":
http://oldforum.puppylinux.com/viewtopi ... 15#p264415

The package is at the end of the first post.

This may be what you need, or as a starting point.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Wed Nov 03, 2021 8:41 pm
by Clarity

Hi @rerwin. Should that solution be in WoofCE for obvious reasons?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Fri Nov 05, 2021 1:14 am
by chris_r

I do something similar to what defort does (using Bionic and Xenial64,) and found that frisbee network manager will put in two default gateways. Deleting the default gateway for the "local network" fixes the symptom.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Sun Nov 07, 2021 4:11 pm
by defort
chris_r wrote: Fri Nov 05, 2021 1:14 am

I do something similar to what defort does (using Bionic and Xenial64,) and found that frisbee network manager will put in two default gateways. Deleting the default gateway for the "local network" fixes the symptom.

so my route always choose one of two default gateway

if i choose eth 0, the output will be :
============================
default <ip eth 0>
eth 0
eth 1
============================
if i choose eth 1, the output will be :
============================
default <ip eth 1>
eth 0
eth 1
============================

so, if i want to just samba LAN in eth1, i must delete eth1 and keep eth0 for internet connection? is it true?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 08, 2021 12:54 am
by chris_r

Yes. Of course this fixes the symptom (assuming your problem is the same as mine.) I haven't had a chance to fix it permanently myself yet.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Mon Nov 08, 2021 12:48 pm
by rcrsn51
defort wrote: Sun Nov 07, 2021 4:11 pm

if i choose eth 0, the output will be :

Please explain what you mean by "choose".

How do eth0 and eth1 get their IP addresses?

Is the Samba server box also connected to the Internet? How is it providing a Gateway address to eth1? Does it run its own DHCP service?

If you only use eth1 to access the Samba server, why does the Gateway address matter?

What Samba client app are you using? Can it not find the server directly by its IP address?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Wed Nov 10, 2021 12:57 pm
by rcrsn51

No reply?


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Sat Nov 13, 2021 4:19 pm
by defort
rcrsn51 wrote: Wed Nov 10, 2021 12:57 pm

No reply?

hello thank for the reply
sorry, i rarely open the forum

before i finish my problems in puppy linux, i moved to debian. but i still have same problem, same problem.
so i solved my problem in debian. maybe another readers can try it in puppy
so, i modify network used " sudo nano /etc/network/interfaces "
and set default route router to the ip that use internet network
and set samba route LAN to second ip
both of them (eth0 and eth1) set with diffrent subnetmask

it works, so always set LAN with internet network always default
the second LAN also must be run, but in the background

thanks for help guys, bye bye


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Sat Nov 13, 2021 4:43 pm
by rcrsn51

Too bad you never answered my questions. Here are two final thoughts.

1. If your Puppy connection tool automatically takes down eth0 when eth1 comes up, you need another tool.

2. If the real problem is making eth0's gateway have a higher priority than eth1's, there is a simple solution.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Tue Nov 16, 2021 12:09 am
by chris_r

@rcrsn51
I would be interested in hearing the simple solution to making a particular gateway have a highter priority.

Thanks.


Re: How to Connect Eth0 and Eth 1 at the same time?

Posted: Fri Nov 19, 2021 4:07 pm
by rerwin
defort wrote: Sat Nov 13, 2021 4:19 pm

thanks for help guys, bye bye

@defort,
You apparently ignored my suggestion to explore using "shareinternet", which I have since done myself by reading the entire thread at the link I provided.

I was able to accomplish what you have been attempting. I used an old router as a switch by not connecting its WAN cable and using only the regular ethernet jacks.

I am considering making a GUI for it, as its author left that to anyone who cares to, although there is nothing in that thread indicating that anyone created a GUI.

If anyone here is interested in working with shareinternet and a GUI, please let me know. The GUI would probably need only to set up the links for the added LAN, since the internet connection is created with any network manager. I am thinking more of a "walk-through" type tool that covers the instructions given in the shareinternet thread.

Richard