Sie sind auf Seite 1von 14

Wide Area Network

Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Inter-VLAN Routing
Topology

172.17.60.0/30
172.17.50.0/30
R2

F0/10 F0/1 F0/10


F0/1

192.168.1.128/28 192.168.1.0/25 172.17.30.0/24 172.17.40.0/24

Addressing Table
Device Interface IPv4 Address Subnet Mask Default Gateway
R1 F0/0.10 192.168.1.129 255.255.255.240 N/A
F0/0.20 192.168.1.1 255.255.255.128 N/A
G0/0.99 172.17.99.1 255.255.255.0 N/A
S0/0/0 200.200.200.1 255.255.255.252 N/A
Lo0 209.165.200.225 255.255.255.224 N/A
R2 S0/0/0 200.200.200.2 255.255.255.252 N/A
S0/0/1 200.200.200.6 255.255.255.252 N/A
R3 G0/0.10 172.17.30.1 255.255.255.0 N/A
G0/0.20 172.17.40.1 255.255.255.0 N/A
G0/0.99 172.17.99.2 255.255.255.0 N/A
S0/0/1 200.200.200.5 255.255.255.252 N/A
S1 VLAN 99 172.17.99.10 255.255.255.0 172.17.99.1
S2 VLAN 99 172.17.99.11 255.255.255.0 172.17.99.2
PC0 NIC 192.168.1.142 255.255.255.240 192.168.1.129
PC1 NIC 192.168.1.126 255.255.255.128 192.168.1.1
PC2 NIC 172.17.30.24 255.255.255.0 172.17.30.1
PC3 NIC 172.17.40.25 255.255.255.0 172.17.40.1

1
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Objectives
Part 1: Configure the PCs

Part 2: Configure basic configuration on S1 and S2

Part 3: Verify the Default VLAN Configuration

Part 4: Configure VLANs

Part 5: Assign VLANs to Ports

Part 6: Configure Trunks

Part 7: Configure the Switch Management Interface

Part 8: Configure Router Interfaces

Part 9: Configure Subinterfaces

Part 10: Configure RIPv2

Part 11: Verify Configurations

Background
In this activity, you will first perform basic switch configurations. Then, you will implement basic
connectivity by configuring IP addressing on switches and PCs. When the IP addressing configuration is
complete, you will use various show commands to verify configurations and use the ping command to
verify basic connectivity between devices. You will also focus on creating and naming VLANs, and
assigning access ports to specific VLANs. Then you will be creating trunk ports, and assigning them to a
native VLAN other than the default. You will then configure VLANs and inter-VLAN routing. Finally,
you will enable trunking and verify connectivity between VLANs. Lastly, you will configure a default
route, RIP version 2, with appropriate network statements and passive interfaces, and verify full
connectivity.

2
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 1: Configure the PCs
Step 1: Configure all PCs with IP addresses based on the Addressing Table.

Part 2: Configure Basic Configuration on S1 and S2


Complete the following steps on S1 and S2.

Step 1: Configure S1 with a hostname.

a. Enter the correct command to configure the hostname as S1.


Switch>enable
Switch#conf t
Switch(config)#hostname S1
Step 2: Save the configuration file to NVRAM.

Which command do you issue to accomplish this step?


S1(config)# exit (or end)
S1# copy run start

Step 3: Repeat Steps 1 to 2 for S2.

Part 3: View the Default VLAN Configuration


Step 1: Display the current VLANs.
On S1, issue the command that displays all VLANs configured. By default, all interfaces are assigned
to VLAN 1.

Step 2: Verify connectivity between PCs on the same network.


Notice that each PC can ping the other PC that shares the same network.

• PC0 can ping PC1


• PC2 can ping PC3
Pings to PCs in other networks fail.

What benefit will configuring VLANs provide to the current configuration? The primary benefits of
using VLANs are as follows: security, cost reduction, higher performance, broadcast storm mitigation,
improved IT staff efficiency, and simpler project and application management.

3
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 4: Configure VLANs
Step 1: Create and name VLANs on S1.
Create the following VLANs. Names are case-sensitive:

