• 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>
  • 相关阅读:
    管理页面的类 PageHelper
    接下来打算写一下visual stuido 2013使用git进行远端管理。
    转一下网上找来的tortoise git不用每次都输入邮箱和密码的方法。备查看
    tortoise git使用 git版本库的rsa key来进行ssh连接
    2015年4月1日 14:36:56 EF 主从表更新
    Oop分析方法
    Knative 实战:基于 Knative Serverless 技术实现天气服务-下篇
    超大规模商用 K8s 场景下,阿里巴巴如何动态解决容器资源的按需分配问题?
    从零开始入门 K8s | 可观测性:你的应用健康吗?
    Knative 暂时不会捐给任何基金会 | 云原生生态周报 Vol. 22
  • 原文地址:https://www.cnblogs.com/liujunjun/p/12923334.html
Copyright © 2020-2023  润新知