首页 > 其他分享 >2024/6/14

2024/6/14

时间:2024-06-19 17:14:09浏览次数:12  
标签:14 Fa0 vlan 2024 Interface state interface config

学习时长:3小时

代码行数:未统计

博客数量:1篇

今天完成计网实验三的部分,也是最后一次实验

S1>enable
S1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#vlan 10
S1(config-vlan)#interface fastethernet 0/1
S1(config-if)#switchport access vlan 10
S1(config-if)#interface fastethernet 0/2
S1(config-if)#switchport access vlan 10
S1(config-if)#exit
S1(config)#vlan 20
S1(config-vlan)#interface fastethernet 0/4
S1(config-if)#switchport access vlan 20
S1(config-if)#interface fastethernet 0/5
S1(config-if)#switchport access vlan 20
S1(config-if)#end
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#show vlan

Vlan划分情况:

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, 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
10 VLAN0010 active Fa0/1, Fa0/2
20 VLAN0020 active Fa0/4, Fa0/5

 

 

②配置二层交换机S2
S2>enable
S2#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#vlan 10
S2(config-vlan)#interface fastethernet 0/1
S2(config-if)#switchport access vlan 10
S2(config-if)#interface fastethernet 0/2
S2(config-if)#switchport access vlan 10
S2(config-if)#interface fastethernet 0/3
S2(config-if)#switchport access vlan 10
S2(config-if)#end
S2#
%SYS-5-CONFIG_I: Configured from console by console
S2#show vlan

Vlan划分结果

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, 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
10 VLAN0010 active Fa0/1, Fa0/2, Fa0/3
20 VLAN0020 active Fa0/3

 

 


