首页 > 其他分享 >6.6

6.6

时间:2024-06-17 13:59:14浏览次数:11  
标签:S2 S1 vlan 6.6 exit config Fa0

实验一vlan的创建与划分

五、实验过程(配置过程):

1.同一个交换机上的vlan划分

创建虚拟局域网VLAN11和VLAN22

Switch>enable

Switch#config

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

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

Switch(config)#hostname S1

S1(config)#vlan 22

S1(config-vlan)#name T22

S1(config-vlan)#exit

S1(config)# vlan 11

S1(config-vlan)#name T11

S1(config-vlan)#exit

S1(config)#exit

S1#

验证测试:验证虚拟局域网VLAN11和VLAN22已创建成功

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

11   T11                              active    Fa0/1, Fa0/2

22   T22                              active    Fa0/3, 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

11   enet  100011     1500  -      -      -        -    -        0      0

22   enet  100022     1500  -      -      -        -    -        0      0

1002 fddi  101002     1500  -      -      -        -    -        0      0  

S1#show vlan

为局域网VLAN11和VLAN22分配端口

S1#config

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

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

S1(config)#interface vlan 11

S1(config-if)#

%LINK-5-CHANGED: Interface Vlan11, changed state to up

S1(config-if)#interface fastethernet 0/1

S1(config-if)#switchport access vlan 11

