华为vlan划分,单臂路由以及静态路由

 

华为 vlan 划分,单臂路由以及静态路由使所有成员都能上网

华为拓扑图:

 

IP 地址规划如图!
给三台电脑配 IP 地址

 

 

VLAN 划分:

 

sy         进入视图模式

[Huawei]un in en      关闭消息中心

[Huawei]sysname SW1      改交换机名字

[SW1]inter vlan 1       进入交换机

[SW1-Vlanif1]ip address 192.168.0.10 24   ip 地址

[SW1-Vlanif1]un shut    开启

[SW1]vlan 2     设置 vlan

[SW1-vlan2]vlan 3

[SW1-vlan3]vlan 4

[SW1]inter e0/0/2    进接口 划分 vlan

[SW1-Ethernet0/0/2]port link-type access     

[SW1-Ethernet0/0/2]port default vlan 3

[SW1-Ethernet0/0/2]inter e0/0/1

[SW1-Ethernet0/0/1]port link-type access

[SW1-Ethernet0/0/1]port default vlan 2

[SW1-Ethernet0/0/1]inter e0/0/3

[SW1-Ethernet0/0/3]port link-type access

[SW1-Ethernet0/0/3]port default vlan 4

[SW1-Ethernet0/0/3]inter g0/0/1

[SW1-GigabitEthernet0/0/1]port link-type trunk   设置成中端口

[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

设置成所有成员通过

 

单臂路由:

sy    进入视图模式

[Huawei]un in en   关闭消息中心

[Huawei]sysname R1  改交换机名字

[R1]inter g0/0/0

[R1-GigabitEthernet0/0/0]un shut   开启

[R1-GigabitEthernet0/0/0]inter g0/0/0.1  进入子接口

[R1-GigabitEthernet0/0/0.1]dot1q termination vid 1

[R1-GigabitEthernet0/0/0.1]ip address 192.168.0.1 24

[R1-GigabitEthernet0/0/0.1]un shut

[R1-GigabitEthernet0/0/0.1]inter g0/0/0.2

[R1-GigabitEthernet0/0/0.2]dot1q termination vid 2

[R1-GigabitEthernet0/0/0.2]ip address 192.168.1.1 24

[R1-GigabitEthernet0/0/0.2]un shut

[R1-GigabitEthernet0/0/0.2]inter g0/0/0.3

[R1-GigabitEthernet0/0/0.3]dot1q termination vid 3  

[R1-GigabitEthernet0/0/0.3]ip address 192.168.2.10 24

[R1-GigabitEthernet0/0/0.3]un shut

[R1-GigabitEthernet0/0/0.3]inter g0/0/0.4

[R1-GigabitEthernet0/0/0.4]dot1q  termination vid 4     

[R1-GigabitEthernet0/0/0.4]ip address 192.168.3.10 24

[R1-GigabitEthernet0/0/0.4]un shut

[R1-GigabitEthernet0/0/0.4]inter g0/0/1

[R1-GigabitEthernet0/0/1]ip address 202.106.1.1 30  配置 ip 地址

[R1-GigabitEthernet0/0/1]un shut

 
sys

[Huawei]un in en 

[Huawei]sysname R2

[R2]inter g0/0/0

[R2-GigabitEthernet0/0/0]ip address 202.106.1.2 30

[R2-GigabitEthernet0/0/0]un shut

[R2-GigabitEthernet0/0/0]inter g0/0/1

[R2-GigabitEthernet0/0/1]ip address 202.106.1.5 30

[R2-GigabitEthernet0/0/1]un shut

 

sy

[Huawei]un in en

[Huawei]sysname R3

[R3]inter g0/0/0

[R3-GigabitEthernet0/0/0]ip address 202.106.1.6 30

[R3-GigabitEthernet0/0/0]un shut

 

 

加静态路由:

[R2] ip route-static 192.168.0.0 255.255.252.0 202.106.1.1  然后测试结果

 
[R3]ip route-static 202.106.1.0 30 202.106.1.5

[R3]ip route-static 192.168.0.0 22 202.106.1.5

[R1]ip route-static 202.106.1.4 30 202.106.1.2

 

 
测试结果!!!!!!都通了!

 

你可能感兴趣的:(华为vlan划分,单臂路由以及静态路由)