• 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>
  • 相关阅读:
    新版淘淘商城_01_简介
    JavaMail之-通过邮件激活账号
    javaMail发送邮件
    JavaMail学习之一-邮件传输协议
    解决ios的safari不能自动播放audio问题(以及部分微信也不能自动播放)
    css3背景渐变色
    jq杂记
    各种“分享按钮“方法总结
    底部导航统一高度
    js 与或运算符 || && 妙用
  • 原文地址:https://www.cnblogs.com/liujunjun/p/12923334.html
Copyright © 2020-2023  润新知