From Fedora Project Wiki

(Created page with "Category:Package vzctl test cases {{QA/Test_Case |description=Network tests for OpenVZ Linux Containers and Checkpoint/Restore In Userspace (CRIU) {{admon/important | Know...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
{{QA/Test_Case
{{QA/Test_Case
|description=Network tests for OpenVZ Linux Containers and Checkpoint/Restore In Userspace (CRIU)
|description=Network tests for OpenVZ Linux Containers and Checkpoint/Restore In Userspace (CRIU)
{{admon/important | Known issues, bug reports, etc | This testcase doesn't contain this information. Pass this test '''only''' after [[QA:Testcase_vzctl_base]]}}
{{admon/important | Known issues, bug reports, etc | This testcase doesn't contain this information. Pass this test '''only''' after base testcase. It's contain all needed info. [[QA:Testcase_vzctl_base]]}}
|setup=
|setup=
# Open terminal
# Open terminal
Line 27: Line 27:
# Stop container: <code>vzctl stop 101</code>
# Stop container: <code>vzctl stop 101</code>
|results=
|results=
The following must be true to consider this a successful test run. Be brief ... but explicit.
* All steps completes without error
* All steps completes without error
* #13 step shows like this:
* #13 step shows like this:
Line 44: Line 43:
* 192.168.50.240 - free IP from my subnet
* 192.168.50.240 - free IP from my subnet
* 192.168.50.254 - default gw for my subnet
* 192.168.50.254 - default gw for my subnet
* em1 - my work ethernet interface
* em1 - name for ethernet interface
}}
}}

Latest revision as of 13:31, 22 July 2013


Description

Network tests for OpenVZ Linux Containers and Checkpoint/Restore In Userspace (CRIU)

Important.png
Known issues, bug reports, etc
This testcase doesn't contain this information. Pass this test only after base testcase. It's contain all needed info. QA:Testcase_vzctl_base

Setup

  1. Open terminal
  2. Switch to root user: su -
  3. Prepare sysctl settings for network:
    1. sysctl -w net.ipv4.ip_forward=1
    2. sysctl -w net.ipv4.conf.em1.forwarding=1
    3. sysctl -w net.ipv4.conf.em1.proxy_arp=1

How to test

  1. Start container: vzctl start 101
  2. Add network interface in container: vzctl set 101 --netif_add em1
  3. Enable forwarding in virtual eth: sysctl -w net.ipv4.conf.veth101.1.forwarding=1
  4. Enable proxy_arp in virtual eth: sysctl -w net.ipv4.conf.veth101.1.proxy_arp=1
  5. Enter to container: vzctl enter 101
  6. Enable network intarface: ip link set em1 up
  7. Assign ip address to interface: ip addr add 192.168.50.240/24 dev em1
  8. Add route for interface: ip route add default via 192.168.50.254 dev em1
  9. Exit from container: logout
  10. Enable virtual net interface: ip link set veth101.1 up
  11. Add route for virtual net interface: ip route add 192.168.50.240/32 dev veth101.1
  12. Enter to container: vzctl enter 101
  13. Test network: ping -c 3 192.168.50.254
  14. Exit from container: logout
  15. Stop container: vzctl stop 101

Expected Results

  • All steps completes without error
  • #13 step shows like this:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=52 time=23.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=52 time=23.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=52 time=23.8 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 23.104/23.544/23.856/0.343 ms

Optional

In network tests I've used two IPs, em1 network interface. More details about them:

  • 192.168.50.240 - free IP from my subnet
  • 192.168.50.254 - default gw for my subnet
  • em1 - name for ethernet interface