Pagina 1 di 1
DHCP & HSRP
Inviato: mer 05 mar , 2008 3:50 pm
da freccetta
Qualcuno ha le config per configurare due router in hsrp e pure il dhcp su entrambi?
grazie
Inviato: gio 06 mar , 2008 8:00 am
da Helix
Ammettiamo che te abbia due router
Esempio:
Primo Router HSRP (IP, priorità sono messe come esempio)
interface GigabitEthernet0/1
description ROUTER 1
ip address 10.10.10.209 255.255.255.240
duplex auto
speed auto
standby 1 ip 10.10.10.211
standby 1 priority 125
standby 1 preempt
standby 1 track INT_SU_CUI_FARE_IL_TRACK PRIORITA'
standby 2 ip 10.10.10.212
standby 2 preempt
(L'interfaccia di track solitamente in ambienti enterprise è una interfaccia seriale o ATM. la Variabile PRIORITA' se non metti niente è 10 altrimenti puoi impostare un valore a tua scelta...esempio 20)
Secondo Router
interface GigabitEthernet0/1
description ROUTER 2
ip address 10.10.10.210 255.255.255.240
duplex auto
speed auto
standby 1 ip 10.10.10.211
standby 1 preempt
standby 2 ip 10.10.10.212
standby 2 priority 125
standby 2 preempt
standby 2 track track INT_SU_CUI_FARE_IL_TRACK PRIORITA'
se tutto va bene dovresti avere una cosa del genere...
Router2# sh standby brie
Interface Grp Prio P State Active Standby Virtual IP
Gi0/1 1 100 P Standby 10.10.10.209 local 10.10.10.211
Gi0/1 2 125 P Active local 10.10.10.209 10.10.10.212
e la cosa inversa sul router 1
Per il dhcp:
entra nel conf term
ip dhcp pool DATI_LAN
network RETE SUBNET
default-router DEFAULT_GATEWAY
dns-server DNS_SERVER_1 DNS_SERVER_2
lease VALORE
exit
VALORE è il valore della lease
se vuoi escludere range di indirizzi allora devi dare questo comando
ip dhcp excluded-address IP_PARTENZA IP_FINE
Se non ricordo male, impostando il dhcp server su entrambi i router...la scelta viene fatta in base al valore della lease. Maggiore è la lease, maggiore è la priorità di preferenza...(dico una cavolata???)
Questa è ovviamete una conf base per il dhcp...se ti serve altro chiedi pure!!!
Inviato: gio 06 mar , 2008 9:37 am
da freccetta
Lease non è il valore della scadenza?Se il primo router assegna un'IP,quando funziona il dhcp e quindi è il server DHCP del secondo router ad essere attivo che succede?
Router 1
assegna x.x.x.1 e x.x.x.2
Router 1 viene spento
Router 2 cosa fa?alla prossima richiesta dhcp riassegna x.x.x.1 e x.x.x.2?
Inviato: gio 06 mar , 2008 12:55 pm
da Helix
Dovrebbe assegnargli un nuovo IP...
Inviato: gio 06 mar , 2008 1:00 pm
da freccetta
dovrebbe?nel senso che neanche tu l'hai mai provato?
Inviato: gio 06 mar , 2008 4:27 pm
da Helix
Sinceramente non l'ho mai provato...
Inviato: gio 06 mar , 2008 5:02 pm
da freccetta
tanto per chiudere.
configurato e funziona.il primo dhcp che risponde assegna l'ip e l'altro lo vede con usato quindi non lo riassegna.
Vale come avere due dhcp sulla stessa rete.che siano o no cisco.
Ciao
Inviato: sab 14 giu , 2008 5:54 pm
da nat
Ciao Helix vorrei chiederti se è proponibile una simile configurazione
Primo router
interface GigabitEthernet0/1
description ROUTER 1
ip address 10.10.10.209 255.255.255.240
duplex auto
speed auto
standby 1 ip 10.10.10.211
standby 1 priority 125
standby 1 preempt
standby 1 track INT_SU_CUI_FARE_IL_TRACK PRIORITA'
Secondo router
interface GigabitEthernet0/1
description ROUTER 2
ip address 10.10.10.210 255.255.255.240
duplex auto
speed auto
standby 1 ip 10.10.10.211
standby 1 preempt
Mi spiego meglio
l’ip 10.10.10.211 deve essere il default gateway host,
preempt il ritorno al primo quando l’interfaccia torna Up,
quindi quando va down l’interfaccia tranck del primo router si passa al secondo , se ritorna up il primo con il preempt si torna sul primo.
E’ possibile che funziona? Se no puoi spiegarmi l’ip 10.10.10.212 a cosa serve?
Grazie per un Tuo eventuale interessamento.
Inviato: dom 15 giu , 2008 11:40 am
da the wolf
si nat la tua configurazione funzona, e forse è anche più indicata, quella con il doppio gruppo standby è più per ambienti enterprise e serve per il load sharing, se per esempio ai due router ci sono collegati apparati layer 3 e comunicano con i router tramite una vlan di transito, sulla vlan si configura anche lì un doppio standby in modo che un apparato parla con un router e l'altro con il secondo router mantenendo cmq la ridondanza.
Mmmmhhh come mi sono spiegato bene

