综合实验:期末

2023-12-15 04:46:53

实验要求
一.物理连接

实验分2个组进行,使用思科模拟软件。每个同学模拟两个组。每个组选用一台路由器、一台三层交换机和一台二层交换机。要求按下图拓扑进行连接。如下图:最上端设备为核心交换机,按老师要求配置(后面提供)

在这里插入图片描述

核心交换机配置:

Switch>

Switch>ena

Switch#conf t

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

Switch(config)#hostname CORE

CORE(config)#int fa 0/1

CORE(config-if)#no shut

CORE(config-if)#no switchport 

CORE(config-if)#ip add 200.200.1.254 255.255.255.0

CORE(config-if)#int fa 0/2

CORE(config-if)#no shut

CORE(config-if)#no switchport 

CORE(config-if)#ip add 200.200.2.254 255.255.255.0

CORE(config-if)#

CORE#(config)#ip routing

CORE#

注意:核心交换机必须按老师指定的配置,不能自己增加额外的配置

二. IP编址

每组两台交换机之间通过端口24进行连接,之间配置成TRUNK链路。每个组配置VLAN10x、VLAN20x,其中x为组号。例如:组号为2时,需要配置VLAN102和202。

VLAN10x 使用IP网络192.168.10x.0/24, VLAN20x使用IP网络192.168.20x.0/24。VLAN10x为服务器网段,VLAN20x为客户端网段。DNS、WEB和EMAIL(不做)使用相应网段的101-103三个IP地址。在三层交换机中启用VLAN10x和VLAN20x三层接口,其IP分别设为相应IP网络的地址1。

第一组路由器配置lo0:1.1.1.1/32;三层交换机配置lo0:1.1.1.2/32

第二组路由器配置lo0:2.2.2.1/32;三层交换机配置lo0:2.2.2.2/32

X组三层交换机名字为SW1_x,其中x=1或2. X组二层交换机名字SW2_x

各组路由器gi 0/1端口的IP地址使用200.200.x.0/24网段,分别是该网段的地址200.200.x.10。200.200.x.0/24由x组使用。路由器gi0/0对应的交换机端口划分到VLAN10x,gi 0/0 IP配置为192.168.10x.254 /24。255.255.255.0

三. IP NAT与DHCP

所有客户PC机的IP地址在离开本组的出口路由器时,转换成路由器gi0/1接口IP地址。各组服务器提供的服务应满足本组及其他组的PC机能够访问。当从外网访问200.200.x.101时,就访问了x组的DNS服务器;当从外网访问200.200.x.102时,就访问了x组的WEB服务器;

在每组的三层交换机上配置DHCP服务器,使得vlan20x的计算机可以自动获得ip地址(包括网关等)

四. 路由

每组的路由器配置到核心交换机的默认路由

每组组内配置ospf选路

默认路由通过ospf通告到ospf域中

Ospf配置中要求指定路由器ID为loopback的ip 地址。

出口路由器到外部网络的下一跳IP地址为:200.200.x.254。

五. 网络联通性测试

首先保证各组内客户机与服务器相互间具有IP连通性,并均可PING通出口路由器内外口IP地址。然后检查与其他组连通性。

六. Windows 2012 Server配置DNS服务器(不需要配置)

DNS服务器运行在Windows 2012 Server环境,负责本组的三个服务器的域名解析。为了方便各组记忆,具体的域名规划如下:

第1组: (DNS服务器 ----- 192.168.101.101 )

Web服务器----web.beijing.china.com-----192.168.101.102

? Mail服务器---- beijing.china.com------------192.168.101.103

第2组: (DNS服务器 ----- 192.168.102.101 )

Web服务器----web.shanghai.china.com-----192.168.102.102

? Mail服务器---- shanghai.china.com------192.168.102.103

提交:

1. 每个设备show run(10分)

2. 路由器三层交换机show ip route(10分)

3. PC 之间ping 通的测试(10分)

在PC2上,ping 192.168.101.101;ping 192.168.101.102;

Ping 200.200.2.254

