cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2174
Views
5
Helpful
6
Replies

FLOATING IP

princeshiloh
Level 1
Level 1

I have two servers in active and passive mode, and a cisco router, how can i create a floating IP

1 Accepted Solution

Accepted Solutions

Hello,

 

I am thinking maybe it is possible to use an EEM script in conjunction with static DHCP reservations. Basically, you assign a static reservatio for your first NIC. If the router cannot ping that NIC (and the assigned IP address) anymore, the EEM script will remove the DHCP reservation and configure a second one (for the second NIC). If NIC 1 comes back up, the process is being reversed...

 

This is what the configuration would look like (IP and MAC addresses are arbitrary, obviously):

 

ip dhcp pool SERVER_NIC_1
host 192.168.1.10 255.255.255.0
client-identifier 000b.39c8.4cb2
!
track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 192.168.1.10 source-interface GigabitEthernet0/0
!
ip sla schedule 1 start-time now life forever
!
event manager applet SERVER_NIC_1_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "clear ip dhcp binding 192.168.1.10"
action 3.0 cli command "conf t"
action 4.0 cli command "no ip dhcp pool SERVER_NIC_1"
action 5.0 cli command "ip dhcp pool SERVER_NIC_2"
action 6.0 cli command "host 192.168.1.10 255.255.255.0"
action 7.0 cli command "client-identifier 000a.35d6.4fc3"
action 8.0 cli command "end"
!
event manager applet SERVER_NIC_1_UP
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "clear ip dhcp binding 192.168.1.10"
action 3.0 cli command "conf t"
action 4.0 cli command "no ip dhcp pool SERVER_NIC_2"
action 5.0 cli command "ip dhcp pool SERVER_NIC_1"
action 6.0 cli command "host 192.168.1.10 255.255.255.0"
action 7.0 cli command "client-identifier 000b.39c8.4cb2"
action 8.0 cli command "end"

 

View solution in original post

6 Replies 6

Hello

Can you elaborate what you mean regards your servers , how are you server connected at present in relation to this router?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I have two hp servers that need to have HA built between them, is it possible to use a router to acheive active/standby 

Hello,

 

I am thinking maybe it is possible to use an EEM script in conjunction with static DHCP reservations. Basically, you assign a static reservatio for your first NIC. If the router cannot ping that NIC (and the assigned IP address) anymore, the EEM script will remove the DHCP reservation and configure a second one (for the second NIC). If NIC 1 comes back up, the process is being reversed...

 

This is what the configuration would look like (IP and MAC addresses are arbitrary, obviously):

 

ip dhcp pool SERVER_NIC_1
host 192.168.1.10 255.255.255.0
client-identifier 000b.39c8.4cb2
!
track 1 ip sla 1 reachability
!
ip sla 1
icmp-echo 192.168.1.10 source-interface GigabitEthernet0/0
!
ip sla schedule 1 start-time now life forever
!
event manager applet SERVER_NIC_1_DOWN
event track 1 state down
action 1.0 cli command "enable"
action 2.0 cli command "clear ip dhcp binding 192.168.1.10"
action 3.0 cli command "conf t"
action 4.0 cli command "no ip dhcp pool SERVER_NIC_1"
action 5.0 cli command "ip dhcp pool SERVER_NIC_2"
action 6.0 cli command "host 192.168.1.10 255.255.255.0"
action 7.0 cli command "client-identifier 000a.35d6.4fc3"
action 8.0 cli command "end"
!
event manager applet SERVER_NIC_1_UP
event track 1 state up
action 1.0 cli command "enable"
action 2.0 cli command "clear ip dhcp binding 192.168.1.10"
action 3.0 cli command "conf t"
action 4.0 cli command "no ip dhcp pool SERVER_NIC_2"
action 5.0 cli command "ip dhcp pool SERVER_NIC_1"
action 6.0 cli command "host 192.168.1.10 255.255.255.0"
action 7.0 cli command "client-identifier 000b.39c8.4cb2"
action 8.0 cli command "end"

 

me like that , thanks

Hello

HA suggests that the servers are some way linked together however your explanation is very vague as to the running of these server interms of what they provide and how they are physically connected.

 

However if you just wish to have the one servers link active while another is disabled then possible a simple flex link could perform the job but again it all depends on how the servers are physically connected (directy to the router or via switch.

 

Rtr
int X/0
description Link to primary server
backup interface int X/1
backup delay 10 30

int X/1
description Link to secondary server


Switch
int X/0
description switchport to primary server
switchport backup interface int X/1 preempt delay xx


int X/1
description switchport to secondary server


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I hope the gateways of both servers are used as floating IP.

If you have switch in between the servers then you can use

router-on-stick

method to keep the gateway in the router for the HA requirement.

 

Active/Standby servers <---->Switch<---->Router
Review Cisco Networking for a $25 gift card