Tuesday, June 14, 2016

OSPFv2 Base Config on IOS and IOS XR

As I progress through my SPv4 prep I will routinely and often put together posts that may help another engineer or lone wolf studier out. I plan on breaking down the posts into into individual configuration posts, like this one where we focus on just 1 specific configuration feature, OSPFv2 between IOS and IOS XR. Then we'll take a look in a future post about OSPFv3 in the same manner.

For those with a R&S background this will be simple and almost not worth your time but it's the IOS XR configuration that is more important. The below topology is what I will be using for all of the OSPF posts.
On all the IOS devices, R4-R7 on the LAN and Loopack interfaces we'll start with configuring the network statement on the LAN interfaces to the /24 level and the interface configuration on the loopbacks, so you'll see the 2 main ways. There is a third with redistribution calling a route-map that specifies the interfaces.

R4
R4(config-router)#do sh run | sec ospf
router ospf 1
 network 10.4.7.0 0.0.0.255 area 0
 network 10.4.15.0 0.0.0.255 area 0
 network 10.5.4.0 0.0.0.255 area 0
interface Loopback0
 ip ospf 1 area 0



R5
R5(config-router)#do sh run | sec ospf
router ospf 1
 network 10.5.4.0 0.0.0.255 area 0
 network 10.5.6.0 0.0.0.255 area 0
interface Loopback0
 ip ospf 1 area 0

R6
R6(config-if)#do sh run | sec ospf
router ospf 1
 network 10.5.6.0 0.0.0.255 area 0
 network 10.6.7.0 0.0.0.255 area 0
interface Loopback0
 ip ospf 1 area 0

R7
R7(config-if)#do sh run | sec ospf
router ospf 1
 network 10.4.7.0 0.0.0.255 area 0
 network 10.6.7.0 0.0.0.255 area 0
 network 10.7.16.0 0.0.0.255 area 0
interface Loopback0
 ip ospf 1 area 0

Verification is the 2nd most important part, you can see that we have full adjacency with R4 and R6.
R7(config-if)#do sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           1   FULL/DR         00:00:35    10.4.7.4        GigabitEthernet1.47
6.6.6.6           1   FULL/DR         00:00:36    10.6.7.6        GigabitEthernet1.67



Now it's time for IOS XR, the configuration is very simple, now that I've done it like 50 times it's easy. Slightly different command structure but, at the end of the day you'll see where things jive.

XR5
RP/0/0/CPU0:XR5(config-ospf-ar-if)#do sh run router ospf
Tue Jun 14 23:33:39.549 UTC
router ospf 1
 area 0
  interface Loopback0
  !
  interface GigabitEthernet0/0/0/0.415
  !
  interface GigabitEthernet0/0/0/0.1516

XR6
RP/0/0/CPU0:XR6(config-ospf-ar-if)#do sh run router ospf
Tue Jun 14 23:34:26.836 UTC
router ospf 1
 area 0
  interface Loopback0
  !
  interface GigabitEthernet0/0/0/0.716
  !
  interface GigabitEthernet0/0/0/0.1516

The functional difference is everything is configured globally under the routing process. So when you want to do anything to the protocol, go the appropriate sub feature and configure it. As we get into more configuration depth in later posts you'll see exactly what I mean. 

Verification on XR is very similar to IOS
RP/0/0/CPU0:XR6#sh ospf nei
Tue Jun 14 23:36:11.048 UTC

* Indicates MADJ interface

Neighbors for OSPF 1

Neighbor ID     Pri   State           Dead Time   Address         Interface
7.7.7.7         1     FULL/DR         00:00:36    10.7.16.7       GigabitEthernet0/0/0/0.716
    Neighbor is up for 00:01:48
15.15.15.15     1     FULL/DR         00:00:35    10.15.16.15     GigabitEthernet0/0/0/0.1516
    Neighbor is up for 00:01:49

RP/0/0/CPU0:XR6#sh ospf interface brief
Tue Jun 14 23:36:30.197 UTC

* Indicates MADJ interface, (P) Indicates fast detect hold down state

Interfaces for OSPF 1

Interface          PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0                1     0               16.16.16.16/32     1     LOOP  0/0
Gi0/0/0/0.716      1     0               10.7.16.16/24      1     BDR   1/1
Gi0/0/0/0.1516     1     0               10.15.16.16/24     1     BDR   1/1

There you have it. Pretty simple. I won't do a debug dump or wireshark capture at least for this as it's a base config. I will do debug outputs as we get into more interesting configs later so you can see mis-configurations and the "deltas" or differences in case you are here for troubleshooting support. 

Thanks for stopping by and stay tuned for more content in the future.

Rob Riker, CCIE #50693, VCP5/6-DCV









No comments:

Post a Comment