华为交换机配置静态路由

· 配置静态路由
  -拓扑图

                   华为交换机配置静态路由_第1张图片
  -操作
    CE1:
        system-view
        [~HUAWEI] interface GE 1/0/0
        [~HUAWEI-GE1/0/0] undo portswitch
        [*HUAWEI-GE1/0/0] ip address 192.168.4.1 24
        [*HUAWEI-GE1/0/0] undo shutdown
        [*HUAWEI-GE1/0/0] quit
        [*HUAWEI] ip route-static 192.168.100.0 24      192.168.4.254    #指定静态路由
               \\ 关键字         被访问地址端  反掩码  下一跳地址
        [*HUAWEI-GE1/0/0] commit
    CE2:
        system-view
        [~HUAWEI] inter ge1/0/0
        [~HUAWEI-GE1/0/0] undo portswitch
        [*HUAWEI-GE1/0/0] ip address 192.168.4.254 24
        [*HUAWEI-GE1/0/0] undo shutdown
        [*HUAWEI-GE1/0/0] commit
        
        [~HUAWEI-GE1/0/0] inter ge1/0/1
        [~HUAWEI-GE1/0/1] undo portswitch
        [*HUAWEI-GE1/0/1] ip address 192.168.100.254 24
        [*HUAWEI-GE1/0/1] undo shutdown
        [*HUAWEI-GE1/0/1] commi
    CE3:
        system-view
        [~HUAWEI] interface ge1/0/0
        [~HUAWEI-GE1/0/0] undo portswitch
        [*HUAWEI-GE1/0/0] ip address 192.168.100.1 255.255.255.0
        [*HUAWEI-GE1/0/0] undo shutdown
        [*HUAWEI-GE1/0/0] quit
        [*HUAWEI] ip route-static 192.168.4.0 24 192.168.100.254     #指定静态路由,双方互指
        [*HUAWEI] commit
    测试:
        CE1    [~HUAWEI] ping 192.168.100.1
        CE3    [~HUAWEI] ping 192.168.4.1

转载于:https://my.oschina.net/xinsui1314x/blog/3057949

你可能感兴趣的:(华为交换机配置静态路由)