Difference between revisions of "CCNP SWITCH/Implementing Inter-VLAN Routing"

From Teknologisk videncenter
Jump to: navigation, search
m (Inter-VLAN Routing Using SWI)
m (Routing with Routed Ports)
Line 117: Line 117:
 
Switch(config-if)#<input>no shutdown</input>
 
Switch(config-if)#<input>no shutdown</input>
 
</source>
 
</source>
 +
==Configure Layer 3 EtherChannel==
 +
It is important to match the EtherChannel configuration on both sides on the switches, and the IP addresses on the Portchannel Interfaces should be on the same sub-nets/VLAN to communicate.
 +
<source lang=cli>
 +
switch(config)#<input> interface fastethernet 0/23</input>
 +
switch(config-if)# <input>no switchport</input>
 +
switch(config-if)#<input> channel-group 1 mode on</input>
 +
switch(config)# <input>interface fastethernet 0/24</input>
 +
switch(config-if)# <input>no switchport</input>
 +
switch(config-if)# <input>channel-group 1 mode on</input>
 +
switch(config)# <input>interface port-channel 1</input>
 +
switch(config-if)# <input>no switchport</input>
 +
switch(config-if)# <input>ip address 10.1.20.1 255.255.255.0</input>
 +
</source>
 +
==Multilayer Switch Routing Protocol configuration==
 +
<source lang=cli>
 +
Switch(config)#<input> ip routing</input>
 +
Switch(config)# <input>router eigrp 100</input>
 +
Switch(config-router)#<input> no auto-summary</input>
 +
Switch(config-router)# <input>network 10.0.0.0</input>
 +
Switch(config-router)# <input>passive-interface default</input>
 +
Switch(config-router)# <input>no passive-interface fa0/24</input>
 +
Switch(config)#<input> interface f0/24</input>
 +
Switch(config-if)# <input>description Uplink</input>
 +
Switch(config-if)# <input>ip summary-address eigrp 100 10.1.0.0 255.255.240.0</input>
 +
</source>
 +
=Implementing Dunamic Host Configuration Protocol in a Multilayer Switched Environment==
 +
As defined in RFC 2131, Dynamic Host Configuration Protocol (DHCP) provides configuration parameters to Internet hosts.

Revision as of 11:35, 29 August 2011

Inter-VLAN Routing

Because VLANs isolate trafficto a defined broadcast domain and subnet, network devices in different VLANs cannot communicate with each other natively.

Isolated VLANs
Inter-VLAN Routing

Adding an external routing with subinterface routing does not scale beyond 50 VLANs. Cisco IOS routers only support trunking in IP Plus Feature set and above.

Catalyst Multilayer Switches support 3 different routed interface types:

Routed Port
A pure Layer 3 interface similar to a routed port on a Cisco IOS router.
Switched Virtual Interface (SVI)
A virtual VLAN interface for inter-VLAN routing. In other words, SVIs are the virtual routed VLAN interfaces.
Bridged Virtual Interfaces (BVI)
A Layer 3 virtual bridging interface.

All Cisco Layer 3 Switches support routing protocols, but several models requires enhanced software for specific routing protocol features.

To change between routed and switchports use no switchport and switchport interface commands respectively. Catalyst 6500 switches use L3 interfaces by default, so depending on the switching model the swithport and no switchport command might be present in the running-config files.

Inter-VLAN Routing Support
Switch Type Inter-VLAN Routing Capability Inter-VLAN Routing Solution
Catalyst 2940/2950/2955/2960/2970 No N/A
Catalyst 3560/3750/3760 Yes Integrated
Catalyst 4000/4500/4948 Yes Catalyst 4000 running Cisco CatOS with Supervisor I or II, using the Layer 3 module, WS-X4232-L3 Catalyst 4000 with a Supervisor II+, III, IV, or V running Cisco IOS using integrated routing
Catalyst 6500 Yes Catalyst 6500 with an MSFC, MSFC II, or MSFC III daughter card running Cisco CatOS on the supervisors and Cisco IOS on the MSFC Catalyst 6500 with MSFC, MSFC II, or MSFC III running Cisco Native IOS Catalyst 6500 using a legacy MSM module

Router-on-a-Stick

Inter-VLAN subinterface Routing forwarding path

Router-on-a-Stick Advantages and Disanvantages

  • Works on any L2 switch that support Trunking.
  • Simpel Implementation. Only one swithc port and one router interface require configuration.
  • The Router provides Inter-VLAN Routing i a Layer 2 network.
  • The Router is a single point of failure.
  • Trunk link may be congested when multible VLANs use it.
  • Latency might be higher as frames leave and re-enter the switch chassis multiple times and the router makes software-based routing decisions.