S1(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan11, changed state to up

S1(config-if)#exit

S1(config)#interface vlan 11

S1(config-if)#interface fastethernet 0/2

S1(config-if)#switchport access vlan 11

S1(config-if)#exit

S1(config)#interface vlan 22

S1(config-if)#

%LINK-5-CHANGED: Interface Vlan22, changed state to up

S1(config-if)#interface fastethernet 0/3

S1(config-if)#switchport access vlan 22

S1(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan22, changed state to up

S1(config-if)#exit

S1(config)#interface vlan 22

S1(config-if)#interface fastethernet 0/4

S1(config-if)#switchport access vlan 22

S1(config-if)#exit

验证测试:验证为VLAN11和VLAN22分配端口成功

划分虚拟局域网之前网络情况:

 

划分虚拟局域网之后网络情况:

 

 

 

2、进行跨交换机的相同vlan之间的计算机的通信实验。

在S1上创建虚拟局域网VLAN11和VLAN22并为之分配端口

Switch>enable

Switch#config

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

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

Switch(config)#hostname S1

S1(config)#vlan 11

S1(config-vlan)#name T11

S1(config-vlan)#exit

S1(config)#interface fastethernet 0/2

S1(config-if)#switchport access vlan 11

S1(config-if)#exit

S1(config)#exit

S1#

%SYS-5-CONFIG_I: Configured from console by console

S1#show vlan id 11

 

VLAN Name                             Status    Ports

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

11   T11                              active    Fa0/2

 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

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

11   enet  100011     1500  -      -      -        -    -        0      0

 

S1#config

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

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

S1(config)#vlan 22

S1(config-vlan)#name T22

S1(config-vlan)#exit

S1(config)#interface fastethernet 0/3

S1(config-if)#switchport access vlan 22

S1(config-if)#exit

S1(config)#exit

S1#

%SYS-5-CONFIG_I: Configured from console by console

S1#show vlan id 22

 

VLAN Name                             Status    Ports

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

22   T22                              active    Fa0/3

 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

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

22   enet  100022     1500  -      -      -        -    -        0      0

 

S1#config

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

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

S1(config)#interface fastethernet 0/1

S1(config-if)#switchport mode trunk

 

S1(config-if)#

%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

S1(config-if)#exit

S1(config)#exit

S1#

%SYS-5-CONFIG_I: Configured from console by console

S1#show interface fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

Voice VLAN: none

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Administrative private-vlan trunk native VLAN: none

Administrative private-vlan trunk encapsulation: dot1q

Administrative private-vlan trunk normal VLANs: none

Administrative private-vlan trunk private VLANs: none

Operational private-vlan: none

Trunking VLANs Enabled: ALL

Pruning VLANs Enabled: 2-1001

Capture Mode Disabled

Capture VLANs Allowed: ALL

Protected: false

Appliance trust: none

在S2上创建虚拟局域网VLAN11和VLAN22并为之分配端口

Switch>enable

Switch#config

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

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

Switch(config)#host S2

S2(config)#vlan 11

S2(config-vlan)#name T11

S2(config-vlan)#exit

S2(config)#exit

S2#

%SYS-5-CONFIG_I: Configured from console by console

S2#config

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

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

S2(config)#interface fastrthernet 0/4

                         ^

% Invalid input detected at '^' marker.

 

S2(config)#interface fastethernet 0/4

S2(config-if)#switchport access vlan 11

S2(config-if)#exit

S2(config)#exit

S2#

%SYS-5-CONFIG_I: Configured from console by console

S2#show vlan id 11

 

VLAN Name                             Status    Ports

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

11   T11                              active    Fa0/4

 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

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

11   enet  100011     1500  -      -      -        -    -        0      0

 

S2#config

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

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

S2(config)#vlan 22

S2(config-vlan)#name T22

S2(config-vlan)#exit

S2(config)#interface fastethernet 0/5

S2(config-if)#switchport access vlan 22

S2(config-if)#exit

S2(config)#exit

S2#

%SYS-5-CONFIG_I: Configured from console by console

S2#show vlan id 22

 

VLAN Name                             Status    Ports

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

22   T22                              active    Fa0/5

 

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2

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

22   enet  100022     1500  -      -      -        -    -        0      0

 

S2#config

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

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

S2(config)#interface fastethernet 0/1

S2(config-if)#switchport mode trunk

S2(config-if)#exit

S2(config)#exit

S2#

%SYS-5-CONFIG_I: Configured from console by console

S2#show interces fastethernet 0/1 switchport

             ^

% Invalid input detected at '^' marker.

 

S2#show interface fastethernet 0/1 switchport

Name: Fa0/1

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: On

Access Mode VLAN: 1 (default)

Trunking Native Mode VLAN: 1 (default)

Voice VLAN: none

Administrative private-vlan host-association: none

Administrative private-vlan mapping: none

Administrative private-vlan trunk native VLAN: none

Administrative private-vlan trunk encapsulation: dot1q

Administrative private-vlan trunk normal VLANs: none

Administrative private-vlan trunk private VLANs: none

Operational private-vlan: none

Trunking VLANs Enabled: ALL

Pruning VLANs Enabled: 2-1001

Capture Mode Disabled

Capture VLANs Allowed: ALL

Protected: false

 --More—

划分虚拟局域网之前网络情况:

 

划分虚拟局域网之后网络情况:

六、实验总结:

 通过本次实验,可以发现,不管是只有一个交换机,还是跨交换机,只有在相同的局域网上pc机之间才能通信,不在同一个局域网的pc之间不能通信。

标签:S2,S1,vlan,6.6,exit,config,Fa0
From: https://www.cnblogs.com/binglinll/p/18252239

相关文章

  • 6.6
    学习心得今日学习时间2hmportrandomimportmath#定义函数用于判断一个点(x,y)是否在单位圆内defis_inside_circle(x,y):#计算点到原点的距离平方distance_squared=x**2+y**2#判断距离是否小于1(单位圆半径为1)returndistance_squared<=1#获取用户输入的掷飞镖次数......
  • 6.6
    今天发现拼接后的sql语句无法实现,就是拼接后的sql语句在控制台可以查找出来结果在mapper层却查询不到结果,所以我在b站找到了下自己原来学习的视频,进行了复习,我发现在对sql语句拼接时用的符号也有讲究,其实我可以选择不拼接sql语句,可以传递数组使用mybatis进行数据的填充。 ......
  • 6.6学习进度
    今天进行了Python大作业可视化界面设计器的部分编写,以下代码为画图的功能,以及调节笔刷大小的功能importtkinterastkfromtkinterimportfiledialog,messagebox,colorchooser,simpledialogclassLoginWindow:def__init__(self,root):self.root=root......
  • 【网络安全的神秘世界】2024.6.6 Docker镜像停服?解决最近Docker镜像无法拉取问题
    ......
  • Nexpose v6.6.255 for Linux & Windows - 漏洞扫描
    Nexposev6.6.255forLinux&Windows-漏洞扫描Rapid7VulnerabilityManagement,releaseJun05,2024请访问原文链接:https://sysin.org/blog/nexpose-6/,查看最新版。原创作品,转载请保留出处。作者主页:sysin.org您的本地漏洞扫描程序搜集通过实时覆盖整个网络,随......
  • 6.6
    完成python作业  8-4【Python0028】分段函数图形绘制【题目描述】已知,在区间绘制该分段函数的曲线,以及由该曲线所包围的填充图形。【练习要求】请给出源代码程序和运行测试结果,源代码程序要求添加必要的注释。  importmatplotlib.pyplotaspltimportnumpya......
  • [转帖]Linux Kernel 6.6 确认成为 LTS 版本
    https://www.kernel.org/category/releases.html  GregKroah-Hartman已经宣布LinuxKernel6.6版本为长期支持(LTS)版本;支持期限到2026年12月。LinuxKernel6.6于10月29日正式发布,是一次包含了新功能、硬件支持、安全增强和性能改进的重大更新。具......
  • 2024.6.6
    更换了hadoop中的jdk的版本从1.8->17rdd行动算子和转换算子序列化//TODO//Spark在编写代码时,调用转换算子,并不会真正执行,因为只是在Driver端组合功能//所以当前的代码其实就是在Driver端执行//所以当前main方法也称之为driver方法......
  • 2024.6.6 日记
    晚上写不动题,所以打算每天睡前写点神秘文字。明天还有模拟赛,相似。周二T1挂了,凭借神秘的狗运打表瞪出了T2的结论,明天,或者以后,还会有这样的好运吗。呃我要干啥,要不然写点总结。这两天讲了dp,于是我补了一点题,找了一点题。感觉dp的方法其实大概就是,对着一个已知的过程dp,......
  • 6.6--链表
    链表的定义C++的定义链表节点方式,如下所示://单链表structListNode{intval;//节点上存储的元素ListNode*next;//指向下一个节点的指针ListNode(intx):val(x),next(NULL){}//节点的构造函数};不定义构造函数,C++默认生成一个构造函数,但是这......