基于Cisco的校园网络拓扑搭建

特此说明:请先看评论区留言哦~

一、基础配置

1.新建拓扑图

2.服务器配置

3.PC端配置

4.核心交换机配置

a.CORE-S1

Switch>enable

Switch#configure terminal

Switch(config)#hostname CORE-S1

CORE-S1(config)#vlan 10

CORE-S1(config-vlan)#vlan 20

CORE-S1(config-vlan)#vlan 30

CORE-S1(config-vlan)#vlan 40

CORE-S1(config-vlan)#exit

CORE-S1(config)#interface vlan 10

CORE-S1(config-if)#ip address 192.168.10.254 255.255.255.0

CORE-S1(config-if)#standby 10 ip 192.168.10.252

CORE-S1(config-if)#standby 10 priority 120

CORE-S1(config-if)#standby 10 preempt

CORE-S1(config-if)#standby 10 track f0/1

CORE-S1(config-if)#standby 10 track f0/2

CORE-S1(config-if)#exit

CORE-S1(config)#interface vlan 20

CORE-S1(config-if)#ip address 192.168.20.254 255.255.255.0

CORE-S1(config-if)#standby 20 ip 192.168.20.252

CORE-S1(config-if)#standby 20 priority 120

CORE-S1(config-if)#standby 20 preempt

CORE-S1(config-if)#standby 20 track f0/1

CORE-S1(config-if)#standby 20 track f0/2

CORE-S1(config-if)#exit

CORE-S1(config)#interface vlan 30

CORE-S1(config-if)#ip address 192.168.30.254 255.255.255.0

CORE-S1(config-if)#standby 30 ip 192.168.30.252

CORE-S1(config-if)#standby 30 track f0/1

CORE-S1(config-if)#standby 30 track f0/2

CORE-S1(config-if)#exit

CORE-S1(config)#interface vlan 40

CORE-S1(config-if)#ip address 192.168.40.254 255.255.255.0

CORE-S1(config-if)#standby 40 ip 192.168.40.252

CORE-S1(config-if)#standby 40 track f0/1

CORE-S1(config-if)#standby 40 track f0/2

CORE-S1(config-if)#exit

CORE-S1(config)#interface fastEthernet 0/1

CORE-S1(config-if)#no switchport

CORE-S1(config-if)#ip address 192.168.4.2 255.255.255.0

CORE-S1(config-if)#no shutdown

CORE-S1(config-if)#exit

CORE-S1(config)#interface fastEthernet 0/2

CORE-S1(config-if)#no switchport

CORE-S1(config-if)#ip address 192.168.6.2 255.255.255.0

CORE-S1(config-if)#no shutdown

CORE-S1(config-if)#exit

CORE-S1(config)#ip routing

CORE-S1(config)#int port-channel 1

CORE-S1(config-if)#switchport trunk encapsulation dot1q

CORE-S1(config-if)#switchport mode trunk

CORE-S1(config-if)#exit

CORE-S1(config)#int range fastEthernet 0/3-4

CORE-S1(config-if-range)#switchport trunk encapsulation dot1q

CORE-S1(config-if-range)#switchport mode trunk

CORE-S1(config-if-range)#channel-group 1 mode on

CORE-S1(config-if-range)#exit

CORE-S1(config)#spanning-tree mode pvst

CORE-S1(config)#spanning-tree vlan 10,20 root primary

CORE-S1(config)#spanning-tree vlan 30,40 root secondary

CORE-S1(config)#interface range fastEthernet 0/5-8

CORE-S1(config-if-range)#switchport trunk encapsulation dot1q

CORE-S1(config-if-range)#switchport mode trunk

b.CORE-S2

Switch>enable

Switch#configure terminal

Switch(config)#hostname CORE-S2

CORE-S2(config)#vlan 10

CORE-S2(config-vlan)#vlan 20

CORE-S2(config-vlan)#vlan 30

CORE-S2(config-vlan)#vlan 40

CORE-S2(config-vlan)#exit

CORE-S2(config)#interface vlan 10

CORE-S2(config-if)#ip address 192.168.10.253 255.255.255.0

CORE-S2(config-if)#standby 10 ip 192.168.10.252

CORE-S2(config-if)#standby 10 track f0/1

CORE-S2(config-if)#standby 10 track f0/2

CORE-S2(config-if)#exit

CORE-S2(config)#interface vlan 20

CORE-S2(config-if)#ip ad 192.168.20.253 255.255.255.0

CORE-S2(config-if)#standby 20 ip 192.168.20.252

CORE-S2(config-if)#standby 20 track f0/1

CORE-S2(config-if)#standby 20 track f0/2

CORE-S2(config-if)#exit

CORE-S2(config)#interface vlan 30

CORE-S2(config-if)#ip address 192.168.30.253 255.255.255.0

CORE-S2(config-if)#standby 30 ip 192.168.30.252

CORE-S2(config-if)#standby 30 priority 120

CORE-S2(config-if)#standby 30 preempt

CORE-S2(config-if)#standby 30 track f0/1

CORE-S2(config-if)#standby 30 track f0/2