Router(config)# interface FastEthernet0/0
Router(config-if)#no shutdown
Router(config-if)#no ip address
Router(config)# interface FastEthernet 0/0.1
Router(config-subif)# description VLAN 1
Router(config-subif)# encapsulation dot1Q 1 native
Router(config-subif)# ip address 10.1.1.1 255.255.255.0
Router(config-subif)# exit
Router(config)# interface FastEthernet 0/0.2
Router(config-subif)# description VLAN 2
Router(config-subif)# encapsulation dot1Q 2
Router(config-subif)# ip address 10.2.2.1 255.255.255.0
Router(config-subif)# exit
Router(config)# end
!! Switch Configuration  **************************
switch(config)# interface FastEthernet 0/24
switch(config-if)# switchport trunk encapsulation dot1q
switch(config-if)# switchport mode trunk
switch(config-if)# end

Inter-VLAN Routing Using SWI

A long time ago high performance network consisted of L2 Switches. Routers routed i software and performed slow whereas switches switched in hardware.

Routed vs switches Campus Architecture

As networks evolved routing became faster and got implemented in ASICs. Routing in hardware performs at wire-speed in most L3 Switches.

SVI Example

The number of Switch Virtual Interfaces a Layer 3 Switch support is not the same at the number of VLAN supported.

SVI is use to:

  • Provide gateways for VLAN Clients
  • Provide Layer 3 IP connectivity to the switch
  • Support Routing Protocols

SVI: Advantages and Disadvantages:

  • It is much faster than router-on-a-stick because everything is hardware switched and routed.
  • No need for external links from the switch to the router for routing.
  • Not limited to one link. Layer 2 EtherChannels can be used between the switches to get more bandwidth.
  • Latency is much lower because it doesn’t need to leave the switch.
  • It needs a Layer 3 switch to perform Inter-VLAN routing, which is more expensive.

Configure SVI inter-VLAN Routing

Switch# <input>configure terminal</input>
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)# <input>ip routing</input>
Switch(config)# <input>interface vlan 10</input>
Switch(config-if)# <input>ip address 10.10.1.1 255.0.0.0</input>
Switch(config-if)# <input>no shutdown</input>
Switch(config-if)# <input>exit</input>
Switch(config)# <input>interface vlan20</input>
Switch(config-if)# <input>ip address 10.20.1.1 255.255.255.0</input>
Switch(config-if)# <input>no shutdown</input>

SVI Autostate

SVi interfaces are consideres up if:

  • The VLAN exists and is active in the VLAN database on the switch.
  • The VLAN interface exists and is not administratively down.
  • At least one Layer 2 (access or trunk) port exists on the switch, has a link in the up state on this VLAN, and is in the spanning-tree forwarding state on the VLAN.

Disable autostate

Switch(config)# <input>interface gigabitEthernet0/1</input>
Switch(config-if)# <input>switchport autostate exclude</input>

Routing with Routed Ports

Routed interfaces don’t support subinterfaces as with Cisco IOS routers. But it is possible to configure a routed EtherChannel. Routed ports removes Layer 2 protocols such as STP and VTP.

Configuring a routed port

Switch(config)#<input>interface fastethernet 0/1</input>
Switch(config-if)#<input>no switchport</input>
Switch(config-if)#<input>ip address 192.168.1.1 255.255.255.0</input>
Switch(config-if)#<input>no shutdown</input>

Configure Layer 3 EtherChannel

It is important to match the EtherChannel configuration on both sides on the switches, and the IP addresses on the Portchannel Interfaces should be on the same sub-nets/VLAN to communicate.

switch(config)#<input> interface fastethernet 0/23</input>
switch(config-if)# <input>no switchport</input>
switch(config-if)#<input> channel-group 1 mode on</input>
switch(config)# <input>interface fastethernet 0/24</input>
switch(config-if)# <input>no switchport</input>
switch(config-if)# <input>channel-group 1 mode on</input>
switch(config)# <input>interface port-channel 1</input>
switch(config-if)# <input>no switchport</input>
switch(config-if)# <input>ip address 10.1.20.1 255.255.255.0</input>

Multilayer Switch Routing Protocol configuration

Switch(config)#<input> ip routing</input>
Switch(config)# <input>router eigrp 100</input>
Switch(config-router)#<input> no auto-summary</input>
Switch(config-router)# <input>network 10.0.0.0</input>
Switch(config-router)# <input>passive-interface default</input>
Switch(config-router)# <input>no passive-interface fa0/24</input>
Switch(config)#<input> interface f0/24</input>
Switch(config-if)# <input>description Uplink</input>
Switch(config-if)# <input>ip summary-address eigrp 100 10.1.0.0 255.255.240.0</input>

Implementing Dunamic Host Configuration Protocol in a Multilayer Switched Environment=

As defined in RFC 2131, Dynamic Host Configuration Protocol (DHCP) provides configuration parameters to Internet hosts.