[首页]
[文章]
[教程]
首页
Web开发
Windows开发
编程语言
数据库技术
移动平台
系统服务
微信
设计
布布扣
其他
数据分析
首页
>
其他
> 详细
实验课题2
时间:
2019-04-11 10:19:55
阅读:
140
评论:
0
收藏:
0
[点我收藏+]
实验课题(2019.4.10)
实验需求:
1、pc1属于vlan10 pc2/pc4属于vlan20
2、Vlan10流量默认从SW-3L走,vlan20流量从R3走(互为热备)
3、二层交换机与三层交换机有链路捆绑
4、Pc1/2/4机器自动获取ip地址
5、全网互通pc3服务器,pc4受到acl控制,无法访问
解题:
一、划分网段
PC1属于vlan10、PC2\PC4属于vlan20
Sw-3L上的vlan10的IP是192.168.10.10
Sw-3L上的Vlan20的IP是192.168.20.20
R3上的子接口f0/0.1的IP是192.168.10.20
R3上的子接口f0/0.2的IP是192.168.20.30
其他网段如图所示
二、各个设备上的设置
SW1上的设置:
sw1#conf t
sw1(config)#vlan 10,20//建立vlan10和vlan20
sw1(config-vlan)#e
sw1(config)#int f1/0
sw1(config-if)#switchport access vlan 10//进入端口,设置端口属于vlan10
sw1(config-if)#e
sw1(config)#int f1/1
sw1(config-if)#switchport access vlan 20//进入端口,设置端口属于vlan20
sw1(config-if)#int f1/2
sw1(config-if)#switchport access vlan 20//进入端口,设置端口属于vlan20
sw1(config)#int range f1/3 - 4
sw1(config-if-range)#channel-group 1 mode on
sw1(config-if-range)#e
sw1(config)#
sw1(config)#int port-channel 1
sw1(config-if)#switchport mode trunk
sw1(config-if)#e
sw1(config)#int f1/5
sw1(config-if)#switchport mode trunk
SW-3L上的设置:
SW-3L#conf t
SW-3L(config)#vlan 10,20,30
SW-3L(config-vlan)#e
SW-3L(config)#int f1/2
SW-3L(config-if)#switchport access vlan 30
SW-3L(config-if)#e
SW-3L(config)#int range f1/0 - 1
SW-3L(config-if-range)#channel-group 1 mode on
SW-3L(config-if-range)#e
SW-3L(config)#int port-channel 1
SW-3L(config-if)#switchport mode t
SW-3L(config-if)#e
SW-3L(config)#int vlan 10
SW-3L(config-if)#ip add 192.168.10.10 255.255.255.0
SW-3L(config-if)#standby 1 ip 192.168.10.1
SW-3L(config-if)#standby 1 preempt
SW-3L(config-if)#standby 1 track f1/2
SW-3L(config-if)#e
SW-3L(config)#int vlan 20
SW-3L(config-if)#ip add 192.168.20.20 255.255.255.0
SW-3L(config-if)#standby 2 ip 192.168.20.1
SW-3L(config-if)#standby 2 priority 50
SW-3L(config-if)#e
SW-3L(config)#int vlan 30
SW-3L(config-if)#ip add 192.168.30.2 255.255.255.0
SW-3L(config-if)#no shut
SW-3L(config-if)#e
SW-3L(config)#int vlan 10
SW-3L(config-if)#ip add 192.168.10.10 255.255.255.0
SW-3L(config-if)#ip helper-address 192.168.30.1
SW-3L(config-if)#e
SW-3L(config)#int vlan 20
SW-3L(config-if)#ip add 192.168.20.20 255.255.255.0
SW-3L(config-if)#ip helper-address 192.168.30.1
SW-3L(config-if)#e
SW-3L(config)#router ospf 1
SW-3L(config-router)#network 192.168.30.0 0.0.0.255 are
SW-3L(config-router)#network 192.168.30.0 0.0.0.255 area 0
SW-3L(config-router)#network 192.168.10.0 0.0.0.255 area 0
SW-3L(config-router)#network 192.168.20.0 0.0.0.255 area 0
R1上的设置:
R1#conf t
R1(config)#int f0/1
R1(config-if)#ip add 192.168.30.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#e
R1(config)#int f0/0
R1(config-if)#ip add 192.168.40.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
R1(config-if)#int f1/0
R1(config-if)#ip add 192.168.50.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#e
R1(config)#router ospf 1
R1(config-router)#network 192.168.30.0 0.0.0.255 are
R1(config-router)#network 192.168.30.0 0.0.0.255 area 0
R1(config-router)#network 192.168.30.0 0.0.0.255 area 0
R1(config-router)#network 192.168.40.0 0.0.0.255 area 0
R1(config-router)#network 192.168.50.0 0.0.0.255 area 0
R1(config-router)#e
R1(config)#ip dhcp pool v10
R1(dhcp-config)#network 192.168.10.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#e
R1(config)#ip dhcp pool v20
R1(dhcp-config)#network 192.168.20.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.20.1
R1(dhcp-config)#end
R1#conf t
R1(config)#access-list 1 deny host 192.168.20.2
R1(config)#access-list 1 permit any
R1(config)#int f1/0
R1(config-if)#ip access-group 1 out
R3上的设置:
R3#conf t
R3(config)#int f0/0
R3(config-if)#no shut
R3(config-if)#e
R3(config)#int f0/0.1
R3(config-subif)#encapsulation dot1Q 10
R3(config-subif)#ip add 192.168.10.20 255.255.255.0
R3(config-subif)#ip helper-address 192.168.40.1
R3(config-subif)#standby 1 ip 192.168.10.1
R3(config-subif)#standby 1 priority 50
R3(config-subif)#e
R3(config)#int f0/0.2
R3(config-subif)#en
R3(config-subif)#encapsulation dot1Q 20
R3(config-subif)#ip add 192.168.20.30 255.255.255.0
R3(config-subif)#ip helper-address 192.168.40.1
R3(config-subif)#standby 2 ip 192.168.20.1
R3(config-subif)#standby 2 preempt
三、测试
1.pc1自动获得IP地址
Pc2自动获得IP地址
Pc4自动获得IP地址
Pc3手动配置IP地址
![]
2.热备份路由
3.Vlan10跟踪路由
Vlan20跟踪路由
4.链路捆绑
SW-3L
![]
SW1
![]
5.全网互通
PC1ping通全网
PC2ping通全网
6.通过acl让pc2无法访问pc3
实验课题2
原文:https://blog.51cto.com/14268989/2376474
踩
(
0
)
赞
(
0
)
举报
评论
一句话评论(
0
)
登录后才能评论!
分享档案
更多>
2021年09月23日 (328)
2021年09月24日 (313)
2021年09月17日 (191)
2021年09月15日 (369)
2021年09月16日 (411)
2021年09月13日 (439)
2021年09月11日 (398)
2021年09月12日 (393)
2021年09月10日 (160)
2021年09月08日 (222)
最新文章
更多>
2021/09/28 scripts
2022-05-27
vue自定义全局指令v-emoji限制input输入表情和特殊字符
2022-05-27
9.26学习总结
2022-05-27
vim操作
2022-05-27
深入理解计算机基础 第三章
2022-05-27
C++ string 作为形参与引用传递(转)
2022-05-27
python 加解密
2022-05-27
JavaScript-对象数组里根据id获取name,对象可能有children属性
2022-05-27
SQL语句——保持现有内容在后面增加内容
2022-05-27
virsh命令文档
2022-05-27
教程昨日排行
更多>
1.
list.reverse()
2.
Django Admin 管理工具
3.
AppML 案例模型
4.
HTML 标签列表(功能排序)
5.
HTML 颜色名
6.
HTML 语言代码
7.
jQuery 事件
8.
jEasyUI 创建分割按钮
9.
jEasyUI 创建复杂布局
10.
jEasyUI 创建简单窗口
友情链接
汇智网
PHP教程
插件网
关于我们
-
联系我们
-
留言反馈
- 联系我们:wmxa8@hotmail.com
© 2014
bubuko.com
版权所有
打开技术之扣,分享程序人生!