CORE-S2(config-if)#exit

CORE-S2(config)#interface vlan 40

CORE-S2(config-if)#ip address 192.168.40.253 255.255.255.0

CORE-S2(config-if)#st

CORE-S2(config-if)#standby 40 ip 192.168.40.252

CORE-S2(config-if)#standby 40 priority 120

CORE-S2(config-if)#standby 40 preempt

CORE-S2(config-if)#standby 40 track f0/1

CORE-S2(config-if)#standby 40 track f0/2

CORE-S2(config-if)#exit

CORE-S2(config)#interface fastEthernet 0/1

CORE-S2(config-if)#no switchport

CORE-S2(config-if)#ip address 192.168.5.2 255.255.255.0

CORE-S2(config-if)#no shutdown

CORE-S2(config-if)#exit

CORE-S2(config)#interface fastEthernet 0/2

CORE-S2(config-if)#no switchport

CORE-S2(config-if)#ip address 192.168.7.2 255.255.255.0

CORE-S2(config-if)#no shutdown

CORE-S2(config-if)#exit

CORE-S2(config)#ip routing

CORE-S2(config)#int port-channel 1

CORE-S2(config-if)#switchport trunk encapsulation dot1q

CORE-S2(config-if)#switchport mode trunk

CORE-S2(config-if)#exit

CORE-S2(config)#int range fastEthernet 0/3-4

CORE-S2(config-if-range)#switchport trunk encapsulation dot1q

CORE-S2(config-if-range)#switchport mode trunk

CORE-S2(config-if-range)#channel-group 1 mode on

CORE-S2(config-if-range)#exit

CORE-S2(config)#spanning-tree mode pvst

CORE-S2(config)#spanning-tree vlan 10,20 root secondary

CORE-S2(config)#spanning-tree vlan 30,40 root primary

CORE-S2(config)#int range fastEthernet 0/5-8

CORE-S2(config-if-range)#switchport trunk encapsulation dot1q

CORE-S2(config-if-range)#switchport mode trunk

5.核心路由器配置

a.CORE-R1

Router>enable

Router#configure terminal

Router(config)#hostname CORE-R1

CORE-R1(config)#interface fastEthernet 1/0

CORE-R1(config-if)#ip address 192.168.4.1 255.255.255.0

CORE-R1(config-if)#no shutdown

CORE-R1(config-if)#exit

CORE-R1(config)#interface fastEthernet 1/1

CORE-R1(config-if)#ip address 192.168.5.1 255.255.255.0

CORE-R1(config-if)#no shutdown

CORE-R1(config-if)#exit

CORE-R1(config)#interface fastEthernet 0/1

CORE-R1(config-if)#ip address 192.168.3.1 255.255.255.0

CORE-R1(config-if)#no shutdown

CORE-R1(config-if)#exit

CORE-R1(config)#interface fastEthernet 0/0

CORE-R1(config-if)#ip address 192.168.1.2 255.255.255.0

CORE-R1(config-if)#no shutdown

b.CORE-R2

Router>enable

Router#configure terminal

Router(config)#hostname CORE-R2

CORE-R2(config)#interface fastEthernet 1/0

CORE-R2(config-if)#ip address 192.168.7.1 255.255.255.0

CORE-R2(config-if)#no shutdown

CORE-R2(config-if)#exit

CORE-R2(config)#interface fastEthernet 1/1

CORE-R2(config-if)#ip address 192.168.6.1 255.255.255.0

CORE-R2(config-if)#no shutdown

CORE-R2(config-if)#exit

CORE-R2(config)#interface fastEthernet 0/1

CORE-R2(config-if)#ip address 192.168.3.2 255.255.255.0

CORE-R2(config-if)#no shutdown

CORE-R2(config-if)#exit

CORE-R2(config)#interface fastEthernet 0/0

CORE-R2(config-if)#ip address 192.168.2.2 255.255.255.0

CORE-R2(config-if)#no shutdown

6.出口路由器配置

Router>enable

Router#configure terminal

Router(config)#hostname CK-R

CK-R(config)#interface fastEthernet 0/0

CK-R(config-if)#ip address 192.168.1.1 255.255.255.0

CK-R(config-if)#no shutdown

CK-R(config-if)#exit

CK-R(config)#interface fastEthernet 0/1

CK-R(config-if)#ip address 192.168.2.1 255.255.255.0

CK-R(config-if)#no shutdown

CK-R(config-if)#exit

CK-R(config)#interface serial 0/0/0

CK-R(config-if)#ip address 200.10.1.1 255.255.255.240

CK-R(config-if)#no shutdown

CK-R(config-if)#clock rate 64000

7.互联网路由器配置

Router>enable

Router#configure terminal

Router(config)#hostname ISP-R

ISP-R(config)#interface serial 0/0/0

ISP-R(config-if)#ip address 200.10.1.2 255.255.255.240

ISP-R(config-if)#no shutdown

ISP-R(config-if)#exit

ISP-R(config)#interface fastEthernet 0/0

ISP-R(config-if)#ip address 100.10.1.1 255.255.255.240

ISP-R(config-if)#no shutdown

