码迷,mamicode.com
首页 > 其他好文 > 详细

华为模拟器如何实现不同Vlan不同网段之间的互通

时间:2018-01-11 11:36:12      阅读:492      评论:0      收藏:0      [点我收藏+]

标签:网关   roc   net   ctr   server   address   monit   oss   eth   

如图可以使PC1、PC2、PC3、PC4、PC5、server1、之间可以互相ping通:
技术分享图片
实验步骤:
1.配置PC1/PC2/PC3/PC4/PC5的IP,子网掩码,网关如图:
技术分享图片技术分享图片技术分享图片技术分享图片技术分享图片
2.配置Switch1如下:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan 10
[SW1-vlan10]vlan 20
[SW1-vlan20]vlan 30
[SW1-vlan30]q
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1-GigabitEthernet0/0/1]undo shut
[SW1-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW1-GigabitEthernet0/0/1]q
[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 20
[SW1-GigabitEthernet0/0/2]undo shut
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW1-GigabitEthernet0/0/2]q
[SW1]interface g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type ac
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 30
[SW1-GigabitEthernet0/0/3]undo shut
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[SW1]interface g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type trunk
[SW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/4]undo shutdown
Info: Interface GigabitEthernet0/0/4 is not shutdown.
3.配置Switch2如下:
<Huawei>undo terminal monitor
<Huawei>system-view
[Huawei]sysname SW2
[SW2]vlan 40
[SW2-vlan40]vlan 50
[SW2-vlan50]q
[SW2]interface g0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 40
[SW2-GigabitEthernet0/0/2]undo shutdown
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW2-GigabitEthernet0/0/2]q
[SW2]interface g0/0/3
[SW2-GigabitEthernet0/0/3]port link-type access
[SW2-GigabitEthernet0/0/3]port default vlan 50
[SW2-GigabitEthernet0/0/3]undo shutdown
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[SW2-GigabitEthernet0/0/3]q
[SW2]interface g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]undo shutdown
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
Info: Interface GigabitEthernet0/0/1 is not shutdown.
4.配置Switch3如下:
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>system-view
[Huawei]sysname SW3
[SW3]vlan 10
[SW3-vlan10]vlan 20
[SW3-vlan20]vlan 30
[SW3-vlan30]vlan 40
[SW3-vlan40]vlan 50
[SW3-vlan50]q
[SW3]interface vlan 10
[SW3-Vlanif10]ip address 10.0.0.254 255.0.0.0
[SW3-Vlanif10]undo shutdown
Info: Interface Vlanif10 is not shutdown.
[SW3-Vlanif10]q
[SW3]interface vlan 20
[SW3-Vlanif20]ip address 20.0.0.254 255.0.0.0
[SW3-Vlanif20]undo shutdown
Info: Interface Vlanif20 is not shutdown.
[SW3-Vlanif20]q
[SW3]interface vlan 30
[SW3-Vlanif30]ip address 30.0.0.254 255.0.0.0
[SW3-Vlanif30]undo shutdown
Info: Interface Vlanif30 is not shutdown.
[SW3-Vlanif30]q
[SW3]interface vlan 40
[SW3-Vlanif40]ip address 40.0.0.254 255.0.0.0
[SW3-Vlanif40]undo shutdown
Info: Interface Vlanif40 is not shutdown.
[SW3-Vlanif40]q
[SW3]interface vlan 50
[SW3-Vlanif50]ip address 50.0.0.254 255.0.0.0
[SW3-Vlanif50]undo shutdown
Info: Interface Vlanif50 is not shutdown.
[SW3-Vlanif50]q
[SW3]interface g0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW3-GigabitEthernet0/0/1]undo shutdown
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW3-GigabitEthernet0/0/1]q
[SW3]interface g0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]undo shutdown
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW3]vlan 60
[SW3-vlan60]q
[SW3]interface g0/0/3
[SW3-GigabitEthernet0/0/3]port link-type access
[SW3-GigabitEthernet0/0/3]port default vlan 60
[SW3-GigabitEthernet0/0/3]undo shutdown
[SW3]interface vlan 60
[SW3-Vlanif60]ip address 60.0.0.1 255.0.0.0
5.配置R1如下
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1-GigabitEthernet0/0/0]ip address 60.0.0.2 255.0.0.0
[R1-GigabitEthernet0/0/0]undo shut
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]q
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 70.0.0.254 255.0.0.0
[R1-GigabitEthernet0/0/1]undo shut
Info: Interface GigabitEthernet0/0/1 is not shutdown.
6.配置server1如图:
技术分享图片
7.在R1配置默认路由:
技术分享图片
8.在SW3上配置静态路由:
技术分享图片
结果验证如图:
技术分享图片技术分享图片技术分享图片技术分享图片

华为模拟器如何实现不同Vlan不同网段之间的互通

标签:网关   roc   net   ctr   server   address   monit   oss   eth   

原文地址:http://blog.51cto.com/13568842/2059667

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!