COMP2001J Computer Network

董寻
• 阅读 154

COMP2001J Computer Network 2024
1
Packet Tracer Lab: Introduction
Abstract:
You will learn the basics of setting up networks of computers in Packet Tracer by the following steps:

  1. Create a network by physically connecting two computers
  2. Get these two computers to communicate with each other
  3. Add more computers using a switch
  4. Add a router to allow communication outside of the network you have created
    Note: All steps described in this lab note have been successfully tested using Packet Tracer 7.3 MacOS 64-
    bit version.
    Build a basic network
    First, we create a basic network by adding two computers to the simulation and connecting them. When we
    connect them together, we use a cross-over cable because we are connecting two devices of the same type.

This image with two green dots on both sides shows two computers have already been physically connected.
The dashed cable shows that it is a cross-over cable.

Basic network configuration
Before they can actually communicate, we must set up the network on each device.

By clicking on each individual component, we can configure the network settings of devices. In PC0, we set
its IP address 192.168.1.1 and its subnet mask 255.255.255.0.

In PC1, we set its IP address 192.168.2.1 and its subnet mask 255.255.255.0. Now send a message from PC0
to PC1 (click “add simple PDU”->click “pc0”->click “pc1”). Because the two computers are not in the same
subnet (why?), they cannot communicate with each other, and messages cannot be sent.

To solve this, we either change the subnet mask in both devices or change the IP address代 写 COMP2001J Computer Networkof one of the
computers to keep them in the same subnet. The easiest solution is to change the IP address of PC1 to
192.168.1.2.
COMP2001J Computer Network 2024
2
Adding more computers using a switch
A single cable is enough for two computers to communicate with each other. However, in reality, we usually
want more computers to be able to communicate and work together. To do this, we can add a switch. There
are many types of switches that can be added to the network simulations, we choose an empty switch
(Switch-PT-Empty) to get started.

Then, we need to add the necessary ports to this switch. In this example, we will connect four devices, so
we must add four ports to the switch (after we have powered it off). There are different types of ports:
ethernet (10 Mbps), fast ethernet (100 Mbps), and gigabit ethernet (1 Gbps). These are labeled ending in CE,
CFE, and CGE, respectively. As the computers we have created all have fast ethernet connections, we should
drag 4 of these to the switch and power it back on.

Now we can add some more devices (e.g., a laptop and a printer). These should all be connected to the
switch using a straight copper cable. Just like the previous example. we need to set the IP address of each
of the devices and their subnet masks. They should be set to the following values (192.168.1.1 reserved for
the gateway later):
• PC0: 192.168.1.2; 255.255.255.0
• PC1: 192.168.1.3; 255.255.255.0
• Laptop0: 192.168.1.4; 255.255.255.0
• Printer0: 192.168.1.5; 255.255.255.0

Now, you should send messages between any of the devices to test if they are connected.

Connecting to other networks using a router
We are going to add a router such that we can communicate with other devices outside our network. Routers
are more complicated to set up and configure than simple switches, so we must learn how to configure them.

First, we add an empty router to our simulation. We should add two fast ethernet ports to this empty router,
one for connecting to our switch and the other for connecting to something else in the other network. We
remove the “printer0” to free a port of the switch in our network. Connect the switch to the router using a
straight copper cable and click on the router to configure the device. Remember which port number in the
router that we connected the switch to.

Power it off COMP2001J Computer Network 2024
3
Router Configuration
To configure the router, we need to type commands into the CLI (Command Line Interface). This can be
opened by choosing the CLI tab and pressing enter. We should see a terminal like this:

This allows us to type the command into the system to change the settings. If we are unsure what the correct
command is, we can type “?” or add it to a command that we are not sure of.

  1. Before changing settings, we have to enable the privileged mode by typing the command enable (or

en). This gives us more options so that we can execute to change the settings.

  1. To start setting up the device, we use the configure terminal command. This allows us to configure

the different network interfaces.

  1. After this, we must select the correct interface and define the type of connection and the port

number. The switch is connected to this router using fastEthernet over port 0/0 so the command is:
interface fastEthernet 0/0

  1. Now we have selected the interface, we can set details like the IP address and subnet mask. This is

done with the command ip address followed by the ip address and the subnet mask. Here we are
going to give the address 192.168.1.1 to the network interface connected to the switch and give it
the same subnet mask as the other devices in the network.

  1. Lastly, we need to activate the interface so that it is operational. This is done with the command no
    shutdown. This means that the interface will remain on when the device is powered up.

    1. Assuming that everything else is done correctly, you should see a message ending ‘changed state to

    up’. Finally, we need to exit the interface (so we can configure another interface).
    COMP2001J Computer Network 2024
    4

Adding a server
Now, we will add a Server to our simulation and connect it to the second port on the router. These should
be connected using a cross-over cable. We will go through the same steps to set the IP address of this
network interface to 10.1.1.1 with a subnet of 255.255.255.0.

After this, we need to set the IP address of the server to 10.1.1.2 with a subnet of 255.255.255.0.
Additionally, we need to set the gateway to the IP address of the router in this network (10.1.1.1). Lastly,
we need to change the settings of all devices in the first network so that the default gateway is set to the
IP address of the router in the first network (192.168.1.1). Now, we should be able to send messages to

WX:codinghelp

点赞
收藏
评论区
推荐文章
blmius blmius
4年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
Wesley13 Wesley13
4年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Easter79 Easter79
4年前
typeScript数据类型
//布尔类型letisDone:booleanfalse;//数字类型所有数字都是浮点数numberletdecLiteral:number6;lethexLiteral:number0xf00d;letbinaryLiteral:number0b101
Wesley13 Wesley13
4年前
VBox 启动虚拟机失败
在Vbox(5.0.8版本)启动Ubuntu的虚拟机时,遇到错误信息:NtCreateFile(\\Device\\VBoxDrvStub)failed:0xc000000034STATUS\_OBJECT\_NAME\_NOT\_FOUND(0retries) (rc101)Makesurethekern
Wesley13 Wesley13
4年前
FLV文件格式
1.        FLV文件对齐方式FLV文件以大端对齐方式存放多字节整型。如存放数字无符号16位的数字300(0x012C),那么在FLV文件中存放的顺序是:|0x01|0x2C|。如果是无符号32位数字300(0x0000012C),那么在FLV文件中的存放顺序是:|0x00|0x00|0x00|0x01|0x2C。2.  
Wesley13 Wesley13
4年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
4年前
PHP创建多级树型结构
<!lang:php<?php$areaarray(array('id'1,'pid'0,'name''中国'),array('id'5,'pid'0,'name''美国'),array('id'2,'pid'1,'name''吉林'),array('id'4,'pid'2,'n
Wesley13 Wesley13
4年前
Java日期时间API系列36
  十二时辰,古代劳动人民把一昼夜划分成十二个时段,每一个时段叫一个时辰。二十四小时和十二时辰对照表:时辰时间24时制子时深夜11:00凌晨01:0023:0001:00丑时上午01:00上午03:0001:0003:00寅时上午03:00上午0
Wesley13 Wesley13
4年前
MBR笔记
<bochs:100000000000e\WGUI\Simclientsize(0,0)!stretchedsize(640,480)!<bochs:2b0x7c00<bochs:3c00000003740i\BIOS\$Revision:1.166$$Date:2006/08/1117
Python进阶者 Python进阶者
2年前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这