Configuration Example: VTP and Inter-VLAN Routing


Figure 15-1 shows the network topology for the configuration of VTP and inter-VLAN routing. There are separate sections on configuring both 2900 and 2950 series switches.

Figure 15-1. Network Topology for VTP and Inter-VLAN Routing Configuration


ISP Router

Router>en

 

Router>#config t

 

Router(config)#hostname ISP

Sets the host name

ISP(config)#no ip domain-lookup

Turns off DNS resolution to avoid wait time dur to DNS lookup of spelling errors

ISP(config)#line con 0

 

ISP(config-line)#logging synchronous

Appends the command line to a new lineno interruption from info items

ISP(config-line)#exec-timeout 0 0

Console session will never time out

ISP(config-line)#exit

 

ISP(config)#enable secret cisco

Sets the secret password to cisco

ISP(config)#int lo 0

Creates a loopback address for testing purposes

ISP(config-if)#description simulated address representing remote website

 

ISP(config-if)#ip address 172.16.1.1 255.255.255.0

 

ISP(config-if)#int s0/0

Enters serial interface configuration mode

ISP(config-if)#description WAN link to the Corporate Router

 

ISP(config-if)#ip address 200.200.200.13 255.255.255.252

 

ISP(config-if)#clock 56000

Sets the clock rate for the serial link

ISP(config-if)#no shut

 

ISP(config-if)#exit

 

ISP(config-if)#router eigrp 10

Turns on the EIGRP routing process

ISP(config-router)#network 172.16.0.0

Advertises the 172.16.0.0 network

ISP(config-router)#network 200.200.200.0

Advertises the 200.200.200.0 network

ISP(config-router)#no auto-summary

Turns off automatic summarization at the classful boundary

ISP(config-router)#exit

 

ISP(config)#exit

 

ISP#copy run start

Saves the configuration to NVRAM

  

