核心交换机接入路由器配置 华为三层交换机配置实例


核心交换机接入路由器配置 华为三层交换机配置实例

文章插图
S1配置
[S1] Vlan batch 3 to 7 创建vlan3到7
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13] port link-type access
[S1-GigabitEthernet0/0/13] Port default vlan 3
[S1-GigabitEthernet0/0/13] q
[S1]interface GigabitEthernet 0/0/1
【核心交换机接入路由器配置 华为三层交换机配置实例】 [S1-GigabitEthernet0/0/1] port link-type access
[S1-GigabitEthernet0/0/1] Port default vlan4
[S1-GigabitEthernet0/0/1] q
[S1]interface Eth-Trunk 1
[S1-Eth-Trunk1]mode lacp-static
[S1-Eth-Trunk1]port link-type trunk
[S1-Eth-Trunk1]port trunk allow-pass vlan all
[S1-Eth-Trunk1]trunkport GigabitEthernet 0/0/13 to 0/0/1
[S1]interface Vlanif 3 配置三层接口
[S1-Vlanif3]ip address 10.0.3.254 24 给三层接口配置地址
[S1]interface Vlanif4
[S1-Vlanif4]ip address 10.0.4.254 24
[S1]interface Vlanif5
[S1-Vlanif5]ip address 10.0.5.1 24
[S1] ospf
[S1-ospf-1]area 0
[S1-ospf-1-area-0.0.0.0]netw
[S1-ospf-1-area-0.0.0.0]network 10.0.0.0 0.255.255.255
S2配置同S1
S3配置
[S3]interface Vlanif 1
[S3-Vlanif1]ip address 10.0.3.3 24
[S3]ip route-static 0.0.0.0 0.0.0.0 10.0.3.254
S4配置
[S4]interface Vlanif 1
[S4-Vlanif1]ip address 10.0.7.4 24
[S4]ip route-static 0.0.0.0 0.0.0.0 10.0.7.254
R1配置
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0] ip address 10.0.4.1 24
[R1]ip route-static 0.0.0.0 0.0.0.0 10.0.4.254
R3配置
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/0] ip address 10.0.6.3 24
[R3]ip route-static 0.0.0.0 0.0.0.0 10.0.6.254
测试VLAN间通信正常

    推荐阅读