vlan的基本配置1
2012-12-05 16:27
302 查看
VLAN的基本命令
1.交换机上配置IP :
1. 命名:Switch(config)# host S29502. 配置IP。
S2950(config)# int vlan 1 管理VLAN
S2950(config-if)# ip add 192.168.1.210 255.255.255.0
3. [/b]S2950(config)# ip default-gateway 192.168.1.251[/b]
目的:方便从其它网段对SW进行Telnet远程管理。4.[/b]查看[/b]MAC[/b]表。[/b]
S2950#sh mac-add
5.设置双工和速率。
S2950(config)# int f0/1
S2950(config-if)#speed 10 / 100 / auto
S2950(config-if)#duplex half / full / auto
2.Vlan的配置
1. [/b]划分[/b]VLAN[/b]。[/b]
S2950(config)# vlan 2S2950(config)# vlan 2-4
S2950(config)# vlan 2-4,10,20,30
2. 将端口划到[/b]VLAN[/b]。[/b]
S2924(config)# int f0/3# switchport mode access
# sw acc vlan 2
S2950(config)# int range f0/3 – 4
S2950(config-range-if)# sw mode acc
S2950(config-range-if)# sw acc vlan 2
3. 将接口配置成trunk.
S3560[/b]([/b]config[/b])[/b]# int f0/ 24[/b]
S35600(config-range-if)# sw trunk encapsulation isl
dotlq (2950 默认)
S35600(config-range-if)# sw mode trunk
S35600(config-range-if)# sw nonegotiate
4. VTP
S3560[/b]([/b]config[/b])[/b]# vtp domain wq.com [/b]域名必须设置
# vtp mode server(服务器)/ client(客户端)/ transparent(透明模式)
#vtp pass cisco 密码为可选
5. 单臂路由(在交换机的接口配置成trunk模式,路由器上配置命令如下:)
R1([/b]config[/b])[/b]#int f0/1[/b]
R1([/b]config-if[/b])[/b]#no shutdown[/b]
R1([/b]config-if[/b])#inf f0/1.2(vlan2)[/b]
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip add 192.168.2.254 255.255.255.0
R1([/b]config-if[/b])#inf f0/1.3(vlan3)[/b]
R1(config-subif)#encapsulation dot1Q 3
R1(config-subif)#ip add 192.168.3.254 255.255.255.0
R1(config-subif)#exit
相关文章推荐
- 一个实验搞定华为hybrid-vlan基本配置及原理
- CCNA配置试验五 vlan的基本配置
- H3C交换机基本配置(vlan,dhcp,telnet)
- CCNA配置试验五 vlan的基本配置
- PingingLab传世经典系列《CCNA完全配置宝典》-3.1 VLAN基本配置
- 基本VLAN特性配置与管理——5
- Vlan的基本配置
- 华为交换机的VLAN基本配置
- 基本VLAN特性配置与管理——4
- H3C交换机基本配置(vlan,dhcp,telnet)
- 基本VLAN特性配置与管理——2
- 交换机和路由器的基本配置命令,VLAN和单臂路由的配置
- CCNA配置试验五 vlan的基本配置
- Cisco 的基本配置实例之四----vlan的规划及配置(核心交换机)
- VLAN的基本配置
- VLAN基本配置实验
- VLAN的基本配置
- CCNA之旅-交换机的基本配置-stp、vtp、vlan间通信实验
- 基本VLAN特性配置与管理——3