Wednesday, June 8, 2011

Configure BGP

Configure BGP to Communicate between two ASes






Router 1 Config:

!
interface FastEthernet0/0
 ip address 172.16.19.19 255.255.0.0
 duplex auto
 speed auto
!
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.255
!
R1(config)#router bgp 200

R1(config-router)#neighbor 3.3.3.1 remote-as 100

R1(config-router)#neighbor 3.3.3.1 ebgp-multihop 2

R1(config-router)#neighbor 3.3.3.1 update-source loopback 1

R1(config)#ip route 0.0.0.0 0.0.0.0 3.3.3.1

Router 2 Configuration:

!
interface Loopback0
 ip address 40.40.40.40 255.255.255.255
!

!
interface FastEthernet0/0
 ip address 3.3.3.1 255.255.255.0
 duplex auto
 speed auto
!


R2(config)#router bgp 100

R2(config-router)#neighbor 3.3.3.2 remote-as 200

R2(config-router)#neighbor 3.3.3.2 ebgp-multihop 2

R2(config-router)#neighbor 3.3.3.2 update-source loopback 0

R2(config)#ip route 0.0.0.0 0.0.0.0 3.3.3.2


R2#sh ip bgp neighbors
BGP neighbor is 3.3.3.2,  remote AS 200, external link
  BGP version 4, remote router ID 36.36.36.36
  BGP state = Established, up for 00:34:04
 <output truncated>

R2#sh ip bgp summary
BGP router identifier 3.3.3.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.2         4   200      38      38        1    0    0 00:34:28        0


R2#ping 33.33.33.33

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.33.33.33, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

R1#sh ip bgp neighbors
BGP neighbor is 3.3.3.1,  remote AS 100, external link
  BGP version 4, remote router ID 3.3.3.1
  BGP state = Established, up for 00:38:08
 <output truncated>

R1#sh ip bgp summary
BGP router identifier 36.36.36.36, local AS number 200
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.1         4   100      42      42        1    0    0 00:38:49        0

R1#ping 40.40.40.40

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.40.40.40, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

Wednesday, June 1, 2011

Configuring EIGRP Routing


EIGRP Protocol:



Router 1 config:

interface FastEthernet0/0
 ip address 172.16.19.19 255.255.0.0
!
interface FastEthernet0/1
 ip address 3.3.3.2 255.255.255.0


R1(config-router)#network 172.16.0.0 0.0.255.255
R1(config-router)#network 3.3.3.0 0.0.0.255
R1(config-router)#no auto-summary

Router 2 Config:

interface FastEthernet0/0
 ip address 3.3.3.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 bandwidth 64
 ip address 2.2.2.2 255.255.255.0
 clockrate 128000
!

R2(config)#router eigrp 100
R2(config-router)#network 2.2.2.0 0.0.0.255
R2(config-router)#network 3.3.3.0 0.0.0.255
R2(config-router)#no auto-summary

Router 3 Config:

interface Serial0/0
 ip address 2.2.2.1 255.255.255.0
!
interface Serial0/1
 ip address 1.1.1.2 255.255.255.0
!

R3(config)#router eigrp 100
R3(config-router)#network 1.1.1.0 0.0.0.255
R3(config-router)#network 2.2.2.0 0.0.0.255
R3(config-router)#no auto-summary

Router 4 Config:
!
interface FastEthernet0/0
 ip address 172.16.20.20 255.255.0.0
!
interface Serial0/1
 bandwidth 64
 ip address 1.1.1.1 255.255.255.0
 clockrate 128000
!


R4(config)#router eigrp 100
R4(config-router)#network 1.1.1.0 0.0.0.255
R4(config-router)#no auto-summary

Check your Routing status by,


R1#sh ip route eigrp
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/41026560] via 3.3.3.1, 00:11:23, FastEthernet0/1
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/40514560] via 3.3.3.1, 00:11:23, FastEthernet0/1


R2#sh ip route eigrp
     1.0.0.0/24 is subnetted, 1 subnets
D       1.1.1.0 [90/41024000] via 2.2.2.1, 00:11:01, Serial0/0
D    172.16.0.0/16 [90/30720] via 3.3.3.2, 00:11:01, FastEthernet0/0


R3#sh ip route eigrp
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2172416] via 2.2.2.2, 00:34:09, Serial0/0
D    172.16.0.0/16 [90/2174976] via 2.2.2.2, 00:34:09, Serial0/0


R4#sh ip route eigrp
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/41024000] via 1.1.1.2, 00:33:04, Serial0/1
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/41026560] via 1.1.1.2, 00:33:04, Serial0/1

Also check topology generated by DUAL algorithm in EIGRP by,


R1#sh ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(36.36.36.36)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 1.1.1.0/24, 1 successors, FD is 41026560
        via 3.3.3.1 (41026560/41024000), FastEthernet0/1
P 2.2.2.0/24, 1 successors, FD is 40514560
        via 3.3.3.1 (40514560/40512000), FastEthernet0/1
P 3.3.3.0/24, 1 successors, FD is 28160
        via Connected, FastEthernet0/1
P 172.16.0.0/16, 1 successors, FD is 28160
        via Connected, FastEthernet0/0




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