在PC4上,ping 192.168.101.101;ping 192.168.101.102

Ping 200.200.1.254

4. 文件名:学号_姓名_综合实验(word或PDF文档)

? \boxtimes ? 基础性实验 □ \square 综合性实验 □ \square 设计性实验


实验报告正文

实验过程

网络拓扑

在这里插入图片描述

sh run

核心交换机

CORE>ena
CORE#sh run
Building configuration...

Current configuration : 1296 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname CORE
!
!
!
!
!
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
 no switchport
 ip address 200.200.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/2
 no switchport
 ip address 200.200.2.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

路由器1

Router>ena
Router#sh run
Building configuration...

Current configuration : 1292 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX15241CPO
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
 ip address 192.168.101.254 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 ip address 200.200.1.10 255.255.255.0
 ip nat outside
 duplex auto
 speed auto
!
interface GigabitEthernet0/2
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 redistribute static subnets 
 network 1.1.1.1 0.0.0.0 area 0
 network 200.200.1.0 0.0.0.255 area 0
 network 192.168.101.0 0.0.0.255 area 0
 default-information originate
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
ip nat inside source static 192.168.101.101 200.200.1.101 
ip classless
ip route 0.0.0.0 0.0.0.0 200.200.1.254 
!
ip flow-export version 9
!
!
access-list 1 permit 192.168.101.0 0.0.0.255
access-list 1 permit 192.168.201.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

三层交换机1

Switch>ena
Switch#sh run
Building configuration...

Current configuration : 1809 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip dhcp pool NET1
 network 192.168.201.0 255.255.255.0
 default-router 192.168.201.1
 dns-server 8.8.8.8
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree vlan 1-500 priority 24576
!
!
!
!
!
!
interface Loopback0
 ip address 1.1.1.2 255.255.255.255
!
interface FastEthernet0/1
 switchport access vlan 101
!
interface FastEthernet0/2
 switchport access vlan 101
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan101
 ip address 192.168.101.1 255.255.255.0
!
interface Vlan201
 ip address 192.168.201.1 255.255.255.0
!
router ospf 1
 router-id 1.1.1.2
 log-adjacency-changes
 redistribute static subnets 
 network 1.1.1.2 0.0.0.0 area 0
 network 192.168.101.0 0.0.0.255 area 0
 network 192.168.201.0 0.0.0.255 area 0
 default-information originate
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

交换机1

SW1>ena
SW1#sh run
Building configuration...

Current configuration : 1131 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
!
!
spanning-tree mode pvst
spanning-tree vlan 1-500 priority 28672
!
interface FastEthernet0/1
 switchport access vlan 201
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
end

路由器2

Router>ena
Router#sh run
Building configuration...

Current configuration : 1351 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2911/K9 sn FTX15249G53
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.1 255.255.255.255
!
interface GigabitEthernet0/0
 ip address 192.168.102.254 255.255.255.0
 ip nat inside
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 ip address 200.200.2.10 255.255.255.0
 ip nat outside
 duplex auto
 speed auto
!
interface GigabitEthernet0/2
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1
 router-id 2.2.2.1
 log-adjacency-changes
 redistribute static subnets 
 network 2.2.2.1 0.0.0.0 area 0
 network 200.200.2.0 0.0.0.255 area 0
 network 192.168.102.0 0.0.0.255 area 0
 default-information originate
!
ip nat inside source list 1 interface GigabitEthernet0/1 overload
ip nat inside source static 192.168.102.102 200.200.2.102 
ip classless
ip route 0.0.0.0 0.0.0.0 200.200.2.254 
!
ip flow-export version 9
!
!
access-list 1 permit 192.168.102.0 0.0.0.255
access-list 1 permit 192.168.202.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

三层交换机2

Switch>ena
Switch#sh run
Building configuration...

Current configuration : 1749 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip dhcp pool NET2
 network 192.168.202.0 255.255.255.0
 default-router 192.168.202.1
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/1
 switchport access vlan 102
