基于eNSP的华为设备,配置多区域OSFP 验证 和RIP 验证 及单臂路由,并实现全网互通
如图所示:
一. 在R2上配置单臂路由 实现不同vlan间通信。并开启远程管理功能
- 配置单臂路由
[R2]interface g 0/0/1.1
[R2-GigabitEthernet0/0/1.1]ip address 192.168.100.254 24
R2-GigabitEthernet0/0/1.1]dot1q termination vid 100
[R2-GigabitEthernet0/0/1.1]q
[R2]interface g 0/0/0.2
[R2-GigabitEthernet0/0/1.2]ip address 192.168.200.254 24
R2-GigabitEthernet0/0/1.2]dot1q termination vid 200
[R2-GigabitEthernet0/0/1.2]q - 在交换机上创建vlan 并将对应接口加入到相应的vlan中。
配置trunk链路
[sw1]vlan batch 100 200
[sw1]interface g 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all - 加入vlan
[sw1]interface e 0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 100
[sw1]interface e 0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 200 - 客户端配置并验证
二. 多区域ospf,ospf认证,重分发。
- OSPF认证
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]authentication-mode simple [email protected]
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]authentication-mode simple [email protected]
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]authentication-mode simple [email protected]
[R4]ospf 1
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.1]authentication-mode simple [email protected]
- 路由重分发
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
[R4]ospf 1
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.0]network 192.168.30.0 0.0.0.255
[R2]rip 1
[R2-rip-1]import-route ospf 1 cost 1
[R2]ospf 1
[R2-ospf-1]import-route rip 1 cost 1
- Rip宣告。
[R2]rip 1
[R2-rip-1]network 192.168.10.0
[R2-rip-1]network 192.168.100.0
[R2-rip-1]network 192.168.200.0
认证:
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]rip authentication-mode simple [email protected]
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]rip authentication-mode simple [email protected]
汇总:
[R1]interface g 0/0/0
[R1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.0.0
查看汇总
三. 实现全网互通。
- 在R4上发布直连路由
[R4]ospf 1
[R4-ospf-1]import-route direct type 2 - 实现全网互通