博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
交换路由实现全网互通
阅读量:5891 次
发布时间:2019-06-19

本文共 4899 字,大约阅读时间需要 16 分钟。

交换路由实现全网互通1.配置各个交换机及路由器:【开头介绍一下命令的意思,以下同理】

Sw1:
[Huawei]sysname sw1 并创建vlan20和vlan40
[sw1]in g 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type acc
[sw1-GigabitEthernet0/0/1]port def vlan 20//加入vlan20
[sw1]in g 0/0/2
[sw1-GigabitEthernet0/0/2]port link-type acc
[sw1-GigabitEthernet0/0/2]port def vlan 40
[sw1-GigabitEthernet0/0/2]q
[sw1]info-center
[sw1]interface vlan 40//进入vlan40
[sw1-Vlanif40]undo sh
Info: Interface Vlanif40 is not shutdown.
[sw1-Vlanif40]
[sw1-Vlanif40]
[sw1-Vlanif40]ip add 192.168.40.1 255.255.255.0//配置网关地址
[sw1-Vlanif40]q
[sw1-Vlanif20]ip add 192.168.20.254 255.255.255.0//配置网关地址
[sw1]rip //配置RIP
[sw1-rip-1]version 2//选择版本2
[sw1-rip-1]undo su
[sw1-rip-1]undo summary //关闭自动汇总
[sw1-rip-1]network 192.168.20.0//设置网段
[sw1-rip-1]network 192.168.40.0
[sw1-rip-1]q
Sw2:
[Huawei]sysname sw2
[sw2]vlan 30
[sw2-vlan30]vlan 60
[sw2-vlan60]q
[sw2]in g 0/0/1
[sw2-GigabitEthernet0/0/1]undo sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[sw2-GigabitEthernet0/0/1]port link-type acc
[sw2-GigabitEthernet0/0/1]q
[sw2]in g 0/0/1
[sw2]in g 0/0/2
[sw2-GigabitEthernet0/0/2]und sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[sw2-GigabitEthernet0/0/2]port link-type acc
[sw2-GigabitEthernet0/0/2]port def vlan 60
[sw2-GigabitEthernet0/0/2]q
[sw2]in vla 30
[sw2-Vlanif30]undo sh
Info: Interface Vlanif30 is not shutdown.
[sw2-Vlanif30]ip add 192.168.30.254 255.255.255.0
[sw2-Vlanif30]q
[sw2]in vlan 60
[sw2-Vlanif60]undo sh
Info: Interface Vlanif60 is not shutdown.
[sw2-Vlanif60]ip add 192.168.60.1 255.255.255.0
[sw2-Vlanif60]q
[sw2]rip
[sw2-rip-1]version 2
[sw2-rip-1]undo
[sw2-rip-1]undo su
[sw2-rip-1]network
[sw2-rip-1]network 192.168.30.0
[sw2-rip-1]network 192.168.60.0
[sw2-rip-1]q
Sw3:
[sw3]in g 0/0/1
[sw3-GigabitEthernet0/0/1]port def vlan 10
[sw3-GigabitEthernet0/0/1]q
[sw3]
[sw3]
[sw3]
[sw3]in g 0/0/2
[sw3-GigabitEthernet0/0/2]undo sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[sw3-GigabitEthernet0/0/2]port link-type acc
[sw3-GigabitEthernet0/0/2]port def vlan 10
[sw3-GigabitEthernet0/0/2]q
[sw3]in g 0/0/3
[sw3-GigabitEthernet0/0/3]port link-typ acc
[sw3-GigabitEthernet0/0/3]q
[sw3]in g 0/0/4
[sw3-GigabitEthernet0/0/4]undo s
[sw3-GigabitEthernet0/0/4]port link-type acc
[sw3-GigabitEthernet0/0/4]port def vlan 50
[sw3-GigabitEthernet0/0/4]q
[sw3]in vlan 10
[sw3-Vlanif10]undo sh
Info: Interface Vlanif10 is not shutdown.
[sw3-Vlanif10]ip add 192.168.10.254 255.255.255.0
[sw3-Vlanif10]q
[sw3]in vlan 50
[sw3-Vlanif50]undo sh
Info: Interface Vlanif50 is not shutdown.
[sw3-Vlanif50]ip add 192.168.50.1 255.255.255.0
[sw3-Vlanif50]q
[sw3]rip
[sw3-rip-1]version 2
[sw3-rip-1]undo summary
[sw3-rip-1]network 192.168.10.0
[sw3-rip-1]network 192.168.50.0
[sw3-rip-1]q
R1:
[R1]in g 0/0/0
[R1-GigabitEthernet0/0/0]undo sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]ip add 192.168.40.254 255.255.255.0
[R1-GigabitEthernet0/0/0]q
[R1]in g 0/0/1
[R1-GigabitEthernet0/0/1]undo sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R1-GigabitEthernet0/0/1]ip add 10.10.1.1 255.255.255.0
[R1-GigabitEthernet0/0/1]q
[R1]rip
[R1-rip-1]version 2
[R1-rip-1]undo su
[R1-rip-1]undo summary
[R1-rip-1]network 192.168.20.0
[R1-rip-1]network 10.0.0.0
[R1-rip-1]network 192.168.40.0
[R1-rip-1]q
R2:
[R2]in g 0/0/0
[R2-GigabitEthernet0/0/0]undo sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]ip add 192.168.50.254 255.255.255.0
[R2-GigabitEthernet0/0/0]q
[R2]in g 0/0/1
[R2-GigabitEthernet0/0/1]undo sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1]ip add 10.10.1.2 255.255.255.0
[R2-GigabitEthernet0/0/1]q
[R2]in g 0/0/2
[R2-GigabitEthernet0/0/2]undo sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R2-GigabitEthernet0/0/2]ip add 10.10.2.1 255.255.255.0
[R2-GigabitEthernet0/0/2]q
[R2]rip
[R2-rip-1]version 2
[R2-rip-1]undo su
[R2-rip-1]undo summary
[R2-rip-1]network 192.168.50.0
[R2-rip-1]network 192.168.10.0
[R2-rip-1]network 10.0.0.0
[R2-rip-1]q
R3:
[R3]in g 0/0/0
[R3-GigabitEthernet0/0/0]undo sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0]ip add 192.168.60.254 255.255.255.0
Jan 16 2018 19:49:11-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]q
[R3]in g 0/0/2
[R3-GigabitEthernet0/0/2]undo sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R3-GigabitEthernet0/0/2]ip add 10.10.2.2 255.255.255.0
Jan 16 2018 19:49:35-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[R3-GigabitEthernet0/0/2]q
[R3]rip
[R3-rip-1]version 2
[R3-rip-1]undo su
[R3-rip-1]undo summary
[R3-rip-1]network 192.168.30.0
[R3-rip-1]network 192.168.60.0
[R3-rip-1]network 10.0.0.0
[R3-rip-1]q
2.验证、测试、保存
PC【终端】互ping

转载于:https://blog.51cto.com/13557045/2061802

你可能感兴趣的文章
AIX ftp 530 User root access denied
查看>>
【Java记录】try-with-resources的一个坑
查看>>
如何学习Linux命令-初级篇
查看>>
从Oracle Public Yum为Oracle Linux建立本地的Yum源
查看>>
spring4+mybaits3整合—项目Demo
查看>>
PHP数据类型
查看>>
MySQL utf8mb4 字符集:支持 emoji 表情符号
查看>>
IOS开发-如何debug及处理闪退,My App Crashed,Now What? - P...
查看>>
马云_拥抱敏捷-----华为的SDN实践
查看>>
Cocos2d-x 3移动游戏编程
查看>>
Android开发——09Google I/O之让Android UI性能更高效(1)
查看>>
广度优先搜索知识总结
查看>>
Java多线程机制详解(转)
查看>>
在 SELECT 查询中使用表表达式
查看>>
我的友情链接
查看>>
(二) php if语句,switch语句,continue语句,return语句,for 、while、do while 循环
查看>>
Hadoop集群(第7期)_Eclipse开发环境设置
查看>>
ARC 下两种释放对象的方法
查看>>
scala中的continue和break
查看>>
edx 获取当前request
查看>>