组网技术论文
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
南阳师范学院物理与电子工程学院
《网络工程》
课程设计报告
完成人:
班级:
学号:
专业:
实验报告
一.设计目标
网络配置静态路由,使得各主机能够互通。配置访问控制列表,禁止子网10.69.0.0/16访问主机E,但允许其它网络访问主机E。
二.设计规划
1.设置主机A,B,C,D,E的IP地址,网关。
HostA IP地址:10.65.1.1 255.255.0.0 gw:10.65.1.5
HostB IP地址:10.66.1.1 255.255.0.0 gw:10.66.1.5
HostC IP地址:10.69.1.1 255.255.0.0 gw:10.69.1.5
HostD IP地址:10.70.1.1 255.255.0.0 gw:10.70.1.5
HostE IP地址:10.72.1.1 255.255.0.0 gw:10.72.1.5
2.设置路由器A,B,C的IP地址
RouterA:f0/0 IP地址:10.65.1.2 255.255.0.0 ;
f0/1 IP地址:10.66.1.2 255.255. 0.0;
S0/1IP地址:10.68.1.2 255.255.0.0 ;
RouterB:f0/0 IP地址:10.69.1.2 255.255.0.0 ;
f0/1 IP地址:10.70.1.2 255.255.0.0 ;
S0/0 IP 地址:10.78.1.2 255.255.0.0 ;
RouterC:f0/0 IP 地址:10.72.1.2 255.255.0.0 ;
S0/0 IP 地址:10.68.1.1 255.255.0.0;
S0/1 IP地址:10.78.1.1 255.255.0.0 ;
三.网络配置过程
(1)设置主机A,B,CD,E的IP
○1设置主机A的IP
PCA login: root //登陆用户Password: linux //登陆密码
[root@PCA root]# ifconfig eth0 10.65.1.1 netmask 255.255.0.0 //设置主机A的IP [root@PCA root]# route add default gw 10.65.1.2 //添加默认网关[root@PCA root]# ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[root@PCA root]# ifconfig //查看IP
eth0 inet addr: 10.65.1.1 mask: 255.255.0.0
loopback inet addr: 127.0.0.1 mask: 255.0.0.0
[root@PCA root]# route add default gw 10.65.1.2
[root@PCA root]# route //查看网关default gateway: 10.65.1.2
○2设置主机B的IP
PCB login: root
password: linux
[root@PCB root]# ifconfig eth0 10.66.1.1 netmask 255.255.0.0
[root@PCB root]# route add default gw 10.66.1.2
○3设置主机C的IP,代码如下:
PCC login: root
password: linux
[root@PCC root]# ifconfig eth0 10.69.1.1 netmask 255.255.0.0
[root@PCC root]# route add default gw 10.69.1.2
○4设置主机D的IP
PCD login: root
password: linux
[root@PCD root]# ifconfig eth0 10.70.1.1 netmask 255.255.0.0
[root@PCD root]# route add default gw 10.70.1.2
○5设置主机E的IP
PCE login: root
password: linux
[root@PCE root]# ifconfig eth0 10.72.1.1 netmask 255.255.0.0
[root@PCE root]# route add default gw 10.72.1.2
[root@PCE root]#
(2)路由器配置
○1RouterA配置
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#int f0/0 //进入f0/0端口router(config-if)#ip address 10.65.1.2 255.255.0.0 //设置f0/0端口的ip router(config-if)#no shutdown //开启端口
router(config-if)#int f0/1
router(config-if)#ip address 10.66.1.2 255.255. 0.0
router(config-if)#no shutdown
router(config-if)#int s0/1
router(config-if)#ip address 10.68.1.2 255.255.0.0
router(config-if)#no shutdown
clock ?
router(config-if)#clock rate 64000 // 配置时钟赔率router(config-if)exi
router(config)#ip routing //启动路由
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#ip routing
router(config)#ip route 10.69.0.0 255.255.0.0 10.68.1.1 //配置静态路由router(config)#ip routing
router(config)#ip route 10.70.0.0 255.255.0.0 10.68.1.1
router(config)#ip route 10.72.0.0 255.255.0.0 10.68.1.1
router(config)#exit //退出
router#show ip route //显示配置的路由Codes: C - connected, S - static, I - IGRP,B - BGP
R - RIP, O - OSPF, D - EIGRP, i - IS-IS
C 10.65.0.0 is directly connected, FastEthernet0/0
C 10.66.0.0 is directly connected, FastEthernet0/1
C 10.68.0.0 is directly connected, Serial0/1
S 10.72.0.0 [1/1] via 10.68.1.1 Serial0/1 //出现静态路由
S 10.69.0.0 [1/2] via 10.68.1.1 Serial0/1
S 10.70.0.0 [1/2] via 10.68.1.1 Serial0/1
○2RouterB配置
router>enable
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#int f0/0
router(config-if)#ip address 10.69.1.2 255.255.0.0
router(config-if)#no shutdown
router(config-if)#int f0/1
router(config-if)#ip address 10.70.1.2 255.255.0.0
router(config-if)#no shutdown
router(config-if)#int s0/0
router(config-if)#ip address 10.78.1.2 255.255.0.0