8.S1配置

Switch>enable

Switch#configure terminal

Switch(config)#hostname S1

S1(config)#vlan 10

S1(config-vlan)#vlan 20

S1(config-vlan)#vlan 30

S1(config-vlan)#vlan 40

S1(config-vlan)#exit

S1(config)#int range fastEthernet 0/1-2

S1(config-if-range)#switchport mode access

S1(config-if-range)#switchport mode trunk

S1(config-if-range)#exit

S1(config)#int range fastEthernet 0/3-4

S1(config-if-range)#switchport mode access

S1(config-if-range)#switchport access vlan 10

9.S2配置

Switch>enable

Switch#configure terminal

Switch(config)#hostname S2

S2(config)#vlan 10

S2(config-vlan)#vlan 20

S2(config-vlan)#vlan 30

S2(config-vlan)#vlan 40

S2(config-vlan)#exit

S2(config)#interface range fastEthernet 0/1-2

S2(config-if-range)#switchport mode access

S2(config-if-range)#switchport mode trunk

S2(config-if-range)#exit

S2(config)#interface fastEthernet 0/3

S2(config-if)#switchport mode access

S2(config-if)#switchport access vlan 20

10.S3配置

Switch>enable

Switch#configure terminal

Switch(config)#hostname S3

S3(config)#vlan 10

S3(config-vlan)#vlan 20

S3(config-vlan)#vlan 30

S3(config-vlan)#vlan 40

S3(config-vlan)#exit

S3(config)#interface range fastEthernet 0/1-2

S3(config-if-range)#switchport mode access

S3(config-if-range)#switchport mode trunk

S3(config-if-range)#exit

S3(config)# interface fastEthernet 0/3

S3(config-if)#switchport mode access

S3(config-if)#switchport access vlan 30

11.S4配置

Switch>enable

Switch#configure terminal

Switch(config)#hostname S4

S4(config)#vlan 10

S4(config-vlan)#vlan 20

S4(config-vlan)#vlan 30

S4(config-vlan)#vlan 40

S4(config-vlan)#exit

S4(config)#interface range fastEthernet 0/1-2

S4(config-if-range)#switchport mode access

S4(config-if-range)#switchport mode trunk

S4(config-if-range)#exit

S4(config)#interface fastEthernet 0/3

S4(config-if)#switchport mode access

S4(config-if)#switchport access vlan 40

二、OSPF配置

1.核心交换机配置

a.CORE-S1

CORE-S1>enable

CORE-S1#configure terminal

CORE-S1(config)#router ospf 10

CORE-S1(config-router)#network 192.168.10.0 0.0.0.255 area 0

CORE-S1(config-router)#network 192.168.20.0 0.0.0.255 area 0

CORE-S1(config-router)#network 192.168.30.0 0.0.0.255 area 0

CORE-S1(config-router)#network 192.168.40.0 0.0.0.255 area 0

CORE-S1(config-router)#network 192.168.4.0 0.0.0.255 area 0

CORE-S1(config-router)#network 192.168.6.0 0.0.0.255 area 0

b.CORE-S2

CORE-S2>enable

CORE-S2#configure terminal

CORE-S2(config)#router ospf 20

CORE-S2(config-router)#network 192.168.10.0 0.0.0.255 a

CORE-S2(config-router)#network 192.168.10.0 0.0.0.255 area 0

CORE-S2(config-router)#network 192.168.20.0 0.0.0.255 area 0

CORE-S2(config-router)#network 192.168.30.0 0.0.0.255 area 0

CORE-S2(config-router)#network 192.168.40.0 0.0.0.255 area 0

CORE-S2(config-router)#network 192.168.5.0 0.0.0.255 area 0

CORE-S2(config-router)#network 192.168.7.0 0.0.0.255 area 0

试看结束啦,需要完整版请私信哦~

相关推荐
城南vision15 分钟前
计算机网络——TCP篇
网络·tcp/ip·计算机网络
Ciderw43 分钟前
块存储、文件存储和对象存储详细介绍
网络·数据库·nvme·对象存储·存储·块存储·文件存储
lihuhelihu1 小时前
第3章 CentOS系统管理
linux·运维·服务器·计算机网络·ubuntu·centos·云计算
山东布谷科技官方1 小时前
布谷直播源码部署服务器关于数据库配置的详细说明
运维·服务器·数据库·直播系统源码·直播源码·直播系统搭建·直播软件开发
爱吃喵的鲤鱼1 小时前
linux进程的状态之环境变量
linux·运维·服务器·开发语言·c++
Tony聊跨境2 小时前
独立站SEO类型及优化:来检查这些方面你有没有落下
网络·人工智能·tcp/ip·ip
2403_875736872 小时前
道品科技智慧农业中的自动气象检测站
网络·人工智能·智慧城市
荒Huang2 小时前
Linux挖矿病毒(kswapd0进程使cpu爆满)
linux·运维·服务器
零意@3 小时前
ubuntu切换不同版本的python
windows·python·ubuntu
九河云3 小时前
如何选择适合的AWS EC2实例类型
服务器·云计算·aws