Mailing List Archive

Mass-renaming interfaces
Hi!

One of my 7201 routers has four GigabitEthernet interfaces but uses only two,
one for IP uplink and another as client-sided downlink with multiple
sub-interfaces named like GigabitEthernet0/1.10 (encapsulation dot1Q).

It need reconfiguration to use 2x1G port-channles. I already did such reconfiguration
for same 7201 router with small number of sub-interfaces and know this is doable
changing sub-interfaces from GigabitEthernet0/1.N to Port-channel1.N

This time the router has about 800 sub-interfaces. I can do some scripting
to prepare incremental configuration removing/re-creating sub-interfaces,
but I presume high CPU load for router while reconfiguring, long procedure time
and notable service degradation or even interruption.

Is there same another, more lightweight way to mass-rename sub-interfaces
while switching from single parent interface to Port-channel?
_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
I would avoid using gig 0/3 and would not bundle it with gig0/[012] .

Gig0/0 0/1 0/2 are marvel SOCs build-in Ports
while Gig0/3 together with the Mangement "Fas"0/0 are on a separate intel
ethernetcontrollerchip
(with gig+(only)fas they try tonot oversubscribe the internal pci bus )

> One of my 7201 routers has four GigabitEthernet interfaces but uses only
> two, one for IP uplink and another as client-sided downlink with multiple
> sub-interfaces named like GigabitEthernet0/1.10 (encapsulation dot1Q).
>
> It need reconfiguration to use 2x1G port-channles. I already did such
> reconfiguration for same 7201 router with small number of sub-interfaces
> and know this is doable changing sub-interfaces from GigabitEthernet0/1.N
> to Port-channel1.N

Just my 0.01 $
Juergen.


_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
28.09.2020 15:20, cnsp@marenda.net wrote:
>
> I would avoid using gig 0/3 and would not bundle it with gig0/[012] .
>
> Gig0/0 0/1 0/2 are marvel SOCs build-in Ports
> while Gig0/3 together with the Mangement "Fas"0/0 are on a separate intel
> ethernetcontrollerchip
> (with gig+(only)fas they try tonot oversubscribe the internal pci bus )

We do not use FastEthernet0/0 at all (shut down), instead a console port is connected to a console server.

I already run one of 7201 with a couple of 2x1G port-channels mostly for redundancy as it proccesses less than 100Mbps,
no problems observed. Will see how it goes with more loaded box.


_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
On Mon, 28 Sep 2020 at 07:35, Eugene Grosbein <eugen@grosbein.net> wrote:
>
> Hi!
>
> One of my 7201 routers has four GigabitEthernet interfaces but uses only two,
> one for IP uplink and another as client-sided downlink with multiple
> sub-interfaces named like GigabitEthernet0/1.10 (encapsulation dot1Q).
>
> It need reconfiguration to use 2x1G port-channles. I already did such reconfiguration
> for same 7201 router with small number of sub-interfaces and know this is doable
> changing sub-interfaces from GigabitEthernet0/1.N to Port-channel1.N
>
> This time the router has about 800 sub-interfaces. I can do some scripting
> to prepare incremental configuration removing/re-creating sub-interfaces,
> but I presume high CPU load for router while reconfiguring, long procedure time
> and notable service degradation or even interruption.
>
> Is there same another, more lightweight way to mass-rename sub-interfaces
> while switching from single parent interface to Port-channel?

Hi Eugene,

If you don't want to do this over a series of incremental changes then
you can make one "big bang" change by taking a copy of the running
configuration, making all the changes to that, and uploading it to the
router as a replacement start-up config file, then just reboot the
router to apply the config in one action. However, this approach is
risky, you need to test that new full configuration file (confirm that
the change only relate to the interface renaming, and that there are
no mistakes, typos, wrong VLAN numbers etc.), which is quite tricky.

If you've ever wanted a pet project to get you into some network
automation and programming stuff this sounds like an ideal project to
me. You can definitely do this with Python tools like NAPALM and
Nornir. Then you can automate the changes and automate the testing of
the changes, and the rollback if required, in either multiple stages
or as one giant change; whatever suits your circumstances best.

Cheers,
James.
_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
28.09.2020 17:12, James Bensley wrote:

