You are not logged in.

#1 2010-12-03 01:52:57

tacostick
Member
Registered: 2010-07-20
Posts: 27

Interesting Ethernet Crossover Problem

I'm in a little bit of a pickle here, and I wonder if you guys have any ideas.

I'm in college, and while I was home for Thanksgiving, I set up a server running Arch. It was configured to use DHCP to get an IP address, start up sshd and vncserver, and then email me its IP address. I tested this several times at home and it worked great--I figured I'd bring it up to school without a mouse, keyboard, or monitor, and have myself a little headless server.

The issue: When I brought it to school and hooked it up, it didn't get an IP address; it needed to register its MAC address with the university IT service. I had a router lying around, so I hooked the server and my laptop up to the router, SSH'd in, and switched it to use a static IP address (I work at the university Information Technology Services office, so I knew of a few 'free' IPs).

Of course, I screwed up and chose the wrong one. Now the machine turns on and tries (and fails) to resolve that static IP address.

By chance, I have a crossover ethernet cable lying around. Is it possible to connect the headless server to my laptop with the crossover cable, set my eth0 subnet to the same one the server is trying to use, and ... connect them? All I need to do is ssh in and change, literally, one character in the /etc/rc.conf file on the server.

Any ideas? Thanks in advance!

Offline

#2 2010-12-03 05:13:41

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Interesting Ethernet Crossover Problem

tacostick wrote:

Is it possible to connect the headless server to my laptop with the crossover cable, set my eth0 subnet to the same one the server is trying to use, and ... connect them?

Yes.

Offline

#3 2010-12-03 08:44:05

tacostick
Member
Registered: 2010-07-20
Posts: 27

Re: Interesting Ethernet Crossover Problem

Okay that's what I thought. I'm not sure why it isn't working. I hook up the cable to both computers, and the network settings in /etc/rc.conf on the headless server  (if my memory is right) are:

eth0="eth0 130.64.110.153 netmask 255.255.255.0 broadcast 130.64.110.255" 
INTERFACES=(eth0)
gateway="default gw 130.64.110.1"
ROUTES=(gateway)

I don't actually know much at all about networks (at least, enormous ones like at this university), so the netmask, broadcast, and gateway are numbers that seemed to be good choices when I was editing the server's rc.conf but might actually be wrong and the reason it's not working.

Anyway so those are the settings on the headless server, which can't be changed unless I, well, can get into the box with ssh.

I hook up the cable to both computers, and on my laptop, I run:

# ifconfig eth0 130.64.110.1

then boot up the ol' server, then:

# ping 130.64.110.153 

which, to my understanding, should work as the server tries to get 130.64.110.153, finds me on the same subnet, and gets the desired IP address. I also tried

ifconfig eth0 130.64.110.154

and that didn't work.

Is it probably the broadcast/gateway/netmask? How do I know what the "right" value is for those?

Offline

#4 2010-12-03 10:50:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Interesting Ethernet Crossover Problem

That *should* work.... Perhaps the server is blocking pings? Try `arping` instead of ping

Offline

Board footer

Powered by FluxBB