zoukankan      html  css  js  c++  java
  • VLAN

     SW1配置

    vlan batch 10 12 20
    interface Vlanif10
     ip address 192.168.10.254 255.255.255.0
    #
    interface Vlanif12
     ip address 192.168.12.1 255.255.255.0
    #
    interface MEth0/0/1
    #
    interface GigabitEthernet0/0/1
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 10 12 20
    #
    
    ospf 1 router-id 1.1.1.1
     area 0.0.0.0
      network 192.168.12.0 0.0.0.255
      network 192.168.10.0 0.0.0.255
    #

    SW2配置

    vlan batch 10 12 20
    interface Vlanif12
     ip address 192.168.12.2 255.255.255.0
    #
    interface Vlanif20
     ip address 192.168.20.254 255.255.255.0
    #
    interface MEth0/0/1
    #
    interface GigabitEthernet0/0/1
     port link-type access
     port default vlan 10
    #
    interface GigabitEthernet0/0/2
     port link-type access
     port default vlan 20
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 10 12 20
    #
    
    ospf 1 router-id 2.2.2.2
     area 0.0.0.0
      network 192.168.20.0 0.0.0.255
      network 192.168.12.0 0.0.0.255

    PC1测试

    PC>ping 192.168.10.3
    
    Ping 192.168.10.3: 32 data bytes, Press Ctrl_C to break
    From 192.168.10.3: bytes=32 seq=1 ttl=128 time=47 ms
    From 192.168.10.3: bytes=32 seq=2 ttl=128 time=62 ms
    From 192.168.10.3: bytes=32 seq=3 ttl=128 time=47 ms
    From 192.168.10.3: bytes=32 seq=4 ttl=128 time=62 ms
    From 192.168.10.3: bytes=32 seq=5 ttl=128 time=47 ms
    
    --- 192.168.10.3 ping statistics ---
      5 packet(s) transmitted
      5 packet(s) received
      0.00% packet loss
      round-trip min/avg/max = 47/53/62 ms
    
    PC>ping 192.168.20.2
    
    Ping 192.168.20.2: 32 data bytes, Press Ctrl_C to break
    From 192.168.20.2: bytes=32 seq=1 ttl=126 time=125 ms
    From 192.168.20.2: bytes=32 seq=2 ttl=126 time=78 ms
    From 192.168.20.2: bytes=32 seq=3 ttl=126 time=62 ms
    From 192.168.20.2: bytes=32 seq=4 ttl=126 time=78 ms
    From 192.168.20.2: bytes=32 seq=5 ttl=126 time=78 ms
    
    --- 192.168.20.2 ping statistics ---
      5 packet(s) transmitted
      5 packet(s) received
      0.00% packet loss
      round-trip min/avg/max = 62/84/125 ms
    
    PC>ping 192.168.20.4
    
    Ping 192.168.20.4: 32 data bytes, Press Ctrl_C to break
    From 192.168.20.4: bytes=32 seq=1 ttl=126 time=78 ms
    From 192.168.20.4: bytes=32 seq=2 ttl=126 time=63 ms
    From 192.168.20.4: bytes=32 seq=3 ttl=126 time=47 ms
    From 192.168.20.4: bytes=32 seq=4 ttl=126 time=63 ms
    Request timeout!
    
    --- 192.168.20.4 ping statistics ---
      5 packet(s) transmitted
      4 packet(s) received
      20.00% packet loss
      round-trip min/avg/max = 47/62/78 ms
    
    PC>
  • 相关阅读:
    一个很实用的css3兼容工具很多属性可以兼容到IE6
    html5 canvas 填充渐变形状
    找到任何形状的中心-总结篇
    html canvas非正方旋转和缩放...写的大多是正方的有人表示一直看正方的看厌了
    把jQuery的类、插件封装成seajs的模块的方法
    那些年实用但被我忘掉javascript属性.onresize
    总有一些实用javascript的元素被人遗忘在角落-slice
    jquery(入门篇)无缝滚动
    html5 canvas旋转+缩放
    今天看到这篇新闻之后,决定休息一下咯
  • 原文地址:https://www.cnblogs.com/liujunjun/p/12923334.html
Copyright © 2011-2022 走看看