0% found this document useful (0 votes)
25 views

IOS XR Basic Lab

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

IOS XR Basic Lab

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Cisco IOS XR Configuration Basic

Examples 1

Network Diagram

XR1 .2 172.16.0.0/24 .1 R1 Lo0


Lo0
G0/0/0/0 F0/0 1.1.1.1/32
2.2.2.2/32

CDP

To enable CDP on IOS XR (on IOS it's enabled by default)

XR
conf t
cdp
interface GigabitEthernet0/0/0/0
cdp

RP/0/0/CPU0:XR1#sh cdp neighbors


Tue Apr 22 13:55:34.481 UTC
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID


R1 Gi0/0/0/0 176 RSI

RP/0/0/CPU0:XR1#sh cdp neighbors detail


Tue Apr 22 13:55:44.790 UTC

-------------------------
Device ID: R1
SysName :
Entry address(es):
IPv4 address: 172.16.0.1

1
Platform: Cisco 3725, Capabilities: Router Switch IGMP
Interface: GigabitEthernet0/0/0/0
Port ID (outgoing port): FastEthernet0/0
Holdtime : 165 sec

Version :
Cisco IOS Software, 3700 Software (C3725-ADVENTERPRISEK9-M), Version
12.4(15)T10, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Mon 14-Sep-09 15:53 by prod_rel_team

advertisement version: 2
Duplex: half

OSPFv2

We will start by configuring loopback0 interfaces on both devices and advertise these
networks in area 0

R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255

router ospf 1
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 172.16.0.1 0.0.0.0 area 0

XR
RP/0/0/CPU0:XR1interface loopback 0
RP/0/0/CPU0:XR1(config-if)#ipv4 address 2.2.2.2/32

router ospf 1
router-id 2.2.2.2
area 0
interface Loopback0
!
interface GigabitEthernet0/0/0/0

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


2.2.2.2 1 FULL/BDR 00:00:37 172.16.0.2 FastEthernet0/0
R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets

2
O 2.2.2.2 [110/11] via 172.16.0.2, 00:31:22, FastEthernet0/0

R1#sh ip ospf database

OSPF Router with ID (1.1.1.1) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count


1.1.1.1 1.1.1.1 1759 0x80000003 0x0095F9 2
2.2.2.2 2.2.2.2 1891 0x80000003 0x007615 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum


172.16.0.1 1.1.1.1 11 0x80000002 0x0076F4

RP/0/0/CPU0:XR1#sh ospf neighbor


Tue Apr 22 13:59:13.376 UTC

* Indicates MADJ interface

Neighbors for OSPF 1

Neighbor ID Pri State Dead Time Address Interface


1.1.1.1 1 FULL/DR 00:00:35 172.16.0.1 GigabitEthernet0/0/0/0
Neighbor is up for 00:33:01

Total neighbor count: 1


RP/0/0/CPU0:XR1#sh route ospf
Tue Apr 22 13:59:16.016 UTC

O 1.1.1.1/32 [110/2] via 172.16.0.1, 00:29:41, GigabitEthernet0/0/0/0


RP/0/0/CPU0:XR1#sh ospf database
Tue Apr 22 13:59:19.755 UTC

OSPF Router with ID (2.2.2.2) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count


1.1.1.1 1.1.1.1 1785 0x80000003 0x0095f9 2
2.2.2.2 2.2.2.2 1916 0x80000003 0x007615 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum

3
172.16.0.1 1.1.1.1 37 0x80000002 0x0076f4

R1#sh ip ospf interface fastEthernet 0/0


FastEthernet0/0 is up, line protocol is up
Internet Address 172.16.0.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 172.16.0.1
Backup Designated router (ID) 2.2.2.2, Interface address 172.16.0.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)

RP/0/0/CPU0:XR1#sh ospf interface brief


Tue Apr 22 13:59:56.083 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 2.2.2.2/32 1 LOOP 0/0
Gi0/0/0/0 1 0 172.16.0.2/24 1 BDR 1/1

RP/0/0/CPU0:XR1#sh ospf interface gigabitEthernet 0/0/0/0


Tue Apr 22 14:00:01.653 UTC

GigabitEthernet0/0/0/0 is up, line protocol is up


Internet Address 172.16.0.2/24, Area 0
Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU 1500, MaxPktSz 1500
Designated Router (ID) 1.1.1.1, Interface address 172.16.0.1
Backup Designated router (ID) 2.2.2.2, Interface address 172.16.0.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/1, flood queue length 0

