如图:思科 三层交换机划分vlan实现跨vlan的配置命令

13:09 提问
Cisco Packet Tracer三层交换机实现不同终端互通怎么配置
老师出的题,这样连接怎么实现不同终端之间的互通
思科的模拟器
谢谢各位大神了~
按赞数排序
要在三层交换机启用ip routing,把不同的终端放到不通的vlan里面,把vlan业务做到三层交换机上,我这边有个案列,你可以看看
三层交换机与路由器的配置 实例(图解)
目的:学会使用三层交换与路由器让处于不同网段的网络相互通信
实验步骤:一:二层交换机的配置:
在三个二层交换机上分别划出两VLAN,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口
二:三层交换机的配置:
1:首先在三层交换上划出两个VLAN,并进入VLAN为其配置IP,此IP将作为与他相连PC的网关。
2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport)
3:将路由器和下面的交换机进行单臂路由的配置
实验最终结果:拓扑图下各个PC均能相互通信
交换机的配置命令:
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#no shut
Switch(config-if)#int f0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if)#exit
Switch(config)#
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 2
% Access VLAN does not exist. Creating vlan 2
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if)#
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/2
Switch(config-if)#switchport access vlan 2
% Access VLAN does not exist. Creating vlan 2
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#
三层交换的配置命令:
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f0/1
Switch(config-if)#switchport mode trunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int vlan 1
Switch(config-if)#no shut
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
Switch(config-if)#ip address 192.168.1.168 255.255.255.0
Switch(config-if)#exit
Switch(config)#int vlan 2
%LINK-5-CHANGED: Interface Vlan2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip add
Switch(config-if)#ip address 192.168.2.168 255.255.255.0
Switch(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if)#exit
Switch(config)#int f0/3
Switch(config-if)#no switchport
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#
Switch(config-if)#ip address 192.168.10.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#exit
Switch(config)#ip routing
Switch(config-if)#exit
Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2
Switch(config)#
路由器的配置:
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int f0/1
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int f0/0.1
Router(config-subif)#encapsulation dot1Q 1
Router(config-subif)#ip address 192.168.3.168 255.255.255.0
Router(config-subif)#exit
Router(config)#int f0/0.2
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add
Router(config-subif)#ip address 192.168.4.168 255.255.255.0
Router(config-subif)#exit
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#ip add
Router(config-if)#ip address 192.168.10.2 255.255.255.0
Router(config-if)#
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐单片机、电路板
连接器、接插件
其他元器件
cisco三层交换机怎么设置实现vlan间的通讯?
cisco三层交换机怎么设置实现vlan间的通讯?
二层交换机是不能实现vlan间通讯的,这就需要三层路由功能,而3560默认情况下是二层交换机,这就需要多交换机进行一些配置,实现vlan间的通讯,下面通过具体实验对其进行讲解,如需具体学习,谢谢大家的支持。1、打开思科模拟软件----按如图配置拓扑图---将pc0、pc1、pc2配置地址为192.168.1.2 255.255.255.0,192.168.2.2 255.255.255.0,192
二层交换机是不能实现vlan间通讯的,这就需要三层路由功能,而3560默认情况下是二层交换机,这就需要多交换机进行一些配置,实现vlan间的通讯,下面通过具体实验对其进行讲解,如需具体学习,谢谢大家的支持。1、打开思科模拟软件----按如图配置拓扑图---将pc0、pc1、pc2配置地址为192.168.1.2 255.255.255.0,192.168.2.2 255.255.255.0,192.168.1.3 255.255.255.0----pc0 ping pc1不能ping通,pc0 ping pc2能ping通。2、s2960的配置----进入特权模式配置vlan2和vlan3----将fa0/2端口分配到vlan2中,将fa0/3配置到vlan3中----将fa0/1端口模式配置成trunk----end----copy run start3、3560交换机的配置----进入特权模式配置vlan2和vlan3----在特权模式下输入ip routing开启三层路由----进入端口fa0/1将将其trunk封装802.1Q的帧格式----将端口模式配置为trunk4、3560交换机进入fa0/2端口将其分配给vlan2中----在特权模式下输入interface vlan 2,配置vlan虚拟接口---输入ip address 192.168.1.1 255.255.255.0----同理配置vlan3地址为192.168.2.1 255.255.255.0----end----输入copy run start配置结束。5、测试vlan的通讯----pc0 ping pc2可以ping通,pc0 ping pc1也可以ping通,证明配置成功。注意事项:注意输入ip routing开启三层路由,3560交换机是核心,配置是关键。
型号/产品名
深圳市茂和昌科技有限公司
华强电子网测试账号-鹏程微电子
华强电子网测试账号-鹏程微电子声明:本站文章皆基于公开来源信息,仅代表作者个人观点
利用单个三层交换机实现不同vlan和不同网段之间互通(华为和cisco)
作者:【吴业亮】
一、华为三层交换机实现不同网段和不同vlan间互通
目标实现:pc1和pc2之间互通
2、三层交换机配置:
&S1&display current-configuration
#sysname S1
#VLAN batch 2 3
#interface VLANif2
ip address 192.168.8.1 255.255.255.0
#interface VLANif3
ip address 172.16.8.1 255.255.255.0
#interface GigabitEthernet0/0/1
port link-type access
port default VLAN 2
#interface GigabitEthernet0/0/2
port link-type access
port default VLAN 3
二、通过cisco三层交换机实现不同网段和不同vlan间互通
目标实现:pc1和pc2之间互通
2、配置交换机:
我们要用S1 来实现分别处于VLAN1 和VLAN2 的PC1 和PC2 间的通信。首先在S1 上划分VLAN,配置命令为:
S1(config)#vlan 3
S1(config-vlan)#exit
S1(config)#vlan 2
S1(config-vlan)#exit
在接口1和接口2上配置vlan
S1(config)#int f0/1
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 2
S1(config-if)#int f0/2
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 3
创建虚拟vlan,为VLAN1和VLAN2配置网关,即是PC1,PC2的网关,配置命令为:
S1(config)#int vlan 2
S1(config-if)#no shutdown
S1(config-if)#ip address 192.168.8.1 255.255.255.0
S1(config)#int vlan 3
S1(config-if)#no shutdown
S1(config-if)#ip address 172.16.8.1 255.255.255.0
配置三层交换,配置命令为:
S1(config)#ip routing
查看路由表
没有更多推荐了,
加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!CISCO_3层交换机VLAN配置命令大全_百度文库
您的浏览器Javascript被禁用,需开启后体验完整功能,
赠送免券下载特权
10W篇文档免费专享
部分付费文档8折起
每天抽奖多种福利
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
CISCO_3层交换机VLAN配置命令大全
&&CISCO 3层交换机VLAN配置命令大全
阅读已结束,下载本文需要
想免费下载本文?
定制HR最喜欢的简历
你可能喜欢思科设备三层交换机的vlan间通信配置_百度文库
您的浏览器Javascript被禁用,需开启后体验完整功能,
赠送免券下载特权
10W篇文档免费专享
部分付费文档8折起
每天抽奖多种福利
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
思科设备三层交换机的vlan间通信配置
阅读已结束,下载本文需要
想免费下载本文?
定制HR最喜欢的简历
下载文档到电脑,同时保存到云知识,更方便管理
加入VIP
还剩1页未读,
定制HR最喜欢的简历
你可能喜欢

我要回帖

更多关于 思科加入vlan命令 的文章

 

随机推荐