交换机基础配置

来源:互联网 发布:网络世界大战 编辑:程序博客网 时间:2024/06/06 03:05

交换机基础配置

这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述

//1.基本配置PC>ping 10.1.1.2Ping 10.1.1.2: 32 data bytes, Press Ctrl_C to breakFrom 10.1.1.2: bytes=32 seq=1 ttl=128 time=78 msFrom 10.1.1.2: bytes=32 seq=2 ttl=128 time=109 msFrom 10.1.1.2: bytes=32 seq=3 ttl=128 time=78 msFrom 10.1.1.2: bytes=32 seq=4 ttl=128 time=78 msFrom 10.1.1.2: bytes=32 seq=5 ttl=128 time=78 ms--- 10.1.1.2 ping statistics ---  5 packet(s) transmitted  5 packet(s) received  0.00% packet loss  round-trip min/avg/max = 78/84/109 ms//现在PC1和PC2能够正常通信

这里写图片描述

[S1]int g0/0/1[S1]undo negotiation auto[S1-GigabitEthernet0/0/1]duplex full
[S2]interface g0/0/2[S2-GigabitEthernet0/0/2]undo negotiation auto  [S2-GigabitEthernet0/0/2]duplex full 
[S3]interface g0/0/1[S3-GigabitEthernet0/0/1]undo negotiation auto [S3-GigabitEthernet0/0/1]duplex full
[S3]interface g0/0/2[S3-GigabitEthernet0/0/2]undo negotiation auto [S3-GigabitEthernet0/0/2]duplex full

这里写图片描述

[S1]int e0/0/1[S1-Ethernet0/0/1]undo negotiation auto [S1-Ethernet0/0/1]speed 10

用同样的方法配置另外两台设备接口的速率

[S2]int e0/0/1  [S2-Ethernet0/0/1]undo negotiation auto     [S2-Ethernet0/0/1]speed 10[S2-Ethernet0/0/1]quit[S2]int g0/0/2[S2-GigabitEthernet0/0/2]undo negotiation auto [S2-GigabitEthernet0/0/2]speed 100
[S3]int g0/0/1  [S3-GigabitEthernet0/0/1]undo negotiation auto [S3-GigabitEthernet0/0/1]speed 100[S3-GigabitEthernet0/0/1]int g0/0/2[S3-GigabitEthernet0/0/2]undo negotiation auto [S3-GigabitEthernet0/0/2]speed 100

理解ARP及Proxy ARP

这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述

实验拓扑

这里写图片描述
这里写图片描述
这里写图片描述

[Huawei]sysname R1[R1]int g0/0/1[R1-GigabitEthernet0/0/1]ip address 10.1.1.254 255.255.255.0[R1-GigabitEthernet0/0/1]int g0/0/2[R1-GigabitEthernet0/0/2]ip address 10.1.2.254 255.255.255.0[R1-GigabitEthernet0/0/2]display arp allIP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                           VLAN/CEVLAN PVC                      ------------------------------------------------------------------------------10.1.1.254      00e0-fca4-403f            I -         GE0/0/110.1.2.254      00e0-fca4-4040            I -         GE0/0/2------------------------------------------------------------------------------Total:2         Dynamic:0       Static:0     Interface:2    

这里写图片描述

PC>ping 10.1.1.254Ping 10.1.1.254: 32 data bytes, Press Ctrl_C to breakFrom 10.1.1.254: bytes=32 seq=1 ttl=255 time=78 msFrom 10.1.1.254: bytes=32 seq=2 ttl=255 time=31 msFrom 10.1.1.254: bytes=32 seq=3 ttl=255 time=31 msFrom 10.1.1.254: bytes=32 seq=4 ttl=255 time=32 msFrom 10.1.1.254: bytes=32 seq=5 ttl=255 time=31 ms--- 10.1.1.254 ping statistics ---  5 packet(s) transmitted  5 packet(s) received  0.00% packet loss  round-trip min/avg/max = 31/40/78 msPC>ping 10.1.1.2Ping 10.1.1.2: 32 data bytes, Press Ctrl_C to breakFrom 10.1.1.2: bytes=32 seq=1 ttl=128 time=32 msFrom 10.1.1.2: bytes=32 seq=2 ttl=128 time=47 msFrom 10.1.1.2: bytes=32 seq=3 ttl=128 time=31 msFrom 10.1.1.2: bytes=32 seq=4 ttl=128 time=31 msFrom 10.1.1.2: bytes=32 seq=5 ttl=128 time=32 ms--- 10.1.1.2 ping statistics ---  5 packet(s) transmitted  5 packet(s) received  0.00% packet loss  round-trip min/avg/max = 31/34/47 ms

这里写图片描述

PC>ping 10.1.2.254Ping 10.1.2.254: 32 data bytes, Press Ctrl_C to breakFrom 10.1.2.254: bytes=32 seq=1 ttl=255 time=46 msFrom 10.1.2.254: bytes=32 seq=2 ttl=255 time=31 msFrom 10.1.2.254: bytes=32 seq=3 ttl=255 time=31 msFrom 10.1.2.254: bytes=32 seq=4 ttl=255 time=31 msFrom 10.1.2.254: bytes=32 seq=5 ttl=255 time=47 ms--- 10.1.2.254 ping statistics ---  5 packet(s) transmitted  5 packet(s) received  0.00% packet loss  round-trip min/avg/max = 31/37/47 ms

这里写图片描述
这里写图片描述
这里写图片描述

