Configuration Different vlan and communication with router



Creating VTP ,Vlans & Routing in router.........Getting ip from the dhcp router

First Configuration of router is



Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0.10
Router(config-subif)#encapsulation dot1Q 10
Router(config-subif)#ip address 192.168.10.1 255.255.255.0
Router(config-subif)#no shutdown
Router(config-subif)#exit
Router(config)#int fa0/0.20
Router(config-subif)#
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
Router(config-subif)#no shutdown
Router(config-subif)#
Router(config-subif)#int fa0/0.30
Router(config-subif)#ip address 192.168.30.1 255.255.255.0
 I forget here to type the encapsulation dot1q vlan id//........ this error why it comes because we are in the sub interface mode i.e the error showing.....
% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Router(config-subif)#encapsulation dot1Q 30
Router(config-subif)#ip address 192.168.30.1 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#no shutdown
Router(config-subif)#exit
Router(config)#ip dhcp pool ?
WORD Pool name
Router(config)#ip dhcp pool data


Router(dhcp-config)#network 192.168.10.0 255.255.255.0


Router(dhcp-config)#default-router 192.168.10.1

Router(dhcp-config)#exit

Router(config)#ip dhcp pool it

Router(dhcp-config)#network 192.168.20.0 255.255.255.0

Router(dhcp-config)#default-router 192.168.20.1

Router(dhcp-config)#exit

Router(config)#ip dhcp pool hr

Router(dhcp-config)#network 192.168.30.0 255.255.255.0

Router(dhcp-config)#default-router 192.168.30.1

Router(dhcp-config)#exit
Router(config)#ip routing (This One  do main task in the router to routing the ip to communicate all vlans with each other )

switch 0
Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vtp domain sharan

Changing VTP domain name from NULL to sharan

Switch(config)#vtp version 2

Switch(config)#vlan 10

Switch(config-vlan)#name data
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name it
Switch(config-vlan)#vlan 30
Switch(config-vlan)#name hr
Switch(config-vlan)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#interface range fa0/1-3
Switch(config-if-range)#switchport mode trunk
Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

Switch(config-if-range)#switchport trunk allowed vlan 1-99
Switch(config-if-range)#exit
Switch(config)#int ran fa0/5-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#int ran fa0/10-15
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#int ran fa0/16-20
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 30
Switch(config-if-range)#exit


    Switch 2

Switch>

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp domain sharan
Domain name already set to sharan.
Switch(config)#int ran fa 0/1-2
Switch(config-if-range)#switchport mode trunk

Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

Switch(config-if-range)#switchport trunk allowed vlan 1-99
Switch(config-if-range)#exit
Switch(config)#int ran fa0/5-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#int ran fa0/10-15
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#int ran fa0/16-20
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 30
Switch(config-if-range)#exit


Switch One

Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp domain sharan
Domain name already set to sharan.
Switch(config)#int ran fa0/1-2
Switch(config-if-range)#switchport mode trunk
Switch(config-if-range)#switchport trunk allowed vlan 1-99
Switch(config-if-range)#exit
Switch(config)#int ran fa0/5-10
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit
Switch(config)#int ran fa0/10-15
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#int ran fa0/16-20
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 30
Switch(config-if-range)#exit
  
finish bye........................................
 

Comments

Popular posts from this blog

Zabbix Server is not working: the information dispaly may not be current

How to install VNX Launcher that has embedded java and Firefox

DHCP FAILED APIPA IS USED