4
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 1.1.1.1 (Designated Router)
Suppress hello for 0 neighbor(s)
Multi-area interface Count is 0

Let us change the network type for the interfaces running OSPF

R1#sh ip ospf interface fastEthernet 0/0 | inc Network


Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10

R1
int f0/0
ip ospf network point-to-point

R1#sh ip ospf interface fastEthernet 0/0 | inc Network


Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 10

RP/0/0/CPU0:XR1#sh ospf interface gigabitEthernet 0/0/0/0 | inc Network


Tue Apr 22 14:31:18.514 UTC
Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1

RP/0/0/CPU0:XR1(config)#router ospf 1
RP/0/0/CPU0:XR1(config-ospf)#area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#network point-to-point
RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit

RP/0/0/CPU0:XR1#sh ospf interface gigabitEthernet 0/0/0/0 | inc Network


Tue Apr 22 14:31:54.141 UTC
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


2.2.2.2 0 FULL/ - 00:00:32 172.16.0.2 FastEthernet0/0

RP/0/0/CPU0:XR1#show ospf neighbor


Tue Apr 22 14:32:16.510 UTC

* Indicates MADJ interface

Neighbors for OSPF 1

5
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/ - 00:00:33 172.16.0.1 GigabitEthernet0/0/0/0
Neighbor is up for 00:00:30

Total neighbor count: 1

Let us change the OSPF cost on these interfaces

R1#sh ip ospf interface fastEthernet 0/0 | inc Network


Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 10

R1(config)#int f0/0
R1(config-if)#ip ospf cost 20

RP/0/0/CPU0:XR1(config)#router ospf 1
RP/0/0/CPU0:XR1(config-ospf)#area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#cost 20
RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit
Tue Apr 22 14:33:50.254 UTC

RP/0/0/CPU0:XR1#sh ospf interface gigabitEthernet 0/0/0/0 | inc Network


Tue Apr 22 14:33:51.933 UTC
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 20

Let us configure clear text authentication between the two routers

R1(config)#int f0/0
R1(config-if)#ip ospf authentication
R1(config-if)#ip ospf authentication-key cisco

R1#sh ip ospf interface fastEthernet 0/0 | inc authen


Simple password authentication enabled

*Mar 1 01:18:51.811: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0


from FULL to DOWN, Neighbor Down: Dead timer expired

RP/0/0/CPU0:XR1(config)#router ospf 1
RP/0/0/CPU0:XR1(config-ospf)#area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#authentication
RP/0/0/CPU0:XR1(config-ospf-ar-if)#authentication-key cisco
RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit

RP/0/0/CPU0:XR1#show ospf interface gigabitEthernet 0/0/0/0 | inc authen


Tue Apr 22 14:37:17.069 UTC

6
Clear text authentication enabled

*Mar 1 01:20:16.751: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0


from LOADING to FULL, Loading Done

Let us enable MD5 authentication

R1(config)#int f0/0
R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf message-digest-key 1 md5 cisco

R1#sh ip ospf interface fastEthernet 0/0 | inc authen


Message digest authentication enabled

*Mar 1 01:23:38.275: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0


from FULL to DOWN, Neighbor Down: Dead timer expired

RP/0/0/CPU0:XR1(config)#router ospf 1
RP/0/0/CPU0:XR1(config-ospf)#area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#authentication message-digest
RP/0/0/CPU0:XR1(config-ospf-ar-if)#message-digest-key 1 md5 cisco
RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit
Tue Apr 22 14:41:27.962 UTC

*Mar 1 01:25:02.199: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0


from LOADING to FULL, Loading Done

RP/0/0/CPU0:XR1#show ospf interface gigabitEthernet 0/0/0/0 | inc authen


Tue Apr 22 14:42:47.437 UTC
Message digest authentication enabled

IPv6 Addressing

Let us configure our devices with IPv6 addresses

R1(config)#int f0/0
R1(config-if)#ipv6 address 2001:172:16::1/64

R1(config-if)#int lo0
R1(config-if)#ipv6 address 2001::1/128

RP/0/0/CPU0:XR1(config)#int g0/0/0/0
RP/0/0/CPU0:XR1(config-if)#ipv6 address 2001:172:16::2/64

RP/0/0/CPU0:XR1(config-if)#int lo0
RP/0/0/CPU0:XR1(config-if)#ipv6 address 2001::2/128

