我有这样的设计
但是我收到了很多不匹配的错误,它根本不起作用。我试了一下10.0.0.1,但没有结果。
我试图以这种方式配置交换机1上的vlans (到路由器的接口是f0/1):
configure terminal
vlan 2
name subnet1
vlan 3
name subnet2
interface fastEthernet 0/3
switchport mode access
switchport access vlan 3
exit
interface fastEthernet 0/2
switchport mode access
switchport access vlan 2
exit
interface fastEthernet 0/1
switchport mode trunk
exit
Switch(config)#interface vlan 2
Switch(config-if)#ip address 192.168.1.3 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#interface vlan 3
Switch(config-if)#ip address 192.168.2.3 255.255.255.0
Switch(config-if)#no shutdown
开关11
interface fastEthernet 0/1
switchport mode trunk
exit
**ALSO SAME CONFIG AS MAIN ROUTER WITH VLAN BEING EQUAL AS CONFIGURED BEFORE.**
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#interface fastEthernet 0/0.2
Router(config-subif)#
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip address 192.168.1.2 255.255.255.0
Router(config-subif)#
Router(config)#interface fastEthernet 0/0.3
Router(config-subif)#
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 192.168.2.2 255.255.255.0
Router(config-subif)#
Router(config)#interface FastEthernet0/0
Router(config-if)#ip helper 192.168.1.4
Router(config-if)#interface FastEthernet0/0.2
Router(config-subif)#ip helper 192.168.1.4
Router(config-subif)#interface FastEthernet0/0.3
Router(config-subif)#ip helper 192.168.1.4
Router(config-subif)#
我还尝试用f0/1主干模式配置交换机11,并将所有其他端口配置到地址为192.168.1.4的vlan上。
有什么建议吗?
更新1:错误是switch11 f0/1与Switch1 f0/2不匹配的开关
更新2:我在路由器上有v2 RIP路由和所有相关的IP。
更新3:我有个人电脑和个人电脑到路由器的连接。仍然得到开关错误/警告:
%CDP-4-本机_ VLAN _失配:在FastEthernet0 0/1 (1)上发现本机VLAN失配,并使用开关FastEthernet0 0/2 (2)。%CDP-4-本机_ VLAN _失配:在FastEthernet0 0/3 (3)上发现本机VLAN失配,而开关FastEthernet0 0/1 (1)。
更新4:
似乎无法让DHCP服务器工作。我在路由器f0/0接口和子接口上使用了IP助手命令,但没有工作。
更新5:显示开关1f0/2的命令(现在命名为开关0 )。(连接到路由器的那个):
Switch>show interfaces fastEthernet 0/2 switchport
Name: Fa0/2
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 2 (subnet1)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
更新6:去掉警告(在子网交换机上创建vlan并将vlan分配给主干)!现在唯一的问题是我不能让DHCP开始工作。
更新注意:记住有与路由器子接口0.2或0.3的连接。例: ping从PC到192.168.1.2工作,以及在不同子网上的PC机之间。
但是,错误不会停止,而且似乎无法使DHCP服务器工作。
最后更新:似乎我所做的是唯一可能的事情,根据这篇文章,“恐怕你不能用ip帮助的er-地址分配IP地址给个人电脑从一个次要的地址范围。“
所以我需要一个L3路由器才能做到这一点。我想这就是全部,我将广告一个L3路由器。
发布于 2018-11-20 15:12:34
这不管用。
需要将单个路由器接口配置为VLAN ID 1(?)的VLAN中继。2.交换机必须在其互连线和路由器上使用VLAN中继。
您需要确保每个子网提供从终端节点到路由器的正确连接。
在路由器上,每个VLAN子接口都需要配置来自子网的IP地址。在配置中,缺少了192.168.2.0/24。10.0.0.1/24是绑定的,但似乎没有提供任何连接。
RIP不疼,但也不做任何事情,只有一个路由器。
https://networkengineering.stackexchange.com/questions/54863
复制相似问题