餐饮门面转让:二层 三llll层 vlan的配置二层是用vlan-membership static # 三层上是用switchport mode access

来源:百度文库 编辑:九乡新闻网 时间:2024/04/27 16:42:02

2.在交换机上创建VLAN,

  二层上用vlan # name vlanname

  三层上是到vlan database里面去创建VLAN或直接在全局配置模式下用vlan #

3.把端口划分到vlan中去,

  二层是用vlan-membership static  #

  三层上是用switchport mode access

                 switchport access vlan #

4.配置干道,

  二层配置干道时进入子接口,再用trunk on命令

  三层配置干道时进入子接口,再用switchport trunk encapsulation isl

                                switchport mode trunk

5.在三层交换机上配置vlan间的路由

  ip routing

  int vlan 2

  no shut

  ip add 192.168.22.1 255.255.255.0

6.最后把属于不同vlan中的PC的

cisco 3550+1924作VLAN间路由配置1924上的配置过程

>enable

#config termit

L2S_1924(config)#hostname L2S_1924

L2S_1924(config)#enable secret ncie2

L2S_1924(config)#vlan 2 name vlan2

L2S_1924(config)#vlan 3 name vlan3

L2S_1924(config)#interface e0/1

L2S_1924(config-if)vlan-membership static 2

L2S_1924(config-if)interface e0/2

L2S_1924(config-if)#vlan-membership static 2

L2S_1924(config-if)#interface e0/3

L2S_1924(config-if)vlan-membership static 2

L2S_1924(config-if)interface e0/4

L2S_1924(config-if)#vlan-membership static 2

L2S_1924(config-if)#interface e0/5

L2S_1924(config-if)vlan-membership static 3

L2S_1924(config-if)interface e0/6

L2S_1924(config-if)#vlan-membership static 3

L2S_1924(config-if)#interface e0/7

L2S_1924(config-if)vlan-membership static 3

L2S_1924(config-if)interface e0/8

L2S_1924(config-if)#vlan-membership static 3

L2S_1924(config-if)#interface f0/26

L2S_1924(config-if)#duplex full

L2S_1924(config-if)#trunk on

L2S_1924(config-if)#end

L2S_1924#show vlancisco 3550 configuration...

switch>enable

switch#config term

L3S_3550(config)#hostname L3S_3550

L3S_3550(config)#enable secret ncie3

L3S_3550(config)#vlan 2

L3S_3550(config-vlan)#name vlan2

L3S_3550(config-vlan)#vlan 3

L3S_3550(config-vlan)#name vlan3

L3S_3550(config-vlan)#exit

L3S_3550(config)#interface range f0/1 - 4

L3S_3550(config-if)#switchport mode access

L3S_3550(config-if)#switchport access vlan 2

L3S_3550(config-if)#interface range f0/5 - 8

L3S_3550(config-if)#switchport mode access

L3S_3550(config-if)#switchport access vlan 3

L3S_3550(config-if)#exit

L3S_3550(config)#interface f0/24

L3S_3550(config-if)#duplex full

L3S_3550(config-if)#speed 100

L3S_3550(config-if)#switchport trunk encapsulation isl

L3S_3550(config-if)#switchport mode trunk

L3S_3550(config-if)#exit

L3S_3550(config)#interface vlan 2

L3S_3550(config-if)#no shutdown

L3S_3550(config-if)#ip address 192.168.2.1 255.255.255.0

L3S_3550(config-if)#interface vlan 3

L3S_3550(config-if)#no shutdown

L3S_3550(config-if)#ip address 192.168.3.1 255.255.255.0

L3S_3550(config-if)#exit

L3S_3550(config)#ip routing

L3S_3550#show vlan

L3S_3550#show running-config以下是我的一个实验报告不知道这样的实验报告能不能这到考试的要求:1.配置两个交换机的名字与设置加密的口令,使用到hostname 与enable secret命令

网络设置设成与端口所在的vlan在同一网段,网关就用相应vlan接口的IP