, , ,

3308920793 4834aa4007 o

This is going to be the first post in a series of blog posts on IOS XR code. This post might be simple, but it is a good to start with the basics so that poeple can get familiar with how XR works.
Lets cover the prompt real quick as that is a bit different then what people are used to.
Lets look at the standard IOS prompt vs the IOS XR prompt.
IOS: Router#
IOS-XR: RP/0/7/CPU0:ios#
As you can see the prompt is a bit different. In standard IOS you have the hostname, but in IOS XR you get a bit more information. It breaks down as follows:
Prompt Syntax:
Type – type of interface card (Usually RP for Route Processor)
Rack – What Rack number this is installed in in a multi-shelf system, typically 0 if standalone
Slot – Slot the RP is installed in (7)
Module – What execute the user commands or port interface. Usually CPU0 or CPU1
Name – Hostname of the router, default here is IOS
->  RP/0/7/CPU0:ios#

Ok, now lets change the hostname from IOS to R1.
First though, let’s change the hostname on typical IOS so you can see the difference.
Router#conf t
*Mar 29 16:32:51.507: %SYS-5-CONFIG_I: Configured from console by console
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1

As you can see, in IOS the hostname changed immediately after hitting Enter.
So, let’s change the hostname to R1 on IOS XR code:
RP/0/7/CPU0:ios#conf t
Thu Mar 29 16:00:43.844 UTC
RP/0/7/CPU0:ios(config)#hostname R1

Notice that the hostname did not change? In IOS XR you need to COMMIT your changes in order for them to take effect. But before we commit them, let’s do a show config quick.

RP/0/7/CPU0:ios(config)#sh config
Thu Mar 29 16:03:53.060 UTC
Building configuration…
!! IOS XR Configuration 4.1.1
hostname R1

Pretty cool, the router will show you the changes you are about to make.
Now we can COMMIT the changes
Thu Mar 29 16:03:04.182 UTC

See, once you entered COMMIT, the hostname change from IOS to R1.