Tags

, , , , ,

IOS XR Fryguy

 


Time for some OSPF configs, these will build off the previous configs we just did.  For this lab, the other router, R2, was
preconfigured to support the connections.

We will place our loopback and out g0/3/0/2 interface into OSPF process LAB and area 0.0.0.0

RP/0/7/CPU0:R1#
RP/0/7/CPU0:R1#
conf t
Thu Mar 29 19:37:52.671 UTC


Defineour OSPF process name

RP/0/7/CPU0:R1(config)#
router ospf LAB

Now to define our area first
RP/0/7/CPU0:R1(config-ospf)#
area 0.0.0.0

Now we can place the interfaces into the area, no need to entering subnets
RP/0/7/CPU0:R1(config-ospf-ar)#
inter loo0
RP/0/7/CPU0:R1(config-ospf-ar-if)#
inter g0/3/0/2
RP/0/7/CPU0:R1(config-ospf-ar-if)#
exit
RP/0/7/CPU0:R1(config-ospf-ar)#
exit
RP/0/7/CPU0:R1(config-ospf)#
exit
RP/0/7/CPU0:R1(config)#
commit

Thu Mar 29 19:38:15.182 UTC
RP/0/7/CPU0:R1(config)#

Now to look at our IP Protocols running:
RP/0/7/CPU0:R1#
sh ip proto
Thu Mar 29 19:38:24.113 UTC
Routing Protocol OSPF LAB
Router Id: 1.1.1.1
Distance: 110
Non-Stop Forwarding: Disabled
Redistribution:
None
Area 0.0.0.0
Loopback0
GigabitEthernet0/3/0/2
RP/0/7/CPU0:R1#


We can see what we have OSPF LAB running with a RouterID of 1.1.1.1 (our loopback).  It tells us what interfaces are in Area
0.0.0.0 as well.

Now to see if we neighbored up with R2:
RP/0/7/CPU0:R1#
sh ip ospf nei
Thu Mar 29 19:38:33.557 UTC

* Indicates MADJ interface
Neighbors for OSPF LAB

Neighbor ID Pri State    Dead Time  Address     Interface
2.2.2.2     1   FULL/DR  00:00:37   150.1.12.2  GigabitEthernet0/3/0/2
Neighbor is up for 00:00:12

Total neighbor count: 1
RP/0/7/CPU0:R1#

Yup, we have a neighbor of R2 (2.2.2.2) up and in FULL/DR.
Time to look at the routing table:

RP/0/7/CPU0:R1#sh ip route
Thu Mar 29 19:41:06.047 UTC

Codes:
C – connected, S – static, R – RIP, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area      
N1 – OSPF NSSA external type 1, N2 -OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – ISIS, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, su – IS-IS summary null, * – candidate default
U – per-user static route, o – ODR, L – local, G  – DAGR
A – access/subscriber, (!) – FRR Backup pathc

Gateway of last resort is not set
L    1.1.1.1/32 is directly connected, 00:15:37, Loopback0

O    2.2.2.2/32 [110/2] via 150.1.12.2, 00:02:43, GigabitEthernet0/3/0/2

C    150.1.12.0/24 is directly connected, 01:02:19, GigabitEthernet0/3/0/2
L    150.1.12.1/32 is directly connected, 01:02:19, GigabitEthernet0/3/0/2
RP/0/7/CPU0:R1#


We can see we have a route to R2 loopback interface (2.2.2.2/32), now we should be able to
PING it from our Loopback0 interface.

RP/0/7/CPU0:R1#ping 2.2.2.2 source lo0

Thu Mar 29 19:41:21.828 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
RP/0/7/CPU0:R1#

For reference, here is a similar IOS config for the same thing:

R1(config)#router ospf 1
R1(config-router)#
net 1.1.1.1 0.0.0.0 a 0.0.0.0
R1(config-router)#
net 150.1.12.0 0.0.0.255 a 0.0.0.0
R1(config-router
)#^Z
R1#
*Mar 29 20:18:29.698: %SYS-5-CONFIG_I: Configured from console by console
R1#
R1#
p 2.2.2.2 so l0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1#

 

