A-A+

华为交换机之间vlan通信rip路由的配置

2015年11月21日 路由器高级应用 暂无评论 阅读 3 views 次

交换机A的配置:

  1. vlan batch 20 30  
  2. #  
  3. interface Vlanif1  
  4.  ip address 192.168.1.1 255.255.255.0  
  5. #  
  6. interface Vlanif20  
  7.  ip address 192.168.20.1 255.255.255.0  
  8. #  
  9. interface Vlanif30  
  10.  ip address 192.168.30.1 255.255.255.0  
  11.    
  12. interface Ethernet0/0/1  
  13.  port link-type access  
  14.  port default vlan 20  
  15. #  
  16. interface Ethernet0/0/2  
  17.  port link-type access  
  18.  port default vlan 30  
  19.    
  20. rip 1  
  21.  network 192.168.20.0  
  22.  network 192.168.30.0  
  23.  network 192.168.1.0  

交换机的B配置:

  1. vlan batch 40  
  2. interface Vlanif1  
  3.  ip address 192.168.1.2 255.255.255.0  
  4. #  
  5. interface Vlanif40  
  6.    
  7. network 192.168.1.0  
  8. network 192.168.40.0  

在两个交换配之间端口做trunk配置,并允许所有的vlan通过

  1. interface GigabitEthernet0/0/2  
  2.  port link-type trunk  
  3.  port trunk allow-pass vlan 2 to 4094  
标签:

给我留言