ARP代理主要分为三种:

一,路由式Proxy ARP:

解决同一网段不同物理网络上计算机的互通问题。

二,VLAN内Proxy ARP:

解决相同VLAN内,且VLAN配置用户隔离后的网络上计算机互通问题。

三,VLAN间Proxy ARP:

解决不同VLAN之间对应计算机的三层互通问题。

 

未标题-1

用上图中三个路由器模拟实际使用环境RSG5与RSG6分别代表两台主机。

实验一:

路由式Proxy ARP:解决同一网段不同物理网络上计算机的互通问题

RSG5上配置:

VLAN 5

vlan 5

interface Vlanif5
ip address 192.168.6.1 255.255.0.0               -----这里是关键RSG5 RSG6的地址必须是一个网段的。
interface GigabitEthernet0/0/2
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 5

RSG6上配置:

vlan 6

interface Vlanif6
ip address 192.168.7.1 255.255.0.0

interface GigabitEthernet0/0/2
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 6

RNC上配置:

vlan batch 5 to 6

interface Vlanif5
ip address 192.168.6.3 255.255.255.0
arp-proxy enable
interface Vlanif6
ip address 192.168.7.2 255.255.255.0
arp-proxy enable

interface GigabitEthernet0/0/0           
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 5


interface GigabitEthernet0/0/1
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 6

 

配置后在RSG5上执行:

<RSG5>ping -c 1000 192.168.7.1
  PING 192.168.7.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.7.1: bytes=56 Sequence=1 ttl=254 time=90 ms
    Reply from 192.168.7.1: bytes=56 Sequence=2 ttl=254 time=70 ms
    Reply from 192.168.7.1: bytes=56 Sequence=3 ttl=254 time=60 ms
    Reply from 192.168.7.1: bytes=56 Sequence=4 ttl=254 time=60 ms
    Reply from 192.168.7.1: bytes=56 Sequence=5 ttl=254 time=60 ms
    Reply from 192.168.7.1: bytes=56 Sequence=6 ttl=254 time=30 ms
    Reply from 192.168.7.1: bytes=56 Sequence=7 ttl=254 time=70 ms
    Reply from 192.168.7.1: bytes=56 Sequence=8 ttl=254 time=40 ms
    Reply from 192.168.7.1: bytes=56 Sequence=9 ttl=254 time=50 ms
    Reply from 192.168.7.1: bytes=56 Sequence=10 ttl=254 time=60 ms
    Reply from 192.168.7.1: bytes=56 Sequence=11 ttl=254 time=50 ms
    Reply from 192.168.7.1: bytes=56 Sequence=12 ttl=254 time=40 ms
    Reply from 192.168.7.1: bytes=56 Sequence=13 ttl=254 time=50 ms
    Reply from 192.168.7.1: bytes=56 Sequence=14 ttl=254 time=60 ms--------------------这里可以看到TTL=254经过ARP代理后减了1

    !!这里只要在RSG的VLANIF5下做ARP代理就可以从RSG5上ping通RSG6上的地址。

实验二:用的模拟器不能模拟在交换机上的端口隔离配置这里就没有做,这个实验也是最简单的一个。

实验三:

解决不同VLAN之间对应计算机的三层互通问题。

未标题-1

基础配置:

在RSG5上:建立vlan5,起三层接口配地址:192.168.1.5/24

在RSG6上:建立vlan6,起三层接口配地址:192.168.1.6/24

在RNC上:建立vlan7,起三层接口配地址:192.168.1.1/24,RNC在VLAN7的三层地址下起VLAN间ARP代理,将VLAN7设置为汇聚VLAN,将VLAN 5 VLAN 6加入到VLAN7中。

配置:

RSG5:

interface Vlanif5
ip address 192.168.1.5 255.255.255.0

interface GigabitEthernet0/0/2
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 5

RSG6:

interface Vlanif6
ip address 192.168.1.6 255.255.255.0

interface GigabitEthernet0/0/2
undo shutdown
portswitch
port link-type trunk
port trunk allow-pass vlan 6

RNC:

vlan batch 5 to 7

vlan 7
aggregate-vlan
access-vlan 5 to 6

interface Vlanif7
ip address 192.168.1.1 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable

 

结果:

PING 192.168.1.5: 56  data bytes, press CTRL_C to break
   Request time out
   Request time out
   Request time out
   Request time out
   Request time out
   Request time out                                                                                             ------没有开启VLAN间ARP代理时RSG5与RSG6不通
   Reply from 192.168.1.5: bytes=56 Sequence=7 ttl=254 time=80 ms -------开启VLAN间ARP代理后可以PING通同样跳数减1
   Reply from 192.168.1.5: bytes=56 Sequence=8 ttl=254 time=50 ms
   Reply from 192.168.1.5: bytes=56 Sequence=9 ttl=254 time=60 ms
   Reply from 192.168.1.5: bytes=56 Sequence=10 ttl=254 time=60 ms
   Reply from 192.168.1.5: bytes=56 Sequence=11 ttl=254 time=30 ms
   Reply from 192.168.1.5: bytes=56 Sequence=12 ttl=254 time=30 ms