!
interface FastEthernet0/2
 switchport access vlan 102
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
interface Vlan102
 ip address 192.168.102.1 255.255.255.0
!
interface Vlan202
 ip address 192.168.202.1 255.255.255.0
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 redistribute static subnets 
 network 192.168.102.0 0.0.0.255 area 0
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.202.0 0.0.0.255 area 0
 default-information originate
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

交换机2

Switch>ena
Switch#sh run
Building configuration...

Current configuration : 1094 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
 switchport access vlan 202
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
 switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 no ip address
 shutdown
!
!
!
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
end

sh ip route

核心交换机

CORE#sh ip rout
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    200.200.1.0/24 is directly connected, FastEthernet0/1
C    200.200.2.0/24 is directly connected, FastEthernet0/2
CORE#

三层交换机1

Switch#sh ip rout
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 192.168.101.254 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 2 subnets
O       1.1.1.1 [110/2] via 192.168.101.254, 01:04:08, Vlan101
C       1.1.1.2 is directly connected, Loopback0
C    192.168.101.0/24 is directly connected, Vlan101
C    192.168.201.0/24 is directly connected, Vlan201
O    200.200.1.0/24 [110/2] via 192.168.101.254, 01:04:08, Vlan101
O*E2 0.0.0.0/0 [110/1] via 192.168.101.254, 01:04:08, Vlan101
Switch#

三层交换机2

Switch#sh ip rout
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 192.168.102.254 to network 0.0.0.0

     2.0.0.0/32 is subnetted, 2 subnets
O       2.2.2.1 [110/2] via 192.168.102.254, 00:56:35, Vlan102
C       2.2.2.2 is directly connected, Loopback0
C    192.168.102.0/24 is directly connected, Vlan102
C    192.168.202.0/24 is directly connected, Vlan202
O    200.200.2.0/24 [110/2] via 192.168.102.254, 00:56:35, Vlan102
O*E2 0.0.0.0/0 [110/1] via 192.168.102.254, 00:56:35, Vlan102
Switch#

路由器1

Router#sh ip rout
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 200.200.1.254 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 2 subnets
C       1.1.1.1/32 is directly connected, Loopback0
O       1.1.1.2/32 [110/2] via 192.168.101.1, 01:04:40, GigabitEthernet0/0
     192.168.101.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.101.0/24 is directly connected, GigabitEthernet0/0
L       192.168.101.254/32 is directly connected, GigabitEthernet0/0
O    192.168.201.0/24 [110/2] via 192.168.101.1, 01:04:40, GigabitEthernet0/0
     200.200.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       200.200.1.0/24 is directly connected, GigabitEthernet0/1
L       200.200.1.10/32 is directly connected, GigabitEthernet0/1
S*   0.0.0.0/0 [1/0] via 200.200.1.254
Router#

路由器2

Router#sh ip rout
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 200.200.2.254 to network 0.0.0.0

     2.0.0.0/32 is subnetted, 2 subnets
C       2.2.2.1/32 is directly connected, Loopback0
O       2.2.2.2/32 [110/2] via 192.168.102.1, 00:56:45, GigabitEthernet0/0
     192.168.102.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.102.0/24 is directly connected, GigabitEthernet0/0
L       192.168.102.254/32 is directly connected, GigabitEthernet0/0
O    192.168.202.0/24 [110/2] via 192.168.102.1, 00:56:32, GigabitEthernet0/0
     200.200.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       200.200.2.0/24 is directly connected, GigabitEthernet0/1
L       200.200.2.10/32 is directly connected, GigabitEthernet0/1
S*   0.0.0.0/0 [1/0] via 200.200.2.254
Router#

实验结果

PC2

ping 192.168.101.101

在这里插入图片描述

ping 200.200.2.102

在这里插入图片描述

ping 200.200.2.254

在这里插入图片描述

PC4

ping 192.168.102.102

在这里插入图片描述

ping 200.200.1.101

在这里插入图片描述

ping 200.200.1.254

在这里插入图片描述

文章来源:https://blog.csdn.net/m0_52065936/article/details/134998315
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。