Presented here is a protocol that allows dynamic distribution of the information needed to build tables to translate an address A in protocol P's address space into a 48.bit Ethernet address.
Dest mac | Sou mac | type | Hardware type | Protocol type | Hardware size | Protocol size | opcode | Sender mac | Sender ip | Target mac | Target ip |
从硬件类型(hardware type)开始就是ARP数据包了,前面是以太网的帧头。
硬件类型(hardware type)为16bit,指定了硬件类型,常见的有:
编号 | 硬件类型 |
1 | 以太网 |
15 | 帧中继 |
16 | hdlc |
17 | ATM(异步传输模式) |
20 | 串型链路 |
协议类型(protocol type)为16bit.,指定了发送者映射到硬件地址(在ethernet中的mac地址,hdlc中的pvc等)的网络层协议。
硬件地址大小(hardware address size)为8个bit,指定了硬件地址的大小(ethernet中的mac地址大小,mac为6(字节))
协议地址大小(protocol address size)为8个bit,指定了网络层地址的大小(ipv4为4(字节))
发送者硬件地址(sender hardware address)为48个bit-----这里以 ethernet 为例
目的者硬件地址(target hardware address)为48个bit
目的者网络层地址(target ip address)为32个bit
R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2
R1(config)# ip route 0.0.0.0 0.0.0.0 fa 0/0
R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.2
而且开启了proxy ARP(default开启)
R1请求的是gateway的mac地址(里面没有用到proxy arp),只是将数据包扔给Gateway,由Gateway来转发(这里不管目的是什么网段,都交由GATEWAY, 如果Gateway路由表里面没有到达的路由,就会回复一个icmp报文:目的不可达)
将前面那条default route no掉,配置成
R1(config)# ip route 0.0.0.0 0.0.0.0 fa 0/0