How do I setup network connection between two Ubuntu computers using patch cable?
I am attempting to ssh into an intel NUC mini computer from my laptop. They are connected directly using a Cat5e ethernet cable. Both systems are running Ubuntu 18.04. I have tried setting static IP addresses on both computers but I am not getting any response when I try to ping the NUC.
Here is my /etc/netplan/01-network-manager-all.yaml file on the NUC:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.1.150/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
And here is my /etc/netplan/01-network-manager-all.yaml file on my laptop:
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: no
addresses: [192.168.1.151/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
I am then configuring both networks by running:
sudo netplan apply
And then pinging the NUC with:
ping 192.168.1.150
Am I configuring this wrong? I also know that there is a way to ssh between these two computers by setting up a DHCP server on the NUC along with a static IP address and then I wouldn't have to set up the static IP address on the laptop as well. If anyone has any ideas on how to do this please let me know!
UPDATE: I got it to work using static IP addresses on both computers. Next I would like to know if there is a way to do this without needing to set the static IP address on the laptop because there will be multiple computers logging into the NUC at different times. I know there is a way to do this with a DHCP server on the NUC and was wondering if anyone knows how to set that up? Thanks everyone for all of your help!
networking server 18.04 dhcp ip
|
show 8 more comments
I am attempting to ssh into an intel NUC mini computer from my laptop. They are connected directly using a Cat5e ethernet cable. Both systems are running Ubuntu 18.04. I have tried setting static IP addresses on both computers but I am not getting any response when I try to ping the NUC.
Here is my /etc/netplan/01-network-manager-all.yaml file on the NUC:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.1.150/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
And here is my /etc/netplan/01-network-manager-all.yaml file on my laptop:
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: no
addresses: [192.168.1.151/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
I am then configuring both networks by running:
sudo netplan apply
And then pinging the NUC with:
ping 192.168.1.150
Am I configuring this wrong? I also know that there is a way to ssh between these two computers by setting up a DHCP server on the NUC along with a static IP address and then I wouldn't have to set up the static IP address on the laptop as well. If anyone has any ideas on how to do this please let me know!
UPDATE: I got it to work using static IP addresses on both computers. Next I would like to know if there is a way to do this without needing to set the static IP address on the laptop because there will be multiple computers logging into the NUC at different times. I know there is a way to do this with a DHCP server on the NUC and was wondering if anyone knows how to set that up? Thanks everyone for all of your help!
networking server 18.04 dhcp ip
1
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
1
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14
|
show 8 more comments
I am attempting to ssh into an intel NUC mini computer from my laptop. They are connected directly using a Cat5e ethernet cable. Both systems are running Ubuntu 18.04. I have tried setting static IP addresses on both computers but I am not getting any response when I try to ping the NUC.
Here is my /etc/netplan/01-network-manager-all.yaml file on the NUC:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.1.150/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
And here is my /etc/netplan/01-network-manager-all.yaml file on my laptop:
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: no
addresses: [192.168.1.151/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
I am then configuring both networks by running:
sudo netplan apply
And then pinging the NUC with:
ping 192.168.1.150
Am I configuring this wrong? I also know that there is a way to ssh between these two computers by setting up a DHCP server on the NUC along with a static IP address and then I wouldn't have to set up the static IP address on the laptop as well. If anyone has any ideas on how to do this please let me know!
UPDATE: I got it to work using static IP addresses on both computers. Next I would like to know if there is a way to do this without needing to set the static IP address on the laptop because there will be multiple computers logging into the NUC at different times. I know there is a way to do this with a DHCP server on the NUC and was wondering if anyone knows how to set that up? Thanks everyone for all of your help!
networking server 18.04 dhcp ip
I am attempting to ssh into an intel NUC mini computer from my laptop. They are connected directly using a Cat5e ethernet cable. Both systems are running Ubuntu 18.04. I have tried setting static IP addresses on both computers but I am not getting any response when I try to ping the NUC.
Here is my /etc/netplan/01-network-manager-all.yaml file on the NUC:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [192.168.1.150/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
And here is my /etc/netplan/01-network-manager-all.yaml file on my laptop:
network:
version: 2
renderer: networkd
ethernets:
enp2s0:
dhcp4: no
addresses: [192.168.1.151/24]
nameservers:
addresses: [8.8.8.8,8.8.4.4]
I am then configuring both networks by running:
sudo netplan apply
And then pinging the NUC with:
ping 192.168.1.150
Am I configuring this wrong? I also know that there is a way to ssh between these two computers by setting up a DHCP server on the NUC along with a static IP address and then I wouldn't have to set up the static IP address on the laptop as well. If anyone has any ideas on how to do this please let me know!
UPDATE: I got it to work using static IP addresses on both computers. Next I would like to know if there is a way to do this without needing to set the static IP address on the laptop because there will be multiple computers logging into the NUC at different times. I know there is a way to do this with a DHCP server on the NUC and was wondering if anyone knows how to set that up? Thanks everyone for all of your help!
networking server 18.04 dhcp ip
networking server 18.04 dhcp ip
edited Feb 5 at 21:03
Adam Dodge
asked Feb 5 at 19:51
Adam DodgeAdam Dodge
63
63
1
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
1
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14
|
show 8 more comments
1
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
1
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14
1
1
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
1
1
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14
|
show 8 more comments
2 Answers
2
active
oldest
votes
I finally got it to work. I changed my setup back to the original configuration to use NetworkManager and used the /etc/network/interfaces files for configuration.
This is what my /etc/network/interfaces file looks like for the laptop with ethernet port enp2s0:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.151
netmask 24
This is what my /etc/network/interfaces file looks like for the NUC with ethernet port eno1:
auto eno1
iface enp2s0 inet static
address 192.168.1.150
netmask 24
I also used the following to reboot the interface and enable connection:
sudo ifdown enp2s0 && sudo ifup enp2s0
Then, I can see the connection is working by running ping 192.168.1.150
on the laptop. Thanks for all the help!
add a comment |
Actually you can set you network using legacy way - by editing /etc/network/interfaces. First you need to list all your interfaces by ip a
. Then, you need to edit network file on both machines. It should look like that:
name of your interface* auto iface
name of your interface* inet static
address 192.168.1.xxx
netmask 24
Then you can do ip link set name of your interface down && ^down^up
That will reboot you interface and enable configuration.
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
|
show 1 more comment
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115911%2fhow-do-i-setup-network-connection-between-two-ubuntu-computers-using-patch-cable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I finally got it to work. I changed my setup back to the original configuration to use NetworkManager and used the /etc/network/interfaces files for configuration.
This is what my /etc/network/interfaces file looks like for the laptop with ethernet port enp2s0:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.151
netmask 24
This is what my /etc/network/interfaces file looks like for the NUC with ethernet port eno1:
auto eno1
iface enp2s0 inet static
address 192.168.1.150
netmask 24
I also used the following to reboot the interface and enable connection:
sudo ifdown enp2s0 && sudo ifup enp2s0
Then, I can see the connection is working by running ping 192.168.1.150
on the laptop. Thanks for all the help!
add a comment |
I finally got it to work. I changed my setup back to the original configuration to use NetworkManager and used the /etc/network/interfaces files for configuration.
This is what my /etc/network/interfaces file looks like for the laptop with ethernet port enp2s0:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.151
netmask 24
This is what my /etc/network/interfaces file looks like for the NUC with ethernet port eno1:
auto eno1
iface enp2s0 inet static
address 192.168.1.150
netmask 24
I also used the following to reboot the interface and enable connection:
sudo ifdown enp2s0 && sudo ifup enp2s0
Then, I can see the connection is working by running ping 192.168.1.150
on the laptop. Thanks for all the help!
add a comment |
I finally got it to work. I changed my setup back to the original configuration to use NetworkManager and used the /etc/network/interfaces files for configuration.
This is what my /etc/network/interfaces file looks like for the laptop with ethernet port enp2s0:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.151
netmask 24
This is what my /etc/network/interfaces file looks like for the NUC with ethernet port eno1:
auto eno1
iface enp2s0 inet static
address 192.168.1.150
netmask 24
I also used the following to reboot the interface and enable connection:
sudo ifdown enp2s0 && sudo ifup enp2s0
Then, I can see the connection is working by running ping 192.168.1.150
on the laptop. Thanks for all the help!
I finally got it to work. I changed my setup back to the original configuration to use NetworkManager and used the /etc/network/interfaces files for configuration.
This is what my /etc/network/interfaces file looks like for the laptop with ethernet port enp2s0:
auto enp2s0
iface enp2s0 inet static
address 192.168.1.151
netmask 24
This is what my /etc/network/interfaces file looks like for the NUC with ethernet port eno1:
auto eno1
iface enp2s0 inet static
address 192.168.1.150
netmask 24
I also used the following to reboot the interface and enable connection:
sudo ifdown enp2s0 && sudo ifup enp2s0
Then, I can see the connection is working by running ping 192.168.1.150
on the laptop. Thanks for all the help!
answered Feb 6 at 3:22
Adam DodgeAdam Dodge
63
63
add a comment |
add a comment |
Actually you can set you network using legacy way - by editing /etc/network/interfaces. First you need to list all your interfaces by ip a
. Then, you need to edit network file on both machines. It should look like that:
name of your interface* auto iface
name of your interface* inet static
address 192.168.1.xxx
netmask 24
Then you can do ip link set name of your interface down && ^down^up
That will reboot you interface and enable configuration.
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
|
show 1 more comment
Actually you can set you network using legacy way - by editing /etc/network/interfaces. First you need to list all your interfaces by ip a
. Then, you need to edit network file on both machines. It should look like that:
name of your interface* auto iface
name of your interface* inet static
address 192.168.1.xxx
netmask 24
Then you can do ip link set name of your interface down && ^down^up
That will reboot you interface and enable configuration.
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
|
show 1 more comment
Actually you can set you network using legacy way - by editing /etc/network/interfaces. First you need to list all your interfaces by ip a
. Then, you need to edit network file on both machines. It should look like that:
name of your interface* auto iface
name of your interface* inet static
address 192.168.1.xxx
netmask 24
Then you can do ip link set name of your interface down && ^down^up
That will reboot you interface and enable configuration.
Actually you can set you network using legacy way - by editing /etc/network/interfaces. First you need to list all your interfaces by ip a
. Then, you need to edit network file on both machines. It should look like that:
name of your interface* auto iface
name of your interface* inet static
address 192.168.1.xxx
netmask 24
Then you can do ip link set name of your interface down && ^down^up
That will reboot you interface and enable configuration.
edited Feb 5 at 20:41
answered Feb 5 at 20:36
GravemindGravemind
857
857
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
|
show 1 more comment
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
As the user is using netplan, this won't work. It's NetworkManager talk.
– heynnema
Feb 5 at 20:46
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
Previously, I suggested to clean netplan file. You don't need such advanced configuration for end-to-end network. In fact, if your won't mess with netplan and just use legacy way - there will be no issue.
– Gravemind
Feb 5 at 21:54
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
If you wish to use NetworkManager, on a system currently using netplan, you've got to change the /etc/netplan/*.yaml file first.
– heynnema
Feb 5 at 22:37
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
I changed my setup to use NetworkManager. This is what my files look like, with the two different ethernet interfaces and IP addresses: 'auto enp2s0 iface enp2s0 inet static address 192.168.1.151 netmask 24' I also used 'sudo ifdown enp2s0 && sudo ifup enp2s0' instead of what you recommended. I also changed the .yaml file to the original NetworkManager configuration. It works great now!
– Adam Dodge
Feb 6 at 1:21
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
@heynnema actually, it is better to completely get rid of netplan and never use it. It doubles functionality and make system less robust. I always suggest to use legacy way of setup network connection on Debian-like OS.
– Gravemind
Feb 10 at 10:36
|
show 1 more comment
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1115911%2fhow-do-i-setup-network-connection-between-two-ubuntu-computers-using-patch-cable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
192.168.0.2/24 is not in the same subnet as the gateway, Please try: 192.168.1.150/24 for one and 192.168.1.151/24 for the other. Welcome to Ask Ubuntu.
– chili555
Feb 5 at 20:03
1
Please edit with additional information - is there a switch/router in your network, why gateway is in another subnet (hosts are in 192.168.0.0/24 subnet and gateway is in 192.168.1.0/24.) Also it is better never to use first ip in subnet (192.168.0.1) because it could be taken by gateway
– Gravemind
Feb 5 at 20:05
I tried the IP addresses chili555 gave me and it is still not working. I also edited my question, these two computers are connected using a Cat5e ethernet patch cable.
– Adam Dodge
Feb 5 at 20:10
@AdamDodge with such configuration you don't need gateway (you have non in your network). I suggest to delete it from configuration.
– Gravemind
Feb 5 at 20:12
@Gravemind I removed the gateway from my configuration. It still is not responding to a ping. Thank you for responding and helping me!
– Adam Dodge
Feb 5 at 20:14