A-A+

Serial口的ARP实验

2015年12月28日 站长资讯 暂无评论

一.实验目的

查看路由器的ARP表项,看看Serial 口有没有ARP

二.实验拓扑: PC1 - RT1 - RT2 -z- RT3 - RT4 - PC2

一.实验步骤

1.为PC机配置IP,网关。

2.为路由器配置IP地址。

3.全网使用OSPF,全网互通。

4.PING,并查看ARP表。

四.实验内容

  1. PC1  
  2. R1#configure terminal  
  3. R1(config)#hostname ZJPC1  
  4. ZJPC1(config)#no ip routing  
  5. ZJPC1(config)#interface ethernet 0/0  
  6. ZJPC1(config-if)#ip address 1.1.1.1 255.255.255.0  
  7. ZJPC1(config-if)#no shutdown  
  8. ZJPC1(config-if)#exit  
  9. ZJPC1(config)#ip default-gateway 1.1.1.2  
  10.    
  11. PC2  
  12. R1#configure terminal  
  13. R1(config)#hostname ZJPC2  
  14. ZJPC2(config)#no ip routing  
  15. ZJPC2(config)#interface ethernet 0/0  
  16. ZJPC2(config-if)#ip address 5.5.5.2 255.255.255.0  
  17. ZJPC2(config-if)#no shutdown  
  18. ZJPC2(config-if)#exit  
  19. ZJPC2(config)#ip default-gateway 5.5.5.1  
  20.    
  21. RT1  
  22. R2#configure terminal  
  23. R2(config)#hostname ZJRT1  
  24. ZJRT1(config)#interface ethernet 0/0  
  25. ZJRT1(config-if)#ip address 1.1.1.2 255.255.255.0  
  26. ZJRT1(config-if)#no shutdown   
  27. ZJRT1(config-if)#exit  
  28. ZJRT1(config)#interface ethernet 0/1  
  29. ZJRT1(config-if)#ip address 2.2.2.1 255.255.255.0  
  30. ZJRT1(config-if)#no shutdown  
  31. ZJRT1(config-if)#exit  
  32. ZJRT1(config)#router ospf 1  
  33. ZJRT1(config-router)#network 1.1.1.0 0.0.0.255 area 0  
  34. ZJRT1(config-router)#network 2.2.2.0 0.0.0.255 area 0  
  35.    
  36. RT2  
  37. R3#configure terminal  
  38. R3(config)#hostname ZJRT2  
  39. ZJRT2(config)#interface ethernet 1/0  
  40. ZJRT2(config-if)#ip address 2.2.2.2 255.255.255.0  
  41. ZJRT2(config-if)#no shutdown  
  42. ZJRT2(config-if)#exit  
  43. ZJRT2(config)#interface serial 0/0  
  44. ZJRT2(config-if)#ip address 3.3.3.1 255.255.255.0  
  45. ZJRT2(config-if)#no shutdown  
  46. ZJRT2(config-if)#exit  
  47. ZJRT1(config)#router ospf 1  
  48. ZJRT1(config-router)#network 2.2.2.0 0.0.0.255 area 0  
  49. ZJRT1(config-router)#network 3.3.3.0 0.0.0.255 area 0  
  50.    
  51. RT3  
  52. R4#configure terminal  
  53. R4(config)#hostname ZJRT3  
  54. ZJRT3(config)#interface serial 0/0   
  55. ZJRT3(config-if)#ip address 3.3.3.2 255.255.255.0  
  56. ZJRT3(config-if)#no shutdown  
  57. ZJRT3(config-if)#exit  
  58. ZJRT3(config)#interface ethernet 1/0  
  59. ZJRT3(config-if)#ip address 4.4.4.1 255.255.255.0  
  60. ZJRT3(config-if)#no shutdown  
  61. ZJRT3(config-if)#exit  
  62. ZJRT3(config)#router ospf 1  
  63. ZJRT3(config-router)#network 3.3.3.0 0.0.0.255 area 0  
  64. ZJRT3(config-router)#network 4.4.4.0 0.0.0.255 area 0  
  65.    
  66. RT4  
  67. R5#configure terminal  
  68. R5(config)#hostname ZJRT4  
  69. ZJRT4(config)#interface ethernet 0/1  
  70. ZJRT4(config-if)#ip address 4.4.4.2 255.255.255.0  
  71. ZJRT4(config-if)#no shutdown  
  72. ZJRT4(config-if)#exit  
  73. ZJRT4(config)#interface ethernet 0/0  
  74. ZJRT4(config-if)#ip address 5.5.5.2 255.255.255.0  
  75. ZJRT4(config-if)#no shutdown  
  76. ZJRT4(config-if)#exit  
  77. ZJRT4(config)#router ospf 1  
  78. ZJRT4(config-router)#network 4.4.4.0 0.0.0.255 area 0  
  79. ZJRT4(config-router)#network 5.5.5.0 0.0.0.255 area 0  

现在我们来查看ARP表,看看路由器有无ARP。

我们可以看见RT1上有ARP表项。

我们再查看RT2看看Serial 口有没有MAC地址和ARP。

我们可以看见RT2上也有ARP表,但是没有Serial的ARP,因为Serial没有MAC地址。

总结:路由器上也有MAC地址,路由器上也可以生成ARP表,但是Serial没有MAC地址,所以,ARP也不会生成Serial口的ARP映射。

标签:

给我留言