7
RP/0/0/CPU0:XR1(config-if)#commit

R1#sh ipv6 interface fastEthernet 0/0


FastEthernet0/0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C000:AFF:FE84:0
No Virtual link-local address(es):
Global unicast address(es):
2001:172:16::1, subnet is 2001:172:16::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
FF02::1:FF84:0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds

RP/0/0/CPU0:XR1#sh ipv6 interface gigabitEthernet 0/0/0/0


Tue Apr 22 14:46:38.361 UTC
GigabitEthernet0/0/0/0 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000)
IPv6 is enabled, link-local address is fe80::a00:27ff:fe1f:7011
Global unicast address(es):
2001:172:16::2, subnet is 2001:172:16::/64
Joined group address(es): ff02::1:ff00:2 ff02::1:ff1f:7011 ff02::2
ff02::1
MTU is 1514 (1500 is available to IPv6)
ICMP redirects are disabled
ICMP unreachables are enabled
ND DAD is enabled, number of DAD attempts 1
ND reachable time is 0 milliseconds
ND cache entry limit is 1000000000
ND advertised retransmit interval is 0 milliseconds
Hosts use stateless autoconfig for addresses.
Outgoing access list is not set
Inbound access list is not set
Table Id is 0xe0800000
Complete protocol adjacency: 0
Complete glean adjacency: 0
Incomplete protocol adjacency: 0
Incomplete glean adjacency: 0
Dropped protocol request: 0
Dropped glean request: 0

R1#ping 2001:172:16::2

8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:172:16::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/14/36 ms

OSPFv3

Let us turn OSPFv3 in order to exchange the loopback 0 networks between the two
devices

R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 1.1.1.1

R1(config-rtr)#int lo0
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#int f0/0
R1(config-if)#ipv6 ospf 1 area 0

RP/0/0/CPU0:XR1(config)#router ospfv3 OSPFv3_PROCESS


RP/0/0/CPU0:XR1(config-ospfv3)#area 0
RP/0/0/CPU0:XR1(config-ospfv3-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospfv3-ar-if)#exit
RP/0/0/CPU0:XR1(config-ospfv3-ar)#interface loopback 0
RP/0/0/CPU0:XR1(config-ospfv3-ar-if)#commit

*Mar 1 01:32:34.347: %OSPFv3-5-ADJCHG: Process 1, Nbr 2.2.2.2 on


FastEthernet0/0 from LOADING to FULL, Loading Done

R1#sh ipv6 ospf neighbor

Neighbor ID Pri State Dead Time Interface ID Interface


2.2.2.2 1 FULL/BDR 00:00:32 4 FastEthernet0/0

RP/0/0/CPU0:XR1#sh ospfv3 neighbor


Tue Apr 22 14:49:43.598 UTC

Neighbors for OSPFv3 OSPFv3_PROCESS

Neighbor ID Pri State Dead Time Interface ID Interface


1.1.1.1 1 FULL/DR 00:00:33 4 GigabitEthernet0/0/0/0
Neighbor is up for 00:00:42

Total neighbor count: 1

R1#sh ipv6 route ospf


IPv6 Routing Table - 5 entries

9
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
O 2001::2/128 [110/10]
via FE80::A00:27FF:FE1F:7011, FastEthernet0/0

R1#ping 2001::2 source lo0

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
Packet sent with a source address of 2001::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/10/16 ms

RP/0/0/CPU0:XR1#sh ospfv3 routes


Tue Apr 22 14:50:55.133 UTC

Topology Table for OSPFv3 OSPFv3_PROCESS with ID 2.2.2.2

* 2001::1/128, Intra, cost 1/0, area 0


GigabitEthernet0/0/0/0, fe80::c000:aff:fe84:0
* 2001::2/128, Intra, cost 0/0, area 0
Loopback0, connected
* 2001:172:16::/64, Intra, cost 1/0, area 0
GigabitEthernet0/0/0/0, connected

RP/0/0/CPU0:XR1#ping 2001::1 source 2001::2


Tue Apr 22 14:51:48.240 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/9/9 ms

As we can see from the outputs above, R1 is the DR for our shared segment

R1#sh ipv6 ospf interface fas0/0 | inc Priority


Transmit Delay is 1 sec, State DR, Priority 1

RP/0/0/CPU0:XR1#sh ospfv3 interface gigabitEthernet 0/0/0/0 | inc Priority


