基于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

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

相关推荐
友友马6 分钟前
『 Linux 』网络层 - IP协议(一)
linux·网络·tcp/ip
码老白1 小时前
【老白学 Java】Warshipv2.0(二)
java·网络
安迁岚1 小时前
【SQL Server】华中农业大学空间数据库实验报告 实验三 数据操作
运维·服务器·数据库·sql·mysql
HackKong1 小时前
小白怎样入门网络安全?
网络·学习·安全·web安全·网络安全·黑客
vmlogin虚拟多登浏览器1 小时前
虚拟浏览器可以应对哪些浏览器安全威胁?
服务器·网络·安全·跨境电商·防关联
澜世2 小时前
2024小迪安全基础入门第三课
网络·笔记·安全·网络安全
追风赶月、2 小时前
【Linux】线程概念与线程控制
linux·运维·服务器
ZZZCY20034 小时前
华为ENSP--IP编址及静态路由配置
网络·华为
EasyCVR4 小时前
私有化部署视频平台EasyCVR宇视设备视频平台如何构建视频联网平台及升级视频转码业务?
大数据·网络·音视频·h.265
hgdlip4 小时前
主IP地址与从IP地址:深入解析与应用探讨
网络·网络协议·tcp/ip