Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After assigning IP address to router port via ifconfig ping to host from the same subnet is not working #22

Closed
oleksandrivantsiv opened this issue Oct 4, 2016 · 4 comments
Labels

Comments

@oleksandrivantsiv
Copy link
Contributor

Platform: Mellanox SN2700
Description:
After assigning IP address to router port via ifconfig ping to host from the same subnet is not working. ARP packets are handled, neighbor is added on both sides. ICMP packets on device are sent but not trapped. Possible root cause - trap route for router port is not created (sx_api_router_uc_routes_dump_all.py doesn't show this route). When IP address is set in config and deployed by Ansible ping works as expected.

@oleksandrivantsiv
Copy link
Contributor Author

Steps to reproduce are the following:

  • Configure interfaces IP address in /etc/network/interfaces file:
vim /etc/network/interfaces
...
#
auto Ethernet96
iface Ethernet96 inet static
    address 20.20.20.25
    netmask 255.255.255.0
...
  • Restart device to apply configuration.
  • Configure IP address from the same subnet on host connected to switch.
  • Ping host from device and vice-versa:
root@arc-switch1025:/home/admin# ifconfig Ethernet96
Ethernet96 Link encap:Ethernet  HWaddr 00:02:03:04:05:00
          inet addr:20.20.20.25  Bcast:20.20.20.255  Mask:255.255.255.0
          inet6 addr: fe80::202:3ff:fe04:500/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9216  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:136 (136.0 B)  TX bytes:742 (742.0 B)

root@arc-switch1025:/home/admin# ping 20.20.20.100
PING 20.20.20.100 (20.20.20.100) 56(84) bytes of data.
64 bytes from 20.20.20.100: icmp_seq=1 ttl=64 time=0.394 ms
64 bytes from 20.20.20.100: icmp_seq=2 ttl=64 time=0.359 ms
64 bytes from 20.20.20.100: icmp_seq=3 ttl=64 time=0.332 ms
64 bytes from 20.20.20.100: icmp_seq=4 ttl=64 time=0.278 ms
64 bytes from 20.20.20.100: icmp_seq=5 ttl=64 time=0.280 ms
^C
--- 20.20.20.100 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.278/0.328/0.394/0.049 ms
root@arc-switch1025:/home/admin#
  1. Change IP address if interface via ifconfig command:
    root@arc-switch1025:/home/admin# ifconfig Ethernet96 21.21.21.25/24

The following error is observed in logs

000001 1030000000001 1050000000001 1070000000001 1090000000001 10b0000000001 10d00000
Oct 05 07:33:52 arc-switch1025 docker[937]: Oct 05 07:33:52 NOTICE  SAI_RIF: mlnx_sai_rif.c[398]- mlnx_remove_router_interface: Remove rif rif 25
Oct 05 07:33:52 arc-switch1025 docker[937]: Oct 05 07:33:52 ERROR   ROUTER: hwi/rif/rif_be.c[499]- sdk_router_interface_set: Failed to delete rif, this rif(25) is being used, err (Resource is in use)
Oct 05 07:33:52 arc-switch1025 docker[937]: Oct 05 07:33:52 ERROR   SAI_RIF: mlnx_sai_rif.c[415]- mlnx_remove_router_interface: Failed to delete router interface - Resource is in use.
Oct 05 07:33:52 arc-switch1025 docker[729]: terminate called without an active exception
Oct 05 07:33:52 arc-switch1025 docker[937]: terminate called without an active exception
Oct 05 07:33:52 arc-switch1025 kernel: Core dump to |/usr/bin/coredump-compress orchagent 107 pipe failed
Oct 05 07:33:52 arc-switch1025 kernel: Core dump to |/usr/bin/coredump-compress syncd 40 pipe failed
Oct 05 07:33:52 arc-switch1025 docker[937]: /etc/init.d/syncd: line 39:    40 Aborted                 start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS
▒Oct 05 07:33:53 arc-switch1025 ntpd[663]: Listen normally on 43 Ethernet96 21.21.21.25 UDP 123
Oct 05 07:33:53 arc-switch1025 ntpd[663]: Deleting interface #33 Ethernet96, 20.20.20.25#123, interface stats: received=0, sent=0, dropped=0, active_time=259 secs
Oct 05 07:33:53 arc-switch1025 ntpd[663]: peers refreshed

@oleksandrivantsiv
Copy link
Contributor Author

Issue was closed by mistake

@lguohan
Copy link
Contributor

lguohan commented Oct 5, 2016

Thanks a lot for reporing this issue. It looks like the orchagent is trying to delete a rif while it is been referenced. I think current orchagent does not have the logic to protect a rif been removed when it is still in use. We probably need to add the logic there.

oleksandrivantsiv added a commit to oleksandrivantsiv/sonic-swss that referenced this issue Jun 9, 2017
Issue: sonic-net/SONiC#22
Issue was observed only when setting IP address via ifconfig
command. Caused by ifconfig command behavior: first is sets
IP address with netmask /8 and then changes netmask to specified
in command. Problem is not observed when set IP address with
"ip addr" command.
@stcheng stcheng added the bug label Jun 9, 2017
oleksandrivantsiv added a commit to oleksandrivantsiv/sonic-swss that referenced this issue Jun 9, 2017
Issue: sonic-net/SONiC#22
Issue was observed only when setting IP address via ifconfig
command. Caused by ifconfig command behavior: first is sets
IP address with netmask /8 and then changes netmask to specified
in command. Problem is not observed when set IP address with
"ip addr" command.
oleksandrivantsiv added a commit to sonic-net/sonic-swss that referenced this issue Jun 12, 2017
Issue: sonic-net/SONiC#22
Issue was observed only when setting IP address via ifconfig
command. Caused by ifconfig command behavior: first is sets
IP address with netmask /8 and then changes netmask to specified
in command. Problem is not observed when set IP address with
"ip addr" command.
stcheng pushed a commit to sonic-net/sonic-swss that referenced this issue Jun 12, 2017
Issue: sonic-net/SONiC#22
Issue was observed only when setting IP address via ifconfig
command. Caused by ifconfig command behavior: first it sets
IP address with netmask /8 and then changes netmask to specified
in command. Problem is not observed when set IP address with
"ip addr" command.
Introduced overlaps variable to check if the newly set IP prefix
has any overhaps with the current IP prefixes and wait until
there is no overlaps at all.
@oleksandrivantsiv
Copy link
Contributor Author

Issue fixed.

michaelli10 pushed a commit to michaelli10/SONiC that referenced this issue May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants