Hi Josh,
Certainly that's one way to do it. I do like the EEM idea though, saves
having to TFTP/FTP something across but if it's remote access, I would do a
reload in XX just in case things don't work and you need to revert the old
fashioned way...
R1#
*Mar 1 04:28:07.594: %SYS-5-CONFIG_I: Configured from console by consolesh
run int lo2
Building configuration...
Current configuration : 82 bytes
!
interface Loopback2
ip vrf forwarding x
ip address 1.2.3.4 255.255.255.0
end
R1#sh run | s event
event manager applet NoVRF
event none
action 1.0 cli command "enable"
action 2.0 cli command "config terminal"
action 3.0 cli command "int lo2"
action 4.0 cli command "no ip vrf forwarding x"
action 5.0 cli command "ip address 1.2.3.4 255.255.255.0"
R1#reload in 10
Reload scheduled in 10 minutes by console
Reload reason: Reload Command
Proceed with reload? [confirm]
R1#event manager run NoVRF
R1#
*Mar 1 04:28:31.250: %SYS-5-CONFIG_I: Configured from console by vty0
R1#sh run int lo2
Building configuration...
Current configuration : 61 bytes
!
interface Loopback2
ip address 1.2.3.4 255.255.255.0
end
R1#sh run int lo2
Building configuration...
Current configuration : 61 bytes
!
interface Loopback2
ip address 1.2.3.4 255.255.255.0
end
R1#reload cancel
R1#
***
*** --- SHUTDOWN ABORTED ---
***
R1#
*Mar 1 04:30:58.998: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload
cancelled at 04:30:58 UTC Fri Mar 1 2002
Cheers,
Adam
On Sun, Dec 18, 2011 at 5:35 PM, Josh <josh_at_atterburyhouse.com> wrote:
> Put the commands in a text file and copy tftp run
>
> Sent from my iPad
>
> On 14/12/2011, at 7:01 AM, Jeferson Guardia <jefersonf_at_gmail.com> wrote:
>
> > I basically need to exec something like this in a row:
> >
> > int gig0/0
> > no ip vrf forwarding X
> > ip addr IP
> >
> > as soon as I issue the second command, I am out of the router, cant run
> the
> > thrid. I know this is crazy , but.. ideas? Narbik??? :-)
> >
> > 2011/12/13 Jeferson Guardia <jefersonf_at_gmail.com>
> >
> >> Hi,
> >>
> >> I have a remote box where the interface that I access is associated
> with a
> >> VRF, unfortunately this is causing me some issues and as soon as I have
> >> remove the vrf forwarding statement from the interface, it will lose its
> >> IPv4 settings and I will lose connectivity. Is there anyway I can
> overcome
> >> this issue? EEM script or something? no I dont have other interfaces to
> >> access once I turn off the main one that is linked straight to the
> internet.
> >>
> >> Thx!
> >>
> >> --
> >> Jeferson Guardia
> >> CCIE #28157
> >>
> >
> >
> >
> > --
> > Jeferson Guardia
> > CCIE #28157
> >
> >
> > Blogs and organic groups at http://www.ccie.net
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
Received on Sun Dec 18 2011 - 18:38:10 ART
This archive was generated by hypermail 2.2.0 : Sun Jan 01 2012 - 08:27:00 ART