一、实验拓扑

二、实验设备
1.路由器AR1,AR2,AR3,AR4选用AR3260;在每个路由器上添加一个模块(2SA,即2 端口的同异步WAN 接口卡),使路由器之间使用Serial相连;
2.交换机LSW1和LSW2使用S3700。
3.使用华为的eNSP软件来实现。
三、实验内容
1.假定给你的地址块是:192.168.10.0/24;现在VLAN10,VLAN20,VLAN30,VLAN40需要的IP地址数分别是10,20,30,40。请给出各VLAN相应的IP地址划分。网段1,网段2,网段3,外部网络分别取公网地址200.1.0.0/24,200.2.0.0/24,200.3.0.0/24,200.4.0.0/24。请给出各接口的具体IP地址划分;
2.将规划好的IP地址在路由器AR1上配置DHCP服务器,为VLAN10, VLAN20, VLAN30, VLAN40中设备自动分配IP地址;
3.使用单臂路由实现VLAN10,VLAN20,VLAN30,VLAN40之间的互访,即能相互Ping通;
4.AR2与AR1进行双向CHAP验证;
5.在AR1上采用静态路由;
6.在AR2与AR3之间采用OSPF动态路由协议;AR2到企业内网采用静态路由;
7.在AR3与AR4之间以及AR4的GE0/0/0接口上均采用RIP动态路由协议;AR3上配置路由引入(OSPF引入RIP;RIP引入OSPF);
8.在AR2与AR3上配置路由引入(引入静态路由);
9.在Server1上配置WEB服务器(域名为www.zjnu.cn);在Server2上也配置WEB服务器(域名为www.sina.com)和DNS服务器(对上面两个域名进行解析);
10.PC1与两台服务器均能ping通;
11. Client1均能以域名方式访问两个Web站点。
四、实验提交内容
1.IP地址规划方案
(1)各网段的IP地址规划情况(10分)
| 网段 | 起始地址 | 结束地址 | 掩码 |
| VLAN10 | 192.168.10.1 | 192.168.10.14 | 255.255.255.240 |
| VALN20 | 192.168.10.65 | 192.168.10.94 | 255.255.255.224 |
| VALN30 | 192.168.10.129 | 192.168.10.191 | 255.255.255.192 |
| VALN40 | 192.168.10.193 | 192.168.10.254 | 255.255.255.192 |
(2)各设备间连接规划(5分)
| 设备1 | 接口 | 接口 | 设备2 |
| PC1 | - | Ethernet0/0/10 | LSW1 |
| PC2 | - | Ethernet0/0/11 | |
| PC3 | - | Ethernet0/0/20 | |
| Client1 | - | Ethernet0/0/3 | |
| Server1 | - | Ethernet0/0/2 | |
| LSW1 | Ethernet0/0/1 | GE0/0/0 | AR1 |
| AR1 | Serial1/0/0 | Serial1/0/1 | AR2 |
| AR2 | Serial1/0/0 | Serial1/0/1 | AR3 |
| AR3 | Serial1/0/0 | Serial1/0/1 | AR4 |
| LSW2 | - | GE0/0/0 | AR4 |
| PC4 | - | Ethernet0/0/2 | LSW2 |
| Server2 | - | Ethernet0/0/3 |
要求:与题目中的拓扑图上标注一致
(3)各设备的IP地址设置(5分)
| 设备 | 接口 | IP地址 | 网关地址 | 掩码 | DNS地址 |
| AR1 | GE0/0/0.10 | 192.168.10.1 | - | 28 | - |
| GE0/0/0.10 | 192.168.10.65 | 192.168.10.65 | 27 | 200.4.0.2 | |
| GE0/0/0.10 | 192.168.10.129 | 192.168.10.129 | 26 | 200.4.0.2 | |
| GE0/0/0.10 | 192.168.10.193 | 192.168.10.193 | 26 | 200.4.0.2 | |
| Serial1/0/0 | 200.1.0.1 | - | 24 | - | |
| AR2 | Serial1/0/1 | 200.1.0.2 | - | 24 | - |
| Serial1/0/0 | 200.2.0.1 | - | 24 | - | |
| AR3 | Serial1/0/1 | 200.2.0.2 | - | 24 | - |
| Serial1/0/0 | 200.3.0.1 | - | 24 | - | |
| AR4 | Serial1/0/0 | 200.3.0.2 | - | 24 | - |
| GE0/0/0 | 200.4.0.1 | - | 24 | - | |
| PC4 | - | 200.4.0.3 | 200.4.0.1 | 24 | 200.4.0.2 |
| Server2 | - | 200.4.0.2 | 200.4.0.1 | 24 | - |
注:画有“-”表示不需要设置。
(4)按照上面的IP地址设置配置好各设备接口的IP地址。(5分)
2.在AR1上配置DHCP服务器,为VLAN10, VLAN20, VLAN30, VLAN40中设备自动分配IP地址。(10分)
ip pool vlan10
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.240
dns-list 200.4.0.2
#
ip pool vlan20
gateway-list 192.168.10.65
network 192.168.10.64 mask 255.255.255.224
dns-list 200.4.0.2
#
ip pool vlan30
gateway-list 192.168.10.129
network 192.168.10.128 mask 255.255.255.192
dns-list 200.4.0.2
#
ip pool vlan40
gateway-list 192.168.10.193
network 192.168.10.192 mask 255.255.255.192
dns-list 200.4.0.2
#
3.实现VLAN10,VLAN20,VLAN30,VLAN40之间的互访,即能相互ping通。(10分)
(1)LSW1上的配置(写出配置命令)
vlan batch 10 20 30 40
interface Ethernet0/0/2
port link-type access
port default vlan 10
interface Ethernet0/0/3
port link-type access
port default vlan 40
interface Ethernet0/0/10
port link-type access
port default vlan 20
interface Ethernet0/0/11
port link-type access
port default vlan 30
interface Ethernet0/0/20
port link-type access
port default vlan 40
(2)AR1上的配置(写出配置命令)
interface GigabitEthernet0/0/0.10
dot1q termination vid 10
ip address 192.168.10.1 255.255.255.240
arp broadcast enable
dhcp select global
#
interface GigabitEthernet0/0/0.20
dot1q termination vid 20
ip address 192.168.10.65 255.255.255.224
arp broadcast enable
dhcp select global
#
interface GigabitEthernet0/0/0.30
dot1q termination vid 30
ip address 192.168.10.129 255.255.255.192
arp broadcast enable
dhcp select global
#
interface GigabitEthernet0/0/0.40
dot1q termination vid 40
ip address 192.168.10.193 255.255.255.192
arp broadcast enable
dhcp select global
(3)测试(截图)


4.AR2与AR1进行双向CHAP验证。(5分)
(1)AR1上的配置(写出配置命令)
local-user aaa password cipher %$%$0F#_=d:8g%^,we"]b3p&)@*Q%$%$
local-user aaa service-type ppp
interface Serial1/0/0
link-protocol ppp
ppp authentication-mode chap
ppp chap user bbb
ppp chap password cipher %$%$W~Gq%I,7$'R/H=2nS^rO,'`T%$%$
ip address 200.1.0.1 255.255.255.0
(2)AR2上的配置(写出配置命令)
local-user bbb password cipher %$%$bE/p%z}Nd7OhU4"~`(:*)AL4%$%$
local-user bbb service-type ppp
#
interface Serial1/0/1
link-protocol ppp
ppp authentication-mode chap
ppp chap user aaa
ppp chap password cipher %$%$QL}19\H'b'Y~*,,]jL0",4^)%$%$
ip address 200.1.0.2 255.255.255.0
#
5.在AR1上采用静态路由;(写出配置命令)(5分)
ip route-static 0.0.0.0 0.0.0.0 200.1.0.2
6.在AR2与AR3之间采用OSPF动态路由协议;AR2到企业内网采用静态路由; (10分)
(1)AR2上的配置(写出配置命令)
ospf 1
area 0.0.0.0
network 200.2.0.0 0.0.0.255
ip route-static 192.168.10.0 255.255.255.0 200.1.0.1
(2)AR3上的配置(写出配置命令)
ospf 1
area 0.0.0.0
network 200.2.0.0 0.0.0.255
7.在AR3与AR4之间以及AR4的GE0/0/0接口上均采用RIP动态路由协议;(10分)
(1)AR3上的配置(写出配置命令)
rip 1
network 200.3.0.0
(2)AR4上的配置(写出配置命令)
rip 1
network 200.3.0.0
network 200.4.0.0
8.在AR2与AR3上配置路由引入;(10分)
(1)AR2上的配置(写出配置命令)
ospf 1
import-route static
(2)AR3上的配置(写出配置命令)
ospf 1
import-route rip 1
rip 1
import-route ospf 1
9.在Server1上配置WEB服务器(域名为www.zjxz.edu.cn);在Server2上也配置WEB服务器(域名为www.sina.com)和DNS服务器(对上面两个域名进行解析);(配置截图)(5分)



10. PC1与服务器均能ping通;(5分)
测试:(截图)

11. Client1均能以域名方式访问两个Web站点。(5分)
测试:(截图)


