用三层交换机实现不同VLAN下的通信

用三层交换机实现不同VLAN下的通信,第1张

eNSP用三层交换机实现VLAN间通信
  • 1.5700交换机配置
  • 2.交换机配置
    • LSW2配置
    • LSW3配置
    • LSW4配置

1.5700交换机配置

作用是配置网关,让不同网段的VLAN能够相互通信

vlan batch 11 12 13 14 15 16
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 11 12 13 14
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 11 12 13 14
int g0/0/3
port link-type trunk
port trunk allow-pass vlan 11 15 16
interface vlanif11
ip address 192.168.11.254 24
interface vlanif12
ip address 192.168.12.254 24
interface vlanif13
ip address 192.168.13.254 24
interface vlanif14
ip address 192.168.14.254 24
interface vlanif15
ip address 192.168.15.254 24
interface vlanif16
ip address 192.168.16.254 24

2.交换机配置 LSW2配置

vlan batch 11 12 13 14
int e0/0/1
port link-type access
port default vlan 11
int e0/0/2
port link-type access
port default vlan 12
int e0/0/3
port link-type access
port default vlan 13
int e0/0/4
port link-type access
port default vlan 14

int g0/0/1
port link-type trunk
port trunk allow-pass vlan 11 12 13 14

LSW3配置

vlan batch 11 12 13 14
int e0/0/1
port link-type access
port default vlan 11
int e0/0/2
port link-type access
port default vlan 12
int e0/0/3
port link-type access
port default vlan 13
int e0/0/4
port link-type access
port default vlan 14
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 11 12 13 14

LSW4配置

vlan batch 11 15 16
int e0/0/1
port link-type access
port default vlan 11
int e0/0/2
port link-type access
port default vlan 15
int e0/0/4
port link-type access
port default vlan 16
int e0/0/3
port link-type trunk
port trunk allow-pass vlan 11 15 16
总结:
实验最后的要求就是不同交换机下的不同网段在三层交换机配置之后能够相互通信
一开始的时候,主机1能ping通同一网段的主机5和主机11,但是却ping不通其他网段的,后来经过同学点拨才发现是主机的网关忘记设置了。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/733847.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-27
下一篇 2022-04-27

发表评论

登录后才能评论

评论列表(0条)

保存