Packet Tracer – VLAN 间路由练习

该文详细介绍了如何在PacketTracer环境中进行VLAN间路由的配置,包括在路由器R1和交换机S1上设置IP地址、创建和分配VLAN、配置中继和子接口,以及设定默认网关,以确保所有设备间能互相通信并访问外部服务器。
摘要由CSDN通过智能技术生成

Packet Tracer – VLAN 间路由练习

 

地址分配表

设备

接口

IP 地址

子网掩码

默认网关

R1

G0/0

172.17.25.2

255.255.255.252

不适用

G0/1.10

172.17.10.1

255.255.255.0

不适用

G0/1.20

172.17.20.1

255.255.255.0

不适用

G0/1.30

172.17.30.1

255.255.255.0

不适用

G0/1.88

172.17.88.1

255.255.255.0

不适用

G0/1.99

172.17.99.1

255.255.255.0

不适用

S1

VLAN 99

172.17.99.10

255.255.255.0

172.17.99.1

PC1

NIC

172.17.10.21

255.255.255.0

172.17.10.1

PC2

NIC

172.17.20.22

255.255.255.0

172.17.20.1

PC3

NIC

172.17.30.23

255.255.255.0

172.17.30.1

VLAN 和端口分配表

VLAN

名称

接口

10

Faculty/Staff

Fa0/11-17

20

学生

Fa0/18-24

30

Guest(Default)

Fa0/6-10

88

本征

G0/1

99

管理

VLAN 99

拓扑图

场景

在本活动中,您将证明和加强实施 VLAN 间路由的能力,包括配置 IP 地址、VLAN、中继和子接口。

要求

·         根据地址分配表为 R1 和 S1 分配 IP 地址。

·         根据 VLAN 和端口分配表在 S1 上创建、命名和分配 VLAN。 端口应处于接入模式。

·         将 S1 配置为中继,仅允许 VLAN 和端口分配表中的 VLAN。

·         在 S1 上配置默认网关。

·         应禁用未分配给 VLAN 的所有端口。

·         根据地址分配表在 R1 上配置 VLAN 间路由。

·         验证连接。 R1S1 以及所有 PC 都应该能够互相 ping,并且能够 ping 到 cisco.pka 服务器。

实验步骤:

S1:

S1>en

S1#config t

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

S1(config-if)#ip default-gateway 172.17.99.1

S1(config)#vlan 10

S1(config-vlan)#name Faculty/Staff

S1(config-vlan)#vlan 20

S1(config-vlan)#name Students

S1(config-vlan)#vlan 30

S1(config-vlan)#name Guest(Default)

S1(config-vlan)#vlan 88

S1(config-vlan)#name Native

S1(config-vlan)#vlan 99

S1(config-vlan)#name Management

S1(config-vlan)#interface range fa0/11 - 17

S1(config-if-range)#switchport mode access

S1(config-if-range)#switchport access vlan 10

S1(config-if-range)#interface range fa0/18 - 24

S1(config-if-range)#switchport mode access

S1(config-if-range)#switchport access vlan 20

S1(config-if-range)#interface range fa0/6 - 10

S1(config-if-range)#switchport mode access

S1(config-if-range)#switchport access vlan 30

S1(config-if-range)#interface g0/1

S1(config-if)#switchport mode trunk

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

S1(config-if)#interface range fa0/1 - 5 , g0/2

S1(config)#shutdown

S1(config)#do write

%LINK-5-CHANGED: Interface Vlan99, changed state to up

Building configuration...

[OK]

R1:

R1> ena

R1# conf t

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)# interface GigabitEthernet0/1

R1(config-if)# no shutdown

R1(config-if)# interface GigabitEthernet0/1.10

R1(config-subif)# encapsulation dot1Q 10

R1(config-subif)# ip address 172.17.10.1 255.255.255.0

R1(config-subif)# interface GigabitEthernet0/1.20

R1(config-subif)# encapsulation dot1Q 20

R1(config-subif)# ip address 172.17.20.1 255.255.255.0

R1(config-subif)# interface GigabitEthernet0/1.30

R1(config-subif)# encapsulation dot1Q 30

R1(config-subif)# ip address 172.17.30.1 255.255.255.0

R1(config-subif)# interface GigabitEthernet0/1.88

R1(config-subif)# encapsulation dot1Q 88 native

R1(config-subif)# ip address 172.17.88.1 255.255.255.0

R1(config-subif)# interface GigabitEthernet0/1.99

R1(config-subif)# encapsulation dot1Q 99

R1(config-subif)# ip address 172.17.99.1 255.255.255.0

R1(config-subif)# do write

实验脚本:

S1:

en

config t

vlan 10

name Faculty/Staff

vlan 20

name Students

vlan 30

name Guest(Default)

vlan 88

name Native

vlan 99

name Management

exit

interface vlan 99

ip address 172.17.99.10 255.255.255.0

no shutdown

ip default-gateway 172.17.99.1

interface range fa0/11 - 17

switchport mode access

switchport access vlan 10

interface range fa0/18 - 24

switchport mode access

switchport access vlan 20

interface range fa0/6 - 10

switchport mode access

switchport access vlan 30

interface g0/1

switchport mode trunk

switchport trunk native vlan 88

interface range fa0/1 - 5 , g0/2

shutdown

do write

R1:

ena

conf t

interface GigabitEthernet0/1

no shutdown

interface GigabitEthernet0/1.10

encapsulation dot1Q 10

ip address 172.17.10.1 255.255.255.0

interface GigabitEthernet0/1.20

encapsulation dot1Q 20

ip address 172.17.20.1 255.255.255.0

interface GigabitEthernet0/1.30

encapsulation dot1Q 30

ip address 172.17.30.1 255.255.255.0

interface GigabitEthernet0/1.88

encapsulation dot1Q 88 native

ip address 172.17.88.1 255.255.255.0

interface GigabitEthernet0/1.99

encapsulation dot1Q 99

ip address 172.17.99.1 255.255.255.0

do write

实验链接:https://pan.baidu.com/s/1b879mCLC9D3DDoX-8pmeQw?pwd=6338

提取码:6338

--来自百度网盘超级会员V3的分享

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

傻傻的心动

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值