2024/5/24

所花时间:3小时

代码行:160行

博客量:1篇

了解到的知识点

第二步:配置三层交换机(划分vlan,配置rip协议)

① 配置三层交换机

三层交换机Switch0

Switch>enable

Switch#config

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

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

Switch(config)#vlan 11                   

Switch(config)#interface fastethernet0/1     

Switch(config-if)#switchport access vlan 11

Switch(config)#vlan 13                   

Switch(config)#interface fastethernet0/2    

Switch(config-if)#switchport access vlan 13

Switch(config)#vlan 22                      

Switch(config)#interface fastethernet0/3   

Switch(config-if)#switchport access vlan 22

Switch(config-if)#exit

Switch(config)#interface vlan 11

Switch(config-if)#ip address 192.168.1.1  255.255.255.0

Switch(config-if)#no shutdown                

Switch(config)#interface vlan 13

Switch(config-if)#ip address 192.168.3.1  255.255.255.0

Switch(config-if)#no shutdown                

Switch(config-if)#exit

Switch(config)#interface vlan 22

Switch(config-if)#ip address 192.168.2.2  255.255.255.0

Switch(config-if)#no shutdown

② 配置三层交换机Switch1

Switch>enable

Switch#config

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

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

Switch(config)#vlan 25

Switch(config-vlan)#interface fastethernet 0/1

Switch(config-if)#switchport access vlan 25

Switch(config-if)#exit

Switch(config)#vlan 15

Switch(config-vlan)#interface fastethernet 0/2

Switch(config-if)#switchport access vlan 15

Switch(config-if)#exit

Switch(config)#interface vlan 25

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.8.2 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

Switch(config)#interface vlan 15

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.4.1 255.255.255.0

Switch(config-if)#no shutdown

Switch(config-if)#exit

③ 配置三层交换机Switch2

Switch>enable

Switch#config

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

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

Switch(config)#vlan 50

Switch(config-vlan)#interface fastethernet 0/1

Switch(config-if)#switchport access vlan 50

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)#interface vlan 50

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.9.2 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

 

第五步:配置路由器

①配置路由器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.2.1 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.5.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.8.1 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.5.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.7.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.1 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 3/0

Router(config-if)#ip address 192.168.7.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#

 

第六步:验证通信情况

PC2为例,单击PC2->Desktop->Command PromptPC2~PC9PC22~P23之间可以相互通信

 

 

五、实验总结:

在本次实验中,我通过对网络设备的连通和对拓扑的分析,加深了对常见典型局域网拓扑的理解;通过路由建立起网络之间的连接,了解了网络路由的设计与配置;并进一步熟悉了交换机、路由器的基本操作命令。首先,我了解了常见的局域网拓扑结构,包括星型、总线型、环形和网状型。通过实际搭建这些拓扑结构,并观察网络设备之间的连通情况,我们深入理解了各种拓扑结构的优缺点以及适用场景。接下来,我学习了网络路由的设计与配置。通过配置路由器,我们可以实现不同网络之间的连接与通信。了解路由表的概念以及如何配置静态路由和动态路由,对于构建复杂网络结构至关重要。在实验过程中,我们体验了在不同网络之间进行数据包传输的过程,加深了对路由原理的理解。最后,我进一步熟悉了交换机和路由器的基本操作命令。掌握这些命令可以帮助我们对网络设备进行管理和配置,确保网络运行的顺畅和安全。过本次实验,我们不仅掌握了网络拓扑的构建与分析技巧,还提升了网络路由设计与配置的能力,同时加强了对网络设备操作命令的熟悉程度。

 

posted @ 2024-05-24 21:51  为20岁努力  阅读(3)  评论(0编辑  收藏  举报