cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7135
Views
5
Helpful
3
Replies

IOS XR asr9k edit files

jhontoc24
Level 1
Level 1

Hi guys

I don't know if is possible in asr9k to create and edit new files. Because I want  copy a lot of commands from excel (cli) to new file and then in the VM only put a config)#load disk0:/migration.txt.

Thanks in advance.

1 Accepted Solution

Accepted Solutions

Ahmed Muhi
Level 1
Level 1

Hello jhontoc24,

Yes you can, when you issue the command run from the CLI you get into the ksh mode, there you can use Linux commands and Linux text editors such as nano, vim, and emacs, if you are familiar with these applications.

Check this link out for more information on where to find your configuration files.

http://ccie-in-3-months.blogspot.com/2010/09/how-to-edit-text-files-in-ios-xr-easy.html

View solution in original post

3 Replies 3

Ahmed Muhi
Level 1
Level 1

Hello jhontoc24,

Yes you can, when you issue the command run from the CLI you get into the ksh mode, there you can use Linux commands and Linux text editors such as nano, vim, and emacs, if you are familiar with these applications.

Check this link out for more information on where to find your configuration files.

http://ccie-in-3-months.blogspot.com/2010/09/how-to-edit-text-files-in-ios-xr-easy.html

Hi

As a follow up on Ahmed correct answer. With an example and a warning. When in ksh mode. Dont "touch" anything that you don't know what it is. This can cause serious errors on the box

 RP/0/RSP0/CPU0:asr9k#run
Wed Dec 21 07:45:35.556 CET
# vim /disk0:/test123config.txt

edit file as you want. I have added an interface in this example.

# cat /disk0:/test123config.txt
 interface gi1000/0/0/2.222 l2transport
 description To test
 encapsulation dot1q 222
 rewrite ingress tag pop 1 symmetric
!
# exit

RP/0/RSP0/CPU0:asr9k#conf  
Wed Dec 21 07:49:10.068 CET

RP/0/RSP0/CPU0:asr9k(config)#load disk0:test123config.txt
Loading.
125 bytes parsed in 1 sec (124)bytes/sec
RP/0/RSP0/CPU0:asr9k(config-subif)#show configuration
Wed Dec 21 07:49:54.272 CET
Building configuration...
!! IOS XR Configuration 5.3.4
interface GigabitEthernet1000/0/0/2.222 l2transport
 description To test
 encapsulation dot1q 222
 rewrite ingress tag pop 1 symmetric
!
end

RP/0/RSP0/CPU0:asr9k(config-subif)#

Regards Peter

Hello Peter,

A very interesting follow-up Peter, I did know about the load command, thank you.

Kind regards,

Ahmed Muhi

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: