RSE-CH5g - wmmhicks.com

advertisement
Chapter 5
5.1 Inter-VLAN Routing Configuration
5.2 Troubleshooting Inter-VLAN Routing
5.3 Layer 3 Switching
5.4 Summary
Chapter 5: Objectives





Describe the three primary options for enabling inter-VLAN routing.
Configure legacy inter-VLAN routing.
Configure router-on-a-stick inter-VLAN routing.
Troubleshoot common inter-VLAN configuration issues.
Troubleshoot common IP addressing issues in an inter-VLAN-routed
environment.
 Configure inter-VLAN routing using Layer 3 switching.
 Troubleshoot inter-VLAN routing in a Layer 3-switched environment.
Internetwork Communications
C:>ping 172.16.30.100
172.16.10.100/24
172.16.20.100/24
172.16.30.100/24
 Can two hosts on different subnets communicate without a router?
 No
 What would happen if a host tried to ping another host?
 They could not communicate.
 Would it send an ARP Request? Why or why not?
 The host would not send an ARP Request because there is no
default-gateway.
3
Internetwork Communications
 Then Destination MAC Address is that of the same device as the Destination IP Address.
 Check ARP cache for entry of Destination IP Address and its MAC Address.
 If no entry, ARP Request Destination IP Address asking for MAC Address.
 Then Destination MAC Address will be that of the Default Gateway.
 Check ARP cache for entry of Default Gateway’s IP Address and its MAC Address.
 If no entry, ARP Request Default Gateway’s IP Address asking for MAC Address.
4
What is Inter-VLAN routing?
 Layer 2 switches cannot forward traffic between VLANs without
the assistance of a router.
 Inter-VLAN routing is a process for forwarding network traffic from
one VLAN to another, using a router.
 Legacy Inter-VLAN
Routing
 Router-on-Stick
 Switch SVI
 Switch Routed Ports
Legacy Inter-VLAN Routing
6
Legacy Inter-VLAN Routing
 Routers used to route between VLANs.
 Each VLAN was connected to a different physical router interface.
 Packets would arrive on the router through one through interface, be routed
and leave through another.
 Router interfaces connected to VLANs and have IP addresses from that
specific VLAN.
 Large networks with large number of VLANs required many router
interfaces.
7
192.168.20.1
255.255.255.0
Legacy Inter-VLAN Routing
192.168.10.1
255.255.255.0
A
192.168.10.10
255.255.255.0
GW 192.168.10.1
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
 Router is required to connect (route) between subnets/VLANs
S1(config)# vlan 10
S1(config-vlan)# vlan 30
S1(config-vlan)# exit
S1(config)# interface f0/11
S1(config-if)# switchport access vlan 10
S1(config-if)# exit
S1(config)# interface f0/4
S1(config-if)# switchport access vlan 10
S1(config-if)# exit
S1(config)# interface f0/6
S1(config)# switchport access vlan 30
S1(config-if)# exit
S1(config)# interface f0/5
S1(config-if)# switchport access vlan 30
R1(config)# interface g0/0
R1(config-if)# ip address 172.17.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config)# exit
R1(config-if)# interface g0/1
R1(config-if)# ip address 172.17.30.1 255.255.255.0
R1(config-if)# no shutdown
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
<output omitted>
C
L
C
L
172.17.0.0/16 is variably subnetted, 4 subnets, 2 masks
172.17.10.0/24 is directly connected, GigabitEthernet0/0
172.17.10.1/32 is directly connected, GigabitEthernet0/0
172.17.30.0/24 is directly connected, GigabitEthernet0/1
172.17.30.1/32 is directly connected, GigabitEthernet0/1
Router-on-a-Stick
12
Router-on-a-Stick
 The router-on-a-stick approach uses a different path to route between VLANs.
 One of the router’s physical interfaces is configured as a 802.1Q trunk port so it
can understand VLAN tags.
 Logical subinterfaces are created; one subinterface per VLAN.
 Each subinterface is configured with an IP address from the VLAN it represents.
 VLAN members (hosts) are configured to use the subinterface address as a
default gateway.
13
 Only one of the router’s physical interface is used.
S1(config)# vlan 10
S1(config-vlan)# vlan 30
S1(config-vlan)# exit
S1(config)# interface f0/11
S1(config-if)# switchport access vlan 10
S1(config-if)# exit
S1(config)# interface f0/6
S1(config)# switchport access vlan 30
S1(config-if)# exit
S1(config-vlan)# interface f0/5
S1(config-if)# switchport mode trunk
S1(config-if)#
14
R1(config)# interface g0/0.10
R1(config-subif)# encapsulation dot1q 10
R1(config-subif)# ip address 172.17.10.1 255.255.255.0
R1(config-subif)# exit
R1(config)# interface g0/0.30
R1(config-subif)# encapsulation dot1q 30
R1(config-subif)# ip address 172.17.30.1 255.255.255.0
R1(config-subif)# exit
R1(config)# interface g0/0
R1(config-if)# no shutdown
15
R1# show vlans
<output omitted>
Virtual LAN ID: 10 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface:
GigabitEthernet0/0.10
Protocols Configured:
Address:
IP
172.17.10.1
<output omitted>
Virtual LAN ID: 30 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface:
Protocols Configured:
IP
<output omitted>
Received:
11
Transmitted:
18
Received:
11
Transmitted:
8
GigabitEthernet0/0.30
Address:
172.17.30.1
16
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B –
BGP
<output omitted>
C
L
C
L
172.17.0.0/16 is variably subnetted, 4 subnets, 2 masks
172.17.10.0/24 is directly connected, GigabitEthernet0/0.10
172.17.10.1/32 is directly connected, GigabitEthernet0/0.10
172.17.30.0/24 is directly connected, GigabitEthernet0/0.30
172.17.30.1/32 is directly connected, GigabitEthernet0/0.30
17
Verify Switch Configuration
18
Verify Switch Configuration
19
Problem #1
VLAN 10
S1(config)# interface fa0/4
S1(config-if)# switchport access vlan 10
20
Problem #2
Trunk
S1(config)# interface fa0/5
S1(config-if)# switchport mode trunk
21
Problem #3
Trunk
VLAN 10
S1(config)# interface fa0/5
S1(config-if)# switchport mode trunk
22
Verify Router Configuration
23
Problem #4
172.17.10.1/24
R1(config)# interface g0/0
R1(config-if)# ip address 172.17.10.1 255.255.255.0
24
Problem #5
172.17.10.21/24
25
Problem #6
172.17.10.21/24
26
Verifying IP Addressing
27
Multi-layer Switches and Inter-VLAN Routing
28
Routers vs Multilayer Switches
 Routers and multilayer switches both perform routing (connecting
networks)
 Routers may have different types of interfaces (Ethernet, serial,
ATM, etc.) while multilayer switches will only have Ethernet
interfaces.
 While routers can be used to segment LAN devices, their major use
is as WAN devices.
 Each devices does have its own advantages.
 Routers are:
 The backbone devices of large intranets and of the Internet
 They operate at Layer 3 (network layer) of the OSI model
 They make decisions based on network addresses (IPv4, IPv6).
29
Switched Network Design
 Core –
Route/Switch
packets quickly
across between
distribution
multilayer
switches.
 Distribution –
Route between
VLANs/Subnets,
ACLs
 Access –
Provide access
to end devices
and provide port
security.
30
Multilayer
Switch InterVLAN Routing
 Multilayer switches can perform Layer 2 and Layer 3 functions, replacing the need
for dedicated routers.
 Multilayer switches support dynamic routing and inter-VLAN routing.
 A switch virtual interface (SVI) exists for VLAN 1 by default.
 On a multilayer switch, a logical (layer 3) interface can be configured for any
VLAN.
 With a multilayer switch, traffic is routed internal to the switch device.
31
 This routing process is a suitable and scalable solution.
Configure Router On A Stick: 802.1Q Trunk Link
172.16.10.100/
24
172.16.20.100/
24
interface GigabitEthernet 1/1
switchport mode trunk
 Router on a stick is very
simple to implement.
interface GigabitEthernet 0/0
no shutdown ! Does not show in config
!
interface GigabitEthernet 0/0.2
description VLAN 2
encapsulation dot1Q 2 native
ip address 172.16.1.2 255.255.255.0
!
interface GigabitEthernet 0/0.10
description VLAN 10
encapsulation dot1Q 10
ip address 172.16.10.1 255.255.255.0
!
interface GigabitEthernet 0/0.20
description VLAN 20
encapsulation dot1Q 20
ip address 172.16.20.1 255.255.255.0
!
interface GigabitEthernet 0/0.30
description VLAN 30
encapsulation dot1Q 30
ip address 172.16.30.1 255.255.255.0
!
interface GigabitEthernet 0/0.40
description VLAN 40
encapsulation dot1Q 40
ip address 172.16.40.1 255.255.255.0
32
Routed Ports versus Switched Virtual Interfaces
 Routed Ports – Just like a router, the port has an IP address/mask that
makes it a member of that subnet.
 SVI – The switch is a member of that IP subnet/VLAN. All switch ports 33
that are a member of that VLAN can communicate with the switch
Multilayer Switch Interfaces
Layer 2: Access or Trunk Ports
Logical Interface (SVI)
Physical Interface
 Performs both Layer 2 switching and interVLAN routing.
 Layer 2 Interface: Access or Trunk ports
 Layer 3 Interface:
 Has an IP address assigned to it.
 The Default Gateway for any hosts connected to that interface or VLAN.
 Physical interface
 Same as a router
 Aka “Routed Port”
 Example: interface gigabit 0/1
 Logical Interface
 Represents an entire VLAN
 Switched Virtual Interface (SVI)
 Example: interface vlan 10
34
SVI VLAN 10
192.168.10.1
255.255.255.0
A
192.168.10.10
255.255.255.0
GW 192.168.10.1




SVI VLAN 20
192.168.20.1
255.255.255.0
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
Layer 3 functionality can also be enabled for an entire VLAN.
The IP address is assigned to the logical interface – the VLAN.
This is needed when routing is required between VLANs.
SVI (Switched Virtual Interface)
 No physical connection
 VLANs must be created before the SVI can be used.
 The IP address associated of the VLAN interface is the default gateway of the
workstation.
35
SVI VLAN 10
192.168.10.1
255.255.255.0
A
192.168.10.10
255.255.255.0
GW 192.168.10.1
SVI VLAN 20
192.168.20.1
255.255.255.0
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
<VLANs have been created or will be created when configured on
the interface>
S1(config)# interface range fastethernet 0/1 - 12
S1(config-if-range)# switchport mode access
S1(config-if-range)# switchport access vlan 10
S1(config-if-range)# exit
S1(config)# interface range fastethernet 0/12 - 24
S1(config-if-range)# switchport mode access
S1(config-if-range)# switchport access vlan 20
S1(config-if-range)# end
36
SVI VLAN 10
192.168.10.1
255.255.255.0
A
192.168.10.10
255.255.255.0
GW 192.168.10.1
SVI VLAN 20
192.168.20.1
255.255.255.0
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
DLS1(config)# inter vlan 10
DLS1(config-if)# description Engineering VLAN
DLS1(config-if)# ip address 192.168.10.1 255.255.255.0
DLS1(config-if)# no shutdown
DLS1(config)# inter vlan 20
DLS1(config-if)# description IT VLAN
DLS1(config-if)# ip address 192.168.20.1 255.255.255.0
DLS1(config-if)# no shutdown
37
SVI VLAN 10
192.168.10.1
255.255.255.0
A
192.168.10.10
255.255.255.0
GW 192.168.10.1
SVI VLAN 20
192.168.20.1
255.255.255.0
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
Alternative Configuration
38
SVI VLAN 10
192.168.10.1
255.255.255.0
SVI VLAN 20
192.168.20.1
255.255.255.0
Distribution
Layer Switch
Trunk
Access
Layer Switch
A
192.168.10.10
255.255.255.0
GW 192.168.10.1
B
192.168.10.11
255.255.255.0
GW 192.168.10.1
C
192.168.20.12
255.255.255.0
GW 192.168.20.1
D
192.168.20.13
255.255.255.0
GW 192.168.20.1
DLS1(config)# inter gig 0/2
DLS1(config-if)# switchport mode trunk
ALS1(config)# inter fa 0/9
ALS1(config-if)# switchport mode trunk
39
Multilayer Switch Interfaces
Layer 2: Access or Trunk Ports
Logical Interface (SVI – L3)
Physical Interface (L3)
DLS1# show interface gig 0/2 switchport
Name: Gig0/2
Switchport: Enabled
<output omitted>
 Layer 2 or Layer 3 Interface? Is it a “switch” port?
 Default on most Catalyst switches: Layer 2
 Default on Catalyst 6500: Layer 3
 Verify mode:
 Switch# show interface type mod/num switchport
 Switchport: Think Layer 2
 Enabled: Layer 2
 Disabled: Layer 3
40
Multilayer Switch
Interfaces
Is it a “switch” port?
DLS1(config)# interface gig 0/2
DLS1(config-if)# no switchport Converts interface to Layer 3
DLS1(config-if)# end
DLS1# show interface gig 0/2 switchport
Name: Gig0/2
Switchport: Disabled
Layer 3
<output omitted>
DLS1# config t
DLS1(config)# interface gig 0/2
DLS1(config-if)# switchport
Converts interface to Layer 2
DLS1(config-if)# end
DLS1# show interface gig 0/2 switchport
Name: Gig0/2
Switchport: Enabled
Layer 2
<output omitted>
 If in Layer 3 mode switchport interface command puts the port into
Layer 2 mode.
41
SVI Interfaces
- Logical Interfaces
Switch(config)# vlan vlan-number
Switch(config-vlan)# name vlan-name
SwitchA(config)# interface vlan vlan-number
SwitchA(config-if)# ip address ip-address mask
SwitchA(config-if)# no shutdown




Layer 3 functionality can also be enabled for an entire VLAN.
The IP address is assigned to the logical interface – the VLAN.
This is needed when routing is required between VLANs.
SVI (Switched Virtual Interface)
 No physical connection
 VLANs must be created before the SVI can be used.
 The IP address associated of the VLAN interface is the default gateway of 42
the workstation.
Creating VLANs

DLS1: Create and name the user VLANs: 10,
11, 20 and 21.
 DLS1: Create and name a Management VLAN
(used to telnet into switches)
 DLS1: Create and name a NATIVE VLAN
other than VLAN 1 (default)
 DLS1: Create and name a Garbage VLAN
(assigned to all unused ports.)
 All ports that are not used (trunks and
access) will be assigned as an access
port to this VLAN.
DLS1
vlan 2
name NATIVE
vlan 10
name Engineering
vlan 11
name IT
vlan 20
name Sales
vlan 21
name Administration
vlan 99
name ManagementVLAN
vlan 222
name GarbageVLAN
43
Management VLAN (SVI)
 For each device in the network
we configured it to be a member
of the management VLAN.
On each switch
Switch(config)# inter vlan 99
Switch(config-if)# description Management VLAN
Switch(config-if)# ip address 172.16.99.x 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit
If you want to reach the management VLAN from other VLANs, assign
this address to one of the multilayer switches (DLS1 and DLS2):
DLS1(config)# ip default-gateway 172.16.99.1
44
Default Gateway (SVI)
 Configure DLS1 to be the default gateway
for VLANs 10 and 11.
 All hosts on these VLANs will use these
addresses as their default gateway
addresses.
DLS1(config)# inter vlan 99
DLS1(config-if)# description Management VLAN
DLS1(config-if)# ip address 172.16.99.1 255.255.255.0
DLS1(config-if)# no shutdown
DLS1(config)# inter vlan 10
DLS1(config-if)# description Engineering VLAN
DLS1(config-if)# ip address 172.16.10.1 255.255.255.0
DLS1(config-if)# no shutdown
DLS1(config)# inter vlan 11
DLS1(config-if)# description IT VLAN
DLS1(config-if)# ip address 172.16.11.1 255.255.255.0
DLS1(config-if)# no shutdown
45
Default Gateway (SVI)
 Configure DLS2 to be the
default gateway for VLANs 20
and 21.
 All hosts on these VLANs will
use these addresses as their
default gateway addresses.
DLS2(config)# inter vlan 20
DLS2(config-if)# description Sales VLAN
DLS2(config-if)# ip address 172.16.20.1 255.255.255.0
DLS2(config-if)# no shut
DLS2(config)# inter vlan 21
DLS2(config-if)# description Administration VLAN
DLS2(config-if)# ip address 172.16.21.1 255.255.255.0
DLS2(config-if)# no shut
46
Default Gateway (SVI)
172.16.10.10
255.255.255.0
Statically or Dynamically assigned
172.16.10.1
47
Layer 3 Port Configuration
– Physical Interfaces
DLS1(config)# interface gig 0/1
DLS1(config-if)# no switchport
DLS1(config-if)# ip address 192.168.1.1 255.255.255.252
DLS2(config)# interface gig 0/1
DLS2(config-if)# no switchport
DLS2(config-if)# ip address 192.168.1.2 255.255.255.252
 Physical switch ports can operate as Layer 3 interfaces using the
interface command:
Switch(config)# interface type mod/num
Switch(config-if)# no switchport
Switch(config-if)# ip address ip-address mask
48
Switched Network Design
 Core –
Route/Switch
packets quickly
across between
distribution
multilayer
switches.
 Distribution –
Route between
VLANs/Subnets,
ACLs
 Access –
Provide access
to end devices
and provide port
security.
L3 = Routed Ports, over IP, separate subnets
L2 = SVI, VLANs over Trunks OR individual VLANs
49
Verifying
 Verify IP addresses
DLS1#show ip inter brief
Interface
IP-Address
OK? Method Status
FastEthernet0/1
192.168.4.6
YES manual up
up
GigabitEthernet0/1
192.168.1.1
YES manual up
up
Vlan10
172.16.10.1
YES manual up
up
Vlan11
172.16.11.1
YES manual up
up
Protocol
50
InterVLAN Routing
External Router
No VLANs
VLAN 1
External Router
VLANs
Router on a stick
VLANs or No VLANs
VLAN 2
VLAN 3
VLANs 1, 2, 3
Trunk
VLAN 1
Multilayer Switch
VLAN 2
VLAN 3
Trunk
Multilayer Switch
51
SDM
52
Cisco Switch Database Manager (SDM)
 A Catalyst 2960 switch can function as a Layer 3 device and route
between VLANs and a limited number of static routes.
 The Cisco Switch Database Manager (SDM) provides multiple
templates for the 2960 switch.
 The templates can be enabled to support specific roles depending
on how the switch is used in the network.
 For example, the sdm lanbase-routing template can be enabled to
allow the switch to route between VLANs and to support static
routing.
53
Switch Database Manager Template
 show sdm prefer command applies
the default template
 Default does not support static
routing.
 If IPv6 addressing has been enabled,
the template will be dual-ipv4-andipv6 default.
S1# show sdm prefer
The current template is "default" template.
The selected template optimizes the resources in
the switch to support this level of features for
0 routed interfaces and 255 VLANs.
number
number
number
number
of
of
of
of
unicast mac addresses:
IPv4 IGMP groups:
IPv4/MAC qos aces:
IPv4/MAC security aces:
8K
0.25K
0.125k
0.375k
SDM Template
 sdm prefer to change the template
 Switch must be reloaded for the new
template to take effect.
S1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)# sdm prefer ?
default
Default bias
dual-ipv4-and-ipv6 Support both IPv4 and IPv6
lanbase-routing
Supports both IPv4 and IPv6 Static Routing
qos
QoS bias
S1(config)# sdm prefer lanbase-routing
Changes to the running SDM preferences have been stored, but cannot take effect
until the next reload.
Use 'show sdm prefer' to see what SDM preference is currently active.
Switch(config)# do reload
System configuration has been modified. Save? [yes/no]: yes
Building configuration...
[OK]
Proceed with reload? [confirm]
*Mar 20 00:10:24.557: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload
command.
2960 Static Route Support
 lanbase-routing template is active on S1.
 With this template, static routing is supported
for up to 750 static routes.
Switch# show sdm prefer
The current template is "lanbase-routing" template.
The selected template optimizes the resources in
the switch to support this level of features for
0 routed interfaces and 255 VLANs.
number of unicast mac addresses:
number of IPv4 IGMP groups + multicast routes:
number of IPv4 unicast routes:
number of directly-connected IPv4 hosts:
number of indirect IPv4 routes:
number of IPv6 multicast groups:
number of directly-connected IPv6 addresses:
number of indirect IPv6 unicast routes:
number of IPv4 policy based routing aces:
number of IPv4/MAC qos aces:
number of IPv4/MAC security aces:
number of IPv6 policy based routing aces:
number of IPv6 qos aces:
number of IPv6 security aces:
4K
0.25K
0.75K
0.75K
16
0.375k
0.75K
16
0
0.125k
0.375k
0
0.375k
127
Enabling IPv4 Routing
Functionality on a 2960
 Interface F0/6 on S1 is assigned
to VLAN 2.
 The SVIs for VLANs 1 and 2 are
also configured with IP
addresses 192.168.1.1/24 and
192.168.2.1/24, respectively.
 IP routing is enabled with the ip
routing global configuration
mode command.
S1(config)# interface f0/6
S1(config-if)# switchport access vlan 2
S1(config-if)# interface vlan 1
S1(config-if)# ip address 192.168.1.1 255.255.255.0
S1(config-if)# interface vlan 2
S1(config-if)# ip address 192.168.2.1 255.255.255.0
S1(config-if)# no shutdown
Mar 20 01:00:25.021: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up
S1(config)# ip routing
S1(config)# do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
C
L
C
L
192.168.1.0/24 is
192.168.1.0/24
192.168.1.1/32
192.168.2.0/24 is
192.168.2.0/24
192.168.2.1/32
variably subnetted, 2 subnets, 2 masks
is directly connected, Vlan1
is directly connected, Vlan1
variably subnetted, 2 subnets, 2 masks
is directly connected, Vlan2
is directly connected, Vlan2
Router Participating in
Routing with a Switch
 R1 has two IPv4 networks configured:
 Interface G0/1 has IP address 192.168.1.10/24
 loopback interface Lo0 has IP address
209.165.200.225/27
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
C
L
C
L
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
192.168.1.0/24 is directly connected, GigabitEthernet0/1
192.168.1.10/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
209.165.200.224/27 is directly connected, Loopback0
209.165.200.225/32 is directly connected, Loopback0
Configuring a Static Route on a 2960
 A default route is configured on S1
S1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.10
S1(config)# do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 192.168.1.10 to network 0.0.0.0
S*
C
L
C
L
0.0.0.0/0 [1/0] via 192.168.1.10
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
192.168.1.0/24 is directly connected, Vlan1
192.168.1.1/32 is directly connected, Vlan1
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
192.168.2.0/24 is directly connected, Vlan2
192.168.2.1/32 is directly connected, Vlan2
Final Routing Table on Router
 A static route to the remote network 192.168.2.0/24
(VLAN 2) is configured on R1
R1(config)# ip route 192.168.2.0 255.255.255.0 g0/1
R1(config)# do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
C
L
S
C
L
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
192.168.1.0/24 is directly connected, GigabitEthernet0/1
192.168.1.10/32 is directly connected, GigabitEthernet0/1
192.168.2.0/24 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
209.165.200.224/27 is directly connected, Loopback0
209.165.200.225/32 is directly connected, Loopback0
Host Connectivity
209.165.200.225/27
192.168.2.2/24
VLAN 2
192.168.1.2/24
VLAN 1
 PC-A is configured with IP address 192.168.2.2/24
in VLAN 2
 PC-B is configured with IP address 192.168.1.2/24
in VLAN 1.
 PC-B is able to ping both PC-B and the loopback
interface on R1.
Download