我在这个拓扑上工作了这么长时间,我没有设法让每个网络和每个网络上的不同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,您将在每个交换机配置上看到这一点。
以下是路由器配置:
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配置:
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配置:
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配置:
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配置:
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
!发布于 2020-07-03 17:35:53
https://networkengineering.stackexchange.com/questions/68782
复制相似问题