首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我怎样才能让这个拓扑上的每一个网络一起说话?

我怎样才能让这个拓扑上的每一个网络一起说话?
EN

Network Engineering用户
提问于 2020-07-03 16:12:07
回答 1查看 76关注 0票数 0

我在这个拓扑上工作了这么长时间,我没有设法让每个网络和每个网络上的不同VLAN一起说话。在这个拓扑上:

当我跟踪从PC3发送到PC4的数据包时,包到达路由器时,路由器会用以下消息丢弃数据包:“路由器没有在IEEE802.1q帧标签上指示VLAN。它会删除该帧。”

我要PC1(10.1.1.1)到ping PC2(10.1.2.1),PC3(10.1.3.1),PC4(10.1.4.1),PC2到ping PC1,PC3,PC4等等。注意到每个PC都有不同的VLAN。我已经制作了VLAN,您将在每个交换机配置上看到这一点。

以下是路由器配置:

代码语言:javascript
复制
hostname Router
!
ip cef
no ipv6 cef
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0/0
no ip address
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1/0
switchport mode trunk
switchport nonegotiate
!
interface GigabitEthernet0/1/1
switchport mode trunk
switchport nonegotiate
!
interface GigabitEthernet0/1/2
switchport mode access
switchport nonegotiate
!
interface GigabitEthernet0/1/3
switchport mode access
switchport nonegotiate
!
interface Vlan1 
ip address 10.1.0.254 255.255.255.0
!
router rip
!
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end

下面是Switch1配置:

代码语言:javascript
复制
hostname Switch1
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
!
interface FastEthernet0/3
switchport mode trunk
!
.. 
..
!
interface Vlan1
ip address 10.1.1.254 255.255.255.0
!
line con 0
!
line vty 0 4
login
!
line vty 5 15
login
! 
end
!

下面是Switch2配置:

代码语言:javascript
复制
hostname Switch2
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
.. 
..
!
interface Vlan1
ip address 10.1.2.254 255.255.255.0
!
line con 0
!
line vty 0 4
login
!
line vty 5 15
login
! 
end
!

下面是Switch3配置:

代码语言:javascript
复制
hostname Switch3
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
!
.. 
..
!
interface Vlan1
ip address 10.1.3.254 255.255.255.0
!
line con 0
!
line vty 0 4
login
!
line vty 5 15
login
! 
end
!

下面是Switch4配置:

代码语言:javascript
复制
hostname Switch4
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 40
switchport mode access
!
.. 
..
!
interface Vlan1
ip address 10.1.4.254 255.255.255.0
!
line con 0
!
line vty 0 4
login
!
line vty 5 15
login
! 
end
!
EN

回答 1

Network Engineering用户

回答已采纳

发布于 2020-07-03 17:35:53

您还没有为VLAN定义路由器接口。由于您正在挣扎于VLAN和集群的概念,我建议您仔细阅读这些NESE问题和答案:

VLAN入门级说明

为什么和如何标记以太网Vlans?

子网和VLAN的区别?

票数 2
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/68782

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档