华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由

一,链路捆绑

1,目的

实现高宽带传输速率

2,实验步骤
  • 拓扑图
    华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第1张图片

  • 配置IP地址

    PC1;192.168.1.2
    PC2: 192.168.1.23
    
  • 交换机配置

    SW1: vlan 2
       interface Eth-Trunk1 
       port link-type trunk
       port trunk allow-pass vlan 2
       interface Ethernet0/0/1 
        eth-trunk 1 
        interface Ethernet0/0/2
        eth-trunk 1
        interface Ethernet0/0/3  
        eth-trunk 1
        interface Ethernet0/0/4
        port link-type access 
        port default vlan 2
    Sw2:vlan 2 
       interface Eth-Trunk1 
       port link-type trunk
       port trunk allow-pass vlan 2 
       interface Ethernet0/0/1
       eth-trunk 1
       interface Ethernet0/0/2  
       eth-trunk 1
       interface Ethernet0/0/3 
       eth-trunk 1
       interface Ethernet0/0/4
       port hybrid pvid vlan 2 
       port hybrid untagged vlan 2
    
  • 测试连通性

华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第2张图片


二,静态路由

1,实验环境
  两台华为CE,进行手工配置,并添加环回口
2,实验步骤
  • 实验拓扑

华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第3张图片

  • 配置CE1

    建立一个Eeh-trunk 1 ,将其改为postwich模式,并设置相应的地址:

      interface Eth-Trunk1 
       undo portswitch  
       ip address 10.1.1.1 255.255.255.0
    

    将链路子接口加入Eth-Trunk1

          interface GE1/0/0
           undo shutdown 
           eth-trunk 1
           interface GE1/0/1
           undo shutdown  
           eth-trunk 1 
            interface GE1/0/2 
            undo shutdown  
            eth-trunk 1
    

建立一个环回接口,并配置相应的地址

      interface LoopBack0 
      ip address 192.168.1.2 255.255.255.0

添加静态路由

    ip route-static 192.168.2.0 255.255.255.0 10.1.1.2
  • 配置CE2
    建立一个Eeh-trunk 1 ,将其改为postwich模式,并设置相应的地址:

       interface Eth-Trunk1 
        undo portswitch
       ip address 10.1.1.2 255.255.255.0
    

    将链路子接口加入Eth-Trunk1

      interface GE1/0/0
       undo shutdown  
       eth-trunk 1
       interface GE1/0/1 
       undo shutdown 
       eth-trunk 1 
       interface GE1/0/2 
      undo shutdown 
       eth-trunk 1
    

建立环回接口,并配置相应的地址

     interface LoopBack0
    ip address 192.168.2.1 255.255.255.0

添加静态路由

  ip route-static 192.168.1.0 255.255.255.0 10.1.1.1
3,连通性测试

华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第4张图片


三,三层交换机代替单臂路由

1,实验目的

两个不同的VLAN之间除了单臂路由,还可以用三层交换机来实现
给三层交换机相对应的接口也就是连接的PC端所在的接口配置vlan IP,也就是网关,由此来实现不通过vlan之间的通信

2,实验步骤
  • 实验拓扑

华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第5张图片

  • 配置IP地址

       PC1:192.168.100.10 网关:192.168.100.1
       PC2: 192.168.200.10 网关:192.168.200.1
    
  • 创建VLAN

           vlan bat 100 200
    
  • 给vlan 100 200 分别添加网关

       interface Vlanif100 
        ip address 192.168.100.1 255.255.255.0 
        interface Vlanif200 
        ip address 192.168.200.1 255.255.255.0
    
  • 设置端口

        interface GigabitEthernet0/0/1
         port hybrid pvid vlan 100  
         port hybrid untagged vlan 100 
         interface GigabitEthernet0/0/2
         port hybrid pvid vlan 200
         port hybrid untagged vlan 200
    
3,测试连通性

华为交换机链路捆绑与静态路由 ,三层交换机代替单臂路由_第6张图片

配置完成

你可能感兴趣的:(运维,服务器)