LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Connect 2 Computers w/Ethernet Cable (https://www.linuxquestions.org/questions/linux-mint-84/connect-2-computers-w-ethernet-cable-4175732145/)

borgward 12-25-2023 11:11 PM

Connect 2 Computers w/Ethernet Cable
 
How do I get the connection to work? I tried both an Ethernet cable and a Crossover Ethernet cable. 2006 Dell Laptop to 2011 iMac. I failed using Warpinator which does work on my wireless LAN. Both run Linuxmint 21.2 Cinnamon.

Will any commands I use have to be undone when I revert to wireless?

IsaacKuo 12-25-2023 11:27 PM

Connect the two ethernet ports.

On one computer, disable WiFi and set the wired connection to "Automatic (DHCP)".

On the other computer, set the wired connection to "Shared to other computers".

After you're done, re-enable WiFi on the first computer.

borgward 12-25-2023 11:50 PM

I do not see any DHCP. There is MTU w/automatic for in the wired connection page.
There is no Shared to other computers

pan64 12-26-2023 03:08 AM

in general you only need to connect the two ports, as it was mentioned. But you need to configure the two hosts to be able to use this setup.
this is a guide to explain that: https://askubuntu.com/questions/2283...hout-a-router/
On mint it should be something similar.

michaelk 12-26-2023 05:23 AM

Without knowing what type of adapter is in the Dell or mac I would use the crossover cable. Use the ip command to configure the adapters. Running the commands does not make any permanent changes.

rtmistler 12-26-2023 05:41 AM

You should be able to connect them with a straight through Ethernet cable and you also can configure static IP addresses, but then you will not have host names. I'm guessing this is temporary to get data/info from one side to the other?

IsaacKuo 12-26-2023 05:58 AM

Quote:

Originally Posted by IsaacKuo (Post 6472693)
Connect the two ethernet ports.

On one computer, disable WiFi and set the wired connection to "Automatic (DHCP)".

On the other computer, set the wired connection to "Shared to other computers".

After you're done, re-enable WiFi on the first computer.

Under the settings, go to IPv4 settings tab. Then you will have Automatic (DHCP) and "Shared to other computers" settings.

michaelk 12-26-2023 05:58 AM

Auto mdi-x came out in the early 2000s so a straight cable should probably work.
If you don't see a link LED illuminated on the port then try the crossover.

borgward 12-26-2023 04:47 PM

Quote:

Originally Posted by michaelk (Post 6472746)
Auto mdi-x came out in the early 2000s so a straight cable should probably work.
If you don't see a link LED illuminated on the port then try the crossover.

Can connect with either cable. The port on the 2006 Dell laptop lights up w/either cable when connected to the other computer a 2011 iMac. There are no lights on the iMacs Ethernet port. On the Dell the Ethernet port left light shines steadily, the right one flickers dimly.

michaelk 12-26-2023 05:20 PM

The left should be the link LED and right show data activity. Assign IP addresses to each interface and you should be good to go.

borgward 12-26-2023 05:37 PM

On iMac: sudo ip addr add 10.0.0.1/24 dev enp2s0
On Dell laptop: sudo ip addr add 10.0.0.2/24 dev eth0

IPv4 set to Automatic (DHCP) on both
Routes section of IPv4 page has Network, Netmask, Gateway and Metric fields that are not filled in.

Still get Connection Failed.

Wireless is not enabled when attempting wired connection.

michaelk 12-26-2023 06:20 PM

Strange, With Mint 21 I would not expect the ethernet adapter to be named eth0 unless you disabled naming conventions.
No need for DHCP since you are manually configuring the adapters.
Route should not matter since you are direct between the two computers.

from the Dell
ping 10.0.0.1 fails?

Also from the Dell
ping 10.0.0.2 successful?

IsaacKuo 12-26-2023 06:27 PM

Quote:

Originally Posted by borgward (Post 6472865)
IPv4 set to Automatic (DHCP) on both
Routes section of IPv4 page has Network, Netmask, Gateway and Metric fields that are not filled in.

Uhh ... I explained already.

One one computer, set to Automatic (DHCP). (The one with WiFi disabled.)

On the other computer, set to "Shared to other computers".

You need one of them to be "Shared to other computers" in order to make it share its internet connection with the other computer. That will configure a simple DHCP server as well as routing to share its other connection with the client computer.

michaelk 12-26-2023 06:40 PM

If you go that route with the interface set to "Shared to other computers" as posted dnsmasq is automatically configured to assign IP addresses via DHCP. The host will be 10.42.0.1.

borgward 12-26-2023 06:50 PM

Quote:

Originally Posted by IsaacKuo (Post 6472870)
Uhh ... I explained already.

One one computer, set to Automatic (DHCP). (The one with WiFi disabled.)

On the other computer, set to "Shared to other computers".

You need one of them to be "Shared to other computers" in order to make it share its internet connection with the other computer. That will configure a simple DHCP server as well as routing to share its other connection with the client computer.

I do not see a "Shared to other computers" setting. I currently have both set to Automatic (DHCP)

I do see a Manual and a Link local only. Does that mean "Shared to other computers"


All times are GMT -5. The time now is 06:26 AM.