> On Mon, 28 Sep 2020 at 07:35, Eugene Grosbein <eugen@grosbein.net> wrote:
>> One of my 7201 routers has four GigabitEthernet interfaces but uses only two,
>> one for IP uplink and another as client-sided downlink with multiple
>> sub-interfaces named like GigabitEthernet0/1.10 (encapsulation dot1Q).
>>
>> It need reconfiguration to use 2x1G port-channles. I already did such reconfiguration
>> for same 7201 router with small number of sub-interfaces and know this is doable
>> changing sub-interfaces from GigabitEthernet0/1.N to Port-channel1.N
>>
>> This time the router has about 800 sub-interfaces. I can do some scripting
>> to prepare incremental configuration removing/re-creating sub-interfaces,
>> but I presume high CPU load for router while reconfiguring, long procedure time
>> and notable service degradation or even interruption.
>>
>> Is there same another, more lightweight way to mass-rename sub-interfaces
>> while switching from single parent interface to Port-channel?
>
> Hi Eugene,
>
> If you don't want to do this over a series of incremental changes then
> you can make one "big bang" change by taking a copy of the running
> configuration, making all the changes to that, and uploading it to the
> router as a replacement start-up config file, then just reboot the
> router to apply the config in one action. However, this approach is
> risky, you need to test that new full configuration file (confirm that
> the change only relate to the interface renaming, and that there are
> no mistakes, typos, wrong VLAN numbers etc.), which is quite tricky.
>
> If you've ever wanted a pet project to get you into some network
> automation and programming stuff this sounds like an ideal project to
> me. You can definitely do this with Python tools like NAPALM and
> Nornir. Then you can automate the changes and automate the testing of
> the changes, and the rollback if required, in either multiple stages
> or as one giant change; whatever suits your circumstances best.

I've already wrote my script using AWK, it took moderate amount of time
to write and debug; it resulted in less than 50 lines. For each sub-interface
it removes all "ip route" commands referring to it (if any) then removes the interface,
then adds it back with new name, then re-adds removed routes changing interface name.

It's quick-n-dirty but works and is fine for one-time job.

My question was if IOS has some better way to rename sub-interfaces I could be unaware of.

_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
Unfortunately no.

On Mon, Sep 28, 2020 at 8:50 AM Eugene Grosbein <eugen@grosbein.net> wrote:

> 28.09.2020 17:12, James Bensley wrote:
>
> > On Mon, 28 Sep 2020 at 07:35, Eugene Grosbein <eugen@grosbein.net>
> wrote:
> >> One of my 7201 routers has four GigabitEthernet interfaces but uses
> only two,
> >> one for IP uplink and another as client-sided downlink with multiple
> >> sub-interfaces named like GigabitEthernet0/1.10 (encapsulation dot1Q).
> >>
> >> It need reconfiguration to use 2x1G port-channles. I already did such
> reconfiguration
> >> for same 7201 router with small number of sub-interfaces and know this
> is doable
> >> changing sub-interfaces from GigabitEthernet0/1.N to Port-channel1.N
> >>
> >> This time the router has about 800 sub-interfaces. I can do some
> scripting
> >> to prepare incremental configuration removing/re-creating
> sub-interfaces,
> >> but I presume high CPU load for router while reconfiguring, long
> procedure time
> >> and notable service degradation or even interruption.
> >>
> >> Is there same another, more lightweight way to mass-rename
> sub-interfaces
> >> while switching from single parent interface to Port-channel?
> >
> > Hi Eugene,
> >
> > If you don't want to do this over a series of incremental changes then
> > you can make one "big bang" change by taking a copy of the running
> > configuration, making all the changes to that, and uploading it to the
> > router as a replacement start-up config file, then just reboot the
> > router to apply the config in one action. However, this approach is
> > risky, you need to test that new full configuration file (confirm that
> > the change only relate to the interface renaming, and that there are
> > no mistakes, typos, wrong VLAN numbers etc.), which is quite tricky.
> >
> > If you've ever wanted a pet project to get you into some network
> > automation and programming stuff this sounds like an ideal project to
> > me. You can definitely do this with Python tools like NAPALM and
> > Nornir. Then you can automate the changes and automate the testing of
> > the changes, and the rollback if required, in either multiple stages
> > or as one giant change; whatever suits your circumstances best.
>
> I've already wrote my script using AWK, it took moderate amount of time
> to write and debug; it resulted in less than 50 lines. For each
> sub-interface
> it removes all "ip route" commands referring to it (if any) then removes
> the interface,
> then adds it back with new name, then re-adds removed routes changing
> interface name.
>
> It's quick-n-dirty but works and is fine for one-time job.
>
> My question was if IOS has some better way to rename sub-interfaces I
> could be unaware of.
>
> _______________________________________________
> cisco-nsp mailing list cisco-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>
_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
28.09.2020 20:00, Aaron wrote:

> Unfortunately no.

Thanks!

In case someone's curious, I did it at 7:00 early in the morning,
the whole thing lasted for 30 seconds with 100% load of CPU processing
352KB of incremental configuration pre-loaded to flash: device
and then applied with: copy flash:rename.cfg running-config

_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
Re: Mass-renaming interfaces [ In reply to ]
28.09.2020 20:00, Aaron wrote:

> Unfortunately no.

Funny thing, I had very old sub-interface created just for testing:

interface GigabitEthernet0/1.2239
encapsulation dot1Q 2239
xconnect X.X.X.X 239 encapsulation l2tpv3 manual pw-class MyPeer
l2tp id 239 239
l2tp cookie local 4 239
l2tp cookie remote 4 239
l2tp hello l2tp-defaults
!

But for interface Port-channel1.2239 it did not accept "xconnect" part of configuration,
so if I would still need it, I'd move this to another router without Port-channels before investigation.

_______________________________________________
cisco-nsp mailing list cisco-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/