Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » setting up network for prime searching

This thread is locked; no one can reply to it. rss feed Print
 1   2 
setting up network for prime searching
William Labbett
Member #4,486
March 2004
avatar

Yup.

I got a super fan for the CPU but I was awaiting my Power Supplies I'd ordered which
are quiet too.

I've got ubuntu 12 point something (64-bit). I thought I'd use this machine as the main machine which is 'in charge' of all the other machines.

So now it's time to try and set up the network.

I've got an ethernet switch and a bunch of ethernet cables. My other 4-core machine will be up and running soon (I was waiting for the quiet PSU).

I reckon allegro.cc can get the network running despite I not having a clue about networks. I think I've got everything that's needed.

I'd be grateful if allegro.cc could temporarily make-believe that I'm on a remote planet trying to set up a surface to air missile strike on a meteor that is bound for earth at hyperspeed.

I await your instructions.

Thomas Fjellstrom
Member #476
June 2000
avatar

So, is this a separate switch to your internet modem/router? If its a separate switch, plug all of the machines into the switch, and that switch into your router. Or if you don't have a separate switch, just plug them into your router. If they don't need to be connected to the internet, just don't plug them into the router (you will need a separate switch for that).

Modern ethernet is pretty plug and play (if you have a router of some kind). So yeah, easiest way is to plug the machines into your switch, and the switch into your modem/router.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

Thanks Thomas.

So, is this a separate switch to your internet modem/router?

Yes. It's a unit.

Quote:

If its a separate switch, plug all of the machines into the switch, and that switch into your router.

Done that (I think). The switch has got 8 ethernet lead sockets on the back. All the sockets look the same.

I've plugged the main machine in, plus my 4-core that's now working. Also I've plugged a lead in which connects to my router.

Now to be able to control the 4-core from the main machine and to be able to monitor what's going on on it. Is this possible?

Thomas Fjellstrom
Member #476
June 2000
avatar

Just install SSH and log into each one :) Probably want to start that program inside of tmux or screen, so you can log out and it'll keep running.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

Right. I think ssh is installed. Can you explain what I need to do to login to another machine connected to the switch.

I know how to start : Ctrl Alt T to open a terminal. What after that ?

Thomas Fjellstrom
Member #476
June 2000
avatar

