我写入的配置,经测试访问不了外网。请高手指教。
  
我的配置如下
  
  
  
   核心交换机  测试设备为H3C S5560S-28P-SI
  
  
   #
  
  
   #第1步
  
  
   #
  
  
   interface Vlan1
  
  
    ip address 111.1.1.1 255.255.255.0
  
  
   #                                         
  
  
   interface GigabitEthernet1/0/23
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   interface GigabitEthernet1/0/24
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   ip route-static 0.0.0.0 0.0.0.0 111.1.1.254
  
  
   #
  
  
   #第2步新建聚合组
  
  
   #
  
  
   int Bridge-Aggregation 1
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/1
  
  
    port link-aggregation group 1
  
  
   #
  
  
   int g1/0/2
  
  
    port link-aggregation group 1
  
  
   #
  
  
   int Bridge-Aggregation 1
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   
  
  
   
  
  
   #
  
  
   int Bridge-Aggregation 2
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/3
  
  
    port link-aggregation group 2
  
  
   #
  
  
   int g1/0/4
  
  
    port link-aggregation group 2
  
  
   #
  
  
   int Bridge-Aggregation 2
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   
  
  
   
  
  
   #
  
  
   int Bridge-Aggregation 3
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/5
  
  
    port link-aggregation group 3
  
  
   #
  
  
   int g1/0/6
  
  
    port link-aggregation group 3
  
  
   #
  
  
   int Bridge-Aggregation 3
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   
  
  
   
  
  
   #
  
  
   int Bridge-Aggregation 4
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/7
  
  
    port link-aggregation group 4
  
  
   #
  
  
   int g1/0/8
  
  
    port link-aggregation group 4
  
  
   #
  
  
   int Bridge-Aggregation 4
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   
  
  
   
  
  
   #
  
  
   int Bridge-Aggregation 5
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/9
  
  
    port link-aggregation group 5
  
  
   #
  
  
   int g1/0/10
  
  
    port link-aggregation group 5
  
  
   #
  
  
   int Bridge-Aggregation 5
  
  
    port link-type trunk
  
  
    port trunk permit vlan all
  
  
   #
  
  
   
  
  
   
  
  
   #
  
  
   int Bridge-Aggregation 6
  
  
    description <LINK-TO-HW-S5700S>
  
  
   #
  
  
   int g1/0/11
  
  
    port link-aggregation group 6
  
  
   #
  
  
   int g1/0/12
  
  
    port link-aggregation group 6
  
  
   #
  
  
   int Bridge-Aggregation 6
  
  
    port link-type trunk
  
  
   
  
  
   
  
  
   
  
  
   
  
  
   
  
  
   
  
  
   
    汇聚交换机  测试设备为华为S5700-24TP-SI-AC
   
   
    #
   
   
    #第1步新建聚合组
   
   
    #
   
   
    interface Eth-Trunk 1
   
   
    #    
   
   
    interface GigabitEthernet0/0/23
   
   
     port link-type trunk
   
   
     port trunk allow-pass vlan all
   
   
     eth-trunk 1
   
   
    #
   
   
    interface GigabitEthernet0/0/24
   
   
     port link-type trunk
   
   
     port trunk allow-pass vlan all
   
   
     eth-trunk 1
   
   
    #
   
   
    interface Eth-Trunk 1
   
   
     port link-type trunk
   
   
     port trunk allow-pass vlan all
   
   
    # 
   
   
    
   
   
    
   
   
    #
   
   
    #第2步新建vlan
   
   
    #
   
   
    vlan batch 101 to 120
   
   
    #
   
   
    #第3步vlan配置IP
   
   
    #
   
   
    interface Vlanif101
   
   
     ip address 113.1.1.254 255.255.255.0
   
   
    #
   
   
    interface Vlanif102
   
   
     ip address 113.1.2.254 255.255.255.0
   
   
    #
   
   
    interface Vlanif103
   
   
     ip address 113.1.3.254 255.255.255.0
   
   
    #
   
   
    interface Vlanif104
   
   
     ip address 113.1.4.254 255.255.255.0
   
   
    #
   
   
    interface Vlanif105
   
   
     ip address 113.1.5.254 255.255.255.0
   
   
    #
   
   
    interface Vlanif106
   
   
     ip address 113.1.6.254 255.255.255.0
   
   
    #
   
   
  
   
  
  
   
    #
   
   
    #第4步端口与vlan捆绑
   
   
    #
   
   
    interface GigabitEthernet0/0/1
   
   
     port link-type access
   
   
     port default vlan 101
   
   
    #
   
   
    interface GigabitEthernet0/0/2
   
   
     port link-type access
   
   
     port default vlan 102
   
   
    #
   
   
    interface GigabitEthernet0/0/3
   
   
     port link-type access
   
   
     port default vlan 103
   
   
    #
   
   
    interface GigabitEthernet0/0/4
   
   
     port link-type access
   
   
     port default vlan 104
   
   
    #
   
   
    interface GigabitEthernet0/0/5
   
   
     port link-type access
   
   
     port default vlan 105
   
   
    #
   
   
    interface GigabitEthernet0/0/6
   
   
     port link-type access
   
   
     port default vlan 106
   
   
    #
   
   
  
   
  
  
   
    #
   
   
    #第5步新建DHCP地址池
   
   
    #
   
   
    dhcp enable
   
   
    #
   
   
    #
   
   
    ip pool 101
   
   
     network 113.1.1.0 mask 255.255.255.0
   
   
     gateway 113.1.1.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
    ip pool 102
   
   
     network 113.1.2.0 mask 255.255.255.0
   
   
     gateway 113.1.2.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
    ip pool 103
   
   
     network 113.1.3.0 mask 255.255.255.0    
   
   
     gateway 113.1.3.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
    ip pool 104
   
   
     network 113.1.4.0 mask 255.255.255.0
   
   
     gateway 113.1.4.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
    ip pool 105
   
   
     network 113.1.5.0 mask 255.255.255.0
   
   
     gateway 113.1.5.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
    ip pool 106
   
   
     network 113.1.6.0 mask 255.255.255.0
   
   
     gateway 113.1.6.254
   
   
     dns 61.139.2.69 114.114.114.114
   
   
    #
   
   
  
   
  
  
   
  
  
   
    #
   
   
    interface Vlanif101
   
   
     dhcp select global
   
   
    #
   
   
    interface Vlanif102
   
   
     dhcp select global
   
   
    #
   
   
    interface Vlanif103
   
   
     dhcp select global
   
   
    #
   
   
    interface Vlanif104
   
   
     dhcp select global
   
   
    #
   
   
    interface Vlanif105
   
   
     dhcp select global
   
   
    #
   
   
    interface Vlanif106
   
   
     dhcp select global
   
   
    #
   
   
  
   
  
  
   
  
  
   
    路由器上的静态路由配置
   
   
    目的地址:113.1.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.2.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.1.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.3.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.4.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.5.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
    
   
   
    
   
   
    目的地址:113.6.0.0
   
   
    子网掩码:255.255.0.0
   
   
    下一跳(网关):111.1.1.1
   
   
    线路(出接口):路由器的Lan口
   
   
  
    port trunk permit vlan all
  
  
   #  
  
 
暂无评论