• VLAN 10: Faculty/Staff


• VLAN 20: Students
• VLAN 99: Management&Native
S1#(config)# vlan 10
S1#(config-vlan)# name Faculty/Staff
S1#(config-vlan)# vlan 20
S1#(config-vlan)# name Students
S1#(config-vlan)# vlan 99
S1#(config-vlan)# name Management&Native

Step 2: Verify the VLAN configuration.


Which command will only display the VLAN name, status, and associated ports on a switch?
S1# show vlan brief

Step 3: Create the VLANs on S2.


Using the same commands from Step 1, create and name the same VLANs on S2.

Step 4: Verify the VLAN configuration.

Part 5: Assign VLANs to Ports


Step 1: Assign VLANs to the active ports on S1.
Configure the interfaces as access ports and assign the VLANs as follows:

• VLAN 10: FastEthernet 0/1 - 9


• VLAN 20: FastEthernet 0/10 - 19
S1(config)# interface range f0/1 - 9
S1(config-if)# switchport mode access
S1(config-if)# switchport access vlan 10
S1(config-if)# interface range f0/10 - 19
S1(config-if)# switchport mode access
S1(config-if)# switchport access vlan 20

Disable all the remaining unused ports.


S1(config-if)# interface range f0/20 - 24
S1(config-if)# shutdown

4
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Step 2: Assign VLANs to the active ports on S2.
S2 uses the same VLAN access port assignments as S1. Configure the interfaces as access ports and
assign the VLANs as follows:
• VLAN 10: FastEthernet 0/1 - 9
• VLAN 20: FastEthernet 0/10 - 19
S2(config)# interface range f0/1 - 9
S2(config-if)# switchport mode access
S2(config-if)# switchport access vlan 10
S2(config-if)# interface range f0/10 - 19
S2(config-if)# switchport mode access
S2(config-if)# switchport access vlan 20

Disable all the remaining unused ports.


S2(config-if)# interface range f0/20 - 24
S2(config-if)# shutdown

Step 3: Verify loss of connectivity.


Previously, PCs that shared the same network could ping each other successfully.
Try pinging between PC0 and PC1. Although the access ports are assigned to the appropriate VLANs,
were the pings successful? Why? No, the pings failed because the ports between the PC0 and PC1 are in
VLAN 10 and VLAN 20.

Part 6: Configure Trunks


Step 1: Configure trunking on S1 and use VLAN 99 as the native VLAN.
a. Configure G0/1 interface on S1 for trunking.
S1(config)# interface range g0/1
S1(config-if)# switchport mode trunk
b. Disable G0/2 interface on S1
S1(config)#interface g0/2
S1(config-if)#shutdown

c. Configure VLAN 99 as the native VLAN for G0/1 on S1.


S1(config-if)# switchport trunk native vlan 99

The trunk port takes about a minute to become active due to Spanning Tree. After the ports become
active, you will periodically receive the following syslog messages
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1
(99), with S2 GigabitEthernet0/1 (1).
You configured VLAN 99 as the native VLAN on S1. However, S2 are using VLAN 1 as the default
native VLAN as indicated by the syslog message.
Although you have a native VLAN mismatch, pings between PCs on the same VLAN are now
successful.

5
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Why? Pings are successful because trunking has been enabled on S1. Dynamic Trunking Protocol
(DTP) has automatically negotiated the other side of the trunk links. In this case, S2 have now
automatically configured the ports attached to S1 as trunking ports.

Step 2: Verify trunking is enabled on S2.


On S2, issue the show interface trunk command to confirm that DTP has successfully negotiated
trunking with S1 on S2. The output also displays information about the trunk interfaces on S2.
Which active VLANs are allowed to cross the trunk? 1, 10, 20 and 99.

Step 3: Correct the native VLAN mismatch on S2.


a. Configure VLAN 99 as the native VLAN for the appropriate interfaces on S2.

Part 7: Configure the Switch Management Interface


Configure S1 and S2 with an IP address.

Step 1: Configure S1 with an IP address.


Switches can be used as plug-and-play devices. This means that they do not need to be configured for
them to work. Switches forward information from one port to another based on MAC addresses. If
this is the case, why would we configure it with an IP address?
In order for you to connect remotely to a switch, you need to assign it an IP address. The default
configuration on the switch is to have the management of the switch controlled through VLAN 1.
Use the following commands to configure S1 with an IP address.
S1# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)# interface vlan 99
S1(config-if)# ip address 172.17.99.10 255.255.255.0
S1(config-if)# no shutdown
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up
S1(config-if)#
S1(config-if)# exit
S1(config)# ip default-gateway 172.17.99.1

Why do you enter the no shutdown command?


The no shutdown command administratively places the interface in an active state.
Step 2: Configure S2 with an IP address.
Use the information in the Addressing Table to configure S2 with an IP address.

Step 3: Verify the IP address configuration on S1 and S2.


Use the show ip interface brief command to display the IP address and status of all the switch ports
and interfaces. You can also use the show running-config command.

6
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 8: Configure Router Interfaces
Step 1: Configure the Serial 0/0/0 interface on R1.
a. Enter the following commands to address and activate the Serial 0/0/0 interface on R1:
R1(config)# int s0/0/0
R1(config-if)# ip address 172.17.50.1 255.255.255.252
R1(config-if)# no shutdown

Step 2: Configure the remaining interfaces on R1, R2 and R3.


a. Use the information in the Addressing Table to complete the interface configurations for R1, R2
and R3.

Part 9: Configure Subinterfaces


Step 1: Configure subinterfaces on R1 using the 802.1Q encapsulation.
a. Create the subinterface G0/0.10.
• Set the encapsulation type to 802.1Q and assign VLAN 10 to the subinterface.
• Refer to the Address Table and assign the correct IP address to the subinterface.
b. Repeat for the G0/0.20 and G0/0.99 subinterfaces.

R1(config)# int 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)# int g0/0.20
R1(config-subif)# encapsulation dot1Q 20
R1(config-subif)# ip address 172.17.20.1 255.255.255.0
R1(config-subif)# interface g0/0.99
R1(config-subif)# encapsulation dot1Q 99
R1(config-subif)# ip address 172.17.99.1 255.255.255.0

Step 2: Verify Configuration.


a. Use the show ip interface brief command to verify subinterface configuration. Both
subinterfaces are down. Subinterfaces are virtual interfaces that are associated with a physical
interface. Therefore, in order to enable subinterfaces, you must enable the physical interface that
they are associated with.
b. Enable the G0/0 interface. Verify that the subinterfaces are now active.
R1(config)# int g0/0
R1(config-subif)# no shutdown

Step 3: Configure subinterfaces on R2 and R3.


Follow Step 1 to configure subinterfaces on R2 and R3.

Step 4: Test Connectivity with Inter-VLAN Routing

From PC1, ping PC3. The pings should be successful.

7
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 10: Configure RIPv2
Step 1: Configure RIPv2 on R1.
a. Use the appropriate command to create a default route on R1 for all Internet traffic to exit the
network through S0/0/1.
R1(config)#ip route 0.0.0.0 0.0.0.0 lo0
b. Enter RIP protocol configuration mode.
R1(config)#router rip
c. Use version 2 of the RIP protocol and disable the summarization of networks.
R1(config-router)# version 2
R1(config-router)# no auto-summary
d. Configure RIP for the networks that connect to R1.
R1(config-router)#network 172.17.10.0
R1(config-router)#network 172.17.20.0
R1(config-router)#network 172.17.99.0
R1(config-router)#network 172.17.50.0
e. Configure the LAN port that contains no routers so that it does not send out any routing
information.
R1(config-router)# passive-interface gig 0/0
f. Advertise the default route configured in step 1a with other RIP routers.
R1(config-router)# default-information originate
g. Save the configuration.
R1# copy run start

Step 2: Configure RIPv2 on R2.


a. Enter RIP protocol configuration mode.
R2(config)#router rip
b. Use version 2 of the RIP protocol and disable the summarization of networks.
R2(config)#version 2
R2(config-router)#no auto-summary
c. Configure RIP for the networks directly connected to R2.
R2(config-router)#network 172.17.50.0
R2(config-router)#network 172.17.60.0
d. Save the configuration.

Step 3: Configure RIPv2 on R3


Repeat Step 2 on R3.
R3(config)#router rip
R3(config)#version 2
R3(config-router)#network 172.17.30.0
R3(config-router)#network 172.17.40.0
R3(config-router)#network 172.17.60.0
R3(config-router)#no auto-summary
R3(config-router)#passive-interface g0/0

8
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 11: Verify Configurations
Step 1: View routing tables of R1, R2, and R3.
a. Use the appropriate command to show the routing table of R1. RIP (R) now appears with
connected (C) and local (L) routes in the routing table. All networks have an entry. You also can
see a default route listed.
b. View the routing tables for R2 and R3. Notice that each router has a full listing of all the
192.17.x.0 networks and a default route.

R1#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 4 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 2, receive 2
Interface Send Recv Triggered RIP Key-chain
GigabitEthernet0/0.10 2 2
GigabitEthernet0/0.20 2 2
GigabitEthernet0/0.99 2 2
Serial0/0/0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
172.17.0.0
Passive Interface(s):
GigabitEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
172.17.50.2 120 00:00:03
Distance: (default is 120)

9
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________

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, E - EGP
i - IS-IS, 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

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

172.17.0.0/16 is variably subnetted, 11 subnets, 3 masks


C 172.17.10.0/24 is directly connected, GigabitEthernet0/0.10
L 172.17.10.1/32 is directly connected, GigabitEthernet0/0.10
C 172.17.20.0/24 is directly connected, GigabitEthernet0/0.20
L 172.17.20.1/32 is directly connected, GigabitEthernet0/0.20
R 172.17.30.0/24 [120/2] via 172.17.50.2, 00:00:03, Serial0/0/0
R 172.17.40.0/24 [120/2] via 172.17.50.2, 00:00:03, Serial0/0/0
C 172.17.50.0/30 is directly connected, Serial0/0/0
L 172.17.50.1/32 is directly connected, Serial0/0/0
R 172.17.60.0/30 [120/1] via 172.17.50.2, 00:00:03, Serial0/0/0
C 172.17.99.0/24 is directly connected, GigabitEthernet0/0.99
L 172.17.99.1/32 is directly connected, GigabitEthernet0/0.99
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.224/27 is directly connected, Loopback0
L 209.165.200.225/32 is directly connected, Loopback0
S* 0.0.0.0/0 is directly connected, Loopback0

10
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
IPv4 Static and Default Routes
Topology

220.220.220.0/24
200.200.200.0/24

F0/10 F0/1 F0/10


F0/1

172.17.10.0/24 172.17.20.0/24 172.17.30.0/24 172.17.40.0/24

IPV4 Addressing Table


Device Interface IPv4 Address Subnet Mask Default
Gateway
R1 G0/0.10 172.17.10.1 255.255.255.0 N/A
G0/0.20 172.17.20.1 255.255.255.0 N/A
G0/0.99 172.17.99.1 255.255.255.0 N/A
S0/0/0 200.200.200.1 255.255.255.0 N/A
ISP S0/0/0 200.200.200.2 255.255.255.0 N/A
S0/0/1 220.220.220.2 255.255.255.0 N/A
R3 G0/0.10 172.17.30.1 255.255.255.0 N/A
G0/0.20 172.17.40.1 255.255.255.0 N/A
G0/0.99 172.17.99.2 255.255.255.0 N/A
S0/0/1 220.220.220.2 255.255.255.0 N/A
S1 VLAN 99 172.17.99.10 255.255.255.0 172.17.99.1
S2 VLAN 99 172.17.99.11 255.255.255.0 172.17.99.2
PC0 NIC 172.17.10.21 255.255.255.0 172.17.10.1
PC1 NIC 172.17.20.22 255.255.255.0 172.17.20.1
PC2 NIC 172.17.30.24 255.255.255.0 172.17.30.1
PC3 NIC 172.17.40.25 255.255.255.0 172.17.40.1

11
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Objectives
Part 1: Configure basic configuration on ISP

Part 2: Configure Router Interfaces

Part 3: Evaluate the Need for Static Routing

Part 4: Configure Static and Default Routes

Part 5: Verify Connectivity

Background
In this activity, you will configure IPv4 static and default routes. A static route is a route that is entered
manually by the network administrator to create a reliable and safe route. There are three different static
routes that are used in this activity: a recursive static route, a directly attached static route, and a default
route.

Part 1: Configure basic configuration on ISP


Step 1: Configure ISP with a hostname.

b. On ISP’s console, remove previously configured hostname R2.


c. Enter the correct command to configure the hostname as ISP.

Part 2: Configure Router Interfaces


To start, remove previous IP addressing configuration from serial interfaces on all routers.

Step 1: Configure the Serial 0/0/0 interface on R1.


b. Enter the following commands to address and activate the Serial 0/0/0 interface on R1:
R1(config)# interface Serial0/0/0
R1(config-subif)# ip address 200.200.200.1 255.255.255.0
R1(config-if)# no shutdown

Step 2: Save the configuration file to NVRAM.


R1(config)# exit (or end)
R1# copy run start

Step 3: Configure the remaining interfaces on ISP and R3.


b. Repeat Steps 1 and 2 for ISP and R3.
c. Use the information in the Addressing Table to finish the interface configurations for ISP and
R3.

12
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Part 3: Evaluate the Need for Static Routing
a. Looking at the topology diagram, how many networks are there in total?
6
b. How many static routes are required by each router to reach networks that are not directly
connected?
R1 needs 3 static routes, R2 needs 4 static routes, and R3 needs 3 static routes.
c. How does a directly attached static route differ from a recursive static route?
A directly attached static route relies on its exit interface in order for packets to be sent to
its destination, while a recursive static route uses the IP address of the next hop router.
d. How does a default route differ from a regular static route?
A default route, also known as the gateway of last resort, is the network route used by a
router when no other known route exists for a destination network. A static route is used
to route traffic to a specific network.

Part 4: Configure Static and Default Routes


Step 1: Configure recursive static routes on R3.

a. Configure a recursive static route to every network not directly connected to R3.
R3(config)# ip route 200.200.200.0 255.255.255.0 220.220.220.2
R3(config)# ip route 172.17.10.0 255.255.255.0 220.220.220.2
R3(config)# ip route 172.17.20.0 255.255.255.0 220.220.220.2

b. Test connectivity to the R1 LANs and ping the IP addresses of PC0 and PC1. Were you
successful?
Step 2: Configure directly attached static routes on ISP.

a. Configure a directly attached static route from ISP to every network not directly connected.
ISP(config)# ip route 172.17.10.0 255.255.255.0 Serial0/0/0
ISP(config)# ip route 172.17.20.0 255.255.255.0 Serial0/0/0
ISP(config)# ip route 172.17.30.0 255.255.255.0 Serial0/0/1
ISP(config)# ip route 172.17.40.0 255.255.255.0 Serial0/0/1

Step 3: Configure a default route on R1.

a. Configure a default route on R1 so that every network not directly connected is reachable.
R1(config)#ip route 0.0.0.0 0.0.0.0 200.200.200.2

b. How is a static route displayed in the routing table?

13
Prepared by: Syarulnaziah Anawar
Wide Area Network
Lab 2: Inter-VLAN and Static Routing

___________________________________________________________________________________________
Step 4: Verify static route configurations.

Use the appropriate show commands to verify correct configurations. Which show commands can you
use to verify that the static routes are configured correctly?

Commands: show ip route; show ip route static; show ip route [network]

Part 5: Verify Connectivity


Every device should now be able to ping every other device. If not, review your static and default route
configurations.

14
Prepared by: Syarulnaziah Anawar

Das könnte Ihnen auch gefallen