Tue Apr 22 14:54:22.929 UTC
Transmit Delay is 1 sec, State BDR, Priority 1

Let us increase the priority from XR side so that it will take the DR role

10
RP/0/0/CPU0:XR1(config)#router ospfv3 OSPFv3_PROCESS
RP/0/0/CPU0:XR1(config-ospfv3)#area 0
RP/0/0/CPU0:XR1(config-ospfv3-ar)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospfv3-ar-if)#priority 10
RP/0/0/CPU0:XR1(config-ospfv3-ar-if)#commit

sh ospfv3 interface gigabitEthernet 0/0/0/0 | inc Priority


Tue Apr 22 15:00:32.854 UTC
Transmit Delay is 1 sec, State BDR, Priority 10

R1#sh ipv6 ospf neighbor

Neighbor ID Pri State Dead Time Interface ID Interface


2.2.2.2 10 FULL/BDR 00:00:38 4 FastEthernet0/0

RP/0/0/CPU0:XR1#clear ospfv3 process


Tue Apr 22 15:00:59.132 UTC
Reset ALL OSPFv3 processes? [no]: yes

R1#clear ipv6 ospf process


Reset ALL OSPF processes? [no]: yes

R1#sh ipv6 ospf neighbor

Neighbor ID Pri State Dead Time Interface ID Interface


2.2.2.2 10 FULL/DR 00:00:38 4 FastEthernet0/0

EIGRP

Ok, let us move now to another routing protocol; let us choose EIGRP AS 1

R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 172.16.0.1 0.0.0.0
R1(config-router)#network 1.1.1.1 0.0.0.0

RP/0/0/CPU0:XR1(config)#router eigrp EIGRP_PROCESS


RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#autonomous-system 1
RP/0/0/CPU0:XR1(config-eigrp-af)#no auto-summary
RP/0/0/CPU0:XR1(config-eigrp-af)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#exit
RP/0/0/CPU0:XR1(config-eigrp-af)#interface lo0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#commit

*Mar 1 02:25:43.103: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.0.2


(FastEthernet0/0) is up: new adjacency

11
R1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 172.16.0.2 Fa0/0 14 00:00:42 31 200 0 3

R1#sh ip route eigrp


2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/281856] via 172.16.0.2, 00:00:50, FastEthernet0/0

R1#ping 2.2.2.2 source lo0

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 = 8/12/20 ms

RP/0/0/CPU0:XR1#sh eigrp neighbors


Tue Apr 22 15:43:21.578 UTC

IPv4-EIGRP VR(EIGRP_PROCESS) Neighbors for AS(1) VRF default

H Address Interface Hold Uptime SRTT RTO Q Seq


(sec) (ms) Cnt Num
0 172.16.0.1 Gi0/0/0/0 13 00:01:11 9 200 0 3

RP/0/0/CPU0:XR1#sh route eigrp


Tue Apr 22 15:43:27.127 UTC

D 1.1.1.1/32 [90/2570240] via 172.16.0.1, 00:00:59, GigabitEthernet0/0/0/0

RP/0/0/CPU0:XR1#ping 1.1.1.1 source lo0


Tue Apr 22 15:43:33.017 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/9/9 ms

EIGRP6

Let us now enable EIGRP6

R1(config)#ipv6 router eigrp 1


R1(config-rtr)#no shut

12
R1(config-rtr)#int lo0
R1(config-if)#ipv6 eigrp 1
R1(config-if)#int f0/0
R1(config-if)#ipv6 eigrp 1

RP/0/0/CPU0:XR1(config)#router eigrp EIGRP_PROCESS


RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv6
RP/0/0/CPU0:XR1(config-eigrp-af)#autonomous-system 1
RP/0/0/CPU0:XR1(config-eigrp-af)#interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#exit
RP/0/0/CPU0:XR1(config-eigrp-af)#interface lo0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#commit

*Mar 1 03:11:37.647: %DUAL-5-NBRCHANGE: IPv6-EIGRP(0) 1: Neighbor


FE80::A00:27FF:FE1F:7011 (FastEthernet0/0) is up: new adjacency

R1#sh ipv6 eigrp neighbors


IPv6-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 Link-local address: Fa0/0 14 00:00:16 39 234 0 2
FE80::A00:27FF:FE1F:7011

R1#sh ipv6 route eigrp


IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
D 2001::2/128 [90/281856]
via FE80::A00:27FF:FE1F:7011, FastEthernet0/0

