The Internet Protocol (IP)

Network

The network layer of OSI reference model takes care of routing, relaying, moving information from the source to the destination. The popular protocol of the network layer is the Internet Protocol (IP).

IP has two functions: 

1. Addressing
2. Fragmentation

Addressing is about how each node in a network is identified. We make use of IP addresses here. There are two versions of IP addresses. We call them as IPv4 and IPv6 based on the version.


Fragmentation is necessary when the datagram (the information from the upper layer - transport layer) has to traverse through a number of networks where the allowed packet size is smaller than the source network. The IP takes care of this fragmentation at the source and reassembly at the destination. There are some fields in the IP header to allow the fragmentation and reassembly. Different fields and the IP header are explained in below paragraphs. 

IP Header Structure

Version (4 bits): IP header format (IP version)
Header Length (4 bits): Size of IP header in multiples of 4 bytes. Minimum value is 5 (20 bytes)
Type of Service (1 byte): Specifies what treatment the datagram should undergo as it traverses the network.

Total Length (2 bytes):  Datagram length in bytes – includes both header and data. Maximum size 65535 bytes.
Identification (2 bytes): A value assigned to the datagram by the sender. It is used in assembling the fragments of a datagram, if required.

Flags (3 bits):

Fragmentation Offset (13 bits):  Indicates where in the datagram this fragment belongs. The offset is measured in units of 64 bits.
Time to Live (1 byte): Maximum lifetime allowed for datagram. TTL is decremented by one each time the datagram crosses a router; and the datagram is discarded once the TTL reaches zero. The purpose is to avoid the possibility of undeliverable datagrams indefinitely keep circulating over the Internet.
Protocol (1 byte):  Indicates the protocol used by the sender.
Header Checksum (2 bytes):  This field protects only the header fields. Computation: Sum all 16-bit words, then get 1’s complement of it. While a packet is passed from one network to the other, routers decrement the TTL field. At that time, they have to re-compute header checksum and fill this field.
Source and destination addresses: 4 bytes each for source and destination IPv4 addresses.
Options (variable length): This field has some optional tools to monitor the proper functioning of several network functionalities, namely: loose source routing option forces the datagram to cross a given list of IP devices to reach its destination; the strict source routing forces the datagram to cross exclusively the given list of IP devices; the record route option is used to trace the route the datagram takes; the timestamp option requires each traversed router to record (append) its IP address and time to the datagram.
Padding:  All zero field used to guarantee that the header ends on a 32-bit boundary.

Reference: Hands-On Networking: From Theory to Practice

Read More...
Bookmark and Share
Your Ad Here

SR-IOV in XenServer

SR-IOV is a PCI device virtualization technology that allows a single PCI device to appear as multiple PCI devices on the physical PCI bus; the real physical device is called the Physical Function (PF) while the others are called Virtual Functions (VFs).

The purpose of this is for the hypervisor to directly assign one or more VFs to a virtual machine (VM) using Intel VT-D technology: the guest will be able to use the VF as any other directly assigned PCI device.

The common use case is an SR-IOV NIC. Assigning one or more VFs to a virtual machine allows the virtual machine to directly exploit the hardware without any mediation by the hypervisor. This means better performances and scalability since it has very little or no impact on dom0.

On the downside the VFs have no relations with VIFs and bridges in dom0 so they have to be configured separately and independently by the user. Also a virtual machine loses all the assigned VFs after being migrated to a different host. Thus, virtual machines that are migrated between hosts using XenMotion or High Availability (HA) failover require manual reinstatement of VFs on the new host.

Because Provisioning Services hosts tend to be network I/O bound rather than memory or CPU bound, they are ideal candidates to take advantage of this capability. The limitations on XenServer virtual machine failover and XenMotion are not significant in a Provisioning Services deployment because Provisioning Services implements its own HA and load balancing mechanisms.

Requirements
To make use of this capability, you must have a host server in which a SR-IOV capable network device is installed. The device tested for this article is the Intel® 82599 10 Gigabit Ethernet Controller.

Note: The setup procedure below requires that the 10 GigE NIC not be used as the management interface for the host. A second physical NIC must be installed on the system for that purpose.

Procedure
Use the following procedure to configure an SR-IOV-enabled Provisioning Services VM on XenServer 5.6, provided that your system meets the hardware and firmware requirements described above.

  • Enable iommu on the host
    Edit /boot/extlinux.conf and add iommu=1 to the xen command line options. Regenerate the bootloader by executing the following within the XenServer host console:
    extlinux /boot
  • Loading the pciback driver into dom0
    This must be done every time the host boots. To do this automatically, add the following line to /etc/rc.local:
    modprobe pciback
  • Reboot the host
  • Assign one or more VFs to a virtual machine.
    Get a list of VFs in the system executing the lspci command in the XenServer console. You should see many (such as 120) devices like this: 07:10.0 Ethernet controller: Intel Corporation 82559 Ethernet Controller Virtual Function (rev 01)

    Assign one of these VFs to the target virtual machine executing the following command:
    xe vm-param-set other-config:pci=0/0000:07:10.0 uuid=uuid_of_the_VM


    Substitute 07:10.0 in the example above with the pci bus address of the VF you want to assign.
  • Boot the virtual machine and install the correct VF driver in it. Once the driver is installed, Provisioning Services should be installed and configured as normal.


  • Source
    Citrix Xen Knowledge Center

    Read More...
    Bookmark and Share
    Your Ad Here