华为交换机在划分VLAN后如何与路由通信
华为交换机在划分VLAN后,怎么样设置才能和路由通信,链接路由器的交换机口已经做了TRUNK,下面是交换机的配置,<Huawei>discur#sysnameHuawei...
华为交换机在划分VLAN后,怎么样设置才能和路由通信,链接路由器的交换机口已经做了TRUNK,下面是交换机的配置,
<Huawei>dis cur#sysname Huawei#vlan batch 10 20 30 40 50 60#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#vlan 10 policy-vlan mac-address 5489-9860-17f7 ip 172.16.10.1vlan 20 policy-vlan mac-address 5489-9838-29a6 ip 172.16.20.1vlan 30 policy-vlan mac-address 5489-9875-1c8f ip 172.16.30.1vlan 40 policy-vlan mac-address 5489-98be-2193 ip 172.16.40.1vlan 50 policy-vlan mac-address 5489-98bd-40aa ip 172.16.50.1#aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface Vlanif10 ip address 172.16.10.254 255.255.255.0#interface Vlanif20 ip address 172.16.20.254 255.255.255.0#interface Vlanif30 ip address 172.16.30.254 255.255.255.0#interface Vlanif40 ip address 172.16.40.254 255.255.255.0#interface Vlanif50 ip address 172.16.50.254 255.255.255.0#interface Vlanif60#interface MEth0/0/1#interface GigabitEthernet0/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10#interface GigabitEthernet0/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20#interface GigabitEthernet0/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30#interface GigabitEthernet0/0/4 port hybrid pvid vlan 40 port hybrid untagged vlan 40#interface GigabitEthernet0/0/5 port hybrid pvid vlan 50 port hybrid untagged vlan 50#interface GigabitEthernet0/0/6#interface GigabitEthernet0/0/7#interface GigabitEthernet0/0/8#interface GigabitEthernet0/0/9#interface GigabitEthernet0/0/10#interface GigabitEthernet0/0/11#interface GigabitEthernet0/0/12#interface GigabitEthernet0/0/13#interface GigabitEthernet0/0/14#interface GigabitEthernet0/0/15#interface GigabitEthernet0/0/16#interface GigabitEthernet0/0/17#interface GigabitEthernet0/0/18#interface GigabitEthernet0/0/19#interface GigabitEthernet0/0/20#interface GigabitEthernet0/0/21#interface GigabitEthernet0/0/22#interface GigabitEthernet0/0/23#interface GigabitEthernet0/0/24 port link-type trunk port trunk allow-pass vlan 2 to 4094#interface NULL0#user-interface con 0user-interface vty 0 4#return这是拓扑图
请高手解答一下,应该怎么做,原理以及步骤 展开
<Huawei>dis cur#sysname Huawei#vlan batch 10 20 30 40 50 60#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#vlan 10 policy-vlan mac-address 5489-9860-17f7 ip 172.16.10.1vlan 20 policy-vlan mac-address 5489-9838-29a6 ip 172.16.20.1vlan 30 policy-vlan mac-address 5489-9875-1c8f ip 172.16.30.1vlan 40 policy-vlan mac-address 5489-98be-2193 ip 172.16.40.1vlan 50 policy-vlan mac-address 5489-98bd-40aa ip 172.16.50.1#aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface Vlanif10 ip address 172.16.10.254 255.255.255.0#interface Vlanif20 ip address 172.16.20.254 255.255.255.0#interface Vlanif30 ip address 172.16.30.254 255.255.255.0#interface Vlanif40 ip address 172.16.40.254 255.255.255.0#interface Vlanif50 ip address 172.16.50.254 255.255.255.0#interface Vlanif60#interface MEth0/0/1#interface GigabitEthernet0/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10#interface GigabitEthernet0/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20#interface GigabitEthernet0/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30#interface GigabitEthernet0/0/4 port hybrid pvid vlan 40 port hybrid untagged vlan 40#interface GigabitEthernet0/0/5 port hybrid pvid vlan 50 port hybrid untagged vlan 50#interface GigabitEthernet0/0/6#interface GigabitEthernet0/0/7#interface GigabitEthernet0/0/8#interface GigabitEthernet0/0/9#interface GigabitEthernet0/0/10#interface GigabitEthernet0/0/11#interface GigabitEthernet0/0/12#interface GigabitEthernet0/0/13#interface GigabitEthernet0/0/14#interface GigabitEthernet0/0/15#interface GigabitEthernet0/0/16#interface GigabitEthernet0/0/17#interface GigabitEthernet0/0/18#interface GigabitEthernet0/0/19#interface GigabitEthernet0/0/20#interface GigabitEthernet0/0/21#interface GigabitEthernet0/0/22#interface GigabitEthernet0/0/23#interface GigabitEthernet0/0/24 port link-type trunk port trunk allow-pass vlan 2 to 4094#interface NULL0#user-interface con 0user-interface vty 0 4#return这是拓扑图
请高手解答一下,应该怎么做,原理以及步骤 展开
展开全部
你这是要做单臂路由吗?还是要把交换机变三层路由与路由器联通?华为的我没配过,我只能给你讲原理。看你这个样子是像要做单臂路由,这样的话,路由器上要起子接口,分别对应5个VLAN,子接口要封装对应的VLAN号,然后配置与VLAN同网段的IP地址,即可实现通信
更多追问追答
追问
不是单臂路由,单臂路由交换机是不需要配置VLANIF的,只是做交换机三层路由与路由器联通,主要是做MAC-vlan,现在突然不知道怎么与路由器实现联通
追答
如果是三层,首先交换机要启用三层路由功能,思科上是ip routing,其次和路由器相连的口要启用三层接口,可以是SVI口把相连的口划进相应的VLAN,然后只要交换机把相应的路由通告给路由器即可,或者路由默认路由指交换机。我不知道华为的命令,有些没看懂。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询