R1#ping 2001::2 source lo0

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
Packet sent with a source address of 2001::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/9/12 ms

RP/0/0/CPU0:XR1#sh eigrp ipv6 neighbors


Tue Apr 22 16:28:56.270 UTC

IPv6-EIGRP VR(EIGRP_PROCESS) Neighbors for AS(1) VRF default

13
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 Link Local Address: Gi0/0/0/0 12 00:00:51 1602 5000 0 3
fe80::c000:aff:fe84:0

RP/0/0/CPU0:XR1#sh route ipv6 eigrp


Tue Apr 22 16:29:15.339 UTC

D 2001::1/128
[90/2570240] via fe80::c000:aff:fe84:0, 00:00:53, GigabitEthernet0/0/0/0

RP/0/0/CPU0:XR1#ping 2001::1 source 2001::2


Tue Apr 22 16:29:40.227 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/9/9 ms

Let us change the metric EIGRP lies on (by default K1=K3=1 which means that only
bandwidth and delay will be considered from the composite metric)

R1(config)#router eigrp 1
R1(config-router)#metric weights 0 0 0 1 0 0

*Mar 1 03:23:10.943: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.0.2


(FastEthernet0/0) is down: K-value mismatch
R1(config-router)#
*Mar 1 03:23:15.275: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.0.2
(FastEthernet0/0) is down: Interface Goodbye received

RP/0/0/CPU0:XR1(config)#router eigrp EIGRP_PROCESS


RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#metric weights ?
RP/0/0/CPU0:XR1(config-eigrp-af)#metric weights 0 0 0 1 0 0

BGP IPv4

Let us now configure eBGP between our devices

R1(config)#router bgp 1
R1(config-router)#no bgp default ipv4-unicast
R1(config-router)#neighbor 172.16.0.2 remote-as 2
R1(config-router)#address-family ipv4
R1(config-router-af)#neighbor 172.16.0.2 activate
R1(config-router-af)#network 1.1.1.1 mask 255.255.255.255

14
RP/0/0/CPU0:XR1(config)#router bgp 2
RP/0/0/CPU0:XR1(config-bgp)#address-family ipv4 unicast
RP/0/0/CPU0:XR1(config-bgp-af)#network 2.2.2.2/32
RP/0/0/CPU0:XR1(config-bgp-af)#exit
RP/0/0/CPU0:XR1(config-bgp)#neighbor 172.16.0.1
RP/0/0/CPU0:XR1(config-bgp-nbr)#remote-as 1
RP/0/0/CPU0:XR1(config-bgp-nbr)#address-family ipv4 unicast
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#commit

R1#sh ip bgp summary


BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 2, main routing table version 2
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 452 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd


172.16.0.2 4 2 6 9 2 0 0 00:04:01 0

R1#sh ip bgp
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 0.0.0.0 0 32768 i

RP/0/0/CPU0:XR1#sh bgp ipv4 unicast summary


Tue Apr 22 17:01:09.908 UTC
BGP router identifier 2.2.2.2, local AS number 2
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000 RD version: 3
BGP main routing table version 3
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.

Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer


Speaker 3 3 3 3 3 3

15
Some configured eBGP neighbors (under default or non-default vrfs)
do not have both inbound and outbound policies configured for IPv4 Unicast
address family. These neighbors will default to sending and/or
receiving no routes and are marked with '!' in the output below.
Use the 'show bgp neighbor <nbr_address>' command for details.

Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd


172.16.0.1 0 1 9 7 3 0 0 00:04:23 0!

RP/0/0/CPU0:XR1#sh bgp ipv4 unicast


Tue Apr 22 17:01:20.857 UTC
BGP router identifier 2.2.2.2, local AS number 2
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000 RD version: 3
BGP main routing table version 3
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best


i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2.2.2.2/32 0.0.0.0 0 32768 i

Processed 1 prefixes, 1 paths

R1#sh ip bgp neighbors 172.16.0.2 advertised-routes


BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 0.0.0.0 0 32768 i

Total number of prefixes 1

As we can see from the IOS side we are advertising the prefix (loopback 0 network)

RP/0/0/CPU0:XR1#sh bgp ipv4 unicast neighbors 172.16.0.1 advertised-routes


Tue Apr 22 17:03:03.820 UTC

But nothing from the IOS XR side is advertised (in the previous output we can see the
2.2.2.2 prefix is already in the BGP table)
The reason behind this is that the IOS XR will not advertise or receive any route from
external BGP peer unless specified by route-policy, let us configure one

