CISCO cli COMMANDS

download CISCO cli COMMANDS

If you can't read please download the document

description

coMMANDS ON TRUNKING AND SWITCHPORT SECURITY/ACCESS

Transcript of CISCO cli COMMANDS

Vlan Assign and TrunksSwitch S1S1(config)# vlan 10S1(config-vlan)# name StudentS1(config-vlan)# exitS1(config)# vlan 20S1(config-vlan)# name Faculty-AdminS1(config-vlan)# exitS1(config)# interface f0/1S1(config-if)# switchport mode trunkS1(config-if)# interface range f0/5 6S1(config-if-range)# switchport mode accessS1(config-if-range)# switchport access vlan 10S1(config-if-range)# interface vlan 10 Lab Configuring Per-Interface Inter-VLAN RoutingS1(config-if)# ip address 192.168.10.11 255.255.255.0S1(config-if)# no shutS1(config-if)# exitS1(config)# ip default-gateway 192.168.10.1Switch S2S2(config)# vlan 10S2(config-vlan)# name StudentS2(config-vlan)# exitS2(config)# vlan 20S2(config-vlan)# name Faculty-AdminS2(config-vlan)# exitS2(config)# interface f0/1S2(config-if)# switchport mode trunkS2(config-if)# interface f0/11S2(config-if)# switchport mode accessS2(config-if)# switchport access vlan 20S2(config-if)# interface f0/18S2(config-if)# switchport mode accessS2(config-if)# switchport access vlan 20S2(config-if-range)# interface vlan 10S2(config-if)#ip address 192.168.10.12 255.255.255.0S2(config-if)# no shutS2(config-if)# exitS2(config)# ip default-gateway 192.168.10.1########################################more trunks and vlans S1(config)# vlan 10S1(config-vlan)# name StudentsS1(config-vlan)# vlan 20S1(config-vlan)# name FacultyS1(config-vlan)# exitS1(config)# interface f0/1S1(config-if)# switchport mode trunkS1(config-if)# interface f0/5S1(config-if)# switchport mode trunkS1(config-if)# interface f0/6S1(config-if)# switchport mode accessS1(config-if)# switchport access vlan 10Switch S2S2(config)# vlan 10S2(config-vlan)# name StudentsS2(config-vlan)# vlan 20S2(config-vlan)# name FacultyS2(config)# interface f0/1S2(config-if)# switchport mode trunk Lab Configuring 802.1Q Trunk-Based Inter-VLAN Routing 2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 7S2(config-if)# interface f0/18S2(config-if)# switchport mode accessS2(config-if)# switchport access vlan 20Router R1R1(config)# interface g0/1.1R1(config-subif)# encapsulation dot1Q 1R1(config-subif)# ip address 192.168.1.1 255.255.255.0R1(config-subif)# interface g0/1.10R1(config-subif)# encapsulation dot1Q 10R1(config-subif)# ip address 192.168.10.1 255.255.255.0R1(config-subif)# interface g0/1.20R1(config-subif)# encapsulation dot1Q 20R1(config-subif)# ip address 192.168.20.1 255.255.255.0R1(config-subif)# exitR1(config)# interface g0/1R1(config-if)# no shutdown