win10如何设置vlan
1.虚拟局域网怎么设置
1. 配置物理接口设置
配置/etc/sysconfig/network-scripts/ifcfg-ethX,不需要配置IP地址
2. 配置VLAN
新建/etc/sysconfig/network-scripts/ifcfg-ethX.Y(注意与虚拟网卡ifcfg-ethX:Y的命令区别)
上述配置文件必须是ethX.Y,其中X表示具体物理网卡号,Y表示VLAN的VLAN号,即VLAN id。举例来说,
[plain] view plain copy
vim /etc/sysconfig/network-scripts/ifcfg-eth1.51
DEVICE=eth1.51 #表示VLAN id为51
VLAN=yes #配置VLAN
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.51.250
NETMASK=255.255.255.0
GATEWAY=192.168.51.1
备注:VLAN的配置中,必须包含VLAN=yes,MAC地址不需要配置,接口名必须为ethX.Y(Y表示VLAN id)3.交换机上要做一些VLAN的配置,以及trunk的配置
虚拟局域网(VLAN)是一组逻辑上的设备和用户,这些设备和用户并不受物理位置的限制,可以根据功能、部门及应用等因素将它们组织起来,相互之间的通信就好像它们在同一个网段中一样,由此得名虚拟局域网。VLAN是一种比较新的技术,工作在OSI参考模型的第2层和第3层,一个VLAN就是一个广播域,VLAN之间的通信是通过第3层的路由器来完成的。与传统的局域网技术相比较,VLAN技术更加灵活,它具有以下优点:网络设备的移动、添加和修改的管理开销减少;可以控制广播活动;可提高网络的安全性。
2.如何配置vlan,并将一个端口分配给该vlan?
假设创建vlan 10
S2024MF#conf t
S2024MF(config)#int vlan 10
S2024MF(config-vlan10)#member 端口号 untag
S2024MF(config-vlan10)#member 端口号 tag
Untag 口要配置成和相对应vlan 相同的pvid值.
以上配置为烽火S2024MF型二层交换机的配置,供参考
cisco 2950
(config)#vlan 10 name XXX
(config)#int fa 0/1
(config-if)#no shutdown
(config-if)#sw mo ac
(config-if)#sw ac vlan 10
(config-if)#description XXX
(config-if)#exit
3.怎么配VLAN的IP
新交换机肯定是用console来配置了,买交换机的时候会配有一条console线的,一头是接电脑的串口,另一头类似网线接头,接在交换机标有console字样的console上,然后通过windows的开始-程序-附件-通讯-超级终端来连接,在配置连接参数的时候选择还原默认就好。
VLAN配置很简单,进入特权模式后,直接输入vlan (vlanid)就可以创建vlan了,有2个方法把端口加入vlan: 1. 创建(进入)VLAN10,将E0/1加入到VLAN10 [SwitchA]vlan 10 [SwitchA-vlan10]port Ethernet 0/1 2. 进入以太网端口E0/1的配置视图 [SwitchA]interface Ethernet 0/1 配置端口E0/1的PVID为10 [SwitchA-Ethernet0/1]port access vlan 10。
win10下如何设置vlan
1.怎样配置VLAN?
VLAN的配置过程其实非常简单,只需两步:(1)为各VLAN组命名;(2)把相应的VLAN对应到相应的交换机端口。
下面是具体的配置过程: 第1步:设置好超级终端,连接上1900交换机,通过超级终端配置交换机的VLAN,连接成功后出现如下所示的主配置界面(交换机在此之前已完成了基本信息的配置): 1 user(s) now active on Management Console. User Interface Menu [M] Menus [K] Command Line [I] IP Configuration Enter Selection: 【注】超级终端是利用Windows系统自带的"超级终端"(Hypertrm)程序进行的,具体参见有关资料。 第2步:单击"K"按键,选择主界面菜单中"[K] Command Line"选项 ,进入如下命令行配置界面: CLI session with the switch is open. To end the CLI session,enter [Exit ]. > 此时我们进入了交换机的普通用户模式,就象路由器一样,这种模式只能查看现在的配置,不能更改配置,并且能够使用的命令很有限。
所以我们必须进入"特权模式"。 第3步:在上一步">"提示符下输入进入特权模式命令"enable",进入特权模式,命令格式为">enable",此时就进入了交换机配置的特权模式提示符: #config t Enter configuration commands,one per line.End with CNTL/Z (config)# 第4步:为了安全和方便起见,我们分别给这3个Catalyst 1900交换机起个名字,并且设置特权模式的登陆密码。
下面仅以Switch1为例进行介绍。配置代码如下: (config)#hostname Switch1 Switch1(config)# enable password level 15 XXXXXX Switch1(config)# 【注】特权模式密码必须是4~8位字符这,要注意,这里所输入的密码是以明文形式直接显示的,要注意保密。
交换机用 level 级别的大小来决定密码的权限。Level 1 是进入命令行界面的密码,也就是说,设置了 level 1 的密码后,你下次连上交换机,并输入 K 后,就会让你输入密码,这个密码就是 level 1 设置的密码。
而 level 15 是你输入了"enable"命令后让你输入的特权模式密码。 第5步:设置VLAN名称。
因四个VLAN分属于不同的交换机,VLAN命名的命令为" vlan vlan号 name vlan名称 ,在Switch1、Switch2、Switch3、交换机上配置2、3、4、5号VLAN的代码为: Switch1 (config)#vlan 2 name Prod Switch2 (config)#vlan 3 name Fina Switch3 (config)#vlan 4 name Huma Switch3 (config)#vlan 5 name Info 【注】以上配置是按表1规则进行的。 第6步:上一步我们对各交换机配置了VLAN组,现在要把这些VLAN对应于表1所规定的交换机端口号。
对应端口号的命令是"vlan-membership static/ dynamic VLAN号 "。在这个命令中"static"(静态)和"dynamic"(动态)分配方式两者必须选择一个,不过通常都是选择"static"(静态)方式。
VLAN端口号应用配置如下: (1). 名为"Switch1"的交换机的VLAN端口号配置如下: Switch1(config)#int e0/2 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/3 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/4 Switch1(config-if)#vlan-membership static 2 …… Switch1(config-if)#int e0/20 Switch(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/21 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)# 【注】"int"是"nterface"命令缩写,是接口的意思。"e0/3"是"ethernet 0/2"的缩写,代表交换机的0号模块2号端口。
(2). 名为"Switch2"的交换机的VLAN端口号配置如下: Switch2(config)#int e0/2 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/3 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/4 Switch2(config-if)#vlan-membership static 3 …… Switch2(config-if)#int e0/15 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/16 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)# (3). 名为"Switch3"的交换机的VLAN端口号配置如下(它包括两个VLAN组的配置),先看VLAN 4(Huma)的配置代码: Switch3(config)#int e0/2 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/3 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/4 Switch3(config-if)#vlan-membership static 4 …… Switch3(config-if)#int e0/8 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/9 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)# 下面是VLAN5(Info)的配置代码: Switch3(config)#int e0/10 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/11 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/12 Switch3(config-if)#vlan-membership static 5 …… Switch3(config-if)#int e0/20 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/21 Switch3(config-if)#vlan-membership static 5。
2.如何配置Windows桥接至VLAN
VLAN的配置过程其实非常简单,只需两步:(1)为各VLAN组命名;(2)把相应的VLAN对应到相应的交换机端口。
下面是具体的配置过程: 第1步:设置好超级终端,连接上1900交换机,通过超级终端配置交换机的VLAN,连接成功后出现如下所示的主配置界面(交换机在此之前已完成了基本信息的配置): 1 user(s) now active on Management Console. User Interface Menu [M] Menus [K] Command Line [I] IP Configuration Enter Selection: 【注】超级终端是利用Windows系统自带的"超级终端"(Hypertrm)程序进行的,具体参见有关资料。 第2步:单击"K"按键,选择主界面菜单中"[K] Command Line"选项 ,进入如下命令行配置界面: CLI session with the switch is open. To end the CLI session,enter [Exit ]. > 此时我们进入了交换机的普通用户模式,就象路由器一样,这种模式只能查看现在的配置,不能更改配置,并且能够使用的命令很有限。
所以我们必须进入"特权模式"。 第3步:在上一步">"提示符下输入进入特权模式命令"enable",进入特权模式,命令格式为">enable",此时就进入了交换机配置的特权模式提示符: #config t Enter configuration commands,one per line.End with CNTL/Z (config)# 第4步:为了安全和方便起见,我们分别给这3个Catalyst 1900交换机起个名字,并且设置特权模式的登陆密码。
下面仅以Switch1为例进行介绍。配置代码如下: (config)#hostname Switch1 Switch1(config)# enable password level 15 XXXXXX Switch1(config)# 【注】特权模式密码必须是4~8位字符这,要注意,这里所输入的密码是以明文形式直接显示的,要注意保密。
交换机用 level 级别的大小来决定密码的权限。Level 1 是进入命令行界面的密码,也就是说,设置了 level 1 的密码后,你下次连上交换机,并输入 K 后,就会让你输入密码,这个密码就是 level 1 设置的密码。
而 level 15 是你输入了"enable"命令后让你输入的特权模式密码。 第5步:设置VLAN名称。
因四个VLAN分属于不同的交换机,VLAN命名的命令为" vlan vlan号 name vlan名称 ,在Switch1、Switch2、Switch3、交换机上配置2、3、4、5号VLAN的代码为: Switch1 (config)#vlan 2 name Prod Switch2 (config)#vlan 3 name Fina Switch3 (config)#vlan 4 name Huma Switch3 (config)#vlan 5 name Info 【注】以上配置是按表1规则进行的。 第6步:上一步我们对各交换机配置了VLAN组,现在要把这些VLAN对应于表1所规定的交换机端口号。
对应端口号的命令是"vlan-membership static/ dynamic VLAN号 "。在这个命令中"static"(静态)和"dynamic"(动态)分配方式两者必须选择一个,不过通常都是选择"static"(静态)方式。
VLAN端口号应用配置如下: (1). 名为"Switch1"的交换机的VLAN端口号配置如下: Switch1(config)#int e0/2 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/3 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/4 Switch1(config-if)#vlan-membership static 2 …… Switch1(config-if)#int e0/20 Switch(config-if)#vlan-membership static 2 Switch1(config-if)#int e0/21 Switch1(config-if)#vlan-membership static 2 Switch1(config-if)# 【注】"int"是"nterface"命令缩写,是接口的意思。"e0/3"是"ethernet 0/2"的缩写,代表交换机的0号模块2号端口。
(2). 名为"Switch2"的交换机的VLAN端口号配置如下: Switch2(config)#int e0/2 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/3 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/4 Switch2(config-if)#vlan-membership static 3 …… Switch2(config-if)#int e0/15 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)#int e0/16 Switch2(config-if)#vlan-membership static 3 Switch2(config-if)# (3). 名为"Switch3"的交换机的VLAN端口号配置如下(它包括两个VLAN组的配置),先看VLAN 4(Huma)的配置代码: Switch3(config)#int e0/2 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/3 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/4 Switch3(config-if)#vlan-membership static 4 …… Switch3(config-if)#int e0/8 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)#int e0/9 Switch3(config-if)#vlan-membership static 4 Switch3(config-if)# 下面是VLAN5(Info)的配置代码: Switch3(config)#int e0/10 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/11 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/12 Switch3(config-if)#vlan-membership static 5 …… Switch3(config-if)#int e0/20 Switch3(config-if)#vlan-membership static 5 Switch3(config-if)#int e0/21 Switch3(config-if)#vlan-membership static 5。
3.谁能提供下VLAN具体设置的教程~
以CISCO 2950 G 交换机的为例
其他品牌和型号大同小异
>en
#conf t
(config)#vlan 10 name 123
(config-vlan)#end
#conf t
(config)#interface range f0/1,3,6
(config-if)#switchport mode access
(config-if)#switchport access vlan 10
(config-vlan)#end
#cop run-config startup-config
另外教你个小窍门
遇到记不全记不住的命令按TAB补全或按?显示当前可用的命令
win10怎么设置vlan
1.如何为交换机配置VLAN网络呢?
作为网络管理员,我们在工作中会遇到各种各样的网络设备,交换机是其中最常见的一种。
对于交换机来说,最实用的操作就是划分VLAN,利用VLAN技术,可以在一根传输介质上同时传送多个网络的同时又保证各个网络的相互隔离,从而使很多看似不可能完成的任务最后也能够完成了。 熟练运用VLAN技术,是一个网管员必备素质。
本篇文章我们要介绍如何通过图形化界面对交换机进行VLAN配置,拥有图形化的配置界面,是很多厂商在介绍产品时会着重强调的一个优点。 但在实际工作中我们发现,如果一名网络工程师没有通过CLI(命令行界面)模式成功的配置过VLAN的话,即使使用图形化界面,也无法顺利的完成VLAN的配置,在网络工程师的生涯中,没有什么捷径可走。
下面我们会分两部分,从使用命令行的配置VLAN入手,将相关的概念逐一介绍清楚。 通过命令行方式在交换机上配置VLAN 为了让这个例子更有权威性,我们摘取了CISCO网站上的一篇介绍VLAN配置文章(小提示:CISCO公司的网站技术资料极为丰富,可以系统而全面的学习到交换机配置的各个方面的知识,而且是免费的,大家在遇到交换机配置方面的问题的时侯,不妨多访问一下CISCO的网站,一定会有收获的),本例中所用到的例子网址如下:。 这是一个典型的上网用的配置。
(一)CISCO3550交换机的配置 CISCO3550交换机上联一台路由器(拥有互联网出口),下面连接一台CISCO29450交换机,在CISCO3550上还对各个VLAN作了定义,CISCO3550交换机的配置如下所示: Catalyst 3550 (Catalyst 3550-48 Switch) Cat3550#show running-config Building configuration。 。
Current configuration : 3092 bytes ! version 12。
1 no service single-slot-reload-enable no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Cat3550 ip subnet-zero !--- Enable IP routing for interVLAN routing。 (这一步非常重要,通过ip routing命令了实现了各个VLAN间的路由,这样各个VLAN间是可以互访的,但是由于每个VLAN都是一个***的广播域,所以即使在一个VLAN中发生诸如ARP地址欺骗之类的病毒,也不会影响其它的VLAN) ip routing ! spanning-tree extend system-id ! interface FastEthernet0/1 no ip address ! !--- Output suppressed。
! interface FastEthernet0/5 description to SERVER_1 !--- Configure the server port to be in the server VLAN, VLAN 3。 switchport access vlan 3 !--- Configure the port to be an access port to prevent trunk negotiation delays。
switchport mode access no ip address !--- Configure PortFast for initial Spanning Tree Protocol (STP) delay。 Refer to !--- Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays !--- for more information。
(这里又介绍了一个非常重要的概念,即如果确认交换机下某个端口连接的是一台重要的服务器,那就可以将该端口设置为“spanning-tree portfast”状态,从而实现服务器与交换机端口的快速连接) spanning-tree portfast ! !--- Output suppressed。 ! interface FastEthernet0/48 description To Internet_Router !--- The port that connects to the router converts into a routed (L3) port。
(fa0/48是上连到一台路由器) no switchport !--- Configure the IP address on this port。 (为了实现与路由器的通讯,在端口上设置了IP地址) ip address 200。
1。 1。
1 255。255。
255。252 ! interface GigabitEthernet0/1 description To 2950 !--- Configure IEEE 802。
1 (dot1q) trunking, with negotiation, on the L2 switch。 !--- If there is not support for Dynamic Trunking Protocol (DTP) on the far switch, !--- issue the switchport mode trunk command to force the switch port to trunk mode。
!--- Note: The default trunking mode is dynamic auto。 If you establish a trunk link !--- with the default trunking mode, the trunk does not appear !--- in the configuration, even though a trunk has been established on !--- the interface。
Use the show interfaces trunk command to verify the !--- establishment of the trunk。 (G0/1下连到一台CISCO2950的交换机,其实CISCO3550交换机是支持自动设置为TRUNK模式的,即如果下连的网络端口被设置为TRUNK模式的话,3550上的对应端口就会自动的变成TRUNK模式,但是本例中为了详细说明TRUNK的设置,还是把端口封装802。
1Q的命令写了出来) switchport trunk encapsulation dot1q no ip address ! interface Vlan1 no ip address shutdown ! interface Vlan2 description USER_VLAN !--- This IP address is the default gateway for users。 (VLAN2是接入用户的VLAN,VLAN上设置的IP地址就作为下接用户的网关,这也是一个非常重要的概念) ip address 10。
1。2。
1 255。255。
255。0 ! interface Vlan3 description SERVER_VLAN !--- This IP address is the 。
2.设置VLANMembership两种常用方法有哪些呢?
1。
静态VLAN――基于端口的成员身份,通过将端口指派给一个VLAN建立。 2。
动态VLAN――通过管理软件,如Ciscoworks 2000或CWSI建立,基于设备MAC地址。Cisco IOS下配置静态VLANSwitch#vlan databaseSwitch(vlan)#vlan vlan-num name vlan-nameSwitch(vlan)#exitSwitch#configure terminalSwitch(config)#interface interface module/numberSwitch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan vlan-numSwitch(config-if)#endSet-based下配置静态VLANSwitch(enable)set vlan vlan-num [name name ]Switch(enable)set vlan vlan-num mod-num/port-list交换环境中的两种link: 1。
Access link(接入):一单个VLAN的成员(A member of only one vlan)。 2。
Trunk link(干道):Capable of carring multiple vlans。 混合链路,即该链路既是Trunk link又是Access link,它可传输两种帧:标记帧(带VLAN信息)和非标记帧在交换Block中扩展VLAN时,有两种定义VLAN边界的基本方法: 1。
端到端VLAN:不管用户的位置,都可放在同一个VLAN中。目的是维护80/20规则,即把80%数据流限制在本地; 2。
本地VLAN:根据用户的位置配置,不管用户是否是同一个项目组、部门等,数据流变成了20/80模式。VTP协议优点: 1。
即VLAN干道协议,Cisco创建。在网络中维持VLAN配置的一致性。
2。 通过混合介质主干将以太网VLAN映射到高速主干VLAN。
3。 对VLAN的准确跟踪和监管。
4。 动态报告网络中增加的VLAN。
5。 当添加新的VLAN时,实现“即插即用”。
3.如何实现VLAN的机制
在理解了“为什么需要VLAN”之后,接下来让我们来了解一下交换机是如何使用VLAN分割广播域的。
首先,在一台未设置任何VLAN的二层交换机上,任何广播帧都会被转发给除接收端口外的所有其他端口(Flooding)。例如,计算机A发送广播信息后,会被转发给端口 2、3、4。
498)this。style。
width=498;"> 这时,如果在交换机上生成红、蓝两个VLAN;同时设置端口 1、2属于红色VLAN、端口 3、4属于蓝色VLAN。再从A发出广播帧的话,交换机就只会把它转发给同属于一个VLAN的其他端口——也就是同属于红色VLAN的端口2,不会再转发给属于蓝色VLAN的端口。
498)this。style。
width=498;"> 同样,C发送广播信息时,只会被转发给其他属于蓝色VLAN的端口,不会被转发给属于红色VLAN的端口。 就这样,VLAN通过限制广播帧转发的范围分割了广播域。
上图中为了便于说明,以红、蓝两色识别不同的VLAN,在实际使用中则是用“VLAN ID”来区分的。 直观地描述VLAN 如果要更为直观地描述VLAN的话,我们可以把它理解为将一台交换机在逻辑上分割成了数台交换机。
在一台交换机上生成红、蓝两个VLAN,也可以看作是将一台交换机换做一红一蓝两台虚拟的交换机。498)this。
style。width=498;"> 在红、蓝两个VLAN之外生成新的VLAN时,可以想象成又添加了新的交换机。
但是,VLAN生成的逻辑上的交换机是互不相通的。因此,在交换机上设置VLAN后,如果未做其他处理,VLAN间是无法通信的。
明明接在同一台交换机上,但却偏偏无法通信——这个事实也许让人难以接受。但它既是VLAN方便易用的特征,又是使VLAN令人难以理解的原因。
需要VLAN间通信时怎么办 那么,当我们需要在不同的VLAN间通信时又该如何是好呢? 请大家再次回忆一下:VLAN是广播域。而通常两个广播域之间由路由器连接,广播域之间来往的数据包都是由路由器中继的。
因此,VLAN间的通信也需要路由器提供中继服务,这被称作“VLAN间路由”。
4.win10无线连接图标怎么设置出来
看电脑右下角的网络图标消失了。
我们在Win10系统任务栏的空白处点击右键,然后选择“属性” 在“任务栏和开始菜单”属性窗口中我们单击“自定义”按钮 我们点击“通知区域图标”窗口下面的“启用或关闭系统图标” 在“系统图标”窗口里可以看到“网络”被关闭了。 原来是我们无意中把他关闭的原因。
我们只要将“网络”选择为“启用”,然后点击“确定”。 设置好,在Win10系统右下角可以看到“网络”图标出现了。
因为我当前使用的是无线网,所以显示的是无线网图标。这样是不是就可以看到我们的网络图标了。
转载请注明出处windows之家 » win10网卡如何添加vlan
windows之家













