Skip to content

[advanced-reboot] Change Dest IP of VM/Server Originated Packets#1745

Merged
tahmed-dev merged 3 commits intosonic-net:masterfrom
tahmed-dev:taahme/fix-vm-network
Jun 15, 2020
Merged

[advanced-reboot] Change Dest IP of VM/Server Originated Packets#1745
tahmed-dev merged 3 commits intosonic-net:masterfrom
tahmed-dev:taahme/fix-vm-network

Conversation

@tahmed-dev
Copy link
Contributor

Description of PR

Change in PR:1653 changed prefix len and did not change the network
which would result in high chance of collision with DUT vlan IP.
This PR will change the network where VMs' IPs are generated.

signed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

pytest platform_tests/test_advanced_reboot.py::test_fast_reboot --testbed=vms12-t0-s6000-1 --inventory=../ansible/str --testbed_file=../ansible/testbed.csv --host-pattern=str-s6000-acs-14 --module-path=../ansible/library --disable_loganalyzer --skip_sanity --reboot_limit=60 --new_sonic_image=http://100.127.20.23/installer/sonic/broadcom/internal-201811/sonic-broadcom.bin 
================================================================================================================================================== test session starts ===================================================================================================================================================
platform linux2 -- Python 2.7.12, pytest-4.6.9, py-1.8.1, pluggy-0.13.1
ansible: 2.8.7
rootdir: /var/host-acs-mgmt-repo/tests, inifile: pytest.ini
plugins: ansible-2.2.2
collected 1 item                                                                                                                                                                                                                                                                                                         

platform_tests/test_advanced_reboot.py .                                                                                                                                                                                                                                                                           [100%]

========================================================================================================================================= 1 passed, 1 warnings in 662.78 seconds =========================================================================================================================================

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Change in PR:1653 changed prefix len and did not change the network
which would result in high chance of collision with DUT vlan IP.
This PR will change the network where VMs' IPs are generated.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
@tahmed-dev tahmed-dev marked this pull request as ready for review June 8, 2020 21:16
@tahmed-dev tahmed-dev requested a review from neethajohn June 8, 2020 22:53

# Change network of the dest IP addresses (used by VM servers) to be different from Vlan network
prefixLen = self.mgFacts['minigraph_vlan_interfaces'][0]['prefixlen'] - 3
testNetwork = ipaddress.ip_address(self.mgFacts['minigraph_vlan_interfaces'][0]['addr']) + (1 << (32 - prefixLen))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an example? I probably do not fully understand this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are packets originated from servers. The advanced-reboot.py generate random dest IP in the default_ip_range network. The network is the same as the vlan network and so collision could happen. We are changing the network here to be different from the vlan network in order to prevent collision with dut vlan as reported and fixed here. In the case of default vlan network: 192.168.0.1/21, the default_ip_range will have prefixlen 18 and adds 1 in the 14th position and so network would be: 192.168.64.0/18

@tahmed-dev tahmed-dev changed the title [advanced-reboot] Change VM Network [advanced-reboot] Change Dest IP of VM/Server Originated Packets Jun 10, 2020
@tahmed-dev tahmed-dev requested a review from lguohan June 11, 2020 16:42
@tahmed-dev tahmed-dev merged commit f03b7ef into sonic-net:master Jun 15, 2020
@tahmed-dev tahmed-dev deleted the taahme/fix-vm-network branch June 15, 2020 18:29
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
sonic-swss commits

5fbd113 [Flex-counters] Fix the delay of flex counters flow to prevent infinite loop (sonic-net#1899)
dc685b6 [portsorch] Add an extra check before setting oper speed to APPL_DB (sonic-net#1885)
ceef728 Update port_rates & rif_rates lua scripts to convert poll_interval to MS (sonic-net#1855)

sonic-utilities commits

3160753 [ci]: Support PR coverage (sonic-net#1806)
3316fdb fix wrong code indent in sfputil (sonic-net#1808)
c33e3a8 [config reload] Fix config reload failure due to sonic.target job cancellation (sonic-net#1814)
4f7e107 [portconfig] Validate duplicate speed value and interface type value (sonic-net#1745)
59817e2 [warm-reboot] Add new preboot health check: verify database integrity (sonic-net#1785)
bf2ff3c [portstat, intfstat] added rates and utilization (sonic-net#1750)
3bf962c [show][platform] Revise chassis info fallback to only fall back on pmon crash (sonic-net#1751)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…tically (#25244)

#### Why I did it
src/sonic-sairedis
```
* 2457bb8d - (HEAD -> 202511, origin/202511) [Mellanox] Add phcsync activation for mellanox platforms. (sonic-net#1752) (2 days ago) [mssonicbld]
* bcbf7158 - [202511] Upgrade SAI to v1.17.4 (sonic-net#1749) (3 days ago) [Vivek]
* 5eec8434 - [syncd] Remove syncd redis objects if using ZMQ notifications (sonic-net#1738) (6 days ago) [mssonicbld]
* 7770f146 - [vslib] MACsec interface creation command fails on VM/VS with send_sci=false and SCI combination. (sonic-net#1737) (6 days ago) [mssonicbld]
* 4a62e3d2 - [202511][ci] use correct slave container for each branch (sonic-net#1746) (6 days ago) [yijingyan2]
* cff5ae14 - Fix sonic-vpp build issue in master (sonic-net#1745) (7 days ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants