IE-R&S CoD Notes (Lesson 3550-7): Layer 3 Interfaces
7. Layer 3 Interface: In addition to Layer 2 (L2) interfaces (switchports), Cisco Catalyst also supports Layer 3 (L3) interfaces to route IP traffic.
7.1. Layer 3 interfaces come in two flavors:
7.1.1. Layer 3 routed interfaces
7.1.2. SVI (Switch Virtual Interfaces)
7.2. To disable “default” L2 switching and enable L3 routing on the interface issue “no switchport” from the interface level.
7.3. Once the port/interface is configured for L3 traffic, IP addresses can be configured on that interface by issuing “ip address
!
SW1(config-if)#no switchport ?
access Set access mode characteristics of the interface
backup Set backup for the interface
block Disable forwarding of unknown uni/multi cast addresses
host Set port host
mode Set trunking mode of the interface
nonegotiate Device will not engage in negotiation protocol on this interface
port-security Security related command
priority Set appliance 802.1p priority
protected Configure an interface to be a protected port
trunk Set trunking characteristics of the interface
voice Voice appliance attributes
!
SW1(config-if)#do sh run interface fastethernet0/1
!
interface FastEthernet0/1
no switchport
no ip address
!
SW1(config-if)#ip address ?
A.B.C.D IP address
dhcp IP Address negotiated via DHCPSW1(config-if)#ip address 10.10.10.10 255.255.255.0 ?
secondary Make this IP address a secondary address
SW1(config-if)#ip address 10.10.10.10 255.255.255.0
SW1(config-if)#do sh run
!
interface FastEthernet0/1
no switchport
ip address 10.10.10.10 255.255.255.0
!
SW1(config-if)#
!
7.4. L3 routed interface has the same characteristics as Ethernet interfaces on a router.
7.5. To verify if an interface is in L3 mode issue the “show interface status” in privilege mode.
7.5.1. In the VLAN field of the output L3 is listed as “routed”.
!
SW1#sh interfaces statusPort Name Status Vlan Duplex Speed Type
Fa0/1 notconnect routed auto auto 10/100BaseTX
Fa0/2 notconnect 1 auto auto 10/100BaseTX
!
Output suppressed
!
7.6. SVI is used to route traffic between VLAN. For example lets say various hosts are connected two different VLAN (VLAN 1 and VLAN 2). Each VLAN is a separate broadcast domain, and traffic must be processed by a L3 device before each domain (subnet) can communicate with each other. In this case two SVI needs to be configured for each VLAN (interface VLAN 1 and interface VLAN 2).
7.7. Hosts of this VLAN will be configured with appropriate VLAN. SVI interface IP will be configured as the hosts default gateway.
7.8. When switch receives traffic from one VLAN destined for another VLAN, the packets are re-encapsulated with new L2 header and forwarded out to the appropriate L2 interface.
7.9. This setup is similar to legacy router on a stick configuration.
7.9.1. In router in a stick scenario, a trunk link attaches a router and a switch to carry multiple L3 VLAN traffic to the router. In the router each VLAN is configured with sub-interfaces to route L3 traffic. The router routes traffic between sub-interfaces and back down in the switch to the appropriate VLAN.
7.10. Creating/configuring SVI:
7.10.1. First verify the VLAN exists in the VLAN database by issuing “show vlan” in the privilege mode. *Note: In the VLAN does not exist it should be configured before configuring the SVI.
7.10.2. If the VLAN exist, then issue “interface VLAN
7.10.3. After the SVI interface is created, IP address can be configured for this interface.
7.10.4. To verify the SVI issue the “show interface status” or “show interface brief” command in the privilege mode.
!
SW1#sh vlan briefVLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
10 VLAN0010 active
SW1#
SW1#sh run interface vlan 10
^
% Invalid input detected at ‘^’ marker.SW1#
SW1#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#
SW1(config)#interface vlan ?
<1-4094> Vlan interface numberSW1(config)#interface vlan 10
SW1(config-if)#
00:33:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
SW1(config-if)#ip address 10.11.11.11 255.255.255.0
SW1(config-if)#^Z
SW1#
SW1#sh running-config interface vlan 10
Building configuration…Current configuration : 62 bytes
!
interface Vlan10
ip address 10.11.11.11 255.255.255.0
end
SW1#
SW1#sh ip int brief
Interface IP-Address OK? Method Status Protocol
Vlan1 unassigned YES NVRAM up up
Vlan10 10.11.11.11 YES manual up up
FastEthernet0/1 10.10.10.10 YES manual down down
!
Output suppressed
!
7.11. Although L3 interface is configured, IP routing will still need to be enabled. To enable IP routing issue “ip routing” from the global mode.
!
SW1#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#ip routing ?
protocol IP routing protocol
SW1(config)#ip routing
SW1(config)#
!