CORP Router (1721 Router Running Cisco IOS Software Release 12.2(4)

These commands work also for the 1760 and the 2620/2621 series routers

Router>en

 

Router#config t

 

Router(config)#hostname CORP

Sets host name

CORP(config)#no ip domain-lookup

Turns off resolution to avoid wait time due to DNS lookup of spelling errors

CORP(config)#line con 0

 

CORP(config-line)#logging synchronous

Appends the command line to a new lineno interruption from info items

CORP(config-line)#exec-timeout 0 0

Console session will never time out

CORP(config-line)#exit

 

CORP(config)#enable secret cisco

Sets the secret password to cisco

CORP(config)#int s1

 

CORP(config-if)#desc WAN link to ISP Router

 

CORP(config-if)#ip add 200.200.200.14 255.255.255.252

 

CORP(config-if)#bandwidth 1544

Sets bandwith to 1544 kilobits for EIGRP calculation

CORP(config-if)#no shut

 

CORP(config-if)#exit

 

CORP(config)#int fa0

 

CORP(config-if)#full duplex

 

CORP(config-if)#no shut

 

CORP(config-if)#int fa0.1

Creates a subinterface

CORP(config-if)#no ip address

Ensures there is no IP address assigned to the interface

CORP(config-subif)#desc Management VLAN 1

Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 1 native

Enables Dot1Q encapsulation with VLAN 1 as the native VLAN

CORP(config-subif)#ip add 192.168.1.1 255.255.255.0

Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.10

Creates a subinterface

CORP(config-subif)#desc Sales VLAN 10

Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 10

Enables Dot1Q encapsulation on VLAN 10

CORP(config-subif)#ip add 192.168.10.1 255.255.255.0

Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.20

Creates a subinterface

CORP(config-subif)#desc Engineering VLAN 20

Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 20

Enables Dot1Q encapsulation on VLAN 20

CORP(config-subif)#ip add 192.168.20.1 255.255.255.0

Assigns an IP address to the subinterface

CORP(config-subif)#int fa0.30

Creates a subinterface

CORP(config-subif)#desc Marketing VLAN 30

Assigns a description to the subinterface

CORP(config-subif)#encapsulation dot1q 30

Enables Dot1Q encapsulation on VLAN 30

CORP(config-subif)#ip add 192.168.1.1 255.255.255.0

Assigns an IP address to the subinterface

CORP(config-subif)#exit

 

CORP(config)#router eigrp 10

Turns on the EIGRP routing process

CORP(config-router)#network 192.168.1.0

Advertises the 192.168.1.0 network

CORP(config-router)#network 192.168.10.0

Advertises the 192.168.10.0 network

CORP(config-router)#network 192.168.20.0

Advertises the 192.168.20.0 network

CORP(config-router)#network 192.168.30.0

Advertises the 192.168.30.0 network

CORP(config-router)#network 200.200.200.0

Advertises the 200.200.200.0 network

CORP(config-router)#no auto-summary

Turns off auto summari-zation

CORP(config-router)#exit

 

CORP(config)#exit

 

CORP#copy run start

Saves the configuration to NVRAM

 

Caution: Remember to advertise all networks. Advertising 192.168.0.0 does not advertise networks from 192.168.0.0192.168.255.0. These are separate classful networks, so they must be advertised separately, just like 200.200.200.0 is advertised separately.


2900 Series Switch

switch>en

 

switch>#config t

 

switch(config)#hostname 2900Switch

Sets host name

2900Switch(config)#no ip domain-lookup

Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

2900Switch(config)#line con 0

 

2900Switch(config-line)#logging synchronous

Appends the command line to a new lineno interruption from info items

2900Switch(config-line)#exec-timeout 0 0

Console session will never time out

2900Switch(config)#exit

 

2900Switch(config)#enable secret cisco

Sets the secret password to cisco

2900Switch(config)#exit

 

2900Switch#vlan database

Enters VLAN database mode

2900Switch(vlan)#vlan 10 name Sales

Creates VLAN 10 with the name Sales

2900Switch(vlan)#vlan 20 name Engineering

Creates VLAN 20 with the name Engineering

2900Switch(vlan)#vlan 30 name Marketing

Creates VLAN 30 with the name Marketing

2900Switch(vlan)#vtp server

Makes the switch a VTP server

2900Switch(vlan)#vtp domain academy

Assigns a domain name of academy

2900Switch(vlan)#exit

Applies all changes to VLAN database and exits mode

2900Switch#config t

 

2900Switch(config)#int vlan1

 

2900Switch(config-if)#ip add 192.168.1.2 255.255.255.0

 

2900Switch(config-if)#no shutdown

 

2900Switch(config-if)#exit

 

2900Switch(config)#ip default-gateway 192.168.1.1

 

2900Switch(config)#int fa 0/1

 

2900Switch(config-if)#desc Trunk Link to CORP Router

 

2900Switch(config-if)#switchport mode trunk

Creates a trunk link

2900Switch(config-if)#switchport trunk encapsulation dot1q

Sets encapsulation to Dot1Q

2900Switch(config-if)#int fa 0/2

 

2900Switch(config-if)#switchport access vlan 10

Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in Spanning Tree Protocol (STP)

 

Note: The command switchport mode access is not needed, because this is the default mode for interfaces. Use it only if the port was previously set to be a trunk link.

2900Switch(config-if)#int fa0/3

 

2900Switch(config-if)#switchport access vlan 10

Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/4

 

2900Switch(config-if)#switchport access vlan 10

Assigns a port to VLAN 10

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/5

 

2900Switch(config-if)#switchport access vlan 20

Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/6

 

2900Switch(config-if)#switchport access vlan 20

Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/7

 

2900Switch(config-if)#switchport access vlan 20

Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/8

 

2900Switch(config-if)#switchport access vlan 20

Assigns a port to VLAN 20

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/9

 

2900Switch(config-if)#switchport access vlan 30

Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/10

 

2900Switch(config-if)#switchport access vlan 30

Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/11

 

2900Switch(config-if)#switchport access vlan 30

Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#int fa0/12

 

2900Switch(config-if)#switchport access vlan 30

Assigns a port to VLAN 30

2900Switch(config-if)#spanning-tree portfast

Transitions the port directly to the Forwarding state in STP

2900Switch(config-if)#

 

2900Switch#copy run start

Saves the configuration to NVRAM

2900Switch#

 


2950 Series Switch

switch>en

 

switch>#config t

 

switch(config)#hostname 2950Switch

Sets the host name

2950Switch(config)#no ip domain-lookup

Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

2950Switch(config)#line con 0

 

2950Switch(config-line)#logging synchronous

Appends the command line to a new lineno interruption from info items

2950Switch(config-line)#exec-timeout 0 0

Console session will never time out

2950Switch(config-line)#exit

 

2950Switch(config)#enable secret cisco

Sets the secret password to cisco

2950Switch(config)#vlan 10

Creates VLAN 10

2950Switch(config-vlan)#name Sales

Defines the name of Sales

2950Switch(config-vlan)#vlan 20

Creates VLAN 20

2950Switch(config-vlan)#name Engineering

Defines the name of Engineering

2950Switch(config-vlan)#vlan 30

Creates VLAN 30

2950Switch(config-vlan)#name Marketing

Defines the name of Marketing

2950Switch(config-vlan)#exit

 

2950Switch(config)#vtp mode server

Makes the switch a VTP server

2950Switch(config)#vtp domain academy

Assigns a domain name of academy

2950Switch(config)#int vlan1

Creates the virtual VLAN 1 interface

2950Switch(config-if)#ip add 192.168.1.2 255.255.255.0

Assigns an IP address to the interface

2950Switch(config-if)#no shutdown

 

2950Switch(config-if)#exit

 

2950Switch(config)#ip default-gateway 192.168.1.1

Assigns the IP address of the default gateway

2950Switch(config)#int fa 0/1

 

2950Switch(config-if)#desc Trunk Link to CORP Router

 

2950Switch(config-if)#switchport mode trunk

Creates a trunk link

2950Switch(config-if)#int range fa 0/2 4

 

2950Switch(config-if-range)#switchport access vlan 10

Assigns ports to VLAN 10

2950Switch(config-if-range)#spanning-tree portfast

Transitions ports directly to the Forwarding state in STP

 

Note: The command switchport mode access is not needed, because this is the default mode for interfaces. Use it only if the port was previously set to be a trunk link.

2950Switch(config-if-range)#int range fa0/5 8

 

2950Switch(config-if-range)#switchport access vlan 20

Assigns ports to VLAN 20

2950Switch(config-if-range)#spanning-tree portfast

Transitions port directly to the Forwarding state in STP

2950Switch(config-if-range)#int range fa0/9 - 12

 

2950Switch(config-if-range)#switchport access vlan 30

Assigns ports to VLAN 10

2950Switch(config-if-range)#spanning-tree portfast

Transitions ports directly to the Forwarding state in STP

2950Switch(config-if-range)#

 

2950Switch#copy run start

Saves the configuration to NVRAM





CCNA Self-Study(c) CCNA Portable Command Guide
CCNA Portable Command Guide
ISBN: 1587201585
EAN: 2147483647
Year: 2006
Pages: 261
Authors: Scott Empson

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net