Monday, May 30, 2011

Route Summarization in OSPF


Route Summarization between two areas




Router 2 IP addressing: 

interface Loopback1
 ip address 22.22.22.22 255.255.255.255
!
interface Loopback23
 ip address 23.23.23.23 255.255.255.255
!
interface Loopback24
 ip address 24.24.24.24 255.255.255.255
!
interface Loopback25
 ip address 25.25.25.25 255.255.255.255
!
interface fastethernet 0/0
 ip address 3.3.3.1 255.255.255.0
!


R2(config)#router ospf 2
R2(config-router)#network 22.0.0.0 0.255.255.255 area 1
R2(config-router)#network 23.0.0.0 0.255.255.255 area 1
R2(config-router)#network 24.0.0.0 0.255.255.255 area 1
R2(config-router)#network 25.0.0.0 0.255.255.255 area 1
R2(config-router)#network 3.3.3.0 0.0.0.255 area 0


R1(config)#router ospf 2
R1(config-router)#network 3.3.3.0 0.0.0.255 area 0


R1#sh ip route ospf
     23.0.0.0/32 is subnetted, 1 subnets
O IA    23.23.23.23 [110/2] via 3.3.3.1, 00:00:02, FastEthernet0/1
     22.0.0.0/32 is subnetted, 1 subnets
O IA    22.22.22.22 [110/2] via 3.3.3.1, 00:00:02, FastEthernet0/1
     25.0.0.0/32 is subnetted, 1 subnets
O IA    25.25.25.25 [110/2] via 3.3.3.1, 00:00:02, FastEthernet0/1
     24.0.0.0/32 is subnetted, 1 subnets
O IA    24.24.24.24 [110/2] via 3.3.3.1, 00:00:02, FastEthernet0/1



Finding Summarized Route

00010110.00000000.00000000.00000000 22.0.0.0
00010111.00000000.00000000.00000000 23.0.0.0
00011000.00000000.00000000.00000000 24.0.0.0
00011001.00000000.00000000.00000000 25.0.0.0

00010000.00000000.00000000.00000000 16.0.0.0
11110000.00000000.00000000.00000000 240.0.0.0

R2(config)#router ospf 2
R2(config-router)#area 1 range 16.0.0.0 240.0.0.0

R1#sh ip route ospf
O IA 16.0.0.0/4 [110/2] via 3.3.3.1, 00:00:04, FastEthernet0/1

Accessing Switch via Telnet


How to access Cisco switch via Telnet


switch(config)# int vlan 10

switch(config-vlan-if)# ip address 74.59.26.56 255.255.255.248

<It can be both real(fix) ip or LAN ip address>

switch(config-vlan-if)# no shutdown

switch(config)# line vty 0 4

switch(config-line)# password abcdef

switch(config-line)# login

switch(config)# enable secret abcdefg

Changing Native VLAN for trunk


How to change Native VLAN for trunk?



switch0(config)# int fa0/1

switch0(config-if)# switchport trunk native vlan 10

<To find out connected port number on the other side use following command>

switch0# sh cdp neighbors


switch1(config)# int fa0/1

switch1(config-if)# switchport trunk native vlan 10


Cisco Trunking


Cisco Trunking Types
=================

Using Cisco 2950 switches


Switchport mode

access - Used for systems
trunk - Configure Trunking
dynamic         - To auto detect switch on other side for trunking
> desirable
> auto

switch0(config)# int fa0/1

switch0(config-if)# switchport mode dynamic desirable


switch0(config)# int fa0/2

switch0(config-if)# switchport mode dynamic desirable

Switch1 will auto detect trunk as its in 'Dynamic Auto' mode



Encapsulation Types for trunking
--------------------------------------------

802.1q - All Non-cisco and cisco switches

ISL (Inter-Switch Link) - For Cisco Switches only

NOTE: Default encapsulation is always Dot1q