③配置二层交换机S3
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vlan 20
S3(config-vlan)#exit
S3(config)#interface vlan 20
S3(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S3(config-if)#interface fastethernet 0/1
S3(config-if)#switchport access vlan 20
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upS3(config-if)#
S3(config-if)#exit
S3(config)#interface fastethernet 0/2
S3(config-if)#switchport access vlan 20
S3(config-if)# interface fastethernet 0/3
S3(config-if)#switchport access vlan 20
S3(config-if)#end
S3#
%SYS-5-CONFIG_I: Configured from console by console

Vlan划分结果

S3#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, 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
10 VLAN0010 active
20 VLAN0020 active Fa0/1, Fa0/2,Fa0/3

④配置二层交换机S4
Switch>enable
Switch#config
Configuring fr,om terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S4
S4(config)#vlan 20
S4(config-vlan)#exit
S4(config)#interface vlan 20
S4(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S4(config-if)#interface fastethernet 0/1
S4(config-if)#switchport access vlan 20

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upS4(config-if)#
S4(config-if)#exit
S4(config)#interface fastethernet 0/2
S4(config-if)#switchport access vlan 20
S4(config-if)# interface fastethernet 0/3
S4(config-if)#switchport access vlan 20
S4(config-if)#end
S4#
%SYS-5-CONFIG_I: Configured from console by console

Vlan划分结果

S4#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, 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
20 VLAN0020 active Fa0/1, Fa0/2,F0/3

⑤配置二层交换机S5(将F1/1端口设置为trunk模式)
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/1
Switch(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
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Vlan划分结果

Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa4/1, Fa5/1
10 VLAN0010 active Fa2/1
20 VLAN0020 active Fa0/1, Fa3/1
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

 

 

 

 

 

⑥配置二层交换机S6(将F1/1端口设置为trunk模式)
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#interface fastethernet 2/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#interface fastethernet 3/1
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#interface fastethernet 1/1
Switch(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up
Switch(config-if)#exit
Switch(config)#exit
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#

Vlan划分结果

Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa4/1, Fa5/1
10 VLAN0010 active Fa2/1
20 VLAN0020 active Fa3/1
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

 

第四步:配置三层交换机(划分vlan,配置rip协议)
①配置三层交换机S35601
左边三层交换机
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S35601
S35601(config)#vlan 10
S35601(config-vlan)#exit
S35601(config)#vlan 20
S35601(config-vlan)#exit
S35601(config)#vlan 30
S35601(config-vlan)#
S35601(config-vlan)#exit
S35601(config)#interface vlan 10
S35601(config-if)#ip address 192.168.1.1 255.255.255.0
S35601(config-if)#no shutdown
S35601(config-if)#exit
S35601(config)#interface vlan 20
S35601(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S35601(config-if)#interface fastethernet 0/2
S35601(config-if)#switchport access vlan 20

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upS35601(config-if)#exit
S35601(config)#interface vlan 20
S35601(config-if)#ip address 192.168.10.1 255.255.255.0
S35601(config-if)#no shutdown
S35601(config-if)#end
S35601#
%SYS-5-CONFIG_I: Configured from console by console
S35601#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
S35601(config)#interface vlan 30
S35601(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
S35601(config-if)#interface fastethernet 0/3
S35601(config-if)#switchport access vlan 30
S35601(config-if)#exit
S35601(config)#interface vlan 30
S35601(config-if)#ip address 192.168.3.1
% Incomplete command.
S35601(config-if)#ip address 192.168.3.1 255.255.255.0
S35601(config-if)#no shutdown
S35601(config-if)#end
S35601#
%SYS-5-CONFIG_I: Configured from console by console
S35601#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, 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, Gig0/1, Gig0/2
10 VLAN0010 active Fa0/1
20 VLAN0020 active Fa0/2
30 VLAN0030 active Fa0/3
②配置三层交换机S35602
Switch>enable
Switch#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 10
Switch(config-vlan)#interface fastethernet 0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit
Switch(config)#vlan 20
Switch(config-vlan)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#vlan 30
Switch(config-vlan)#interface fastethernet 0/3
Switch(config-if)#switchport access vlan 30
Switch(config-if)#exit
Switch(config)#interface vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
Switch(config-if)#ip address 192.168.5.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 20
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
Switch(config-if)#ip address 192.168.6.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 30
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
Switch(config-if)#ip address 192.168.7.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#
Switch#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, 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, Gig0/1, Gig0/2
10 VLAN0010 active Fa0/1
20 VLAN0020 active Fa0/2
30 VLAN0030 active Fa0/3

 

 

第五步:配置路由器
①配置路由器R0
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R0
R0(config)#interface fastethernet 0/0
R0(config-if)#ip address 192.168.3.2 255.255.255.0
R0(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R0(config-if)#exit
R0(config)#interface serial 2/0
R0(config-if)#ip address 192.168.4.1 255.255.255.0
R0(config-if)#clock rate 64000
R0(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
R0(config-if)#end
R0#
%SYS-5-CONFIG_I: Configured from console by console
R0#
②配置路由器R1
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#interface serial 2/0
Router(config-if)#ip address 192.168.6.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#
③配置路由器R2
Router>enable
Router#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastethernet 0/0
Router(config-if)#ip address 192.168.9.2 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#interface serial 2/0
Router(config-if)#ip address 192.168.4.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Router(config-if)#interface serial 3/0
Router(config-if)#ip address 192.168.8.2 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#

标签:14,Fa0,vlan,2024,Interface,state,interface,config
From: https://www.cnblogs.com/drz1145141919810/p/18256624

相关文章

  • 2024/6/2
    今日完成的主要内容是有关于数据库的实验四的内容相关内容如下:数据库的备份与恢复实验在用Windows身份验证进入SSMS后找到服务器对象,右键点击备份设备点击新建备份设备来新建一个备份设备 然后再右键点击新建的备份设备,点击备份数据库 在数据库中找到students数据库 在......
  • YC303C [ 20240617 CQYC省选模拟赛 T3 ] Generals(generals)
    题意给定一张\(n\timesm\)的地图。对于第\(0\)列,第\(m+1\)列,第\(0\)行,第\(n+1\)行,有\(2n+2m\)个人,每个人面朝地图中心。每个人走到别人染过色的位置,或走出地图,将走过的地方染色。你需要求出共有多少种本质不同的染色方案。\(n,m\le10^6\)Sol直接......
  • 【爬虫软件】2024油管评论采集工具
    目录一、背景介绍1.1软件说明1.2效果演示二、科普知识2.1关于视频id2.2关于评论时间三、爬虫代码3.1界面模块3.2爬虫模块3.3日志模块四、转载声明一、背景介绍我用python开发的GUI软件,作用是爬取油管指定视频的评论,字段含:评论id、评论内容、评论时间、评论作者昵称、评......
  • 华为OD机试真题-冠亚军排名,奖牌榜排名-2024年OD统一考试(官方D卷原题)
    介绍2024年OD统一考试(D卷),最新题库。5-11月份考试都是从本专栏中抽题,命中率百分之95。多语言解法,在线练习机试是在牛客考试,练习的时候也可以在牛客网练习,提前熟悉操作https://ac.nowcoder.com/acm/contest/5652/K点击上方链接进入牛客练习界面,可以自定义题目,自定义输入......
  • 华为OD机试真题-猴子爬山-2024年OD统一考试(官方D卷原题)
    介绍2024年OD统一考试(D卷),最新题库。5-11月份考试都是从本专栏中抽题,命中率百分之95。多语言解法,在线练习机试是在牛客考试,练习的时候也可以在牛客网练习,提前熟悉操作https://ac.nowcoder.com/acm/contest/5652/K点击上方链接进入牛客练习界面,可以自定义题目,自定义输入......
  • 华为OD机试真题-滑动窗口最大和-2024年OD统一考试(官方D卷原题)
    介绍2024年OD统一考试(D卷),最新题库。5-11月份考试都是从本专栏中抽题,命中率百分之95。多语言解法,在线练习机试是在牛客考试,练习的时候也可以在牛客网练习,提前熟悉操作https://ac.nowcoder.com/acm/contest/5652/K点击上方链接进入牛客练习界面,可以自定义题目,自定义输入......
  • 【EI核心、Scopus 】第四届计算机、遥感与航空航天国际学术会议(CRSA 2024)
    【EI核心、Scopus】第四届计算机、遥感与航空航天国际学术会议(CRSA2024)将于2024年7月5-7日在日本大阪举行。计算机、遥感与航空航天国际学术会议为来自世界各地的研究学者、工程师、学会会员以及相关领域的专家们提供一个关于“计算机科学”、“遥感技术与应用”与“航空航......
  • 华为OD机试真题-灰度图存储-2024年OD统一考试(官方D卷原题)
    介绍2024年OD统一考试(D卷),最新题库。5-11月份考试都是从本专栏中抽题,命中率百分之95。多语言解法,在线练习机试是在牛客考试,练习的时候也可以在牛客网练习,提前熟悉操作https://ac.nowcoder.com/acm/contest/5652/K点击上方链接进入牛客练习界面,可以自定义题目,自定义输入......
  • PhotoZoom Pro下载2024官方最新版-photozoom pro 8_图像无损放大软件_2024最新版下载
    PhotoZoompro8苹果版是一款功能强大的图片编辑软件,可以让用户在不影响图片清晰度的情况下对图片进行放大或者缩小,非常适合网友需要大图而手边的图片清晰度不够的时候使用,这款软件通过智能算法让你的小图片在放大之后也不会失真,并且支持批量更改,大幅提升用户的编辑效率。安......
  • 2024年语言、创新教育与文化传播国际会议(LIECC 2024)
    2024年语言、创新教育与文化传播国际会议(LIECC2024)2024InternationalConferenceonLanguage,InnovationEducation,andCulturalCommunication【重要信息】大会地点:南京大会官网:http://www.icliecc.com投稿邮箱:[email protected]【注意:将稿件Word+PDF上传至邮......