Sunday, March 25, 2012

OSPF over FRAME RELAY

Hi,
 i would to explain the OSPF over frame relay.OSPF can be configured over frame relay in three different ways.
1)Default multipoint
2)Point-to-multipoint
3)Point-to-multipoint non-broadcast.

1)Default multipoint
consider the above topology which R1 is hub,R2 and R3 are spokes,R1 having two PVC's to both R2 and R3.As it is a default network type no need to define OSPF network type on framerelay connected interfaces.

lets check the configuration part.

First let me show you the R1 configuration.
R1#

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!

interface Serial0/0.1 multipoint
 ip address 10.0.0.1 255.255.255.248
 frame-relay interface-dlci 101
 frame-relay interface-dlci 102
!

router ospf 1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 10.0.0.1 0.0.0.0 area 0


the same way the configuration on R2 would be

R2:
interface Serial0/0
 ip address 10.0.0.2 255.255.255.248
 encapsulation frame-relay
 serial restart-delay 0
 frame-relay interface-dlci 201
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.2 0.0.0.0 area 0

so now lets see the neighbors of R1,
R1#sh ip os nei

Neighbor ID     Pri   State           DeadTime   Address         Interface
N/A               0   ATTEMPT/DROTHER 00:01:54    10.0.0.2        Serial0/0.1

All the framerelay and ospf configuration has been done still you see that the state is ATTEMPT/DROTHER ,In the default network type the ospf neighbor discovery is not automatically done so, to fix this we need to manually add the neighbors on the routers.


R1(config)#router os 1
R1(config-router)#neighbor 10.0.0.2


R2(config)#router os 1
R2(config-router)#neighbor 10.0.0.1


once we add the above commands on both the routers the both routers will become neighbors and routes are exchanged.

R2#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.1          1   FULL/BDR        00:01:45    10.0.0.1        Serial0/0

From the above output as you can observe R1 became BDR and R2 elected as DR being highest ip address than R1, this is not good why because R2 is spoke so to make R1 as DR set the priority on R2 spoke.


Before that lets check the routing table of R2


And if we check the routing table of router R2
R2#sh ip rou
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, 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
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 10.0.0.1, 00:01:58, Serial0/0
     10.0.0.0/29 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Serial0/0
R2#

To make the R2 state from DR change the priority

R2(config-if)#ip ospf priority 0
R2(config-if)#end
R2#ship
*Mar  1 00:46:04.059: %SYS-5-CONFIG_I: Configured from console by console
R2#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.1          1   FULL/DR         00:01:56    10.0.0.1        Serial0/0
R2#

As i changed the priority on R2, it let the R1 to become DR and also check the neighbor table of R1
R1#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.2          0   FULL/DROTHER    00:01:45    10.0.0.2        Serial0/0.1
R1#

you may think about BDR, here on framerelay its not necessary.

so this is all about OSPF over framerelay default multipoint,here i showed configuration only of R1 and R2, if we want spoke to spoke communication as you already aware we need framerelay mapping between the spokes.

final in this type let me show you the default network type it has taken.

R1#sh ip os interface s0/0.1
Serial0/0.1 is up, line protocol is up
  Internet Address 10.0.0.1/29, Area 0
  Process ID 1, Router ID 10.0.0.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 10.0.0.1, Interface address 10.0.0.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:08
  Supports Link-local Signaling (LLS)
  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 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.0.0.2
  Suppress hello for 0 neighbor(s)
R1#

you can see as i highlighted the default network type.


2)Point-to-multipoint

So i erased the ospf configuration except the framerelay.

In this network type the routers do not elect DR and BDR to dynamically discover neighbors.The only configuration requirement on both the routers is to define network type on that framerelay connected interface.

R1#
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0.1 multipoint
 ip address 10.0.0.1 255.255.255.248
 ip ospf network point-to-multipoint
 frame-relay interface-dlci 101
 frame-relay interface-dlci 102
!
router ospf 1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 10.0.0.1 0.0.0.0 area 0

R2#
interface Serial0/0
 ip address 10.0.0.2 255.255.255.248
 encapsulation frame-relay
 ip ospf network point-to-multipoint
 serial restart-delay 0
 frame-relay interface-dlci 201
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.2 0.0.0.0 area 0



