You are not logged in.

#1 2016-09-21 17:30:29

qSeven
Member
Registered: 2016-09-21
Posts: 3

ip but no connection (ping) when connecting through switch [On Hold]

So I have 2 arch linux computers connected through a switch.  Both get an ip but only one(call this computer C1) has internet access.  Fun thing is,  I can ssh into C1 from a separate computer not connected through the switch and then I can ssh again from C1 into C2 through the ssh connection.  But once logged into C2 I have 100% packet loss when pinging.

I'm using dhcpcd for both. This is the first time I'm using a switch with arch linux.  In the past with windows I just plugged everything and it worked  if the computer could  connect directly to the wall but this was at a different school.  Right now I don't have a windows computer to test on so this might be a problem with the schools network?  Anyways, I don't know much about networking so all the help is appreciated.  My main goal is to have both computers connected to internet.

For C1
ip addr:
http://pastebin.com/cJFv0Vu0

ip route:
http://pastebin.com/iUZjVQec

for C2 after ssh into it from C2(so I can copy and paste results)
ip addr:
http://pastebin.com/fUL9S4rP

ip route:
http://pastebin.com/PYBCJF3Y

btw C1 has two Ethernet ports with one disconnected thats why eno2 is down

Last edited by qSeven (2016-09-29 20:18:24)

Offline

#2 2016-09-23 18:17:28

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: ip but no connection (ping) when connecting through switch [On Hold]

c1 and c2 both have public IP addresses. 138.23.10.135/22 and  138.23.11.18/22 assigned to the University of California. So they're hooked directly to the internet and on different subnets with a mask /22 which is the same as 255.255.252.000, which gets you to 138.23.3.255, they can't talk to each other.

They both have route 138.23.8.1 which is also a public IP.

You'll need to give more info, like why those machines behind a switch have a public and not private IP, what IP is passing out the IP addresses, What is doing NAT etc.

So I have 2 arch linux computers connected through a switch.

Is this switch between both machines and the route? Or are you trying to bridge 2 machines.

Offline

#3 2016-09-24 08:25:08

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: ip but no connection (ping) when connecting through switch [On Hold]

teckk wrote:

[...]and on different subnets with a mask /22 which is the same as 255.255.252.000, which gets you to 138.23.3.255, they can't talk to each other.

Actually...

138.23.10.135 = 10001010 00010111 00001010 10000111
138.23.11.18  = 10001010 00010111 00001011 00010010
          /22 = 11111111 11111111 11111100 00000000
                                        \_ it's fine

They're in the same subnet.
But nice catch with the public IPs and university, I totally missed that smile. It actually seems to be common practice to assign public IP addresses to devices in a university's network. That doesn't mean they are publicly accessible, though, since there is still likely a firewall blocking direct (incoming) access.

qSeven wrote:

But once logged into C2 I have 100% packet loss when pinging.

Pinging what? Can you ping at least C1 (given that you can SSH into C2 from there)? What happens if you unplug C1 from the switch (so there should only be C2 → switch ← university network)? Does the problem persist?

P.S.
Please don't put code snippets like these onto third-party sites (especially not pastebin.com), it makes it tedious to read if we need to jump around.
Instead, use code tags,

[code]like this[/code]

Last edited by ayekat (2016-09-24 08:39:38)


pkgshackscfgblag

Offline

#4 2016-09-29 20:02:44

qSeven
Member
Registered: 2016-09-21
Posts: 3

Re: ip but no connection (ping) when connecting through switch [On Hold]

teckk: I'm not sure why they both have public IP or how to find out who is assigning the IP.  I believe the university is assigning it and the switch is just passing that on.

Maybe this is helpful:
I'm using a 3Com switch model is 3CGSU05A,  Port 1 goes into the wall, Port 3 to C1 and Port 5 to C2.

I don't care if the two machines are bridged right now. Maybe in the future if that facilitates using openMP.

Right now I'm only trying to use the switch to give internet access to both computers.  I haven't done anything special with the switch.  In the past all I needed to do with a switch is plug all the computers in and they all get internet.

Ayekat:
I'm pinging 8.8.8.8 for both computers and yes I can ping C1 from C2.

The problem persists after unpluging C1 and restarting C2.  But if I leave C1 unplugged and remove power from the switch and give it power again. C2 can then ping and C1 can not.  I can repeat the procedure and switch internet back to C1.

It appears that what ever computer the switch notices first is the one that gets the internet (pings).

Sorry about using paste bin, I'll use the tags in the future.

Offline

#5 2016-09-29 20:19:05

qSeven
Member
Registered: 2016-09-21
Posts: 3

Re: ip but no connection (ping) when connecting through switch [On Hold]

Hey I just found out there might be a problem with my universities fire wall, So I'm putting this on hold till I found out more.

Offline

#6 2016-09-29 20:25:29

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: ip but no connection (ping) when connecting through switch [On Hold]

qSeven wrote:

The problem persists after unpluging C1 and restarting C2.  But if I leave C1 unplugged and remove power from the switch and give it power again. C2 can then ping and C1 can not.  I can repeat the procedure and switch internet back to C1.

It appears that what ever computer the switch notices first is the one that gets the internet (pings).

Have you tried with other machines/OSs via that switch? If it happens with any OS (i.e. not just Arch), your university's network admins will probably be more able to help you. Because to me this seems like whatever router's routing table handles the cable to the wall plug is too dumb to realise there are multiple addresses on that cable...

(btw, for general troubleshooting, not being able to ping doesn't mean you don't have Internet access - it's rather common for networks to block ICMP packets)

--edit--
Ah, ninja'd. Well, good luck, then smile

Last edited by ayekat (2016-09-29 20:25:59)


pkgshackscfgblag

Offline

Board footer

Powered by FluxBB