Page 1 of 1

Connecting Pi to PC over ethernet

PostPosted: 04 Dec 2021, 17:02
by ikelini
I have a rather annoying issue. I am trying to connect my Pi to a network so I can SSH to it.

My network setup is as follows.

There is a wireless router downstairs which deals with internet access. My PC is connected over wifi, with a dongle.

I have a Raspberry Pi I want to connect to my PC so I can SSH to it. For various reasons, connecting the Pi to the main router is impractical, nor can I use another dongle to get at it through wifi.

What I have tried is connecting the Pi directly to the PC's ethernet port and connecting the Pi through ethernet to a different router, which is then connected to my PC through ethernet.applinked

However, when I try connecting the Pi directly, it doesn't seem to work. When I try going through the second router, I can access the Pi, but can't access the internet with my PC.

Are there any settings I can change to allow one of the two options to work?

Re: Connecting Pi to PC over ethernet

PostPosted: 05 Jan 2022, 08:49
by popov
I
If Well understand you have 2 routers.
Mdns (avahi) is not routable, that mean you only can aces from pc to pi using ip…
Becarfull you have to use différent ip range on both routers.
Depending you parameter / routers you may have to add statics routes on tour routers (if you have différent ip range, normaly nothing to do…)

Re: Connecting Pi to PC over ethernet

PostPosted: 13 Jan 2022, 11:44
by eea123
Also, a direct connection (without a switch / router) requires a crossover cable, see https://en.wikipedia.org/wiki/Ethernet_crossover_cable. However, I am not sure what your default IP addresses will be on your PC or PI without them being assigned if you try this method.

I had both of the units cable-connected to the same switch / router when I setup mine up, so the DCHP handed out the IPs. That router was connected to the internet (note: my router is also set to assign DCHP IPs). I would try to make sure you are using your primary router with a "physical" connection to the internet.