网络设备配置与管理----通过VLAN划分隔离各公司的网络

发布时间:2020-07-25 17:36:03 作者:lij123
来源:网络 阅读:310

理论学习

问题1:简述以太网发展史?

1. 使用同轴电缆组建以太网

2. 使用HUB组建以太网

3. 使用交换机组建的以太网

4. 使用路由器交换机配合组建局域网

5. 使用单臂路由技术组建局域网

6. 使用路由器交换机组建局域网

 

 

问题2:VLAN的概念及意义?

VLAN 概念:虚拟局域网是通过划分逻辑信道减小广播域,隔离物理网络的一种交换机技术

VLAN 意义:减小网络广播域提升网络通信效率;逻辑隔离增加网络访问的安全性;增加组网的灵活性

 

 

 

问题3:VLAN的类型有哪些?

静态VLAN 和动态VLAN

静态VLAN 是基于接口的VLAN

动态VLAN分四种:基于接口VLAN;基于MAC地址的VLAN;基于协议的VLAN;基于IP子网的VLAN;VLAN 帧的传输过程

问题4:访问链路和中继链路的区别是什么?

访问链路:用于各VLAN成员接入,相应的接口称之为访问链路接口,接入的成员仅可以和同一VLAN内的其他成员通信,访问链路常用于直接连接计算机

中继链路:用于扩展VLAN的通信,相应的接口称之为中继链路接口,中继链路常用于交换机之间的中继链路接口连接,在建立中继链路接口之后,两端的交换机之间同一VLAN的成员可以互相通信,所以中继链路常用于扩展VLAN的实现,中继链路采用的协议有ISL和802.1Q。

 

 

 

问题5:本地VLAN和扩展VLAN的区别?

1. 如不跨交换机实现VLAN中继,所有的VLAN配置仅在本地交换机起作用,这种VLAN配置方式称为本地VLAN

VLAN 间逻辑间隔,除非采用VLAN间路由技术,否则各VLAN 不可通信;本地同一VLAN内主机可通信,在接口接收到以太网帧时打上VLAN标签,传输到目的接口后将去除VLAN标签;接入的连路仅适用访问链路access,而无需中继链路trunkVLAN信息仅在本地起作用;

2. 通过VLAN中继技术跨交换机实现同一VLAN内主机通信的技术称之为扩展VLAN

可实现不同交换机的同一VALN内主机通信,但VLAN间逻辑间隔;两端交换机都是cisco设备可使用ISL协议实现VALN中继,否则使用802.1Q实现VALN中继;各交换机上的VLAN划分可以再各交换机上手工配置完成,也可以通过VTP协议自动实现

工作任务描述

位于同一楼层的AB两公司分别有若干台计算机,这些计算机都直接连接在该楼层的同一台交换机上,由于这两个公司是独立的公司,处于信息安全保护的考虑,不希望双方的计算机之间进行通信,考虑该如何实现设备的配置。

工作任务实施

按基本任务要求进行网络拓扑结构设计(粘贴PT的拓扑图)

网络设备配置与管理----通过VLAN划分隔离各公司的网络

交换机的基本配置(本地VLAN配置)

(1) 配置交换机的VLAN信息

Switch>en

Switch#config

Configuring from terminal, memory, or network [terminal]? 

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#vlan 2

Switch(config-vlan)#name Acompany

Switch(config-vlan)#exi

Switch(config)#vlan 3

Switch(config-vlan)#name Bcompany

Switch(config-vlan)#exi

Switch(config)#in

Switch(config)#interface f0/1

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport access vlan 2

Switch(config-if)#in f0/2

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport m

Switch(config-if)#switchport mode a

Switch(config-if)#switchport mode access 

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport access vlan 3

Switch(config-if)#in

Switch(config-if)#in f0/3

Switch(config-if)#sw

Switch(config-if)#switchport m

Switch(config-if)#switchport mode a

Switch(config-if)#switchport mode access 

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport access vlan 2

Switch(config-if)#in f0/4

Switch(config-if)#sw

Switch(config-if)#switchport m

Switch(config-if)#switchport mode a

Switch(config-if)#switchport mode access 

Switch(config-if)#sw

Switch(config-if)#switchport a

Switch(config-if)#switchport access vlan 3

Switch(config-if)#

 

(2) Ping测试及查看VLAN信息

测试:

Pc1可以ping通pc3,不可以ping通pc2

网络设备配置与管理----通过VLAN划分隔离各公司的网络

Pc2可以pingpc4不可以pingpc3

网络设备配置与管理----通过VLAN划分隔离各公司的网络

查看VLAN信息:

Switch#show vlan

 

VLAN Name                             Status    Ports

---- -------------------------------- --------- -------------------------------

1    default                          active    Fa0/5, Fa0/6, Fa0/7, Fa0/8

                                                Fa0/9, Fa0/10, Fa0/11, Fa0/12

                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16

                                                Fa0/17, Fa0/18, Fa0/19, Fa0/20

                                                Fa0/21, Fa0/22, Fa0/23, Fa0/24

                                                Gig1/1, Gig1/2

2    Acompany                         active    Fa0/1, Fa0/3

3    Bcompany                         active    Fa0/2, Fa0/4

1002 fddi-default                     act/unsup 

1003 token-ring-default               act/unsup 

