Time to continue the IOS XR information, now configuring interfaces. Yes, this is somewhat basic stuff – but I think that it is good just to see it. If you are afraid of it, seeing stuff that is easy can help someone become comfortable with new things.
First, let’s take a look at what interfaces we have and review them quickly. We can use the same command we are already familiar with – show ip interface brief
RP/0/7/CPU0:R1#
RP/0/7/CPU0:R1#sh ip int br
Thu Mar 29 18:12:04.883 UTC
Interface IP-Address Status Protocol
MgmtEth0/7/CPU0/0 unassigned Shutdown Down
MgmtEth0/7/CPU0/1 unassigned Shutdown Down
MgmtEth0/7/CPU0/2 unassigned Shutdown Down
GigabitEthernet0/3/0/0 unassigned Down Down
GigabitEthernet0/3/0/1 unassigned Down Down
GigabitEthernet0/3/0/2 unassigned Up Up
GigabitEthernet0/3/0/3 unassigned Up Up
MgmtEth0/6/CPU0/0 unassigned Shutdown Down
MgmtEth0/6/CPU0/1 unassigned Shutdown Down
MgmtEth0/6/CPU0/2 unassigned Shutdown Down
RP/0/7/CPU0:R1#
Here you can see that we have an RP in Slot 6 and 7 (Mgmt) and a 4-port Gig card in Slot 3. For this lab, interfaces G0/3/0/2 and G0/3/0/3 are pre-cabled to another router and are currently UP/UP right now.
Let configure an IP address on G0/3/0/2 of 150.1.12.1 with a mask of 255.255.255.0
First, let’s look at the running config on the interface now:
RP/0/7/CPU0:R1#
RP/0/7/CPU0:R1#sh run int g0/3/0/2
Thu Mar 29 18:38:29.942 UTC
% No such configuration item(s)
RP/0/7/CPU0:R1#
As you can see, it says No such config, it is telling you that it is unconfigured.
RP/0/7/CPU0:R1#conf t
Thu Mar 29 18:38:31.891 UTC
RP/0/7/CPU0:R1(config)#int g0/3/0/2
RP/0/7/CPU0:R1(config-if)#ip add 150.1.12.1/24
! Notice, on IOS XR you can use / for the subnet, no more entering 255.255.255.0 :
RP/0/7/CPU0:R1(config-if)#show config
Thu Mar 29 18:38:44.248 UTC
Building configuration…
!! IOS XR Configuration 4.1.1
interface GigabitEthernet0/3/0/2
ipv4 address 150.1.12.1 255.255.255.0
!
end
RP/0/7/CPU0:R1(config-if)#
! Another cool thing with IOS-XR is you can find out where you are any time you want just by entering PWD
RP/0/7/CPU0:R1(config-if)#pwd
Thu Mar 29 19:31:24.666 UTC
interface GigabitEthernet0/3/0/2
RP/0/7/CPU0:R1(config-if)#
RP/0/7/CPU0:R1(config-if)#comm
Thu Mar 29 18:38:46.216 UTC
RP/0/7/CPU0:R1(config-if)#
Now, let’s check the running config on that interface again:
RP/0/7/CPU0:R1#sh run int g0/3/0/2
Thu Mar 29 18:42:43.763 UTC
interface GigabitEthernet0/3/0/2
ipv4 address 150.1.12.1 255.255.255.0
!
RP/0/7/CPU0:R1#
Lets PING our neighbor now – 150.1.12.2
RP/0/7/CPU0:R1#ping 150.1.12.2
Thu Mar 29 18:44:39.570 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/8/12 ms
RP/0/7/CPU0:R1#
Lets configure a loopback for R1 of 1.1.1.1/32
RP/0/7/CPU0:R1#conf t
Thu Mar 29 19:25:19.486 UTC
RP/0/7/CPU0:R1(config)#int l0
RP/0/7/CPU0:R1(config-if)#ip add 1.1.1.1/32
RP/0/7/CPU0:R1(config-if)#exit
RP/0/7/CPU0:R1(config)#exit
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:yes
RP/0/7/CPU0:R1#
Notice this time I did not commit the change, but the system knew I was making changes and asked me if I wanted to commit them. I simply responded with YES and it saved them for me.
Now lets configure some IPv6 addresses.
RP/0/7/CPU0:R1#conf t
Thu Mar 29 19:26:21.184 UTC
RP/0/7/CPU0:R1(config)#int g0/3/0/2
RP/0/7/CPU0:R1(config-if)#ipv6 address 2001:1:1:12::1/64
RP/0/7/CPU0:R1(config-if)#exit
RP/0/7/CPU0:R1(config)#commit
Thu Mar 29 19:26:39.769 UTC
RP/0/7/CPU0:R1(config)#exit
Ok, interface configured, lets ping our neighbor at 2001:1:1:12::2
RP/0/7/CPU0:R1#ping 2001:1:1:12::2
Thu Mar 29 19:29:11.893 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:1:1:12::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/16/68 ms
RP/0/7/CPU0:R1#
Lets add one under our loopback interface as well – well use 2001::1/128
Thu Mar 29 19:29:35.420 UTC
RP/0/7/CPU0:R1(config)#int l0
RP/0/7/CPU0:R1(config-if)#ipv6 add 2001::1/128
RP/0/7/CPU0:R1(config-if)#commit
Thu Mar 29 19:30:49.920 UTC
RP/0/7/CPU0:R1(config-if)#
See, wasn’t that easy! No real difference compared to “old IOS”. But the usage of / subnets is a very welcomed change!
IOS XR Configuring Interfaces – Basic IPv4 and IPv6
03 Tuesday Apr 2012