设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 921|回复: 11
收起左侧

[求助] 不同交换机的电脑怎么划入同一个vlan?

[复制链接]
发表于 2017-8-23 10:35:51 | 显示全部楼层 |阅读模式
3鸿鹄币
在学习vlan,做实验的碰到这个问题:原Switch1有VLAN24,销售部用;Switch2有VLAN2,财务部用,因为销售部办公位不够,所以在财务部办公室新增一台电脑1.1.1.2,但是要把这台电脑网络归入到销售部,与财务部隔开,所以在Switch2新增了一个vlan24,配完之后发现1.1.1.2与1.1.1.1不通,是还需要配置什么吗
QQ截图20170823101821.png

vlan.pkt

133.23 KB, 下载次数: 2, 下载积分: 鸿鹄币 -1 个

最佳答案

查看完整内容

switch2: int fa0/1 switch mode trunk multilayer switch2: int gi0/2 switch trunk en dot11 switch mode trunk
发表于 2017-8-23 10:35:52 | 显示全部楼层
switch2:
int fa0/1
switch mode trunk

multilayer switch2:
int gi0/2
switch trunk en dot11
switch mode trunk
沙发 2017-8-23 10:35:52 回复 收起回复
回复

使用道具 举报

 成长值: 58600
发表于 2017-8-23 11:19:27 | 显示全部楼层
vlan2和vlan24同一个网段?不合理啊
不上配置都是耍流氓
板凳 2017-8-23 11:19:27 回复 收起回复
回复

使用道具 举报

发表于 2017-8-23 11:49:37 | 显示全部楼层
mohuanjarry 发表于 2017-8-23 11:19
vlan2和vlan24同一个网段?不合理啊
不上配置都是耍流氓

地板 2017-8-23 11:49:37 回复 收起回复
回复

使用道具 举报

发表于 2017-8-23 12:01:04 | 显示全部楼层
交换机之间配置了trunk了没有?
5# 2017-8-23 12:01:04 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-23 15:15:41 | 显示全部楼层
Admln 发表于 2017-8-23 10:54
switch2:
int fa0/1
switch mode trunk

switch2 电脑接的是f0/24(1.1.1.2)和f0/2(1.1.1.3),你说的是哪个要设置trunk模式?
6# 2017-8-23 15:15:41 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-23 15:17:31 | 显示全部楼层
mohuanjarry 发表于 2017-8-23 11:19
vlan2和vlan24同一个网段?不合理啊
不上配置都是耍流氓

是不能用同一网段吗?
7# 2017-8-23 15:17:31 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-23 15:44:43 | 显示全部楼层
上配置
sw1:Switch#sh run
Building configuration...

Current configuration : 1177 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport access vlan 24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan24
mac-address 0060.5c9c.3101
ip address 1.1.1.12 255.255.255.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
end





sw2:
Switch#sh run
Building configuration...

Current configuration : 1284 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport access vlan 24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
mac-address 000a.4182.c602
ip address 1.1.1.30 255.255.255.0
!
interface Vlan24
mac-address 000a.4182.c601
ip address 1.1.1.12 255.255.255.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
end



Multilayer Switch2:
Switch(config-if)#do sh run
Building configuration...

Current configuration : 1247 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end






8# 2017-8-23 15:44:43 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-23 15:48:46 | 显示全部楼层
trunk 都已经配了
9# 2017-8-23 15:48:46 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-24 15:31:31 | 显示全部楼层
问题还是没解决。。。。
10# 2017-8-24 15:31:31 回复 收起回复
回复

使用道具 举报

发表于 2017-8-25 17:59:38 | 显示全部楼层
switchport trunk allowed vlan all
11# 2017-8-25 17:59:38 回复 收起回复
回复

使用道具 举报

发表于 2017-12-29 18:00:37 | 显示全部楼层
youxiangadd 发表于 2017-8-24 15:31
问题还是没解决。。。。

multilayer switch2:
int gi0/2
switch trunk en dot1q
switch mode trunk

int gi0/1
switch trunk en dot1q
switch mode trunk

Switch(config)#vlan 24
12# 2017-12-29 18:00:37 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-3-29 15:37 , Processed in 0.065714 second(s), 10 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表