You are on page 1of 3

Configuring VLAN, VTP, Inter-VLAN Routing

=========================================
1. Configure Trunk Ports
------------------------
DLSW(config)#int range f0/1, f0/23-24
DLSW(config-if-range)#switchport mode trunk
DLSW(config-if-range)#exit

ALSW1(config)#int range f0/23-24


ALSW1(config-if-range)#switchport mode trunk
ALSW1(config-if-range)#exit

ALSW2(config)#int range f0/23-24


ALSW2(config-if-range)#switchport mode trunk
ALSW2(config-if-range)#exit

2. Configure VTP
----------------
To view VTP Information: DLSW#show vtp status
To view VTP Password: DLSW#show vtp password

a) Configure VTP Server


-----------------------
DLSW(config)#vtp mode server
DLSW(config)#vtp domain xyz
DLSW(config)#vtp password ccna

b) Configure VTP Client


-----------------------
ALSW1(config)#vtp mode client
ALSW1(config)#vtp domain xyz
ALSW1(config)#vtp password ccna

ALSW2(config)#vtp mode client


ALSW2(config)#vtp domain xyz
ALSW2(config)#vtp password ccna

3. Create VLANs in VTP Server


-----------------------------
To view VLAN database: DLSW#show vlan brief

DLSW(config)#vlan 2
DLSW(config-vlan)#name sales
DLSW(config-vlan)#vlan 3
DLSW(config-vlan)#name marketing
DLSW(config-vlan)#vlan 4
DLSW(config-vlan)#name admin
DLSW(config-vlan)#vlan 5
DLSW(config-vlan)#name it
DLSW(config-vlan)#exit

VLAN information should now be propagated to VTP client switches.

4. Assign switchports to their corresponding VLANs


--------------------------------------------------
ALSW1(config)#int range f0/1-2
ALSW1(config-if-range)#switchport mode access
ALSW1(config-if-range)#switchport access vlan 2
ALSW1(config-if-range)#exit
ALSW1(config)#int f0/3
ALSW1(config-if)#switchport mode access
ALSW1(config-if)#switchport access vlan 3
ALSW1(config-if)#exit

Similarly configure ALSW2 and assign host IP addresses. At this point, you should
be able to communicate within same VLAN. But communication between different VLANs
will fail. So, we need to configure Inter-VLAN Routing.

5. Configuring Inter-VLAN Routing


---------------------------------
BR(config)#int f0/0.10
BR(config-subif)#encapsulation dot1q 1
BR(config-subif)#ip address 172.16.1.1 255.255.255.0
BR(config-subif)#exit
BR(config)#int f0/0.20
BR(config-subif)#encapsulation dot1q 2
BR(config-subif)#ip address 172.16.2.1 255.255.255.0
BR(config-subif)#exit
BR(config)#int f0/0.30
BR(config-subif)#encapsulation dot1q 3
BR(config-subif)#ip address 172.16.3.1 255.255.255.192
BR(config-subif)#exit
BR(config)#int f0/0.40
BR(config-subif)#encapsulation dot1q 4
BR(config-subif)#ip address 172.16.4.1 255.255.255.224
BR(config-subif)#exit
BR(config)#int f0/0.50
BR(config-subif)#encapsulation dot1q 5
BR(config-subif)#ip address 172.16.5.1 255.255.255.248
BR(config-subif)#exit

BR(config)#int f0/0
BR(config-if)#no shutdown
BR(config-if)#exit

Now you should be able to communicate between different VLANs.

Configuring Switchport Security


===============================
ALSW1(config)#int range f0/1-20
ALSW1(config-if-range)#switchport mode access
ALSW1(config-if-range)#switchport port-security
ALSW1(config-if-range)#switchport port-security maximum 1
ALSW1(config-if-range)#switchport port-security mac-address sticky
ALSW1(config-if-range)#switchport port-security violation shutdown
ALSW1(config-if-range)#exit

Configuring DHCP
================
BR(config)#ip dhcp excluded-address 172.16.2.1 172.16.2.10

BR(config)#ip dhcp pool sales


BR(dhcp-config)#network 172.16.2.0 255.255.255.0
BR(dhcp-config)#default-router 172.16.2.1
BR(dhcp-config)#dns-server 8.8.8.8
BR(dhcp-config)#exit

Configuring ACL
===============

You might also like