R1:
no ip routing
interface Ethernet0/0
  ip address 192.168.12.5 255.255.255.0
  no ip route-cache   ---自动产生
  end
R2:
interface Ethernet0/0
ip address 192.168.12.254 255.255.255.0
interface Ethernet0/1
ip address 192.168.20.254 255.255.255.0
R2#show ip interface e0/0
Ethernet0/0 is up, line protocol is up
  Internet address is 192.168.12.254/24
  Broadcast address is 255.255.255.255
  Address determined by setup command
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is not set
  Inbound  access list is not set
  Proxy ARP is enabled   ---默认开启代理ARP
R3:
ip route 0.0.0.0 0.0.0.0 192.168.20.254

interface Ethernet0/1
  ip address 192.168.20.101 255.255.255.0
  end

proxy-ARP(代理ARP):只要是no ip routing的都只玩ARP解析.

Proxy-ARP(RFC1027)

作用:

Proxy ARP is the technique in which one host, usually a router, answers ARP requests intended for another machine. By "faking" its identity, the router accepts responsibility for routing packets to the "real" destination. Proxy ARP can help machines on a subnet reach remote subnets without the need to configure routing or a default gateway. Proxy ARP is defined in RFC 1027.

 

实验:

计算机生成了可选文字:
PC 丨 
sI/O 
sI/O 
OSPF 
e a 
PC3 
e2 / 0 
eI/O 
s2 / 0 
eI/O 
PC2 
sI/O

Debug  ip icmp

Debug arp

 

PC3#

1,*Mar  1 00:18:19.951: IP ARP: creating incomplete entry for IP address: 34.1.1.4 interface Ethernet1/0

2,*Mar  1 00:18:19.951: IP ARP: sent req src 35.1.1.5 cc05.1cb0.0010,

                 dst34.1.1.4 0000.0000.0000 FastEthernet1/0

6,*Mar  1 00:18:20.027: IP ARP: rcvd rep src 34.1.1.4 cc03.2660.0010, dst 35.1.1.5 Ethernet1/0

 

R3#

3,*Mar  1 00:18:10.027: IP ARP: rcvd req src 35.1.1.5 cc05.1cb0.0010, dst 34.1.1.4 Ethernet1/1

4,*Mar  1 00:18:10.027: IP ARP: creating entry for IP address: 35.1.1.5, hw: cc05.1cb0.0010

5,*Mar  1 00:18:10.027: IP ARP: sent rep src 34.1.1.4 cc03.2660.0010,

                 dst 35.1.1.5 cc05.1cb0.0010 Ethernet1/1

 

R3#sh int f1/0

FastEthernet1/0 is up, line protocol is up

  Hardware is AmdFE, address is cc03.2660.0010

 

关闭接口的代理ARP功能(默认开启)

R3#sh run int f1/0

interface FastEthernet1/0

 ip address 35.1.1.3 255.255.255.0

 no ip proxy-arp


在所有接口上关闭代理ARP:
Gateway(config)#ip arp proxy ?
  disable  Disable proxy ARP on all interfaces
!
Gateway(config)#do show ip int g0/0
GigabitEthernet0/0 is up, line protocol is up
  Internet address is 192.168.1.250/24
  Broadcast address is 255.255.255.255
  Address determined by non-volatile memory
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Multicast reserved groups joined: 224.0.0.5 224.0.0.6
  Outgoing access list is not set
  Inbound  access list is not set
  Proxy ARP is disabled (Globally)
  Local Proxy ARP is disabled
  Security level is default
  Split horizon is enabled
  ICMP redirects are always sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  IP fast switching is enabled
  IP fast switching on the same interface is disabled
  IP Flow switching is disabled
  IP CEF switching is enabled
  IP CEF switching turbo vector
  IP multicast fast switching is enabled
  IP multicast distributed fast switching is disabled
  IP route-cache flags are Fast, CEF
  Router Discovery is disabled
  IP output packet accounting is disabled
  IP access violation accounting is disabled
  TCP/IP header compression is disabled
  RTP/IP header compression is disabled
  Policy routing is disabled
  Network address translation is disabled
  BGP Policy Mapping is disabled
  Input features: MCI Check
  WCCP Redirect outbound is disabled
  WCCP Redirect inbound is disabled
  WCCP Redirect exclude is disabled