PCA:172.16.0.2 255.255.0.0
PCB:172.16.1.2 255.255.0.0
RTA:G0/0:172.16.0.1 255.255.255.0
G0/1:172.16.1.1 255.255.255.0
利用ARP代理使两个子网互访;
[RTA]interface G0/0
ip address 172.16.0.1 24
proxy-arp enable 开启ARP代理功能
interface G0/1
proxy-arp enable
此时RTA的ARP表上有两边PC的IP和MAC地址信息。
[H3C]disp arp all
Type: S-Static D-Dynamic A-Authorized
IP Address MAC Address VLAN ID Interface Aging Type
172.16.1.2 00e0-0400-1100 N/A Eth0/0/0 12 D
172.16.0.2 000c-29b7-2033 N/A Eth0/1/0 12 D
此时PCA和PCB可以通过ARP代理广播相互访问:
C:\Documents and Settings\xiaofei>ping 172.16.1.2
Pinging 172.16.1.2 with 32 bytes of data:
Reply from 172.16.1.2: bytes=32 time<1ms TTL=254
Reply from 172.16.1.2: bytes=32 time=1ms TTL=254
Reply from 172.16.1.2: bytes=32 time=1ms TTL=254
Reply from 172.16.1.2: bytes=32 time<1ms TTL=254
Ping statistics for 172.16.1.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
C:\Documents and Settings\xiaofei>
<H3C>ping -a 172.16.1.2 172.16.0.2
PING 172.16.0.2: 56 data bytes, press CTRL_C to break
Request time out
Reply from 172.16.0.2: bytes=56 Sequence=2 ttl=127 time=1 ms
Reply from 172.16.0.2: bytes=56 Sequence=3 ttl=127 time=1 ms
Reply from 172.16.0.2: bytes=56 Sequence=4 ttl=127 time=1 ms
Reply from 172.16.0.2: bytes=56 Sequence=5 ttl=127 time=1 ms
--- 172.16.0.2 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 1/1/1 ms
<H3C>