用ENSP配置ospf

先配置拓扑图:

用ENSP配置ospf_第1张图片

这是我的拓扑图,图中的1,2,3是vlan

那就先来看看我们对主机的配置:

用ENSP配置ospf_第2张图片

用ENSP配置ospf_第3张图片 

用ENSP配置ospf_第4张图片 

配置完主机 ,下面先配置sw2的接口配置保证各个接口的配置




sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type access 	
[Huawei-Ethernet0/0/2]port default vlan 1
[Huawei-Ethernet0/0/2]q
[Huawei]vlan batch  2 3
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type access 	
[Huawei-Ethernet0/0/3]port default vlan 2
[Huawei-Ethernet0/0/3]int e0/0/4	
[Huawei-Ethernet0/0/4]port link-type access 	
[Huawei-Ethernet0/0/4]port default vlan 3
[Huawei-Ethernet0/0/4]q	
[Huawei]int GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all 

配置完接口我们来看sw1:


[Huawei]sys sw1	
[sw1]un in en
[sw1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk 
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan all 
[sw1-GigabitEthernet0/0/2]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk 
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[sw1-GigabitEthernet0/0/1]q
[sw1]vlan batch 1 2 3	
[sw1]ospf 3	
[sw1-ospf-3-area-0.0.0.0]network 0.0.0.0 255.255.255.255
[sw1-ospf-3-area-0.0.0.0]q
[sw1-ospf-3-area-0.0.0.0]network 0.0.0.0 0.0.0.0
[sw1-ospf-3-area-0.0.0.0]q
[sw1-ospf-3]
[sw1-ospf-3]q
[sw1]int v	
[sw1]int Vlanif 1
[sw1-Vlanif1]ip ad 192.168.1.254 24
[sw1-Vlanif1]q
[sw1]int v	
[sw1]int Vlanif 2
[sw1-Vlanif2]ip ad 192.168.2.254 24	
[sw1-Vlanif2]q
[sw1]int Vlanif 3
[sw1-Vlanif3]ip ad 192.168.3.254 24
[sw1-Vlanif3]q

下面配置路由器:

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys 	
[Huawei]sysname R1	
[R1-ospf-2]area 0
[R1-ospf-2-area-0.0.0.0]netw	
[R1-ospf-2-area-0.0.0.0]network 0.0.0.0 255.255.255.255
[R1-ospf-2-area-0.0.0.0]q
[R1-ospf-2]
[R1]ospf 2	
[R1-ospf-2-area-0.0.0.0]network 0.0.0.0 0.0.0.0
[R1-ospf-2-area-0.0.0.0]q
[R1-ospf-2]
[R1-ospf-2]

现在来看看我的结果:

用ENSP配置ospf_第5张图片不同vlan可以ping的通

 

你可能感兴趣的:(网络拓扑图,ENSP,网络,网络协议,网络安全,源代码管理,华为)