|
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.
实验:
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