思科三层交换机配置实现不同vlan间的通信
三层交换机配置如下:Switch>enSwitch#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z....
三层交换机配置如下:Switch>en Switch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#name test10Switch(config-vlan)#exitSwitch(config)#int f 0/2Switch(config-if)#swSwitch(config-if)#switchport acc vlan 10Switch(config-if)#exitSwitch(config)#vlan 20Switch(config-vlan)#name test20Switch(config-vlan)#exitSwitch(config)#int f 0/4Switch(config-if)#swSwitch(config-if)#switchport acc vlan 20Switch(config-if)#exitSwitch(config)#int vlan 10%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upSwitch(config-if)#ip add 192.168.10.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#int vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upSwitch(config-if)#ip add 192.168.20.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config)#int f 0/2Switch(config-if)#no swSwitch(config-if)#no switchport %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upSwitch(config-if)#exitSwitch(config)#int f 0/4Switch(config-if)#no sw%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upSwitch(config-if)#exitSwitch(config)#int f 0/24Switch(config-if)#swiSwitch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.Switch(config-if)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to upPC1的IP:192.168.10.4网关:192.168.10.254,ping 交换机IP:192.168.10.1,不通,是怎么回事????
展开
2个回答
展开全部
PC1
的网关应该设置成PC1所在VLAN对应的三层交换机的IP地址,比如说PC1被划分到vlan
10下,你在三层交换机上的配置是: int
vlan
10ip
add
192.168.10.1
那么你的PC1的网关就应该设置成192.168.10.1
了
的网关应该设置成PC1所在VLAN对应的三层交换机的IP地址,比如说PC1被划分到vlan
10下,你在三层交换机上的配置是: int
vlan
10ip
add
192.168.10.1
那么你的PC1的网关就应该设置成192.168.10.1
了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询