OSPF Advanced Features

I just wanted to take a minute and discuss some of the other features available
for OSPF.

Network Point-to-Point, Point-to-Multipoint, broadcast, non-broadcast

RP/0/7/CPU0:R1(config)#router ospf LAB
RP/0/7/CPU0:R1(config-ospf)#
area 0.0.0.0
RP/0/7/CPU0:R1(config-ospf-ar)#
int g0/3/0/2
RP/0/7/CPU0:R1(config-ospf-ar-if)#
network ?
broadcast            Specify OSPF broadcast multi-access network
non-broadcast        Specify OSPF NBMA network
  point-to-multipoint  Specify OSPF point-to-multipoint network
point-to-point       Specify OSPF point-to-point network

As you can see, all the normal OSPF network interface types are there.  You just need to configure them under the
OSPF process instead of the interface like in normal IOS.

Authentication

IOS XR also supports OSPF authentication, both area and interface.  In this example we will create an MD5
interface authentication.

RP/0/7/CPU0:R1(config)#router ospf LAB
RP/0/7/CPU0:R1(config-ospf)#
area 0.0.0.0
RP/0/7/CPU0:R1(config-ospf-ar)#
int g0/3/0/2

Need to enable MD5 authentication
RP/0/7/CPU0:R1(config-ospf-ar-if)#
authentication message-digest

Then set our MD5 key #1 to Cisco
RP/0/7/CPU0:R1(config-ospf-ar-if)#
message-digest-key 1 md5 Cisco
RP/0/7/CPU0:R1(config-ospf-ar-if)#
exit
RP/0/7/CPU0:R1(config-ospf-ar)#
commit

Now, lets look at the interface and make sure we have MD5 authentication enabled.

RP/0/7/CPU0:R1#sh ospf LAB int g0/3/0/2
Sun Apr  1 18:31:01.235 UTC
GigabitEthernet0/3/0/2 is up, line protocol is up
Internet Address 150.1.12.1/24, Area 0.0.0.0
  Process ID LAB, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU 1500, MaxPktSz 1500
Designated Router (ID) 2.2.2.2, Interface address 150.1.12.2
Backup Designated router (ID) 1.1.1.1, Interface address 150.1.12.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 3
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2  (Designated Router)
Suppress hello for 0 neighbor(s)

  Message digest authentication enabled
    Youngest key id is 1

  Multi-area interface Count is 0
RP/0/7/CPU0:R1#

As you can see above, we do.  This is all very similar to IOS, so the jump to XR is more knowing where to configure something then how to configure something.

Now, lets check our neighbor state
RP/0/7/CPU0:R1#
sh ospf LAB neighbor
Sat Mar 31 18:37:07.753 UTC
* Indicates MADJ interface

Neighbors for OSPF LAB

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2         1     EXSTART/DR      00:00:36    150.1.12.2      GigabitEthernet0/3/0/2
Neighbor is up for 00:00:31

Total neighbor count: 1

RP/0/7/CPU0:R1#

Then make sure we are getting a route
RP/0/7/CPU0:R1#
sh route ipv4 ospf
Sat Mar 31 18:37:15.279 UTC
O    2.2.2.2/32 [110/2] via 150.1.12.2, 00:00:06, GigabitEthernet0/3/0/2
RP/0/7/CPU0:R1#

 

And finallying PINGing R2 loopback from ours

RP/0/7/CPU0:R1#ping 2.2.2.2 so l0
Sat Mar 31 18:37:19.151 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms
RP/0/7/CPU0:R1#

Cost

Just like normal IOS, we can change the OSPF cost on an interface – but same thing here;
it is done under the OSPF process

RP/0/7/CPU0:R1#
RP/0/7/CPU0:R1#
conf t
Sun Apr  1 18:35:17.061 UTC

RP/0/7/CPU0:R1(config)#router ospf LAB
RP/0/7/CPU0:R1(config-ospf)#
area 0.0.0.0
RP/0/7/CPU0:R1(config-ospf-ar)#
int loop0
RP/0/7/CPU0:R1(config-ospf-ar-if)#
cost ?
<1-65535>  Cost