1 / 17

Modifying Network Packet Buffering in Network Layer

Modifying Network Packet Buffering in Network Layer. CS518 Final Presentation and Instruction Guide Li Zhang. Contents. Notations Very Brief Introduction Hardware And Software Preparations Modifying the Code Experiments Design Results and Conclusion References. Background.

forbes
Download Presentation

Modifying Network Packet Buffering in Network Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modifying Network Packet Buffering in Network Layer CS518 Final Presentation and Instruction Guide Li Zhang

  2. Contents • Notations • Very Brief Introduction • Hardware And Software Preparations • Modifying the Code • Experiments Design • Results and Conclusion • References

  3. Background • Five Network Layers in Linux : • MAC and Logical-Link Layer • Network Layer • Transport Layer • Application Layer

  4. Traffic Control in Linux and My Goal • In the Linux world, the term traffic control represents all the possibilities to influence incoming and outgoing network traffic in one way or another. • This project focus on modifying the queuing disciplines in network layer in order to create an bigger size buffer which will drop less packets because of time slots used up. • Two reasons to drop packets in network layer: • Buffer overflow. • Policing mechanism detected violation of a rule For example, packet format fault, firewall blocks.

  5. Hardware and Software Preparation • Hardware: An x86 networked computer running Windows XP • Software: • VMware • CentOS 5.2 and its applications • linux kernel 2.6.26 • Two tools to monitor network flows: ntop and bing

  6. Preparation 1: Create a virtual machine and install CentOS 5.2 • Download VMware Server 1.0.3 from http://www.vmware.com/download/server/ • Install VMware server and register it online. The registration is free. • Create a virtual machine under the guide of video ‘Create_Virtual_ Machine.avi’ • Download and install CentOS 5.2 in the virtual machine from http://img.cs.montana.edu/linux/centos/5.2/isos/i386/

  7. Preparation 2: Recompile the Linux kernel • Start Linux and log in as ‘root’ • Download the kernel code and decompressed it into /usr/src $ cd /tmp $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2 $ tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src $ cd /usr/src/linux-2.6.26 • Install gcc, a C compiler $ yum install gcc • Configure the kernel, do not change anything, just select ‘exit’ $ make menuconfig • Make and install modules and kernel $ make $ make modules $ make modules_install $ make install

  8. Preparation 2-continue • Create an initrd image which contains device drivers which needed to loaded $ cd /boot $ mkinitrd -o initrd.img-2.6.26 2.6.26 • Modify the grub file • Open /boot/grub/menu.lst with text editor • Modify the default booting kernel pointing to 2.6.26 • If there is a line like this ‘menu hidden’, delete the whole line • Restart Linux • Select the kernel 2.6.26 from the boot loader menu

  9. Preparation 3: Install ntop and bing • Step 1:Download and install rpmforge-release $ wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm $ rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm • Step 2: Intsall ntop $yum install rrdtool $yum install ntop • Step 3: Install bing $yum install bing

  10. Preparation 4: Duplicate Virtual Machine • A virtual machine can be duplicated very easily. • Duplicate the file folder you created in Preparation 1 and rename it as Linux-modify • Use VMware to open the .vmx file in the file folder Linux-modify. • Select ‘Edit virtual machine setting’ and rename the new machine as ‘Linux-modify’ • Only modify the kernel in the new machine.

  11. Modify the code • First double the buffer size by editing the function tbf_change() in netsched/sch_tbf.c. The variable max_size is the max buffer size. • The watchdog() function is invoked when the timer for a packet expires. This function will be used in tbf_dequeue() to determine whether the process of transmitting a packet should be interrupted. Modify the condition to invoke the watchdog().

  12. Recompile again • $ cd /usr/src/linux-2.6.26 • $ make menuconfig • Select ‘General setup---’ • Select ‘Local version-append to kernel release’ • Enter a name you want, press ‘OK’ • ‘Exit’ twice • Watch video ‘recompile_again_menuconfig.avi’ • Then follow the steps after ‘make menuconfig’ described in Preparation 2. Remember using the version name you created. • Restart and select the kernel 2.6.26_with_your_name from the boot loader menu

  13. Experiments • Using bing which is a tool to identify the bandwidth currently available between two computers. • Get local host IP address: $ ifconfig • Use bing to test the bandwidth betwwen the local host and www.joyo.com $ bing –e 50 –i 1 –s 100 –S 1200 Your_Local_IP www.joyo.com • Using ntop to monitor the network in the long term • Start ntop and keep the terminal running ntop open $ ntop • Open a web browserr, for example Firefox Visit http://localhost:3000/ • Watch video ntop_and_bing.avi

  14. Results

  15. Results-continue

  16. References • K. Wehrle, F. Pahlke, H. Ritter, D. Muller and M. Bechler, ‘The Linux Networking architecture’, Pearson Education Inc, 2005 • http://www.cndev.org/forum/msg.aspx?pid=22736 • https://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.2/pdf/Deployment_Guide/Deployment_Guide.pdf • http://gzmaster.blog.51cto.com/299556/77883 • http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

  17. The End Thank you!

More Related