as you can see there are no manually configured neighbors,and on the interfaces of both the routers i configured network type as "point-to-multipoint".This completes the configuration and lets check the neighbor table.

R1#sh ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.3          0   FULL/  -        00:01:45    10.0.0.3        Serial0/0.1
10.0.0.2          0   FULL/  -        00:01:54    10.0.0.2        Serial0/0.1
R1#

you remember when i said earlier there are no DR and BDR on this network type.

lets check the final command.
R1#sh ip ospf interface s0/0.1
Serial0/0.1 is up, line protocol is up
  Internet Address 10.0.0.1/29, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:09
  Supports Link-local Signaling (LLS)
  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 4 msec, maximum is 4 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 10.0.0.3
    Adjacent with neighbor 10.0.0.2
  Suppress hello for 0 neighbor(s)
R1#

now you see the network type changed to POINT_TO_MULTIPOINT.


3)Point-to-multipoint nonbraodcast
This network type acts similarly to the point-to-multipoint network type but the "nonbroadcast" implies routers cannot broadcast or multicast neighbors to discover neighbors.
so we need to manually add the neighbors on the routers.

R1#

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0.1 multipoint
 ip address 10.0.0.1 255.255.255.248
 ip ospf network point-to-multipoint non-broadcast
 frame-relay interface-dlci 101
 frame-relay interface-dlci 102
!
router ospf 1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 10.0.0.1 0.0.0.0 area 0
 neighbor 10.0.0.2


R2#

interface Serial0/0
 ip address 10.0.0.2 255.255.255.248
 encapsulation frame-relay
 ip ospf network point-to-multipoint non-broadcast
 serial restart-delay 0
 frame-relay interface-dlci 201
!
router ospf 1
 log-adjacency-changes
 network 10.0.0.2 0.0.0.0 area 0
 neighbor 10.0.0.1


now the neighbor table of R1 is

R1#sh ip ospf neighbor


Neighbor ID     Pri   State           Dead Time   Address         Interface
10.0.0.2          0   FULL/  -        00:01:47    10.0.0.2        Serial0/0.1
10.0.0.3          0   FULL/  -        00:01:38    10.0.0.3        Serial0/0.1
R1#


thats all guys...ospf over frame relay


i hope this is helpful and thank you.







Tuesday, January 10, 2012

Route filtering with BGP



Route filtering can be done with "ACL","prefix-list" and "offset-list" with a  combination of "route-map",here i am using the BGP as a routing protocol between different autonomous systems.i apply the route filtering at router R2 which it going to effect the R4 routing table.This filtering can be applied any where depends up on our requirement.

let me show you the BGP routing table of R4 without a route filtering configured at R2
i shutdown the interface between the R0 and R4 to make R4 to reach the other networks via R2, so when we see the routing table of R4 with "show ip  bgp" command.

2.2.2.2 is the R2's loopback address and 4.4.4.4 is the R4's loopback address.As we observe R4 can reach all the networks of 10.2.0.0/30,119.227.0.0/30,128.0.0.0/30 via 2.2.2.2 and 10.0.0.0/30 is a local network to R4

Now i will the configure the route filtering on R2.Here my policy is to prevent R4 to learn about 10.2.0.0/30 network.so my configuration on R2 as follows.

First create an access-list in global configuration mode which should match 10.2.0.0/30 network

access-list 1 permit 10.2.0.0 0.0.0.3

Then create an route-map with name "DENY" with "deny" clause and sequence number "10" which deny's the 10.2.0.0/30 network.

route-map DENY deny 10
match ip address 1

now to accept the remaining routes, create a permit clause with same name with different sequence number

route-map DENY permit 15


Apply this route-map in R2's BGP configuration as

 neighbor 4.4.4.4 route-map DENY out

i configured the route-map for neighbor 4.4.4.4 as "out" because the routes are advertising by R2 to R4

now most important command when applying route filtering in BGP  is
clear ip bgp 4.4.4.4 if we don't clear the bgp process for R4 the route filtering configuration wont take effect in BGP

If we observe the routing table of R4














the route for 10.2.0.0/30 is filtered and remaining are allowed.

This can be done with prefix-list also so i am going to post that in other post with explanation of route redistribution when different routing protocols are used in the network.