Setting interface IP address requires clear ARP

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Jacoby Thwaites on 02-12-2013 12:59:16 PM
When I set an IP address thus:
1  networkInterface.setAddress(
2    true, 
3    OnepAddressScopeType.ONEP_ADDRESS_IPv4_SECONDARY,
4    networkPrefix.getAddress(),
5    networkPrefix.getPrefixLength());
I often find I need to do a 
1clear arp
on the router console before the new address pings (locally).

Is there a onepk call to do this?

Subject: RE: Setting interface IP address requires clear ARP
Replied by: Joseph Clarke on 02-12-2013 01:05:46 PM
Not yet.  There is no ARP SS.  However, you can use the VTY SS to do this.  Assuming the following is configured on your router:

1onep
2 service set vty
Then:
1VtyService vty = new VtyService(ne);
2try {
3    vty.open();
4    vty.write("clear arp");
5    vty.close();
6} catch (Exception e) {
7   e.printStackTrace();
8}
Is the clearing of the ARP table something you think is onePK specific, or something that happens in general or in your config if you configure a new secondary IP address?

Subject: RE: Setting interface IP address requires clear ARP
Replied by: Jacoby Thwaites on 04-12-2013 08:45:52 AM
Well, I suspect it is related to the all-in-one emulator behaviour, when I follow this command:
1vmcloud netsuspend MainTopology
with this command:
1vmcloud netresume MainTopology
One of the (many!) adapters in the VM looks like this before I suspend:
1vtf7155147bcde2 Link encap:Ethernet  HWaddr 4e:70:6b:c3:f7:17
2          inet6 addr: fe80::4c70:6bff:fec3:f717/64 Scope:Link
3          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
4          RX packets:5 errors:0 dropped:5 overruns:0 frame:0
5          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
6          collisions:0 txqueuelen:500
7         RX bytes:300 (300.0 B )  TX bytes:0 (0.0 B )
and like this after I resume:
1vtf7155147bcde2 Link encap:Ethernet  HWaddr 5e:c6:39:53:47:39
2          inet6 addr: fe80::5cc6:39ff:fe53:4739/64 Scope:Link
3          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
4          RX packets:5 errors:0 dropped:5 overruns:0 frame:0
5          TX packets:0 errors:0 dropped:2 overruns:0 carrier:0
6          collisions:0 txqueuelen:500
7          RX bytes:300 (300.0 B )  TX bytes:0 (0.0 B )
You'll notice that the MAC address has changed between the two, which would certainly confuse me if I were a router.

Subject: RE: Setting interface IP address requires clear ARP
Replied by: Jacoby Thwaites on 04-12-2013 01:11:03 PM
Many thanks for your help.

Subject: RE: Setting interface IP address requires clear ARP
Replied by: Joseph Clarke on 04-12-2013 01:07:17 PM
Good point.  I'll raise that with the team.

Attachments

    Outcomes