Tuesday 26 March 2013

intervlan routing using router(Router on Stick)




Configuration of L2sw1-

L2sw1>enable
L2sw1#conf t
L2sw1(config)#vlan 10
L2sw1(config-vlan)#exit
L2sw1(config)#vlan 20
L2sw1(config-vlan)#exit
L2sw1(config)#interface fastEthernet 0/1
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 10
L2sw1(config-if)#no shutdown
L2sw1(config-if)#ex
L2sw1(config)#interface fastEthernet 0/2
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 20
L2sw1(config-if)#no shutdown
L2sw1(config-if)#exit
L2sw1(config)#interface range fastEthernet 0/3 -4
L2sw1(config-if-range)#switchport mode trunk
L2sw1(config-if-range)#no shutdown
L2sw1(config-if-range)#exit


---------------------------------------------

Configuration of L2sw2-

L2sw2>enable
L2sw2#conf t
L2sw2(config)#vlan 10
L2sw2(config-vlan)#exit
L2sw2(config)#vlan 20
L2sw2(config-vlan)#exit
L2sw2(config)#interface fastEthernet 0/2
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 10
L2sw2(config-if)#no shutdown
L2sw2(config-if)#ex
L2sw2(config)#interface fastEthernet 0/3
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 20
L2sw2(config-if)#no shutdown
L2sw2(config-if)#exit
L2sw2(config)#interface fastEthernet 0/1
L2sw2(config-if-range)#switchport mode trunk
L2sw2(config-if-range)#no shutdown
L2sw2(config-if-range)#exit


-------------------------------------------------------

Configuration of Router-

Router>enable
Router#conf t
Router(config)#interface fastEthernet 0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 10.0.0.10 255.0.0.0
Router(config-subif)#no shutdown
Router(config-subif)#ex
Router(config)#interface fastEthernet 0/0.20
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 20.0.0.10 255.0.0.0
Router(config-subif)#no shutdown
Router(config-subif)#ex
Router(config)#


----------------------------------------------


After doing the configuration, try to ping the PCs in different vlans.

PC1>ping 20.0.0.1

Pinging 20.0.0.1 with 32 bytes of data:

Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=90ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127

Ping statistics for 20.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 80ms, Maximum = 90ms, Average = 82ms

PC1>ping 20.0.0.2

Pinging 20.0.0.2 with 32 bytes of data:

Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127

Ping statistics for 20.0.0.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 90ms, Maximum = 100ms, Average = 95ms


PCs in different vlans are communicating.

Intervlan routing using SVI




Configuration of L2sw1-

L2sw1>enable
L2sw1#conf t
L2sw1(config)#vlan 10
L2sw1(config-vlan)#exit
L2sw1(config)#vlan 20
L2sw1(config-vlan)#exit
L2sw1(config)#interface fastEthernet 0/1
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 10
L2sw1(config-if)#no shutdown
L2sw1(config-if)#ex
L2sw1(config)#interface fastEthernet 0/2
L2sw1(config-if)#switchport mode access
L2sw1(config-if)#switchport access vlan 20
L2sw1(config-if)#no shutdown
L2sw1(config-if)#exit
L2sw1(config)#interface range fastEthernet 0/3 -4
L2sw1(config-if-range)#switchport mode trunk
L2sw1(config-if-range)#no shutdown
L2sw1(config-if-range)#exit


---------------------------------------------

Configuration of L2sw2-

L2sw2>enable
L2sw2#conf t
L2sw2(config)#vlan 10
L2sw2(config-vlan)#exit
L2sw2(config)#vlan 20
L2sw2(config-vlan)#exit
L2sw2(config)#interface fastEthernet 0/2
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 10
L2sw2(config-if)#no shutdown
L2sw2(config-if)#ex
L2sw2(config)#interface fastEthernet 0/3
L2sw2(config-if)#switchport mode access
L2sw2(config-if)#switchport access vlan 20
L2sw2(config-if)#no shutdown
L2sw2(config-if)#exit
L2sw2(config)#interface fastEthernet 0/1
L2sw2(config-if-range)#switchport mode trunk
L2sw2(config-if-range)#no shutdown
L2sw2(config-if-range)#exit


