Score:0

Is possible set static IP between 2 devices with nmcli

id flag

I have a computer that has a wireless connection and has an ethernet. I need to communicate with a connected device through a local network created between my computer and this device (communication will be done via TCP/IP using socket).

For this communication, I need my computer to have the IP 192.168.0.57 (will be the host) on the ethernet. The other device expects to have the IP 192.168.0.201, so I need my computer to provide that ip at the other end.

Is it possible to configure it using NetworkManager (nmcli)?

ng flag
What are you trying to accomplish doing this? You can just assign each adapter the IP addresses you have listed so why are you using nmcli?
cn flag
Is there a router between your computer and the device? or both connected each other directly?
Joey Fran avatar
id flag
@DubStep I can't configure the other device. It is configured to receive the ip 192.168.0.201. I need to create this "subnet" between it and my pc.
Joey Fran avatar
id flag
@3735943886 Both are connected to each other. I think I'll have to use dnsmasq for that...
cn flag
@JoeyFran Likely. If the device is connected to your computer directly, and the device requests IP to your computer, then you have to set up DHCP server on your computer with dnsmasq or dhcpd. It cannot be done solely with nmcli.
Joey Fran avatar
id flag
Thank you @3735943886.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.