1

We are going to be moving IP's (via network) from one centos server to another. It's easy enough to add the range on the new server but there might be a problem.

The primary server IP (in /etc/sysconfig/network-scripts/ifcfg-eth0) is one of the IP's being moved. We have some extra IP's on that server not being moved which we are hoping we can use to SSH in to delete all the data etc.

Will the server still be accessible if the Primary IP is not usable?

Joe
  • 35
  • 3

3 Answers3

1

Yes. This is assuming:

  • sshd is configured to listen on all addresses (it is by default, see /etc/ssh/sshd_config)
  • no firewall restricting port 22
  • no authentication mechanisms that communicate to a remote server (ldap, wins, etc) which may be affected by similar rules above.

That said, if you are able to SSH to one of the other IP's not being moved right now, it should be no problem.

h0tw1r3
  • 2,776
  • 19
  • 17
1

Maybe this example will be helpful for you (providing that all the IPs are assigned to the same interface and that I've not misunderstood your question):

root@ulises:~# ifconfig eth0 | grep "inet addr"
          inet addr:192.168.0.30  Bcast:192.168.0.255  Mask:255.255.255.0
root@ulises:~# ifconfig eth0:0 192.168.0.17 up
root@ulises:~# ping -c 1 192.168.0.17
PING 192.168.0.17 (192.168.0.17) 56(84) bytes of data.
64 bytes from 192.168.0.17: icmp_req=1 ttl=64 time=0.064 ms

--- 192.168.0.17 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.064/0.064/0.064/0.000 ms
root@ulises:~# ifconfig eth0 down

root@ulises:~# ping -c 1 192.168.0.17
PING 192.168.0.17 (192.168.0.17) 56(84) bytes of data.
From 192.168.0.238 icmp_seq=1 Destination Host Unreachable

--- 192.168.0.17 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms

(*) the ping is done through a second eth1 interface

hmontoliu
  • 3,753
  • 3
  • 23
  • 24
0

depend of ur server setup.

if u have server in saem ethernet segment, defualt practice is add private ip like 10.0.0.1/10.0.0.2 to both servers and access from second server yusign that ip.

so u can move ip of other network without loose access.

if u have no server near that, please be sure u not delete or recreate default routes.

arheops
  • 708
  • 1
  • 5
  • 13