华为5700 不同Vlan互通 华为S5700交换机划分了不同vlan,不同网段,不同网段设...

\u534e\u4e3a5700\u600e\u4e48\u8bbe\u7f6eVLAN\u95f4\u7684\u4e92\u8bbf\u65b0\u624b\u8bf7\u7ed9\u51fa\u8be6\u7ec6\u914d\u7f6e\u3002

VLAN\u95f4\u4e92\u8bbf\u4e00\u822c\u6709\u4e24\u79cd\u65b9\u5f0f\uff0c\u5355\u81c2\u8def\u7531\u548c\u521b\u5efaVLAN\u4e09\u5c42\u63a5\u53e3\u3002
\u5355\u81c2\u8def\u7531\u4e00\u822c\u7528\u5728\u5b9e\u73b0\u4e8c\u5c42\u4ea4\u6362\u673aVLAN\u95f4\u4e92\u8bbf\uff0c\u9700\u8981\u4e00\u53f0\u8def\u7531\u5668\u652f\u6301\uff1a
\u5047\u8bbe\u6211\u4eec\u9700\u8981\u5b9e\u73b0VLAN100\u548cVLAN200\u95f4\u4e92\u8bbf
\u4e00\u3001\u5355\u81c2\u8def\u7531
\u62d3\u6251 sw1 g0/0/1 ------g0/0/0 R1
\u914d\u7f6e\uff1a
SW1\uff1ainterface g0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200

R1: interface G 0/0/0.1 //\u8def\u7531\u5668\u4e0a\u521b\u5efa\u4e24\u4e2a\u5b50\u63a5\u53e3\uff0c\u5206\u522b\u7ec8\u7ed3VLAN100\u548c200\uff0c\u5b50\u63a5\u53e3\u53f7\u81ea\u5df1\u968f\u610f\u5b9a\u4e49\uff0c\u4e24\u4e2aIP\u5730\u5740\u5206\u522b\u4f5c\u4e3aVLAN100 200\u4e3b\u673a\u7684\u7f51\u5173\u5730\u5740
vlan dot1q vid 100

ip address 192.168.10.1 255.255.255.0


interface G0/0/0.2
vlan dot1q vid 200

ip address 192.168.20.1 255.255.255.0


\u4e8c\u3001\u521b\u5efa\u4e09\u5c42\u63a5\u53e3
interface vlanif 100 //\u521b\u5efa\u4e24\u4e2aVLAN\u5bf9\u5e94\u7684VLAN(SVI)\u63a5\u53e3\u4f5c\u4e3a\u7f51\u5173
ip add192.168.10.1 255.255.255.0
interface vlanif 200
ip add192.168.20.1 255.255.255.0
\u8fd9\u6837\u4ea4\u6362\u673a\u4e0a\u4f1a\u4e3a\u8fd9\u4e24\u4e2a\u7f51\u6bb5\u4ea7\u751f\u4e24\u6761\u76f4\u8fde\u8def\u7531\uff0c\u5b9e\u73b0\u7f51\u6bb5\u95f4\u4e92\u8bbf\u3002

\u7531\u4e8eS5700\u4e3a\u4e09\u5c42\u4ea4\u6362\u673a\uff0c\u672c\u8eab\u652f\u6301\u4e09\u5c42\u529f\u80fd\uff0c\u63a8\u8350\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u6cd5\uff0c\u6bd4\u8f83\u7b80\u5355\u3002

\u4f60\u662f\u4e0d\u662f\u7528\u4e00\u4e2aPC\u53bb\u6d4b\u8bd5\u7684\u3002\u4ea4\u6362\u673a\u7684SVI\uff0c\u53ea\u6709\u5f53VLAN\u5185\u5206\u914d\u4e86\u4e00\u4e2a\u6d3b\u52a8\u76842\u5c42\u7aef\u53e3\uff0c\u5e76\u4e14STP\u6536\u655b\uff0c\u76f8\u5e94\u7684SVI\u624d\u80fd\u4e3aUP\u72b6\u6001\u3002\u8bf4\u767d\u70b9\u5c31\u662f\u4f60\u867d\u7136\u6709\u5212VLAN9\u7684SVI\u7f51\u5173\uff0c\u5e76\u4e14\u5c060/0/17\u52a0\u5165VLAN9\uff0c\u4f46\u662f\u8be5\u63a5\u53e3\u4e0b\u6ca1\u6709\u63a5\u8bbe\u5907\uff0c\u5373\u8be5SVI\u662fDOWN\u7684\u72b6\u6001\uff0c\u6b64\u65f6\u4f60\u7528VLAN2\u4e0b\u7684PC\u53bbping\u662f\u4e0d\u901a\u7684\u3002\u4f60disp ip int b \u770b\u4e0b\u72b6\u6001\u5c31\u77e5\u9053\u4e86\u3002\u5176\u5b83\u914d\u7f6e\u6ca1\u95ee\u9898\u3002

首先你交换机 vlanif 10 掩码错了 是192.168.10.254  255.255.255.0  不是255.255.0.0 。

我的配置思路是要控制A网和B网不能互通,C网可以同时访问A网和B网.使用静态路由方式控制访问。

交换机C上配置vlan10 20 30  配置vlanif 192.168.10.254/20.254/30.254。设置G0/0/2为trunk 允许vlan 10 通过       设置G0/0/1为trunk 允许vlan 20 通过     E0/0/1 端口为vlan 30

