Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to get the IP address of a machine using router[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 680

PostPosted: Tue May 12, 2020 2:26 pm    Post subject: how to get the IP address of a machine using router[SOLVED] Reply with quote

Dear All,

I have two machines that I am using that both run gentoo amd stable in a domestic environment.

They are both connected to the same router.

Supposing I wanted to connect the two machines together.

There could be a number of reasons I might want to do that.

They could be as follows:

1. I want to be able to mount the file tree on the other machine and create directories and modify files and move files from
one machine to another etc allowing them to be worked on there at a later point etc.

2. I might want to be able to remotely log in to the second machine from the first one and run a job of some kind on it from the first machine.

3. I might want to be able to recruit the computational resources of the other machine to help the first machine achieve an important task of some kind.

As I see it if you want to anything like that you need to be able to identify the machine you want to talk to and having convinced yourself you are infact talking
to it and not some other machine or actor you do not want to be talking to then you need to make a connection with it.

In order to do that you need to figure out the IP address of your machine and IP address of the other machine as far as I can see.

I don't know so much about this area of networking.

I have noticed that it is common to read documentation on using software packages that are involved in the process of communication between computers

where a statement like this could be found: "Two client machines running at 192.168.0.4 and 192.168.0.5 are going to connect to a local server machine" followed by some
instructions on how to configure some software to allow this to occur and then perform some other more sophisticated task etc.

I have a basic slightly dumb question to ask here.

If a machine is running at the IP address 192.168.0.4 is that something that is an address chosen by electronics (e.g in a router box or ethernet card) or is mostly software that does it?

So for example, if I would run the same software using the same machines connected in the same way to each other once a week or a month would the same IP addresses be used by the each specified machine in the same way?

I have read discussions of IP addresses and networks in books etc in the past and have probably forgotten most of what was in them.

I could go back and reread them.

I could also go online and read wiki pages and watch videos on youtube on the subject and learn more about it all before posting a query on the site here as I am doing.

Aka reading the manual etc.

Some texts are rather more theoretical whereas the approach I am interested in is at the practical level etc., with gentoo essence added in to the mix.

In general how would I determine (or help assign if that were the correct approach) two IP addresses for the two machines I have here connected to the router in a local environment that would allow e.g. SSH or distcc or perhaps telnet or samba etc work sensibly between them?

Some pointers to appropriate documentation and e.g. videos or online lectures would be appreciated.

Regards

Michael Fothergill


Last edited by mikefot on Tue May 12, 2020 5:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3522

PostPosted: Tue May 12, 2020 2:44 pm    Post subject: Reply with quote

Your router should provide the option to assign a fixed IP address per each client.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4894
Location: Dallas area

PostPosted: Tue May 12, 2020 2:49 pm    Post subject: Reply with quote

charles17 wrote:
Your router should provide the option to assign a fixed IP address per each client.


On my router, I blocked off the 1st 20 or so addresses for static, and left the rest for dhcp (phone, whatever)
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 680

PostPosted: Tue May 12, 2020 3:16 pm    Post subject: Reply with quote

Many thanks for your replies and suggestions.

Does that mean that in the case of the
Code:
distcc
package https://wiki.gentoo.org/wiki/Distcc
in the section under the section titled Configuration and below it open rc it says
Quote:
The following example allows the distcc clients running at 192.168.0.4 and 192.168.0.5 to connect to the distccd server running locally:
that the authors are assuming that the user has tweaked their router manually so that they had preassigned specific IP addresses to known values ready to undertake the software end use requirement in question.

In other words they read the manual for the router (or called the router manufacturer or supplier on the phone and chatted with them) to find out precisely how to assign the IP addresses to each machine before they did anything else at all.

ie: you do the following things in sequence:

1. Get yourself a router and broadband service.

2. Get a computer, put an operating system on it like Gentoo and connect the computer to the internet.

3. Learn how to assign specific IP addresses to each machine you have locally connected to the router by studying documentation on the router itself.

4. Only then try experimenting with the likes of distcc and SSH etc and see how you get on.......

Cheers

MF
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2125
Location: Here and Away Again

PostPosted: Tue May 12, 2020 3:37 pm    Post subject: ><)))°€ Reply with quote

I usually set a static (local) IP for my machines via '/etc/conf.d/net', and they can then connect via the router as long as the firewalls are set right (and as long as they're not set behind the same IP... which can produce some funny results).

To the outside world they look like one and the same, getting one IP at a time from my ISP (via DHCP in the router).
_________________
Kind regards,
Chiitoo.

You might remember me from Gentoo projects such as Forums, LXQt, Qt, and Wine.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3522

PostPosted: Tue May 12, 2020 3:38 pm    Post subject: Reply with quote

mikefot wrote:
... how to assign the IP addresses to each machine before they did anything else at all.

That's not unusual, Always assign this network device the same IPv4 address
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 4163
Location: Illinois, USA

PostPosted: Tue May 12, 2020 4:03 pm    Post subject: Reply with quote

Read your router manual. My old D-Link has a section in the on-line setup for NETWORK SETTINGS -> ADD DHCP RESERVATION
Then you can just keep DHCP in your machine settings and the router will always send your MAC address the same IP address.
You can turn off DHCP on your router and use Dnsmasq also. I'm playing around with this right now. You can also use one of your machines for full bore DHCP but my references say you only need that in a corporate environment with a hundred or more machines.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Tue May 12, 2020 4:17 pm    Post subject: Reply with quote

As I remember from your other thread you are setting up distcc. Just allow the whole subnet instead of one single IP address, who is going to abuse this on your home network anyway.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 680

PostPosted: Tue May 12, 2020 4:56 pm    Post subject: Reply with quote

Many thanks for your reply.

How do I allow the subnet as you put it?

What sort of command does that?

Regards

MF

PS

Many thanks for answering my questions on this topic.

I am going to make a new post on subnets and how you allow them after reading up on this topic some more.

Regards

MF
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7711
Location: Saint Amant, Acadiana

PostPosted: Tue May 12, 2020 5:32 pm    Post subject: Reply with quote

Code:
--allow 192.168.0.0/24
in distccd conf. Methinks you could benefit greatly by spending some time studying networking basics. There are excellent tutorials, free, just use your favorite search engine.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum