Thursday, September 22, 2011

OSPF DR BDR ELECTION




Before knowing about the DR and BDR election we need to know what is the use of this election on LAN but not Point to point?
On point to point there always only two devices to communicate when one device transmits the other always listens to it but coming to LAN think that what happens when a router knows about one update so it need to send it to all of its neighbors and the receiving router receives and also wants its neighbors to know about the update so what will happen if it repeats continues on LAN? It will consume the routers processing power so limit this there will DR and BDR for the LAN which whenever there is an update then sender directly send it to DR and BDR multicast address of 224.0.0.6 and then the DR sends it to all the neighbors with multicast address 224.0.0.5.so this will reduce unnecessarily propagating of ospf updates over the shared media.

Remember on LANS
DR/BDR listens to 224.0.0.6 multicast address
OTHER listens to 224.0.0.5 multicast address

let me show how this LSA updates being propagates in a LAN environment by capturing packets at one of the connection to the switch.






you can see from the above pic the hello packets are sending to multicast address 224.0.0.5 and LS updates are being sent to multicast address of 224.0.0.6

How election invokes?
On LAN, DR/BDR selected on the following rule

Highest IP address on the LAN becomes DR
Second highest IP address becomes BDR

and also remember router-id beats loopback address beats ip address

here i continue my discussion with ip addresses,consider below figure which 4 routers configured and became ospf neighbours,Initially the highest ip address on the LAN becomes DR




if we see on router 10.0.0.4 by issuing "show ip ospf neighbors" we observe the following

 

From the above picture you can observe 10.0.0.4 became DR being highest ip address on the LAN

Here i'd like to show how the election process works with different scenarios
First i make DR down by shutting down the lan interface



when i make the DR down then BDR becomes DR as you can see from the below pic



From the above pic you can see that being BDR ,10.0.0.3 became DR and to elect BDR, election is invoked among the remaining routers so 10.0.0.2 became BDR now.

so what happens when DR comes online back? it doesn't become DR again because there are already DR and BDR exist so no election is invoked.

PPP WITH CHAP AUTHENTICATION




CONFIGURATION:
R1:LONDON LOCATION
hostname LONDON
username texas password 0 cisco
!
!
!
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
encapsulation ppp
serial restart-delay 0
ppp authentication chap


R2:TEXAS LOCATION
hostname TEXAS
username london password 0 cisco
!
!
!
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
encapsulation ppp
serial restart-delay 0
ppp authentication chap






Now i m gonna show you a different configuration of ppp authentication...and you will like it

 

configuration:
 R1:

int s0/0

ip add 10.0.0.1 255.255.255.0

encap ppp

ppp authentication chap

no sh

exit

hostname r1

username r2 password cisco


R2:

int s0/0

ip add 10.0.0.2 255.255.255.0

encap ppp

ppp chap password cisco

no sh

exit

host r2


now check the reachabililty between these two routers.

FRAME RELAY POINT TO POINT



CONFIGURATION:
R1:
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
!
interface Serial0/0.100 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 100
!
interface Serial0/0.101 point-to-point
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 101


R2:
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
!
interface Serial0/0.100 point-to-point
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 100


R3:
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
!
interface Serial0/0.100 point-to-point
ip address 192.168.2.2 255.255.255.0
frame-relay interface-dlci 100



FRAME RELAY SWITCH SETUP:

Tuesday, September 20, 2011

INTER-VLAN ROUTING,ROUTER ON A STICK


To have the reachbility between two vlans  we need an L3 device which here i used the router, we can also use any L3 switch to route between the two vlans here i will show the configurations in the two scenarios.First we discuss about router, when the router is connected we use a sub-interface which we have to "encapsulate" of frames,why because the port which it connects to switch should be a trunk port which by default allows all the vlans and all the vlans travels through the trunk with vlan tag, so here we have to encapsulate that with specific vlan number for that particular sub-interface ,if the number of vlans increases the no of sub-interfaces increases,in the above picture i'd like to route between two vlans thats why i used two sub-interfaces and encapsulated with their respective vlans.

so when it comes to the switch we have to configure the ports as access to which vlans they belongs to,and the port which connects to the router we have to configure as trunk port so that here it allows both the vlans traffic through it.

if you guys use an L3 switch instead of router then give :ip routing" command in the privileged mode and also in L3 switches before making a port to trunk mode we have to use "switchport trunk encapsulation dot1q " command.


ROUTER CONFIGURATION:
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 10.0.0.1 255.255.255.0
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 10.0.1.1 255.255.255.0


SWITCH CONFIGURATION:
interface FastEthernet0/1
 switchport mode trunk

!

interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
switchport access vlan 3
!
interface FastEthernet0/4
switchport access vlan 2
!
interface FastEthernet0/5
switchport access vlan 3


PC0
IP:10.0.1.2
SUBNET MASK:255.255.255.0
GATEWAY:10.0.1.1


PC3
IP:10.0.1.3
SUBNET MASK:255.255.255.0
GATEWAY:10.0.1.1


PC1
IP:10.0.0.2
SUBNET MASK:255.255.255.0
GATEWAY:10.0.0.1


PC2
IP:10.0.0.3
SUBNET MASK:255.255.255.0
GATEWAY:10.0.0.1