16
RP/0/0/CPU0:XR1#sh run router bgp
Tue Apr 22 17:05:10.072 UTC
router bgp 2
address-family ipv4 unicast
network 2.2.2.2/32
!
neighbor 172.16.0.1
remote-as 1
address-family ipv4 unicast

RP/0/0/CPU0:XR1(config)#route-policy PASS
RP/0/0/CPU0:XR1(config-rpl)#pass

RP/0/0/CPU0:XR1(config)#router bgp 2
RP/0/0/CPU0:XR1(config-bgp)# neighbor 172.16.0.1
RP/0/0/CPU0:XR1(config-bgp-nbr)#address-family ipv4 unicast
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#route-policy PASS in
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#route-policy PASS out
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#commit

R1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 172.16.0.2 0 02i

RP/0/0/CPU0:XR1#sh bgp ipv4 unicast neighbors 172.16.0.1 advertised-routes


Tue Apr 22 17:07:11.953 UTC
Network Next Hop From AS Path
2.2.2.2/32 172.16.0.2 Local i

Processed 1 prefixes, 1 paths

RP/0/0/CPU0:XR1#sh bgp ipv4 unicast


Tue Apr 22 17:07:26.382 UTC
BGP router identifier 2.2.2.2, local AS number 2
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000 RD version: 4
BGP main routing table version 4
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best

17
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 172.16.0.1 0 01i
*> 2.2.2.2/32 0.0.0.0 0 32768 i

Processed 2 prefixes, 2 paths

RP/0/0/CPU0:XR1#ping 1.1.1.1 source lo0


Tue Apr 22 17:07:42.051 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/9/9 ms

BGP IPv6

Let us now configure our IPv6 BGP session

R1(config)#router bgp 1
R1(config-router)#neighbor 2001:172:16::2 remote-as 2
R1(config-router)#address-family ipv6
R1(config-router-af)#neighbor 2001:172:16::2 activate
R1(config-router-af)#network 2001::1/128

RP/0/0/CPU0:XR1(config)#router bgp 2
RP/0/0/CPU0:XR1(config-bgp)#address-family ipv6 unicast
RP/0/0/CPU0:XR1(config-bgp-af)#network 2001::2/128
RP/0/0/CPU0:XR1(config-bgp-af)#exit
RP/0/0/CPU0:XR1(config-bgp)#neighbor 2001:172:16::1
RP/0/0/CPU0:XR1(config-bgp-nbr)#remote-as 1
RP/0/0/CPU0:XR1(config-bgp-nbr)#address-family ipv6 unicast
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#commit

R1#
*Mar 1 04:25:26.478: %BGP-5-ADJCHANGE: neighbor 2001:172:16::2 Up

R1#sh bgp ipv6 unicast


BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 2001::1/128 :: 0 32768 i

RP/0/0/CPU0:XR1#sh bgp ipv6 unicast

18
Tue Apr 22 17:42:33.038 UTC
BGP router identifier 2.2.2.2, local AS number 2
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0800000 RD version: 3
BGP main routing table version 3
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best


i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 2001::2/128 :: 0 32768 i

The same route-policy concept applies here, we already configured a route-policy, and
we need only to apply

RP/0/0/CPU0:XR1(config)#router bgp 2
RP/0/0/CPU0:XR1(config-bgp)#neighbor 2001:172:16::1
RP/0/0/CPU0:XR1(config-bgp-nbr)#address-family ipv6 unicast
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#route-policy PASS in
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#route-policy PASS out
RP/0/0/CPU0:XR1(config-bgp-nbr-af)#commit

R1#sh bgp ipv6 unicast


BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 2001::1/128 :: 0 32768 i
*> 2001::2/128 2001:172:16::2 0 02i

RP/0/0/CPU0:XR1#sh bgp ipv6 unicast


Tue Apr 22 17:43:42.003 UTC
BGP router identifier 2.2.2.2, local AS number 2
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0800000 RD version: 4
BGP main routing table version 4
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best


i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete

19
Network Next Hop Metric LocPrf Weight Path
*> 2001::1/128 2001:172:16::1 0 01i
*> 2001::2/128 :: 0 32768 i

Processed 2 prefixes, 2 paths

R1#ping 2001::2 source lo0

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
Packet sent with a source address of 2001::1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/10/16 ms

20

You might also like