Below is the topology used in this post to capture the main link types we'll come up against in the CCIE lab - Frame Relay, PPP and Ethernet.
We shall start with the most straight forward - direct PPP over serial between R1 and R3 Each router is using Loopback0 as the only IP address on the router which is bound to Serial0/1
R1
hostname R1
interface Loopback0
ip address 1.1.1.1 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/1
ip unnumbered Loopback0
encapsulation ppp
ip ospf 1 area 0
clock rate 2000000
no shutdowninterface Loopback0
ip address 1.1.1.1 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/1
ip unnumbered Loopback0
encapsulation ppp
ip ospf 1 area 0
clock rate 2000000
!
R3
hostname R3
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/1
ip unnumbered Loopback0
encapsulation ppp
ip ospf 1 area 0
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf 1 area 0
!
interface Serial0/1
ip unnumbered Loopback0
encapsulation ppp
ip ospf 1 area 0
shutdown
!
!
Let's enable R3 S0/1 and verify that OSPF comes up
R3#deb ip ospf adj
OSPF adjacency events debugging is on
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int s0/1
R3(config-if)#no shut
R3(config-if)#
*Mar 1 00:02:19.543: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
*Mar 1 00:02:20.555: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
*Mar 1 00:02:20.559: OSPF: Interface Serial0/1 going Up
*Mar 1 00:02:20.587: OSPF: 2 Way Communication to 1.1.1.1 on Serial0/1, state 2WAY
*Mar 1 00:02:20.587: OSPF: Send DBD to 1.1.1.1 on Serial0/1 seq 0x1DAE opt 0x52 flag 0x7 len 32
*Mar 1 00:02:20.587: OSPF: Rcv DBD from 1.1.1.1 on Serial0/1 seq 0x105C opt 0x52 flag 0x7 len 32 mtu 1500 state EXSTART
*Mar 1 00:02:20.587: OSPF: First DBD and we are not SLAVE
*Mar 1 00:02:20.591: OSPF: Rcv DBD from 1.1.1.1 on Serial0/1 seq 0x1DAE opt 0x52 flag 0x2 len 52 mtu 1500 state EXSTART
*Mar 1 00:02:20.591: OSPF: NBR Negotiation Done. We are the MASTER
*Mar 1 00:02:20.591: OSPF: Send DBD to 1.1.1.1 on Serial0/1 seq 0x1DAF opt 0x52 flag 0x3 len 52
*Mar 1 00:02:20.591: OSPF: Rcv DBD from 1.1.1.1 on Serial0/1 seq 0x1DAF opt 0x52 flag 0x0 len 32 mtu 1500 state EXCHANGE
*Mar 1 00:02:20.595: OSPF: Send DBD to 1.1.1.1 on Serial0/1 seq 0x1DB0 opt 0x52 flag 0x1 len 32
*Mar 1 00:02:20.595: OSPF: Send LS REQ to 1.1.1.1 length 12 LSA count 1
*Mar 1 00:02:20.599: OSPF: Rcv LS REQ from 1.1.1.1 on Serial0/1 length 36 LSA count 1
*Mar 1 00:02:20.599: OSPF: Send UPD to 1.1.1.1 on Serial0/1 length 40 LSA count 1
*Mar 1 00:02:20.599: OSPF: Rcv DBD from 1.1.1.1 on Serial0/1 seq 0x1DB0 opt 0x52 flag 0x0 len 32 mtu 1500 state EXCHANGE
*Mar 1 00:02:20.599: OSPF: Exchange Done with 1.1.1.1 on Serial0/1
*Mar 1 00:02:20.599: OSPF: Rcv LS UPD from 1.1.1.1 on Serial0/1 length 64 LSA count 1
*Mar 1 00:02:20.603: OSPF: Synchronized with 1.1.1.1 on Serial0/1, state FULL
*Mar 1 00:02:20.603: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Serial0/1 from LOADING to FULL, Loading Done
*Mar 1 00:02:21.059: OSPF: Build router LSA for area 0, router ID 3.3.3.3, seq 0x80000002, process 1
*Mar 1 00:02:21.075: OSPF: Rcv LS UPD from 1.1.1.1 on Serial0/1 length 76 LSA count 1
So no problems here, everything came up, let's validate our IP interface and OSPF interface/neighbors
R3(config-if)#do sh ip interface Serial0/1 | i Interface|Peer
Interface is unnumbered. Using address of Loopback0 (3.3.3.3)
Peer address is 1.1.1.1
R3(config-if)#do sh ip ospf int brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/1 1 0 0.0.0.0/0 64 P2P 1/1
Lo0 1 0 3.3.3.3/24 1 LOOP 0/0
R3(config-if)#do sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:35 1.1.1.1 Serial0/1
Interface is unnumbered. Using address of Loopback0 (1.1.1.1)
Peer address is 3.3.3.3
R1#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:39 3.3.3.3 Serial0/1
R1#sh ip ospf int bri
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/1 1 0 0.0.0.0/0 64 P2P 1/1
Lo0 1 0 1.1.1.1/24 1 LOOP 0/0
Okay, this looks good, lets check the routing table
R1#sh ip route ospf
Hmm, we cant see anything here, we should have R3 Lo0's stub network in our ospf database..
R1#sh ip ospf data router 3.3.3.3 | s Stub
Link connected to: a Stub Network
(Link ID) Network/subnet number: 3.3.3.3
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
We do but it's not being installed in the routing table, is something else already there?
R1#sh ip route 3.3.3.3
Routing entry for 3.3.3.3/32
Known via "connected", distance 0, metric 0 (connected, via interface)
Routing Descriptor Blocks:
* directly connected, via Serial0/1
Route metric is 0, traffic share count is 1
By default, PPP installs a connected route to our peer device, not necessarily a bad thing but we would prefer to see this route originated by ospf, so lets fix that on both sides
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int s0/1
R3(config-if)#no peer neighbor-route
R3(config-if)#end
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int s0/1
R1(config-if)#no peer neighbor-route
Making these changes doesn't cause the static neighbor route to be removed, so we need to bounce the link to make that happen
R1(config-if)#shut
*Mar 1 00:16:45.727: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 00:16:47.715: %LINK-5-CHANGED: Interface Serial0/1, changed state to administratively down
*Mar 1 00:16:48.715: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
R1(config-if)#no shut
*Mar 1 00:16:53.495: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
*Mar 1 00:16:54.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
*Mar 1 00:16:54.603: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/1 from LOADING to FULL, Loading Done
R1(config-if)#do sh ip int s0/1 | i Interface|Peer*Mar 1 00:16:45.727: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar 1 00:16:47.715: %LINK-5-CHANGED: Interface Serial0/1, changed state to administratively down
*Mar 1 00:16:48.715: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
R1(config-if)#no shut
*Mar 1 00:16:53.495: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
*Mar 1 00:16:54.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
*Mar 1 00:16:54.603: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/1 from LOADING to FULL, Loading Done
Interface is unnumbered. Using address of Loopback0 (1.1.1.1)
Peer address is 3.3.3.3
Let's see how if the route comes through from ospf and is installed into the routing table
R1(config-if)#do sh ip route ospf
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 3.3.3.3, 00:00:00, Serial0/1
R1(config-if)#do ping 3.3.3.3 so 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, 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/2/4 ms
OSPF IP Unnumbered over Frame Relay
Between R1 and R2 we have a Frame Relay link, we are going to take advantage of implementing PPP over FR to make this happen
On R1 and R2 create the virtual-template required for PPPoFR to operate, again it's an unnumbered link associated with loopback0
R1
interface Virtual-Template1
ip unnumbered Loopback0
ip ospf 1 area 0
no peer neighbor-route
!
ip unnumbered Loopback0
ip ospf 1 area 0
no peer neighbor-route
!
R2
hostname R2interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 1 area 0
!
interface Virtual-Template1
ip unnumbered Loopback0
ip ospf 1 area 0
no peer neighbor-route
!
ip unnumbered Loopback0
ip ospf 1 area 0
no peer neighbor-route
!
Then we configure the serial interface for frame relay encapsulation and bind the virtual-template to the FR PVC.
R1
interface Serial0/0encapsulation frame-relay
frame-relay interface-dlci 102 ppp Virtual-Template1
no frame-relay inverse-arp
no shutdown
!
R2
interface Serial0/0encapsulation frame-relay
frame-relay interface-dlci 201 ppp Virtual-Template1
no frame-relay inverse-arp
no shutdown
!
After a short period of time R1/R2s PVC will come up and the PPP session will go active and then OSPF should start
R1#
*Mar 1 00:35:51.403: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:36:02.407: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
*Mar 1 00:36:51.423: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up
*Mar 1 00:36:53.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
*Mar 1 00:36:53.575: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Virtual-Access2 from LOADING to FULL, Loading Done
R1#sh ip ospf int brie
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Vi2 1 0 0.0.0.0/0 1 P2P 1/1
Vt1 1 0 0.0.0.0/0 1 DOWN 0/0
Se0/1 1 0 0.0.0.0/0 64 P2P 1/1
Lo0 1 0 1.1.1.1/24 1 LOOP 0/0
Of potential interest, the PPPoFR link has a lower ospf cost than the native PPP link
R1#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:37 2.2.2.2 Virtual-Access2
3.3.3.3 0 FULL/ - 00:00:38 3.3.3.3 Serial0/1
R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 2.2.2.2, 00:02:30, Virtual-Access2
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 3.3.3.3, 00:22:27, Serial0/1
The final link type we're working with is ethernet between R2 and R3
SW1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#int range fa1/2 - 3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 23
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int fa0/0
R2(config-if)#ip unnumbered lo0
Point-to-point (non-multi-access) interfaces only
Okay, that's not so good, I guess we can go back to our friend PPP again and go for PPPoE (R2 will be our PPPoE Client)
R2(config-if)#int di1
R2(config-if)#ip unnumbered lo0
R2(config-if)#encapsulation pppR2(config-if)#ip unnumbered lo0
R2(config-if)#no peer neighbor-route
R2(config-if)#dialer pool 1
R2(config-if)#dialer persistent
R2(config-if)#ip ospf 1 area 0
R2(config-if)#int fa0/0
R2(config-if)#pppoe-client dial-pool-number 1
R2(config-if)#no shut
Let's set up R3 as the PPPoE Server
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int virtual-template 1
R3(config-if)#ip unnumbered lo0
R3(config-if)#no peer neighbor-route
R3(config-if)#ip ospf 1 area 0
R3(config-if)#int fa0/0
R3(config-if)#pppoe enable
R3(config-if)#bba-group pppoe global
R3(config-bba-group)#virtual-template 1
R3(config-bba-group)#int fa0/0
R3(config-if)#no shut
After a short period of time we can see that the PPPoE link comes up but eventially we see this:
*Mar 1 00:59:06.723: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Virtual-Access2.1 from EXSTART to DOWN, Neighbor Down: Too many retransmissions
A typical cause of this is an MTU mismatch, lets see if this is the case:
R3#sh ip int vi2.1 | i MTU
MTU is 1492 bytes
Remember the PPPoE overhead is 8 bytes....
R2#sh ip int di1 | i MTU
MTU is 1500 bytes
Okay, so that didn't happen here, let's fix this up
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int di1
R2(config-if)#ip mtu 1492
R2(config-if)#end
We could have also fixed this with ip ospf mtu-ignore... After a few seconds on R2 we see:
*Mar 1 01:00:35.827: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Dialer1 from LOADING to FULL, Loading Done
So there you go, a few different ways of implementing OSPF adjacencies between routers using peers with different IP addresses and subnets, just remember that different link types will have different link cost metrics applied..
No comments:
Post a Comment