




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 VLANIF与OSPF跨越三层网络通信配置例如 1、组网需求 图1配置通过VLANIF接口跨越三层网络通信组网图 如上图1所示,SwitchA和SwitchB分别下挂VLAN10的二层网络,SwitchA 和SwitchB之间通过三层网络互通,三层网络采用 OSPF协议。 要求两个二层网络的PC实现二层隔离三层互通。 2、配置思路 2.1、 配置接口所属的VLAN,允许VLAN通过当前接口 2.2、 配置VLANIF接口的IP地址,实现三层互通。 2.3、 配置OSPF根本功能,实现路由互通。 3、操作步骤 3.1、 配置 SwitchA # 仓 U 建 VLAN10 和 VLAN30。 s
2、ystem-view HUAWEI sys name SwitchA SwitchA vlan batch 10 30 # 配置接口 GE1/0/1 参加 VLAN 10 , GE1/0/2 参加 VLAN 30。 SwitchA in terface gigabitethernet 1/0/1 SwitchA-GigabitEthernet1/0/1 port lin k-type trunk SwitchA-GigabitEthernet1/0/1 port trunk allow-pass vlan 10 SwitchA-GigabitEthernet1/0/1 quit SwitchA
3、 in terface gigabitethernet 1/0/2 SwitchA-GigabitEthernet1/0/2 port lin k-type trunk SwitchA-GigabitEthernet1/0/2 port trunk allow-pass vlan 30 SwitchA-GigabitEthernet1/0/2 quit # 配置 VLANIF10 的 IP 地址为 10.10.10.1/24 , VLANIF30 的 IP 地址为 10.10.30.1/24。 SwitchA in terface vla nif 10 SwitchA-Vla nif10 ip
4、 address 10.10.10.1 24 SwitchA-Vla nif10 quit SwitchA in terface via nif 30 SwitchA-Vla nif30 ip address 10.10.30.1 24 SwitchA-Vla nif30 quit # 配置OSPF根本功能 SwitchA router id 1.1.1.1 SwitchA ospf SwitchA-ospf-1 area 0 SwitchA-ospf-1-area-0.0.0.0 network 10.10.10.0 0.0.0.255 SwitchA-ospf-1-area-0.0.0.0
5、 n etwork 10.10.30.0 0.0.0.255 SwitchA-ospf-1-area-0.0.0.0 quit 3.2、 配置 SwitchB # 仓 U 建 VLAN10 和 VLAN30。 system-view HUAWEI sys name SwitchB SwitchB vlan batch 10 30 # 配置接口 GE1/0/2 参加 VLAN 10 , GE1/0/1 参加 VLAN 30。 SwitchB in terface gigabitethernet 1/0/2 SwitchB-GigabitEthernet1/0/2 port lin k-type
6、trunk SwitchB-GigabitEthernet1/0/2 port trunk allow-pass vlan 10SwitchB-ospf-1-area-0.0.0.0 n etwork 10.10.30.0 0.0.0.255 SwitchB-ospf-1-area- SwitchB-GigabitEthernet1/0/2 quit SwitchB in terface gigabitethernet 1/0/1 SwitchB-GigabitEthernet1/0/1 port lin k-type trunk SwitchB-GigabitEthernet1/0/1 po
7、rt trunk allow-pass vlan 30 SwitchB-GigabitEthernet1/0/1 quit # 配置 VLANIF10 的 IP 地址为 10.10.20.1/24 , VLANIF30 的 IP 地址为 10.10.30.2/24。 SwitchB in terface vla nif 10 SwitchB-Vla nif10 ip address 10.10.20.1 24 SwitchB-Vla nif10 quit SwitchB in terface vla nif 30 SwitchB-Vla nif30 ip address 10.10.30.2
8、24 SwitchB-Vla nif30 quit # 配置OSPF根本功能 SwitchB router id 2.2.2.2 SwitchB ospf SwitchB-ospf-1 area 0 SwitchB-ospf-1-area-0.0.0.0 n etwork 10.10.20.0 0.0.0.255 0.0.0.0 quit# 4、检查配置结果 SwitchA下挂的二层网络中 PC上配置缺省网关为 VLANIF10接口的IP地 址 10.10.10.1/24。 SwitchB下挂的二层网络中 PC上配置缺省网关为 VLANIF10接口的IP地 址 10.10.20.1/24。 配
9、置完成后,两个二层网络的 PC实现二层隔离三层互通。 5、配置文件 5.1、 SwitchA的配置文件。 # sys name SwitchA # router id 1.1.1.1 # vlan batch 10 30 # in terface Via nif10 ip address 10.10.10.1 255.255.255.0 in terface Via nif30 ip address 10.10.30.1 255.255.255.0 # in terface GigabitEthernet1/0/1 # port lin k-type trunk port trunk allo
10、w-pass vla n 10 # in terface GigabitEthernet1/0/2 port lin k-type trunk port trunk allow-pass vla n 30 # ospf 1 area 0.0.0.0 n etwork 10.10.10.0 0.0.0.255 n etwork 10.10.30.0 0.0.0.255 # Retur n 5.2、 SwitchB的配置文件。 # sys name SwitchBrouter id 2222 # vlan batch 10 30 # in terface Via nif10 ip address 10.10.20.1 255.255.255.0 # in terface Vla nif30 ip address 10.10.30.2 255.255.255.0 # in terface GigabitEthernet1/0/1 port lin k-type trunk port trunk allow-pass vla n 30 # in terfa
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 学生户外实践活动的资源整合与利用
- 办公室健康操与坐姿调整技巧
- 互联网广告与企业市场定位研究
- 2024年宠物殡葬专业课程设置试题及答案
- 兽医临床决策能力试题及答案
- 兽医考生心态调适试题及答案
- 河流对地貌的影响试题及答案
- 寄生虫病诊断试题及答案
- 兽医临床技能提升方法与路径试题及答案
- 火灾事故处理实验的试题及答案
- 2024年新人教版九年级上册化学教学课件 6.1.2 碳单质的化学性质
- 2025年质谱分析考试题及答案
- 中国近现代史纲要学习心得体会与民族团结
- 工程建设资料员培训课件
- 劳务派遣劳务外包项目方案投标文件(技术方案)
- 电机控制器设计原理与现代技术应用
- 2025时事政治考试题库和参考答案
- 化工智能制造技术基础知识单选题100道及答案
- 定额〔2025〕1号文-关于发布2018版电力建设工程概预算定额2024年度价格水平调整的通知
- 2021年烟草营销技能鉴定(高级理论)三级理论历年真题(含答案)
- 医疗器械进院流程
评论
0/150
提交评论