Inviato: dom 15 giu , 2008 2:02 pm
da nat
Grazie per la risposta the wolf,ti sei spiegato bene,appena posso provo questo tipo di configurazione e faccio sapere. ciao
Inviato: lun 07 lug , 2008 5:47 pm
da nat
Se può interessare di seguito metto qualche risultato di prove fatte in configurazione hsrp.
Il tutto sembra funzionare, se ci sono suggerimenti sono ben accolti.
Questi sono i show conf dei due router
ROUTER_1#show conf
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip nat inside
speed auto
standby 1 ip 192.168.1.254
standby 1 priority 105
standby 1 preempt
standby 1 track Serial0/0
ROUTER_2#show conf
interface FastEthernet0
ip address 192.168.1.2 255.255.255.0
ip nat inside
speed auto
standby 1 ip 192.168.1.254
standby 1 preempt
ROUTER_1#show standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 105 P Active local 192.168.1.2 192.168.1.254
ROUTER_1#show standby
FastEthernet0/0 - Group 1
State is Active
4 state changes, last state change 00:02:21
Virtual IP address is 192.168.1.254
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.044 secs
Preemption enabled
Active router is local
Standby router is 192.168.1.2, priority 100 (expires in 7.040 sec)
Priority 105 (configured 105)
Track interface Serial0/0 state Up decrement 10
IP redundancy name is "hsrp-Fa0/0-1" (default)
Router 2
ROUTER_2#show standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0 1 100 P Standby 192.168.1.1 local 192.168.1.254
ROUTER_2#show standby
FastEthernet0 - Group 1
State is Standby
7 state changes, last state change 00:06:05
Virtual IP address is 192.168.1.254
Active virtual MAC address is 0000.0c07.ac01
Local virtual MAC address is 0000.0c07.ac01 (default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.372 secs
Preemption enabled
Active router is 192.168.1.1, priority 105 (expires in 9.368 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Fa0-1" (default)
Nel caso vada giù la serial 0/0 del router 1 si passa sul router 2
ROUTER_1#
*Mar 1 00:26:27: %LINK-3-UPDOWN: Interface Serial0/0, changed state to down
*Mar 1 00:26:28: %HSRP-6-STATECHANGE: FastEthernet0/0 Grp 1 state Active -> Speak
*Mar 1 00:26:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
ROUTER_1#show standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 95 P Standby 192.168.1.2 local 192.168.1.254
ROUTER_2#
*Mar 1 00:33:08.175: %HSRP-6-STATECHANGE: FastEthernet0 Grp 1 state Standby -> Active
ROUTER_2#show standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0 1 100 P Active local 192.168.1.1 192.168.1.254
Questo è un debug
*Mar 1 00:39:06.183: HSRP: Fa0 Grp 1 Hello out 192.168.1.2 Standby pri 100 vIP 192.168.1.254
*Mar 1 00:39:08.183: HSRP: Fa0 Grp 1 Hello in 192.168.1.1 Active pri 105 vIP 192.168.1.254
*Mar 1 00:39:09.183: HSRP: Fa0 Grp 1 Hello out 192.168.1.2 Standby pri 100 vIP 192.168.1.254
*Mar 1 00:39:11.183: HSRP: Fa0 Grp 1 Hello in 192.168.1.1 Active pri 105 vIP 192.168.1.254
*Mar 1 00:39:11.603: HSRP: Fa0 Redirect adv out, Passive, active 0 passive 1
*Mar 1 00:39:12.183: HSRP: Fa0 Grp 1 Hello out 192.168.1.2 Standby pri 100 vIP 192.168.1.254