NAT+ACL+DHCP+DNS+HTTP campus network construction based on Packet Tracer6

Campus network simulation

  • Preface

    Some time ago, the subject of "Computer Networks" began to write experiments. Although there are only three experiments, one is more troublesome than one.
    The content of the second experiment is to write a simulation experiment with Cisco simulation software. Although I know Cisco, I never know what simulation software Cisco has. The teacher let us fend for ourselves. No way, I had to look up the information myself.
    However, I searched for a lot of information and found that either there was an error or something was missing there. Later, I simply stopped referring to those tutorials written by others. I started looking for the manual for this software, researched it myself, and studied it for a long time, and finally got some results.
    I sent it out today, hoping to give some help to those who are struggling to find information to no avail and suffering.

  • demand analysis

    • range

      The scope here refers to the campus network contains several areas.
      University campus is really a more complex network, but after all, there is only a small simulation of the campus network, there is no need to do too complicated, here I set up a server farm, student dormitories, administrative buildings, teaching buildings, libraries five This area is enough to understand the structure of the campus network.
    • Features

    1. The school has a large number of students and insufficient IP addresses, so there will definitely be a DHCP server dynamically assigning IP addresses.
    2. Each school has its own official website, so a www server is inevitably needed.
    3. Set up an education mailbox and use an Email server.
    4. An ftp server is sometimes needed.
    5. The DNS server provides domain name conversion services.
    6. The host of the local area network needs to communicate with the external network, using the NAT translation protocol.
  • Overall design

    • Topology

      The main topological structures of computer networks are bus topology, ring topology, tree topology, star topology, hybrid topology and mesh topology. Among them, ring topology, star topology, and bus topology are the three most basic topologies. In the local area network, the most used is the star structure. The topology I used here is also a star topology . For more information about the topology, please click on the topology .
      It looks like this:
      Insert picture description here
    • 层级结构

      层级结构采用的是三层结构:
      • 核心层:
        中心机房设置一台千兆核心交换机,负责整个校园网内部的数据交换。
      • 汇聚层:
        在教学楼、宿舍楼、图书馆以及行政楼等地方分别设置二级交换机节点。
      • 接入层:
        整个校园网只有一个外网出口,即核心交换机上连到边缘路由器,边缘路由器和广域网设备相连。
        注意:汇聚层的作用就是把下方的交换机集中起来,共用一条线路连接到中心交换机上,这样可以避免中心交换机连接过多的线路。其实这种层级结构就是树结构。
    • 使用的设备

      • 核心层

        使用三层交换机,在这个版本的Cisco模拟器中,我使用Insert picture description here

      • 汇聚层

        使用普通的交换机就好。例如:Insert picture description here

      • 接入层
      Insert picture description here 普通的PC
  • 详细设计

    先放一张总图:
    Insert picture description here
    我会逐步添加设备,同时附上代码。

    • 连接基本线路

      红线右边的就是校园网部分,左边的路由器是边缘路由器(Border-R)。 Insert picture description here

    • 配置Vlan

      vlan的全称是 virtual local area network,即虚拟局域网。它可以使一组设备和用户之间相互通信,好像它们是在同一个网段中一样。

      IEEE于1999年颁布了用于标准化VLAN实现方案的802.1Q协议标准草案。VLAN技术的出现,使得管理员根据实际应用需求,把同一物理局域网内的不同用户逻辑地划分成不同的广播域,每一个VLAN都包含一组有着相同需求的计算机工作站,与物理上形成的LAN有着相同的属性。由于它是从逻辑上划分,而不是从物理上划分,所以同一个VLAN内的各个工作站没有限制在同一个物理范围中,即这些工作站可以在不同物理LAN网段。由VLAN的特点可知,一个VLAN内部的广播和单播流量都不会转发到其他VLAN中,从而有助于控制流量、减少设备投资、简化网络管理、提高网络的安全性。

      我在这里设置了5个vlan,分别是服务器群、学生宿舍局域网(简称学生宿舍)、教学楼、行政楼、图书馆。它们的vlan网段分布如下表所示:

    vlan名称 对应区域 网段 掩码
    vlan2 服务器群 192.168.0.1 255.255.255.0
    vlan3 学生宿舍 192.168.8.1 255.255.248.0
    vlan4 行政楼 192.168.1.1 255.255.255.0
    vlan5 教学楼 192.168.2.1 255.255.255.0
    vlan6 图书馆 192.168.3.1 255.255.255.0
    • 配置VTP:

      vtp relay settings Insert picture description here
      说明:VTP(Vlan Trunk Protocol) 即VLAN中继协议。VTP通过网络(ISL 帧 或cisco 私有DTP帧) 保持VLAN配置统一性。VTP在系统级管理增加,删除,调整的VLAN,自动地将信息向网络中其它的交换机广播。此外, VTP减小了那些可能导致安全问题的配置。便于管理, 只要在vtp server 做相应设置,vtp client 会自动学习vtp server 上的vlan 信息。

    • 配置中继

      Insert picture description here
      说明:配置中继,使VTP管理域能够覆盖所有的分支交换机。Trunk是一个在交换机之间、交换机与路由器之间传递VLAN信息和VLAN数据流的协议,将交换机之间的相连的端口配置为dot1q封装,就可跨越交换机进行整个网络的VLAN设置。
      注意:fa 0/2~fa 0/6都要进行这样的配置!

    • 创建vlan及端口划分

      Insert picture description here
      其实创建vlan也可以在 config>vlan数据库 设置
      Insert picture description here
      Insert picture description here

    • 配置服务器群交换机

      Insert picture description here

    • 配置学生宿舍交换机

      Insert picture description here
      Insert picture description hereInsert picture description hereInsert picture description here

    • 配置行政楼交换机

      Insert picture description here

    • 配置教学楼交换机

      Insert picture description here

    • 配置图书馆交换机

      Insert picture description here

    • 配置主机IP地址

      配置主机IP地址有两种方式:1.静态IP地址(手动设置)2.动态IP(依靠DHCP服务器来实现),由于需要,这两种方式都会用到。

    • 手动设置IP

      The server's IP must be static, and generally speaking, the PCs in the teaching building and the administration building use static IP addresses. Therefore, I configure PC6 and PC8 as static IPs, and the rest are set to dynamic IPs.
      Insert picture description here
      Find Desktop>IP Congiguration to configure, as shown in the figure:

      Insert picture description here

    • DHCP server configuration

      First turn on the DHCP service, as shown below: Insert picture description here
      Add these IP pools:
      Insert picture description here
      Then set the central switch to point to the DHCP server:
      Insert picture description here
      Finally, turn on the routing function of the central switch:
      Insert picture description here
      test:
      Insert picture description here

      At this point, each network segment in the campus network can communicate with each other. Next we start to build an external network.

    • Build an extranet

      Connect the line first:
      Insert picture description here
      Note: Before connecting the line between ISP-R and Border-R , you need to add the WIC-2T module first .

    • Set IP address

      Insert picture description here
      The first line: the
      Insert picture description here
      second line: the
      Insert picture description here
      third line: the
      Insert picture description here
      fourth line: the
      Insert picture description here
      fifth line: the
      Insert picture description here
      sixth line: the
      Insert picture description here
      seventh line: the
      Insert picture description here
      eighth line: the
      Insert picture description here
      ninth line (remember to turn on the DNS service): the
      Insert picture description here
      tenth line (remember to turn on the HTTP service) : The
      Insert picture description here
      eleventh line (remember to turn on the Email service):
      Insert picture description here

    • Configure NAT

    There are three ways to implement NAT: static conversion Static Nat, dynamic conversion Dynamic Nat, and port multiplexing Overload. I have used three methods here:

    • Static conversion

      Insert picture description here
      Insert picture description here

    • Dynamic conversion

      Insert picture description here
      Among them, students use port multiplexing technology.

      Nat settings
      Insert picture description here
      Next specify the internal port and external port:
      Insert picture description here
      Configure routing: a
      Insert picture description here
      Insert picture description here
      simple test, use PC10 to ping PC5:
      Insert picture description here

    • Configure the server

    • DNS server

      The configuration of the DNS server is very simple, just add some records. E.g:
      Insert picture description here

    • HTTP server

      Just turn on the service.
      Enter the URL in Web Browserh on the PC:
      Insert picture description here

      The configuration of other servers is also very simple, you can explore the configuration yourself.


