ARP 實驗

ARP 實驗

一.實驗目的

 查看路由器的ARP表項,看看Serial 口有沒有ARP

 

二.實驗拓撲

wKiom1RQNcbzDTvLAADdTuD3oTY089.jpg

一.實驗步驟

1.PC機配置IP,網關

2.爲路由器配置IP

3.全網使用OSPF,全網互通

4.PING,並查看ARP

 

四.實驗內容

PC1

R1#configure terminal

R1(config)#hostname ZJPC1

ZJPC1(config)#no ip routing

ZJPC1(config)#interface ethernet 0/0

ZJPC1(config-if)#ip address 1.1.1.1 255.255.255.0

ZJPC1(config-if)#no shutdown

ZJPC1(config-if)#exit

ZJPC1(config)#ip default-gateway 1.1.1.2

 

PC2

R1#configure terminal

R1(config)#hostname ZJPC2

ZJPC2(config)#no ip routing

ZJPC2(config)#interface ethernet 0/0

ZJPC2(config-if)#ip address 5.5.5.2 255.255.255.0

ZJPC2(config-if)#no shutdown

ZJPC2(config-if)#exit

ZJPC2(config)#ip default-gateway 5.5.5.1

 

RT1

R2#configure terminal

R2(config)#hostname ZJRT1

ZJRT1(config)#interface ethernet 0/0

ZJRT1(config-if)#ip address 1.1.1.2 255.255.255.0

ZJRT1(config-if)#no shutdown

ZJRT1(config-if)#exit

ZJRT1(config)#interface ethernet 0/1

ZJRT1(config-if)#ip address 2.2.2.1 255.255.255.0

ZJRT1(config-if)#no shutdown

ZJRT1(config-if)#exit

ZJRT1(config)#router ospf 1

ZJRT1(config-router)#network 1.1.1.0 0.0.0.255 area 0

ZJRT1(config-router)#network 2.2.2.0 0.0.0.255 area 0

 

RT2

R3#configure terminal

R3(config)#hostname ZJRT2

ZJRT2(config)#interface ethernet 1/0

ZJRT2(config-if)#ip address 2.2.2.2 255.255.255.0

ZJRT2(config-if)#no shutdown

ZJRT2(config-if)#exit

ZJRT2(config)#interface serial 0/0

ZJRT2(config-if)#ip address 3.3.3.1 255.255.255.0

ZJRT2(config-if)#no shutdown

ZJRT2(config-if)#exit

ZJRT1(config)#router ospf 1

ZJRT1(config-router)#network 2.2.2.0 0.0.0.255 area 0

ZJRT1(config-router)#network 3.3.3.0 0.0.0.255 area 0

 

RT3

R4#configure terminal

R4(config)#hostname ZJRT3

ZJRT3(config)#interface serial 0/0

ZJRT3(config-if)#ip address 3.3.3.2 255.255.255.0

ZJRT3(config-if)#no shutdown

ZJRT3(config-if)#exit

ZJRT3(config)#interface ethernet 1/0

ZJRT3(config-if)#ip address 4.4.4.1 255.255.255.0

ZJRT3(config-if)#no shutdown

ZJRT3(config-if)#exit

ZJRT3(config)#router ospf 1

ZJRT3(config-router)#network 3.3.3.0 0.0.0.255 area 0

ZJRT3(config-router)#network 4.4.4.0 0.0.0.255 area 0

 

RT4

R5#configure terminal

R5(config)#hostname ZJRT4

ZJRT4(config)#interface ethernet 0/1

ZJRT4(config-if)#ip address 4.4.4.2 255.255.255.0

ZJRT4(config-if)#no shutdown

ZJRT4(config-if)#exit

ZJRT4(config)#interface ethernet 0/0

ZJRT4(config-if)#ip address 5.5.5.2 255.255.255.0

ZJRT4(config-if)#no shutdown

ZJRT4(config-if)#exit

ZJRT4(config)#router ospf 1

ZJRT4(config-router)#network 4.4.4.0 0.0.0.255 area 0

ZJRT4(config-router)#network 5.5.5.0 0.0.0.255 area 0

 

現在我們來查看ARP表,看看路由器有無ARP

RT1

wKiom1RQNcayW2anAADRzhuSUEI803.jpg

我們可以看見RT1上有ARP表項

 

我們再查看RT2看看Serial 口有沒有MAC地址和ARP

wKioL1RQNh3SiSWUAACGO6WIPtM056.jpg

我們可以看見RT2上也有ARP表,但是沒有SerialARP,因爲Serial沒有MAC地址

wKioL1RQNh2w_KslAABYzSNMkxs209.jpg

wKiom1RQNcbju3RRAACp6TbIvFk152.jpg

總結:路由器上也有MAC地址,路由器上也可以生成ARP表,但是Serial沒有MAC地址,所以,ARP也不會生成Serial口的ARP映射


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章