PC>arp -aInternet Address    Physical Address    Type10.1.1.254          00-E0-FC-A4-40-3F   dynamic
[R1]display arp allIP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                           VLAN/CEVLAN PVC                      ------------------------------------------------------------------------------10.1.1.254      00e0-fca4-403f            I -         GE0/0/110.1.1.1        5489-98bf-4d8e  18        D-0         GE0/0/110.1.2.254      00e0-fca4-4040            I -         GE0/0/210.1.2.3        5489-989a-5d98  20        D-0         GE0/0/2------------------------------------------------------------------------------Total:4         Dynamic:2       Static:0     Interface:2  

这里写图片描述
这里写图片描述

[R1]arp static 10.1.1.1 5489-98bf-4d7e[R1]display arp all IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                           VLAN/CEVLAN PVC                      ------------------------------------------------------------------------------10.1.1.254      00e0-fca4-403f            I -         GE0/0/110.1.2.254      00e0-fca4-4040            I -         GE0/0/210.1.2.3        5489-989a-5d98  12        D-0         GE0/0/210.1.1.1        5489-98bf-4d7e            S--------------------------------------------------------------------------------Total:4         Dynamic:1       Static:1     Interface:2  [R1]ping 10.1.1.1  PING 10.1.1.1: 56  data bytes, press CTRL_C to break    Request time out    Request time out    Request time out    Request time out    Request time out  --- 10.1.1.1 ping statistics ---    5 packet(s) transmitted    0 packet(s) received    100.00% packet lossPC>ping 10.1.1.254Ping 10.1.1.254: 32 data bytes, Press Ctrl_C to breakRequest timeout!Request timeout!Request timeout!Request timeout!Request timeout!--- 10.1.1.254 ping statistics ---  5 packet(s) transmitted  0 packet(s) received  100.00% packet loss

这里写图片描述

[R1]undo arp static 10.1.1.1 5489-98bf-4d7e[R1]arp static 10.1.1.1 5489-98bf-4d8e[R1]arp static 10.1.1.2 5489-9863-3fba[R1]arp static 10.1.2.3 5489-989A-5d98[R1]display arp allIP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE                                           VLAN/CEVLAN PVC                      ------------------------------------------------------------------------------10.1.1.254      00e0-fca4-403f            I -         GE0/0/110.1.2.254      00e0-fca4-4040            I -         GE0/0/210.1.1.1        5489-98bf-4d8e            S--10.1.1.2        5489-9863-3fba            S--10.1.2.3        5489-989a-5d98            S--------------------------------------------------------------------------------Total:5         Dynamic:0       Static:3     Interface:2    

配置完成后,在PC-1上测试

PC>ping 10.1.1.254Ping 10.1.1.254: 32 data bytes, Press Ctrl_C to breakFrom 10.1.1.254: bytes=32 seq=1 ttl=255 time=47 msFrom 10.1.1.254: bytes=32 seq=2 ttl=255 time=47 msFrom 10.1.1.254: bytes=32 seq=3 ttl=255 time=31 msFrom 10.1.1.254: bytes=32 seq=4 ttl=255 time=31 msFrom 10.1.1.254: bytes=32 seq=5 ttl=255 time=47 ms--- 10.1.1.254 ping statistics ---  5 packet(s) transmitted  5 packet(s) received  0.00% packet loss  round-trip min/avg/max = 31/40/47 ms

这里写图片描述
这里写图片描述
这里写图片描述

[R1]display ip routing-table Route Flags: R - relay, D - download to fib------------------------------------------------------------------------------Routing Tables: Public         Destinations : 10       Routes : 10       Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface       10.1.1.0/24  Direct  0    0           D   10.1.1.254      GigabitEthernet0/0/1     10.1.1.254/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1     10.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/1       10.1.2.0/24  Direct  0    0           D   10.1.2.254      GigabitEthernet0/0/2     10.1.2.254/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/2     10.1.2.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet0/0/2      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

这里写图片描述

PC>ping 10.1.2.3Ping 10.1.2.3: 32 data bytes, Press Ctrl_C to breakFrom 10.1.1.2: Destination host unreachableFrom 10.1.1.2: Destination host unreachableFrom 10.1.1.2: Destination host unreachableFrom 10.1.1.2: Destination host unreachableFrom 10.1.1.2: Destination host unreachable--- 10.1.2.3 ping statistics ---  5 packet(s) transmitted  0 packet(s) received  100.00% packet loss

这里写图片描述
这里写图片描述

[R1]int g0/0/1  [R1-GigabitEthernet0/0/1]arp-proxy enable

这里写图片描述
这里写图片描述
这里写图片描述

PC>arp -aInternet Address    Physical Address    Type10.1.2.3            00-E0-FC-A4-40-3F   dynamic

这里写图片描述

[R1]int g0/0/2  [R1-GigabitEthernet0/0/2]arp-proxy enable 
PC>ping 10.1.1.1Ping 10.1.1.1: 32 data bytes, Press Ctrl_C to breakRequest timeout!From 10.1.1.1: bytes=32 seq=2 ttl=127 time=78 msFrom 10.1.1.1: bytes=32 seq=3 ttl=127 time=78 msFrom 10.1.1.1: bytes=32 seq=4 ttl=127 time=78 msFrom 10.1.1.1: bytes=32 seq=5 ttl=127 time=62 ms--- 10.1.1.1 ping statistics ---  5 packet(s) transmitted  4 packet(s) received  20.00% packet loss  round-trip min/avg/max = 0/74/78 ms

这里写图片描述
这里写图片描述

0 0
原创粉丝点击