It ends here!
Attach a little reference material I found.
(Update link 2020-06-23)
Link: https://pan.baidu.com/s/1ifN7LNxh-GiY0o5UjGRpkQ Extraction code: u47u


I have put the pkt file in the link above.

Campus network simulation

  • Preface

    Some time ago, the subject of "Computer Networks" began to write experiments. Although there are only three experiments, one is more troublesome than one.
    The content of the second experiment is to write a simulation experiment with Cisco simulation software. Although I know Cisco, I never know what simulation software Cisco has. The teacher let us fend for ourselves. No way, I had to look up the information myself.
    However, I searched for a lot of information and found that either there was an error or something was missing there. Later, I simply stopped referring to those tutorials written by others. I started looking for the manual for this software, researched it myself, and studied it for a long time, and finally got some results.
    I sent it out today, hoping to give some help to those who are struggling to find information to no avail and suffering.

  • demand analysis

    • range

      The scope here refers to the campus network contains several areas.
      University campus is really a more complex network, but after all, there is only a small simulation of the campus network, there is no need to do too complicated, here I set up a server farm, student dormitories, administrative buildings, teaching buildings, libraries five This area is enough to understand the structure of the campus network.
    • Features

    1. The school has a large number of students and insufficient IP addresses, so there will definitely be a DHCP server dynamically assigning IP addresses.
    2. Each school has its own official website, so a www server is inevitably needed.
    3. Set up an education mailbox and use an Email server.
    4. An ftp server is sometimes needed.
    5. The DNS server provides domain name conversion services.
    6. The host of the local area network needs to communicate with the external network, using the NAT translation protocol.
  • Overall design

    • Topology

      The main topological structures of computer networks are bus topology, ring topology, tree topology, star topology, hybrid topology and mesh topology. Among them, ring topology, star topology, and bus topology are the three most basic topologies. In the local area network, the most used is the star structure. The topology I used here is also a star topology . For more information about the topology, please click on the topology .
      It looks like this:
      Insert picture description here
    • Hierarchical structure

      The hierarchical structure uses a three-tier structure:
      • Core layer:
        The central computer room is equipped with a gigabit core switch, which is responsible for data exchange within the entire campus network.
      • Convergence layer:
        Set up secondary switch nodes in teaching buildings, dormitory buildings, libraries, and administrative buildings.
      • Access layer:
        The entire campus network has only one external network exit, that is, the core switch is connected to the edge router, and the edge router is connected to the WAN equipment.
        Note: The role of the convergence layer is to gather the switches below and share a line to connect to the central switch, so as to prevent the central switch from connecting too many lines. In fact, this hierarchical structure is a tree structure.
    • Equipment used

      • Core layer

        Using a three-tier switch, in this version of the Cisco simulator, I useInsert picture description here

      • Convergence layer

        Just use an ordinary switch. E.g:Insert picture description here

      • Access layer
      Insert picture description here Ordinary PC
  • detailed design

    First put a general picture:
    Insert picture description here
    I will gradually add equipment, and attach the code at the same time.

    • Connect the basic line

      The right side of the red line is the campus network, and the left router is the border router (Border-R). Insert picture description here

    • Configure VLAN

      vlan的全称是 virtual local area network,即虚拟局域网。它可以使一组设备和用户之间相互通信,好像它们是在同一个网段中一样。

      IEEE于1999年颁布了用于标准化VLAN实现方案的802.1Q协议标准草案。VLAN技术的出现,使得管理员根据实际应用需求,把同一物理局域网内的不同用户逻辑地划分成不同的广播域,每一个VLAN都包含一组有着相同需求的计算机工作站,与物理上形成的LAN有着相同的属性。由于它是从逻辑上划分,而不是从物理上划分,所以同一个VLAN内的各个工作站没有限制在同一个物理范围中,即这些工作站可以在不同物理LAN网段。由VLAN的特点可知,一个VLAN内部的广播和单播流量都不会转发到其他VLAN中,从而有助于控制流量、减少设备投资、简化网络管理、提高网络的安全性。

      我在这里设置了5个vlan,分别是服务器群、学生宿舍局域网(简称学生宿舍)、教学楼、行政楼、图书馆。它们的vlan网段分布如下表所示:

    vlan名称 对应区域 网段 掩码
    vlan2 服务器群 192.168.0.1 255.255.255.0
    vlan3 学生宿舍 192.168.8.1 255.255.248.0
    vlan4 行政楼 192.168.1.1 255.255.255.0
    vlan5 教学楼 192.168.2.1 255.255.255.0
    vlan6 图书馆 192.168.3.1 255.255.255.0
    • 配置VTP:

      vtp relay settings Insert picture description here
      说明:VTP(Vlan Trunk Protocol) 即VLAN中继协议。VTP通过网络(ISL 帧 或cisco 私有DTP帧) 保持VLAN配置统一性。VTP在系统级管理增加,删除,调整的VLAN,自动地将信息向网络中其它的交换机广播。此外, VTP减小了那些可能导致安全问题的配置。便于管理, 只要在vtp server 做相应设置,vtp client 会自动学习vtp server 上的vlan 信息。

    • 配置中继

      Insert picture description here
      Description: Configure the relay so that the VTP management domain can cover all branch switches. Trunk is a protocol for transferring VLAN information and VLAN data flow between switches and between switches and routers. Configure the connected ports between switches as dot1q encapsulation, and then VLAN settings of the entire network can be performed across switches.
      Note: fa 0/2~fa 0/6 must be configured like this!

    • Create vlan and port division

      Insert picture description here
      In fact, you can also create vlan in config> vlan database settings
      Insert picture description here
      Insert picture description here

    • Configure the server farm switch

      Insert picture description here

    • Configure student dormitory switch

      Insert picture description here
      Insert picture description hereInsert picture description hereInsert picture description here

    • Configure the administrative building switch

      Insert picture description here

    • Configure the school building switch

      Insert picture description here

    • Configure library switches

      Insert picture description here

    • Configure the host IP address

      There are two ways to configure the host IP address: 1. Static IP address (manual setting) 2. Dynamic IP (rely on DHCP server to achieve), due to need, both methods will be used.

    • Set IP manually

      The server's IP must be static, and generally speaking, the PCs in the teaching building and the administration building use static IP addresses. Therefore, I configure PC6 and PC8 as static IPs, and the rest are set to dynamic IPs.
      Insert picture description here
      Find Desktop>IP Congiguration to configure, as shown in the figure:

      Insert picture description here

    • DHCP server configuration

      First turn on the DHCP service, as shown below: Insert picture description here
      Add these IP pools:
      Insert picture description here
      Then set the central switch to point to the DHCP server:
      Insert picture description here
      Finally, turn on the routing function of the central switch:
      Insert picture description here
      test:
      Insert picture description here

      At this point, each network segment in the campus network can communicate with each other. Next we start to build an external network.

    • Build an extranet

      Connect the line first:
      Insert picture description here
      Note: Before connecting the line between ISP-R and Border-R , you need to add the WIC-2T module first .

    • Set IP address

      Insert picture description here
      The first line: the
      Insert picture description here
      second line: the
      Insert picture description here
      third line: the
      Insert picture description here
      fourth line: the
      Insert picture description here
      fifth line: the
      Insert picture description here
      sixth line: the
      Insert picture description here
      seventh line: the
      Insert picture description here
      eighth line: the
      Insert picture description here
      ninth line (remember to turn on the DNS service): the
      Insert picture description here
      tenth line (remember to turn on the HTTP service) : The
      Insert picture description here
      eleventh line (remember to turn on the Email service):
      Insert picture description here

    • Configure NAT

    There are three ways to implement NAT: static conversion Static Nat, dynamic conversion Dynamic Nat, and port multiplexing Overload. I have used three methods here:

    • Static conversion

      Insert picture description here
      Insert picture description here

    • Dynamic conversion

      Insert picture description here
      Among them, students use port multiplexing technology.

      Nat settings
      Insert picture description here
      Next specify the internal port and external port:
      Insert picture description here
      Configure routing: a
      Insert picture description here
      Insert picture description here
      simple test, use PC10 to ping PC5:
      Insert picture description here

    • Configure the server

    • DNS server

      The configuration of the DNS server is very simple, just add some records. E.g:
      Insert picture description here

    • HTTP server

      Just turn on the service.
      Enter the URL in Web Browserh on the PC:
      Insert picture description here

      The configuration of other servers is also very simple, you can explore the configuration yourself.


It ends here!
Attach a little reference material I found.
(Update link 2020-06-23)
Link: https://pan.baidu.com/s/1ifN7LNxh-GiY0o5UjGRpkQ Extraction code: u47u


I have put the pkt file in the link above.

Guess you like

Origin blog.csdn.net/weixin_44080445/article/details/112307625