配置vlan
Posted danmin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置vlan相关的知识,希望对你有一定的参考价值。
给主机配置IP地址,然后分别给两个交换机创建vlan 10 和vlan 20,接着进入接口模式(interface gi),把主机配置成vlan 10和vlan 20(access),接着两个交换机都用trunk模式
左边:主机1:IP地址192.168.10.1子网掩码255.255.255.0
主机2:IP地址192.168.10.2子网掩码255.255.255.0
主机3:IP地址192.168.20.1子网掩码255.255.255.0
主机4:IP地址192.168.20.2子网掩码255.255.255.0
右边:主机1:IP地址192.168.10.3子网掩码255.255.255.0
主机2:IP地址192.168.20.3子网掩码255.255.255.0
左边交换机:
sys
vlan 10
vlan 20
interface gi 1/0/1
port link-type access
port access vlan 10
interface gi 1/0/2
port link-type access
port access vlan 10
interface gi 1/0/3
port link-type access
port access vlan 20
interface gi 1/0/4
port link-type access
port access vlan 20
qu
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
右边交换机:
sys
vlan 10
vlan 20
interface gi 1/0/1
port link-type access
port access vlan 10
interface gi 1/0/2
port link-type access
port access vlan 20
qu
interface gi 1/0/48
port link-type trunk
port trunk permit vlan 10 20
以上是关于配置vlan的主要内容,如果未能解决你的问题,请参考以下文章