1004 fddinet-default                  act/unsup 

1005 trnet-default                    act/unsup 

 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1    enet  100001     1500  -      -      -        -    -        0      0

2    enet  100002     1500  -      -      -        -    -        0      0

3    enet  100003     1500  -      -      -        -    -        0      0

1002 fddi  101002     1500  -      -      -        -    -        0      0   

1003 tr    101003     1500  -      -      -        -    -        0      0   

1004 fdnet 101004     1500  -      -      -        ieee -        0      0   

1005 trnet 101005     1500  -      -      -        ibm  -        0      0   

 

Remote SPAN VLANs

------------------------------------------------------------------------------

 

 

Primary Secondary Type              Ports

------- --------- ----------------- ------------------------------------------

Switch#

工作扩展

上述任务随着两个公司的场地变迁而发生了变化,现在A公司的PC1B公司的PC2连接在同一台交换机上,而A公司的PC3B公司的PC4连接在另一台交换机上,如果仍然需要实现公司内部计算机可以通信,两公司之间不能通信,该如何进行设置?(扩展VLAN配置)

网络设备配置与管理----通过VLAN划分隔离各公司的网络

配置PC1PC3在同一VLANPC2PC4在同一VLAN

SW1:

Switch>

Switch>EN

Switch#config

Configuring from terminal, memory, or network [terminal]? 

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hos

Switch(config)#hostname swich2

swich2(config)#vlan 2

swich2(config-vlan)#exi

swich2(config)#vlan 3

swich2(config-vlan)#exi

swich2(config)#in

swich2(config)#interface f0/1

swich2(config-if)#sw

swich2(config-if)#switchport t

swich2(config-if)#switchport trunk en

swich2(config-if)#switchport trunk encapsulation doq

swich2(config-if)#switchport trunk encapsulation dot

swich2(config-if)#switchport trunk encapsulation dot1q 

swich2(config-if)#sw

swich2(config-if)#switchport m

swich2(config-if)#switchport mode t

swich2(config-if)#switchport mode trunk 

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

 

swich2(config-if)#in

swich2(config-if)#in f0/2

swich2(config-if)#sw

swich2(config-if)#switchport m

swich2(config-if)#switchport mode a

swich2(config-if)#switchport mode access 

swich2(config-if)#sw

swich2(config-if)#switchport a

swich2(config-if)#switchport access vlan 2

swich2(config-if)#in

swich2(config-if)#in f0/3

swich2(config-if)#sw

swich2(config-if)#switchport m

swich2(config-if)#switchport mode a

swich2(config-if)#switchport mode access 

swich2(config-if)#s

swich2(config-if)#sw

swich2(config-if)#switchport a

swich2(config-if)#switchport access vlan 3

swich2(config-if)#exi

swich2(config)#

 

 

 

SW2

Switch>EN

Switch#config

Configuring from terminal, memory, or network [terminal]? 

Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#h

Switch(config)#hostname sw

Switch(config)#hostname switch3

switch3(config)#vlan 2

switch3(config-vlan)#exi

switch3(config)#vlan 3

switch3(config-vlan)#exi

switch3(config)#in

switch3(config)#interface f0/1

switch3(config-if)#sw

switch3(config-if)#switchport m

switch3(config-if)#switchport 

switch3(config-if)#switchport 

switch3(config-if)#switchport trunk en

switch3(config-if)#switchport trunk encapsulation do

switch3(config-if)#switchport trunk encapsulation dot1q 

switch3(config-if)#sw

switch3(config-if)#switchport m

switch3(config-if)#switchport mode t

switch3(config-if)#switchport mode trunk 

switch3(config-if)#in

switch3(config-if)#in f0/2

switch3(config-if)#sw

switch3(config-if)#switchport M

switch3(config-if)#switchport Mode a

switch3(config-if)#switchport Mode access 

switch3(config-if)#sw

switch3(config-if)#switchport a

switch3(config-if)#switchport access vlan 2

switch3(config-if)#exi

switch3(config)#in

switch3(config)#interface f0/3

switch3(config-if)#sw

switch3(config-if)#switchport m

switch3(config-if)#switchport mode a

switch3(config-if)#switchport mode access 

switch3(config-if)#sw

switch3(config-if)#switchport a

switch3(config-if)#switchport access vlan 3

switch3(config-if)#

检查交换机1trunk接口:

swich2#show interfaces trunk 

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

 

Port        Vlans allowed on trunk

Fa0/1       1-1005

 

Port        Vlans allowed and active in management domain

Fa0/1       1,2,3

 

Port        Vlans in spanning tree forwarding state and not pruned

Fa0/1       1,2,3

swich2#

 

两两测试,pc1PC3可以PING通,PC2PC4可以PING 

网络设备配置与管理----通过VLAN划分隔离各公司的网络

网络设备配置与管理----通过VLAN划分隔离各公司的网络

思考问题:

问题1本征VLAN有什么作用?

 本征vlan通过trunk链路传输各种vlan数据,仅对于trunk接口有效

 



推荐阅读:
  1. 网络设备配置与管理---VLAN间路由实现部门间通信
  2. VLAN划分实验

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

局域网 交换机 计算机

上一篇:Kafka 0.10问题点滴

下一篇: 堆排序   和 堆的大数据应用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》