Rails2.3可以选择随时使用RouteSet#add_configuration_file添加更多路由。是否可以在Rails3项目中做同样的事情? 最佳答案 在config/application.rb中:config.paths.config.routes在Rails3.2(也可能是Rails3.1)中,使用:config.paths["config/routes"] 关于ruby-on-rails-Rails3中的多个路由文件,我们在StackOverflow上找到一个类似的问题
我没有找到太多关于如何执行此操作的信息,尽管有很多关于如何使用像这样的redirect_to将参数传递给重定向的建议:action=>'something',:controller=>'something'在我的应用程序中,我在路由文件中有以下内容match'profile'=>'User#show'我的表演Action是这样的defshow@user=User.find(params[:user])@title=@user.first_nameend重定向发生在同一个用户Controller中,就像这样defregister@title="Registration"@user=Use
我真的为这个而疯狂。我一直在搜索答案并尝试我找到的所有内容,包括相关问题和stackoverflow上的答案,但仍然无法正常工作。我正在使用嵌套资源,但无法使表单正常工作。我总是遇到错误,例如没有路线匹配[PUT]"/galleries/1/photos"表格在这里:/galleries/1/photos/1/edit路线.rbresources:galleriesdoresources:photosendresources:galleriesresources:photos照片Controller.rbdefnew@gallery=Gallery.find(params[:galle
最近在学习CAN,记录一下,也供大家参考交流。推荐几个我觉得很好的CAN学习,本文也是在看了他们的好文之后做的笔记首先是瑞萨的CAN入门,真的通透;秀!靠这篇我竟然2天理解了CAN协议!实战STM32F4CAN!原文链接:https://blog.csdn.net/XiaoXiaoPengBo/article/details/116206252CAN详解(小白教程)原文链接:https://blog.csdn.net/xwwwj/article/details/105372234一篇易懂的CAN通讯协议指南1一篇易懂的CAN通讯协议指南1-知乎(zhihu.com)视频推荐CAN总线个人知识总
Rails中有没有一种方法可以提取与路由关联的HTTP动词?例如,给定这样的路线:将“users”匹配到:“users#show”,通过:[:get,:post]我能实现这样的目标吗?users_path.respond_to?(:get)(显然#respond_to不是正确的方法)我最接近的是通过执行以下操作,但它似乎并不令人满意。Rails.application.routes.routes.named_routes["users"].constraints[:request_method]#=>/^GET$/对于上下文,我有一个设置cookie然后执行redirect_to:ba
路由有如下代码:resources:orders,only:[:create],defaults:{format:'json'}resources:users,only:[:create,:update],defaults:{format:'json'}resources:delivery_types,only:[:index],defaults:{format:'json'}resources:time_corrections,only:[:index],defaults:{format:'json'}是否可以使用1个字符串为所有资源设置默认格式,每行不带“默认值”散列?谢谢。
我正在使用rails3和cucumber,除了这个小问题,一切都很顺利GivenIamonthe"editautomobile"pageNoroutematches{:controller=>"automobiles",:action=>"edit"}(ActionController::RoutingError)现在路径在paths.rb中设置为edit_automobile_path在routes.rb中我有汽车作为资源,我搭建了它所以请告诉我我遗漏了什么,清楚地定义了路线并且匹配,因为我运行了rake路线并看到了路线。请指出正确的方向 最佳答案
有什么方法可以为url/path助手提供默认值吗?我有一个可选范围环绕我的所有路线:#config/routes.rbFoo::Application.routes.drawdoscope"(:current_brand)",:constraints=>{:current_brand=>/(foo)|(bar)/}do#...allotherroutesgohereendend我希望用户能够使用这些URL访问网站:/foo/some-place/bar/some-place/some-place为了方便起见,我在我的ApplicationController中设置了一个@current
我如何将像“root_path”这样的Rails路由助手作为类方法添加到像my_model.rb这样的类中?所以我的课是这样的:ClassMyModeldefself.fooreturnself.root_pathendendMyModel.foo以上不起作用,因为ClassMyModel不响应root_path这是我所知道的:我可以使用includeRails.application.routes.url_helpers,但这只会将模块的方法添加为实例方法我试过扩展Rails.application.routes.url_helpers但它没用请随时给我上课:)
尝试从我的AngularJS端将数据发布到Rails服务器时出现问题。服务器错误:ActionController::RoutingError(Noroutematches[OPTIONS]"/users"):actionpack(4.1.9)lib/action_dispatch/middleware/debug_exceptions.rb:21:in`call'actionpack(4.1.9)lib/action_dispatch/middleware/show_exceptions.rb:30:in`call'railties(4.1.9)lib/rails/rack/logg