-------------------------------------------------------

Configuration of Multilayer_sw-

Multilayer_sw>enable
Multilayer_sw#conf t
Multilayer_sw(config)#ip routing
Multilayer_sw(config)#vlan 10
Multilayer_sw(config-vlan)#exit
Multilayer_sw(config)#vlan 20
Multilayer_sw(config-vlan)#exit
Multilayer_sw(config)#interface vlan 10
Multilayer_sw(config-if)#ip address 10.0.0.10 255.0.0.0
Multilayer_sw(config-if)#exit
Multilayer_sw(config)#interface vlan 20
Multilayer_sw(config-if)#ip address 20.0.0.10 255.0.0.0
Multilayer_sw(config-if)#ex
Multilayer_sw(config)#interface fastEthernet 0/1
Multilayer_sw(config-if)#switchport trunk encapsulation dot1q
Multilayer_sw(config-if)#switchport mode trunk
Multilayer_sw(config-if)#no shutdown
Multilayer_sw(config-if)#ex
----------------------------------------------


After doing the configuration, try to ping the PCs in different vlans.

PC1>ping 20.0.0.1

Pinging 20.0.0.1 with 32 bytes of data:

Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127
Reply from 20.0.0.1: bytes=32 time=90ms TTL=127
Reply from 20.0.0.1: bytes=32 time=80ms TTL=127

Ping statistics for 20.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 80ms, Maximum = 90ms, Average = 82ms

PC1>ping 20.0.0.2

Pinging 20.0.0.2 with 32 bytes of data:

Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=100ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127
Reply from 20.0.0.2: bytes=32 time=90ms TTL=127

Ping statistics for 20.0.0.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 90ms, Maximum = 100ms, Average = 95ms


PCs in different vlans are communicating.

Saturday 23 March 2013

vtp modes



Configuration of vtp server-

Switch>en
Switch#conf t
Switch(config)#hostname switch0
switch0(config)#interface fastEthernet 0/2
switch0(config-if)#switchport mode access
switch0(config-if)#switchport access vlan 30
switch0(config-if)#ex
switch0(config)#interface fastEthernet 0/3
switch0(config-if)#switchport mode access
switch0(config-if)#switchport access vlan 40
switch0(config-if)#exit
switch0(config)#interface fastEthernet 0/1
switch0(config-if)#switchport mode trunk
switch0(config-if)#exit
switch0(config)#vtp mode server
switch0(config)#vtp domain cisco
switch0(config)#vlan 30
switch0(config-vlan)#ex
switch0(config)#vlan 40
switch0(config-vlan)#ex


-----------------------------------------

Configuration of vtp tranparent switch-

Switch>en
Switch#conf t
Switch(config)#hostname switch1
witch1(config)#interface range fastEthernet 0/1 -2
switch1(config-if-range)#switchport mode trunk
switch1(config-if-range)#no shutdown
switch1(config-if-range)#ex
switch1(config)#vtp mode transparent
switch1(config)#vtp domain cisco
switch1(config)#vlan 30
switch1(config-vlan)#ex
switch1(config)#vlan 40
switch1(config-vlan)#ex



------------------------------------------------------

Configuration of vtp client switch-
Switch>en
Switch#conf
Switch(config)#hostname switch2
switch2(config)#interface fastEthernet 0/2
switch2(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 30
switch2(config-if)#ex
switch2(config)#interface fastEthernet 0/3
switch2(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 40
switch2(config-if)#exit
switch2(config)#interface fastEthernet 0/1
switch2(config-if)#switchport mode trunk
switch2(config-if)#exit
switch2(config)#vtp domain cisco
switch2(config)#vtp mode client