Tags

, ,


One last IOS XR post and then it will be time to post the IOS XR workbook.
Ok, let’s quickly look at loading a configuration from the disk and overwriting an existing configuration.
I have copied a config to disk0a: called newconfig.txt.  What I want to do is install this configuration as the running config on the router.
1626        -rwx  204         Wed Oct 17 01:21:30 2012  newconfig.txt
So to start, lets delete the existing configuration
RP/0/RSP0/CPU0:R1(config)#commit replace
Wed Oct 17 01:21:43.406 UTC
This commit will replace or remove the entire running configuration. This
operation can be service affecting.
Do you wish to proceed? [no]: y
RP/0/RSP0/CPU0:ios(config)#
RP/0/RSP0/CPU0:ios(config)#exit
Ok, so now we are at an unconfigured device.  Now we can load the config on the disk to the running config.
RP/0/RSP0/CPU0:ios(config)#load disk0a:/newconfig.txt
Loading.
204 bytes parsed in 1 sec (203)bytes/sec

The configuration is now loaded into the candidate config.  Let us check what is there and then commit it.
RP/0/RSP0/CPU0:ios(config)#show confi
Wed Oct 17 01:26:17.539 UTC
Building configuration…
!! IOS XR Configuration 4.1.2
hostname R1
domain name lab.cfg
interface Loopback100
ipv4 address 100.100.100.100 255.255.255.255
!
end
RP/0/RSP0/CPU0:ios(config)#commit
Wed Oct 17 01:26:22.174 UTC
RP/0/RSP0/CPU0:R1(config)#
There, we have loaded the config and applied the changes.
 
I have loaded another file to the router called ReplaceConfig.txt.  This is a new configuration for the router, one that we want to replace the existing config with.
1628        -rwx  283         Wed Oct 17 01:36:03 2012  ReplaceConfig.txt
RP/0/RSP0/CPU0:R1#conf t
Wed Oct 17 01:37:23.638 UTC
RP/0/RSP0/CPU0:R1(config)#load disk0a:/ReplaceConfig.txt
Loading.
283 bytes parsed in 1 sec (282)bytes/sec
RP/0/RSP0/CPU0:R1(config)#show config
Wed Oct 17 01:37:38.571 UTC
Building configuration…
!! IOS XR Configuration 4.1.2
hostname Router1
domain name NewLab.CFG
interface Loopback100
ipv4 address 101.101.101.101 255.255.255.255
!
interface TenGigE0/0/0/0
ipv4 address 200.200.200.202 255.255.255.0
!
end
RP/0/RSP0/CPU0:R1(config)#commit replace
Wed Oct 17 01:37:41.577 UTC
This commit will replace or remove the entire running configuration. This
operation can be service affecting.
Do you wish to proceed? [no]: y
RP/0/RSP0/CPU0:Router1(config)#
Now we should be able to Ping R2 Te0/0/0/0 IP Address of 200.200.200.200
RP/0/RSP0/CPU0:Router1#ping 200.200.200.200
Wed Oct 17 02:03:23.338 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.200.200.200, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms
RP/0/RSP0/CPU0:Router1#
What other options to loaf configuration are there?  Well, here is a list:
RP/0/RSP0/CPU0:Router1(config)#load ?
WORD            Load from file
bootflash:      Load from bootflash: file system
commit          Load commit changes
compactflash:   Load from compactflash: file system
compactflasha:  Load from compactflasha: file system
configuration   Contents of configuration
diff            Load from diff file
disk0:          Load from disk0: file system
disk0a:         Load from disk0a: file system
disk1:          Load from disk1: file system
disk1a:         Load from disk1a: file system
ftp:            Load from ftp: file system
harddisk:       Load from harddisk: file system
harddiska:      Load from harddiska: file system
harddiskb:      Load from harddiskb: file system
lcdisk0:        Load from lcdisk0: file system
lcdisk0a:       Load from lcdisk0a: file system
nvram:          Load from nvram: file system
rcp:            Load from rcp: file system
rollback        Load rollback changes
tftp:           Load from tftp: file system
RP/0/RSP0/CPU0:Router1(config)#
You can load from the local disk, RCP, TFTP, FTP, etc if you want.