VLAN Configuration Notes

  • Upload
    dukedo

  • View
    216

  • Download
    0

Embed Size (px)

Citation preview

  • 7/30/2019 VLAN Configuration Notes

    1/5

    Page 1 of5

    CABLING

    Crossover Between host and routers

    Straight-through Between routers/switches and routers/switches OR host toswitches

    Rollover/Console

    Between host and routers/switches

    Clear configuration

    Remove the VLAN databaseSwitch#delete flash:vlan.datDelete filename [vlan.dat]?[Enter]Delete flash:vlan.dat? [confirm] [Enter]

    Remove the startup configuration from NVRAMSwitch#erase startup-config

    Restart the softwareSwitch#reload

    Basic configuration

    Privileged modeRouter>enable

    Configuration modeRouter#config term

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

    Change device (prompt) nameRouter(config)#hostname Router1

    Configure a login bannerRouter(config)#banner login Authorized Personnel Only!

    Configure a message of the day bannerRouter(config)#banner motd Authorized Personnel Only!

    Set the switch default gatewayS1(config)#ip default-gateway 172.17.99.1

    Disable DNS lookupS1(config)#no ip default-gateway

    Encrypt privileged exec passwordRouter1(config)#enable secret class

    Set console access passwordRouter1(config)#line console 0Router1(config-line)#password ciscoRouter1(config-line)#login

    Set telnet access passwordRouter1(config-line)#line vty 0 4

    Router1(config-line)#password ciscoRouter1(config-line)#login

    Set the interface layer 3 addressRouter1(config-line)#interface fa0/0Router1(config-if)#ip address 192.168.7.126 255.255.255.128Router1(config-if)#no shutdown

    Set the interface descriptionRouter1(config-if)#description connection to host1

    Exit from configuration modeRouter1(config-if)#end

  • 7/30/2019 VLAN Configuration Notes

    2/5

    Page 2 of5

    Router1#

    Initialize all ports in the shutdown stateSwitch#config termSwitch(config)#interface range fa0/1-24Switch(config-if-range)#shutdownSwitch(config-if-range)#interface range gi0/1-2Switch(config-if-range)#shutdown

    Configure VTP

    Configure the VTP mode (server,client,transparent)

    S1(config)#vtp mode server or client or transparent

    Device mode already VTP SERVER mode

    S1(config)#vtp domain ZYXCORP

    Changing VTP domain name from NULL to Lab4

    S1(config)#vtp password cisco

    Setting device VLAN database password to cisco

    S1(config)#end

    Configure Trunking

    S1(config)#interface range fa0/1-5S1(config-if-range)#switchport mode trunkS1(config-if-range)#switchport trunk native vlan 99S1(config-if-range)#no shutdown

    S1(config-if-range)#end

    S1#show interface trunk

    Configure port security

    S2(config)#interface fa0/6S2(config-if)#switchport port-security

    S2(config-if)#switchport port-security maximum 1S2(config-if)#switchport port-security mac-address sticky

    Configure VLANs

    Create VLAN on the switch 1(VTP server) and VTP will advertise the VLANs

    configuration

    S1(config)#vlan 99S1(config-vlan)#name managementS1(config-vlan)#exitS1(config)#vlan 10S1(config-vlan)#name faculty/staff

    S1(config-vlan)#vlan 20S1(config-vlan)#name studentsS1(config-vlan)#vlan 30S1(config-vlan)#name guestS1(config-vlan)#end

    S1#show vlan brief

    Configure the management interface address on all switches

  • 7/30/2019 VLAN Configuration Notes

    3/5

    Page 3 of5

    ALSwitch(config)#interface vlan 99ALSwitch(config-if)#ip address 172.17.99.11 255.255.255.0ALSwitch(config-if)#no shutdownALSwitch(config-if)#exit

    Assign switch ports to VLAN

    S3(config)#interface range fa0/6-10S3(config-if-range)#switchport access vlan 30S3(config-if-range)#interface range fa0/11-17S3(config-if-range)#switchport access vlan 10S3(config-if-range)#interface range fa0/18-24S3(config-if-range)#switchport access vlan 20S3(config-if-range)#end

    Configure STP

    Configuring Port Costs

    S1# configure terminal

    S1(config)#interface fastethernet 0/1S1(config-if)#spanning-tree cost 25

    S1(config-if)#end

    Configuring Port priority

    S1# configure terminalS1(config)#interface fastethernet 0/1

    S1(config-if)#spanning-tree port-priority 112

    S1(config-if)#end

    Configuring the bridge priority value.

    S1# configure terminal

    S1(config)#spanning-tree vlan 1 root primary (priority set to 24576 fromdefault 32768)S1(config)#spanning-tree vlan 1 root secondary (priority set to 28672 fromdefault 32768)ORS1(config)#spanning-tree vlan 1 priority 24576 (in increments of 4096

    between 0 and 65536)

    S1(config)#end

    Configuring the spanning tree diameter

    S1# configure terminalS1(config)#spanning-tree vlan 1 root primary diameter 5

    S1(config)#end

    Configuring the Portfast

    S1# configure terminal

  • 7/30/2019 VLAN Configuration Notes

    4/5

    Page 4 of5

    S1(config)#interface fastethernet 0/1S1(config-if)#spanning-tree portfastS1(config)#end

    Configuring the Rapid-PVST+

    S1# configure terminalS1(config)#spanning-tree mode rapid-pvstS1(config)#interface fastethernet 0/1S1(config-if)#spanning-tree link-type point-to-pointS1(config)#endS1#clear spanning-tree detected-protocols

    S1#debug spanning-tree events

    S1#show spanning-tree

    Configure the FastEthernet 0/1 interface on Router.

    R1(config)#interface fastethernet 0/1

    R1(config-if)#ip address 192.168.1.1 255.255.255.0

    R1(config-if)#no shutdown

    Configure the Serial 0/0/0 interface on Router DCE port.

    R1(config)#interface serial 0/0/0

    R1(config-if)#ip address 192.168.2.1 255.255.255.0

    R1(config-if)#clock rate 64000

    R1(config-if)#no shutdown

    R1#show IP interface brief

    Configure the trunking interface on Router.

    R1(config)#interface fastethernet 0/1

    R1(config-if)#no shutdown

    R1(config-if)#interface fastethernet 0/1.1

    R1(config-subif)#encapsulation dot1q 1

    R1(config-subif)#ip address 172.17.1.1 255.255.255.0

    R1(config-if)#interface fastethernet 0/1.10

    R1(config-subif)#encapsulation dot1q 10

    R1(config-subif)#ip address 172.17.10.1 255.255.255.0

    R1(config-if)#interface fastethernet 0/1.20

    R1(config-subif)#encapsulation dot1q 20

    R1(config-subif)#ip address 172.17.20.1 255.255.255.0

    R1(config-if)#interface fastethernet 0/1.99

    R1(config-subif)#encapsulation dot1q 99 native

    R1(config-subif)#ip address 172.17.99.1 255.255.255.0

  • 7/30/2019 VLAN Configuration Notes

    5/5

    Page 5 of5

    R1#show IP route

    Configure the server LAN interface

    R1(config)# interface FastEthernet0/0R1(config-if)#ip address 172.17.50.1 255.255.255.0R1(config-if)#description server interfaceR1(config-if)#no shutdownR1(config-if)#end