Network conundrum

Not strictly a Pi problem but I'm having difficulty getting my head round a network situation.

Pi is downstairs in the parlour acting as a PVR, media centre, always-on bittorrent client and network file server. It's connected to the modem/router via an ethernet cable and accessed via SSH and VNC. So far, so good.

However, when we have visitors, my wife insists that I take it upstairs to my study because "all the wires look a mess". She has a point.

Upstairs I have a dual boot (Windows 8/Linux Mint 13) PC with 2 ethernet ports. One port is connected via wired ethernet to the downstairs modem/router and I want to connect the Pi to the other during its periods of banishment. Wi-Fi doesn't reach here.

So...

How do I get the Pi to recognise where it is so that it can adapt to its situation? I don't want to have "upstairs" and "downstairs" SD cards, nor do I want DHCP servers on the upstairs machine (not least because I don't know how to do it). Obviously I don't expect it to carry out all its functions upstairs but it would be nice to experiment with it (particularly when we have visitors).

Ideally I would like both Windows and Linux to be available.

Another Dave

Reply to
Another Dave
Loading thread data ...

It will be easier to learn how to set up DHCP upstairs than to do what you actually ask.

What you'd end up doing, I suspect, is writing something that tries DHCP, waits for the timeout, then falls back on a static configuration.

(And of course you'll need to set up NAT on your desktop machine.)

Wouldn't it be easier to get a network switch, and plug both your desktop and the pi into that?

Reply to
Roger Bell_West

Run Linux on the desktop and install dnsmasq to handle the address setup problem. It will do DHCP very easily. It is far easier to twist Linux to handle the networking than any flavour of Windows.

--

Tauno Voipio
Reply to
Tauno Voipio

+1.

Network switches are in principle infinitely cascadable and no setup is required to create a network where all RJ45 'ports' are functionally equivalent.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

Linux can bridge the two ethernet ports together.

I think Windows 8 can do the same (it can seems to be able to manage a virtual bridge for Hyper-V VMs) but I?m the wrong person to ask about that really.

Personally, though, I have a network switch upstairs.

--
http://www.greenend.org.uk/rjk/
Reply to
Richard Kettlewell

I now have a box at the top right of my screen alternating between "Wired Connection 2 Connection Established" and "Wired network Disconnected". It's been there 20 minutes - now what?

Another Dave

Reply to
Another Dave

I don't want to sound ungrateful (to you and the others who have suggested the same thing) but are you saying that a £20 box can do something that a Core2Duo with 4Gig of memory can't do just as easily given the right software?

Another Dave

Reply to
Another Dave

I think you want to set up a bridge between the two network ports, so the PC passes RPi traffic to the router, and can also talk to the RPi. These might help:

formatting link
formatting link

Why does the Pi need to act differently upstairs than downstairs?

Reply to
Rob Morley

Thanks for that. I'll try what they suggest as soon as I can (and as soon as I can figure out how to read the Linux link - it shows up as black and dark brown on a dark blue background).

I don't know that it does if what you suggest can be done. Your first paragraph succinctly states what I need.

Another Dave

Reply to
Another Dave

essentially, yes.

in fact more easily, since thats is what it is designed to do straight out of the box.

And that is ALL it is designed to do.

I tried blowing the cobwebs out of the room using the girlfriend's Ferarri's exhaust, but in the end a feather duster worked better.

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

Yes!!! The words "network bridge" were the key. The routine for Windows

8 is somewhat different from Vista but it works easily. As you suggested I haven't had to change the Pi at all.

I can VNC to the pi and it can browse the Internet via the PC.

Magic!

I'll tackle Linux later.

Another Dave

Reply to
Another Dave

+1 Make sure the switch has an uplink port or has a port that can automagically work out it's supposed to be an uplink. (Most can work it out these days).

Or for a quick 'n dirty solution a pair of "Cat5 economisers". The Pi doesn't do gigabit so it only needs two pairs, the PC might but should fall back to fast ethernet when it only has two working pairs.

--
Cheers 
Dave.
Reply to
Dave Liquorice

Which suggests another approach. If you're going to have the desktop on anyway, why not just use it and not bother with the £20 box of Pi :-)

e.g.

formatting link

Reply to
Alan Braggins

:-)

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

That is indeed a very good point. The pi may be compact and tidy, but by the time you have added an 8-way extension lead/adaptor, the wall warts for all the dongles, and all the interconnecting cables, it won't even fit properly into a 10" x 10" x 5" box.

If you can find a good solution (other than falling back on an old tower-case PC), thousands would surely be delighted.

(I never tried to replace my ex-SWMBO but I still have the tidiness problem when trying to let a flat with a small demo PC connected to the TV).

--
Windmill, TiltNot@NoneHome.com       Use  t m i l l 
J.R.R. Tolkien:-                            @ S c o t s h o m e . c o m 
All that is gold does not glister / Not all who wander are lost
Reply to
Windmill

Hi Dave,

I think that the best solution for that kind of problem is to connect a pushbutton to one of the GPIO lines and to do the rest with shellscripts. This ?behaviour-switching? is very easy to implement (if you know how to write a shell script and how to connect a button to the GPIO).

HTH

Gregor

Reply to
Gregor Szaktilla

My outfit consists of the Pi, a powered 4-port hub, a mains-powered Buffalo USB 500Gig disc drive and a USB tuner.

I'm planning on gluing/Velcroing the Pi, hub and tuner to the sides of the Buffalo and wrapping the excess wires round the inside of a toilet roll.

I'm then going to bung the lot into the cabinet on which the TV stands and hide it behind the posh china that we keep there.

Another Dave

Reply to
Another Dave

I tend to screw power strips to the wall - that way the cables hang out of the way rather than making a rat's nest on the table, shelf or floor. USB/network hubs can usually be dealt with in the same way. In fact I'm thinking you could screw a strip of timber to the wall and hang everything from that in a neat row, and drape or lean something in front of the cables if they're not hidden behind a piece of furniture - a nice tapestry perhaps? :-)

Reply to
Rob Morley

how do you plan to tell all the other clients that the pi-server has moved?

probably easier to set the pc up as a network bridge?

--
?? 100% natural
Reply to
Jasen Betts

For some things like maybe a USB hub, Velcro can be useful to attach a device to a wall or "strip of timber". (Not an expression often used in the US.) However, there are some plastics to which the Velcro adhesive does not stick well over time.

--
Robert Riches 
spamtrap42@jacob21819.net 
(Yes, that is one of my email addresses.)
Reply to
Robert Riches

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.