交换机A上配置vlan10  设置vlanif 192.168.10.1 并作为pc电脑的网关。设置G0/0/2为trunk 允许vlan 10 通过  设置    E0/0/1 端口为vlan10 

交换机B上配置vlan20  设置vlanIF 192.168.20.1并作为PC地址的网关 设置G0/0/2为trunk 允许vlan 20 通过  设置    E0/0/1 端口为vlan 20

PCA 配置ip   192.168.10.10  255.255.255.0   192.168.10.1 

PCB 配置IP  192.168.20.20   255.255.255.0    192.168.20.1 

PCC 配置IP   192.168.30.30  255.255.255.0    192.168.30.254

如果现在ping 测试你会发现PCA 、pcb、pcc  都是能通的。假如你把PCA 和PCB 的网关改为254的话 你会发现PCA 、pcb、pcc  都是互通的,因为使用网关都是254 的话都在交换机C上面进行路由交换由于A和B 不能互通所以这里种方式就不可行。因此我们才在交换机A 和B 上设置vlanif 192.168.10.1 和192.168.20.1 后,我就可以在交换机A和B上设置静态路由控制A网和B网不能互通,C网可以同时访问A网和B网。

A交换机静态路由设置   ip route-static 192.168.30.0 24 192.168.10.254 (C网可以访问A)

B交换机静态路由设置   ip route-static 192.168.30.0 24 192.168.20.254     (C网可以访问B)

现在就可以实现了A网和B网不能互通,C网可以同时访问A网和B网

交换机配置如下

交换机A

sysname swa

#

vlan batch 10

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

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 192.168.10.1 255.255.255.0

#

interface MEth0/0/1

#

interface Ethernet0/0/1

port link-type access

port default vlan 10

#

interface Ethernet0/0/2

#

interface Ethernet0/0/3

#

interface Ethernet0/0/4

#

interface Ethernet0/0/5

#

interface Ethernet0/0/6

#

interface Ethernet0/0/7

#

interface Ethernet0/0/8

#

interface Ethernet0/0/9

#

interface Ethernet0/0/10

#

interface Ethernet0/0/11

#

interface Ethernet0/0/12

#

interface Ethernet0/0/13

#

interface Ethernet0/0/14

#

interface Ethernet0/0/15

#

interface Ethernet0/0/16

#

interface Ethernet0/0/17

#

interface Ethernet0/0/18

#

interface Ethernet0/0/19

#

interface Ethernet0/0/20

#

interface Ethernet0/0/21

#

interface Ethernet0/0/22

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 10

#

interface NULL0

#

ip route-static 192.168.30.0 255.255.255.0 192.168.10.254

#

user-interface con 0

user-interface vty 0 4

交换机B

sysname SWB

#

vlan batch 20

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

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 Vlanif20

ip address 192.168.20.1 255.255.255.0

#

interface MEth0/0/1

#

interface Ethernet0/0/1

port link-type access

port default vlan 20

#

interface Ethernet0/0/2

#

interface Ethernet0/0/3

#

interface Ethernet0/0/4

#

interface Ethernet0/0/5

#

interface Ethernet0/0/6

#

interface Ethernet0/0/7

#

interface Ethernet0/0/8

#

interface Ethernet0/0/9

#

interface Ethernet0/0/10

#

interface Ethernet0/0/11

#

interface Ethernet0/0/12

#

interface Ethernet0/0/13

#

interface Ethernet0/0/14

#

interface Ethernet0/0/15

#

interface Ethernet0/0/16

#

interface Ethernet0/0/17

#

interface Ethernet0/0/18

#

interface Ethernet0/0/19

#

interface Ethernet0/0/20

#

interface Ethernet0/0/21

#

interface Ethernet0/0/22

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 20

#

interface NULL0

#

ip route-static 192.168.30.0 255.255.255.0 192.168.20.254

#

user-interface con 0

user-interface vty 0 4

交换机C

sysname SWC

#

vlan batch 10 20 30

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

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 192.168.10.254 255.255.255.0

#

interface Vlanif20

ip address 192.168.20.254 255.255.255.0

#

interface Vlanif30

ip address 192.168.30.254 255.255.255.0

#

interface MEth0/0/1

#

interface Ethernet0/0/1

port link-type access

port default vlan 30

#

interface Ethernet0/0/2

#

interface Ethernet0/0/3

#

interface Ethernet0/0/4

#

interface Ethernet0/0/5

#

interface Ethernet0/0/6

#

interface Ethernet0/0/7

#

interface Ethernet0/0/8

#

interface Ethernet0/0/9

#

interface Ethernet0/0/10

#

interface Ethernet0/0/11

#

interface Ethernet0/0/12

#

interface Ethernet0/0/13

#

interface Ethernet0/0/14

#

interface Ethernet0/0/15

#

interface Ethernet0/0/16

#

interface Ethernet0/0/17

#

interface Ethernet0/0/18

#

interface Ethernet0/0/19

#

interface Ethernet0/0/20

#

interface Ethernet0/0/21

#

interface Ethernet0/0/22

#

interface GigabitEthernet0/0/1

port link-type trunk

port trunk allow-pass vlan 20

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 10

#

interface NULL0

#

user-interface con 0

user-interface vty 0 4

#



扩展阅读:华为交换机5700配置子网 ... 华为5700配置详解 ... 华为交换机s5700管理vlan ... s5700交换机参数配置 ... 华为史上最强屏幕来袭 ... 华为推出85英寸智慧屏 ... arc a770 ... 华为星闪笔支持水墨晕染 ... 华为s5700配置web登陆 ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网