Heh. Install Putty or Kitty (if you're in windows), and use that to connect to the other machines. You'll need to find their IP address from your router, it should have a list of addresses it's recently given out to machines. Otherwise you'll have to log into their console and get the ip from them directly using the ifconfig command.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

I've installed Putty.

I've got to the page for the router but I can only see one ip address.

Where do I find the ip addesses of the other machines ?

Thomas Fjellstrom
Member #476
June 2000
avatar

on your router you'd look for the DHCP settings. Should have a list of mac->ip addresses somewhere. Might not, but some ISP routers really suck.

If you cant find it there, you can scan for the machines using ping, going through all 254 ip addresses :-x

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

I've got to that kind of page.

There were some old entries for when I had my machines connected to the router.

Refreshing the list got them deleted.

It doesn't say anything about any other machine being connected. I've got a feeling that the ethernet lead from the 2nd machine should be connected to the router itself.

At the moment the ethernet switch is connected to the router and the two machines are connected to the switch.

I can't get on to the internet with the other machine so I guess I've not connected it up properly.

Thomas Fjellstrom
Member #476
June 2000
avatar

Hm, when did you connect those machines? after or before you started them up?

You can either log into them and run ifdown eth0 && ifup eth0, or you can just reboot. And they should come online.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

Nope. It didn't work but I've plugged the computer straight into the router (ie not into the switch) and now it connects. So I presume any PC I plug into the router will
connect and so I could form a network that way but I've only got 5 ports on the router.

Thomas Fjellstrom
Member #476
June 2000
avatar

Hm, any normal switch should work fine... What kind of switch is it? can you post the model/brand? How old are the other computers? It's possible they don't like the type of cables you're using.

Or, you haven't plugged the switch into the power outlet. ;)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

Yup. That's what it is.

I couldn't find the adapter when I was sorting things out and then I forget that I'd never found it before I got started. I've been looking around my flat but can't find it. I've a horrible feeling I threw it out when I was sorting things out. I'll to get a power supply for it somehow.

:P

Until then I can try with the router. I've got to get on with the maths right now though but I'll be back later.

Thanks very much for the help.

Thomas Fjellstrom
Member #476
June 2000
avatar

No problem.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

Great news.

Found the adapter in one of my kitchen cupboards.

EDIT :

I've tried it with the power plugged in but I get the same problem.

The ethernet switch is EDIMAX ES-3208P

Thomas Fjellstrom
Member #476
June 2000
avatar

reboot one of the computers when its plugged into the switch.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Hull
Member #1,136
March 2001

Are both machines running linux of some sort? If so, try plugging them both into your router and running nmap on the main computer.
To do this run ifconfig on the main computer to find your network address, look for a line like (x, y, z will be numeric)

inet addr:x.y.z.4  Bcast:x.y.z.255  Mask:255.255.255.0

then run

nmap x.y.z.0/24

should show all the machines on that network (one will be the router itself)
For each one that you want to connect to, nmap should show ssh is open:

22/tcp  open  ssh

If not install openssh-server on that computer
Then you should be able to connect from your main computer to the others e.g.

ssh user@host


where host is an ip address of a computer (listed by nmap) and user is your username on that computer.

If that's OK you can try connecting them through the switch instead and confirming it still works.

pete

William Labbett
Member #4,486
March 2004
avatar

Hi Pete.

Thanks for the help.

I've run nmap (after installing it) on the main machine (with ubuntu on).

I ran ifconfig. Got 192.168.1.68 for the this machine.

I therefore know that my other linux machine has ip address 192.168.1.66 (because there's only three listed on the BTHomeHub screen and the other one's got windows on it).

I then ran nmap and this seems to be of great significance :-

report on william-PC.home (192.168.1.66) All 1000 scanned ports are closed.

When I try to connect to the machine with ssh - I always get 'connection refused'.

Should I be logging in with the Administrator's username for the machine I'm trying to log onto - or some other username ?

Thomas Fjellstrom
Member #476
June 2000
avatar

If the ports are closed, ssh isn't running, and may not be installed. You'll need to make sure its installed and running.

And you'd need to use the admin creds for the machine you're logging into.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Hull
Member #1,136
March 2001

If the port is closed that implies the ssh service (sshd) is not running on William-PC.home.

If you're using Debian or Ubuntu you might well need to install sshd on William-PC.home. Use your package manager/software centre and look for openssh-server. If using Ubuntu software centre you'll need to 'Show technical items'

You can test it by logging into the same machine with

ssh localhost

(see attachment)
Fingers crossed.

[edit] Beaten!

Thomas Fjellstrom
Member #476
June 2000
avatar

[edit] Beaten!

Thats ok, you totally win the thread with the nmap comment. I didn't want to get into that... It would have been fine if he just logged in to the machine and did an ifconfig like I suggested....

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

William Labbett
Member #4,486
March 2004
avatar

I've installed ssh server thing on 'the other machine'.

I do ssh WilliamLabbett@192.168.1.66 then it asks for the password 'for the machine'.

I type in the password for WilliamLabbett and it always says Permission denied, please try again (everytime I try again).

Peter Hull
Member #1,136
March 2001

Obvious things to check:

  • nmap is showing port 22 is open on 192.168.1.66

  • WilliamLabbett is a valid username on 192.168.1.66

  • You're sure you're typing the password right

If you're sitting in front of 192.168.1.66 try 'whoami' to check username and 'ssh localhost' to check you log in locally.

William Labbett
Member #4,486
March 2004
avatar

Thanks Peter.

The whoami command revealed that I should have been using william as the username.

I'm a bit confused now because I log in as WilliamLabbett but my username is william ???

So now I can control one machine from another! Pleased about that.

Now mprime starts up when I boot the other machine, so I'm not sure what I'm doing when I run the program from my 'main machine'. What I mean is, I don't know whether I'm opening an interface to the program that's already running or whether I'm opening an new instance of the program.

I've got tmux installed on the main machine.

Thanks for the help guys. Any further thoughts would be welcome.

Peter Hull
Member #1,136
March 2001

Almost there I csan feel it in my bones!

The next step is going to be tmux/screen so you can start a job and detach. Thomas is the expert there, I've never done it.
Pete

 1   2 


Go to: