三层交换机配置

三层交换机配置

1、配置主机
2、配置二层交换器
3、配置三层交换器
测试

在这里插入图片描述

1、配置PC1-4
pc1:
192.168.1.2
255.255.255.0
192.168.1.1

pc2:
192.168.2.2
255.255.255.0
192.168.2.1

pc3:
192.168.1.3
255.255.255.0
192.168.1.1
pc4:
192.168.2.3
255.255.255.0
192.168.2.1

2、配置SW1
en
conf t
host SW1
vlan 10
exit
vlan 20
exit
int r f0/1-10
sw m a
sw a v 10
exit
int r f0/11-20
sw m a
sw a v 20
exit
int f0/24
sw m tr
end
wr
3、配置SW2
en
conf t
host SW2
ip routing
vlan 10
exit
vlan 20
exit
int f0/24
sw tr en d
sw m tr
exit
int valn 10
ip add 192.168.1.1 255.255.255.0
no shut
exit
int vlan 20
ip add 192.168.2.1 255.255.255.0
no shut
exit
end
4、测试
ping 192.168.1.3

Pinging 192.168.1.3 with 32 bytes of data:

Reply from 192.168.1.3: bytes=32 time=63ms TTL=128
Reply from 192.168.1.3: bytes=32 time=46ms TTL=128
Reply from 192.168.1.3: bytes=32 time=63ms TTL=128
Reply from 192.168.1.3: bytes=32 time=62ms TTL=128

Ping statistics for 192.168.1.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 46ms, Maximum = 63ms, Average = 58ms
ping 192.168.2.3

Pinging 192.168.2.3 with 32 bytes of data:
Reply from 192.168.2.3: bytes=32 time=125ms TTL=127
Reply from 192.168.2.3: bytes=32 time=141ms TTL=127
Reply from 192.168.2.3: bytes=32 time=93ms TTL=127
Reply from 192.168.2.3: bytes=32 time=124ms TTL=127

Ping statistics for 192.168.2.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 93ms, Maximum = 141ms, Average = 120ms

实验补充:
1、f0/24配置封装方式为:802.1q
2、f0/24接口模式改为trunk
3、配置vlan10vlan20
4、为vlan10配置ip地址:192.168.1.1
5、为vlan20配置ip地址192.168.2.1
6、在全局配置模式下开启三层交换机的路由功能

																				以上纯属个人所学
  • 5
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值