Archive for March, 2009

Conservation of Energy-3 MSc Physics

Conservation of Energy-3 MSc Physics

THREE-CAR COASTER PROCEDURE

1. Keep the same track configuration as shown in Figures 4 and 5. Make certain the photogate is directly over the top of the loop. Hold a car at the top of the loop and adjust the photogate up or down so the photogate flag will block the gate. Note that the flag must be in a particular side of the car in order to pass through the gate.

2. Connect 3 Mini Cars together as shown in Figure 7.

conservation-energy-3

3. Place a flag in each car as shown in Figure 8.

conservation-energy-3-1

4. Set the Smart Timer on Time: Fence Mode to measure the speed of each cart at the top of the loop.

5. Press the Button #3 on the Smart Timer to ready the timer. Place the 3-car coaster at the top of the hill on the left and release it from rest.

6. After the coaster passes through the loop, press Button #3 on the Smart Timer to stop timing. The first time displayed will be the time between blocks on the first car’s photogate flag. See Figure 9. Then step through the subsequent times by repeatedly pressing Button #2.

Figure 9:  Photogate Timing

Figure 9: Photogate Timing

Figure 9: Photogate Timing

The second and third times are when the second car’s photogate flag blocked the photogate. Take the difference between the second and third times to find the time for the passing of the second car’s flag. Similarly, the fourth and fifth times correspond to the blocking by the third car’s flag. Calculate the speed of each car using the block-block distance of the flag (1 cm):
conservation-energy-3-3

QUESTIONS

1. Which car is going the fastest at the top of the loop? Considering energy conservation, how can each car have a different speed at the top of the loop?

2. Which car experiences the least normal force at the top of the loop?

3. How is the experience of the riders in the first car of a coaster different from the experience of the riders in the last car of a coaster?

conservation-energy-3-4

1. Configure the two tracks as shown in Figures 10 and 11. Attach a photogate at the end of the two tracks as shown in Figure 11. Also put catchers on the end of each track to keep the cars from going off the end of the tracks. Put a photogate flag in each of the cars, in the sides nearest to the other car so both flags will block the photogate.

2. If the cars are started from rest on the left end of each track at the same time, predict which car will reach the right end first. Try it to test your prediction.

3. Prediction: Which car will have the greater speed at the right end of the track?

4. Set the Smart Timer for Speed: Collision Mode. Press the Button #3 on the Smart Timer to ready the timer. Place the two cars on the left end of the track and release them from rest.

5. After the cars pass through the photogate, press Button #3 on the Smart Timer to stop timing. The speeds of the cars will be displayed.

QUESTIONS

1. Which car has the greater speed at the right end of the track? How does energy conservation explain the result?

2. Which car reaches the end of the track first? Why?

0
Conservation of Energy-2 MSc Physics

Conservation of Energy-2 MSc Physics

QUESTIONS

1. How does increasing the mass of the car change the total energy?

2. How does increasing the mass of the car change the speed of the car at the bottom?

3. Does the car lose a greater percentage of its energy when it has the extra mass or not?

conservation-energy-21

1. Configure the track as shown in Figures 2 and 3. Attach photogates at the top of the hill and on the straight portion at the bottom. Also put the catcher on the end of the straight part to keep the car from going off the end of the track.

2. Place the Mini Car at the top of the hill on the left. Mark on the white board where you start the car. Measure the initial height of the car: Measure from the table to the center of the car.

3. Place the car at the top of the small hill in the center and measure the height of the car.

4. Place the car at the bottom on the flat part of the track and measure the height of the car from the table.

5. Place the car at the top and release it from rest. Use the Smart Timer on Velocity: 2 Gate Mode to measure the speed of the cart at the top of the center hill and at the bottom.

6. Calculate the initial total energy of the car.

7. Calculate the total energy of the car at the top of the center hill.

8. How much energy is lost? Where does it go?

9. Calculate the percent of total energy lost.

conservation-energy-2-21

10. Calculate the total energy of the car at the bottom. Calculate the percent of the total energy lost between the starting position on the left and the final position on the right.

QUESTIONS

1. Using the speed of the car at the top of the middle hill, calculate the normal force on the car. You will need to estimate the radius of a circle that matches the curvature of the hill by drawing the circle on the white board.

2. How fast would the car have to go to cause the normal force to be zero at the top of the hill? How high would the car have to start to make this happen?

conservation-energy-2-3

1. Configure the track as shown in Figures 4 and 5. Attach a photogate at the top of the loop. Also put the catcher on the end of the track to keep the car from going off the end of the track.

2. Put a peg in the center of the loop. Place the Mini Car at the top of the loop. Mark on the position of the center of mass of the car on the white board. Measure from the center of the center peg to the center of mass of the car at the top of the loop (see Figure 6).

conservation-energy-2-4

3. Measure the distance from the center of mass of the car at the top of the loop to the table.

4. Using Conservation of Energy, predict the minimum height from which the car can be released on the left end of the track so the car will just make it completely over the loop.

5. Draw a horizontal line from the top of the circle you drew for the loop to the left part of the track. Measure from this line to mark the starting position calculated in Part 4.

6. Place the center of mass of the car at the marked predicted position and release it from rest.

QUESTIONS

1. Does the car make it over? If not, why not? If so, does it just make it or did you start too high?

2. Once you have determined the release position where the car will make it over the loop, observe and mark the highest position reached on the right side of the track. In theory, where should this position be? How far above or below is this position from the horizontal line drawn in Part 5? Use the loss in height from the starting position to calculate the percent energy lost.

conservation-energy-2-5

0
Conservation of Energy-1 MSc Physics

Conservation of Energy-1 MSc Physics

INTRODUCTION

A car is started from rest on a variety of shapes of tracks (hills, valleys, loops, straight track) and the speeds of the car at various points along the track are measured using a photogate connected to a Smart Timer. The potential energy is calculated from the measured height and the kinetic energy is calculated from the speed. The total energy is calculated for two points on the track and compared.

The height from which the car must be released from rest to just make it over the loop can be predicted from conservation of energy and the centripetal acceleration. Then the prediction can be tested on the real roller coaster. Also, if the car is released from the top of the hill so it easily makes it over the top of the loop, the speed of the car can be measured at the top of the loop and the centripetal acceleration as well as the apparent weight (normal force) on the car can be calculated.

THEORY

The total energy (E) of the car is equal to its kinetic energy (K) and its potential energy (U).

E = K + U (1)

(2)

where m is the mass of the car and v is the speed of the car.

U=mgh (3)

where g is the acceleration due to gravity and h is the height of the car above the position where the potential energy is defined to be zero.

If friction can be ignored, the total energy of the car does not change. The Law of Conservation of Energy is stated as

E = constant

conservation-energy-1

Figure 1: Step Configuration

1. Configure the track as shown in Figure 1. Attach a photogate to the straight portion at the bottom, positioned to measure the speed of the car just after it reaches the straight part (on the second peg from the left). Also put the catcher on the end of the straight part to keep the car from going off the end of the track.

2. Place the Mini Car at the top of the step on the left. Mark on the white board where you start the car. Measure the initial height of the car: Measure from the table to the center of mass of the car. Note that the center of mass of the car is approximately at the slot where the flag is inserted. The exact center of mass can be determined by balancing the car. Measure the car’s mass.

3. Place the car at the bottom on the flat part of the track and measure the height of the car from the table.

4. Place the car at the top and release it from rest. Use the photogate and Smart Timer (set on the Velocity: One Gate Mode) to measure the speed of the cart at the bottom of the step.

5. Calculate the initial total energy of the car.

6. Calculate the final total energy of the car.

7. How much energy is lost? Where does it go?

8. Calculate the percent of total energy lost.

9. Place the 50g mass on the car and repeat steps 2 through 8 above.

1
Centripetal-Force-4 MSc Physics

Centripetal-Force-4 MSc Physics

Setup Passport Sensor

1. Screw the Photogate to the frame of the Centripetal Force Apparatus.
2. Attach the entire Centripetal Force Apparatus as low as possible to the 90cm rod and base.
3. Attach the 45cm rod horizontally to the 90 cm rod with the multi-clamp.
4. Hang the Force Sensor from the horizontal rod.
5. Screw the Ball Bearing Swivel to the Force Sensor.
6. Thread the cable through the plastic pulley and attach the other end to the sliding post.
7. Plug the Photogate into the Photogate Port. Plug the Photogate Port into a PASPORT Interface Plug the Force Sensor into a PASPORT Interface.
8. Making sure it is off, connect the power supply to the Centripetal Force Apparatus with banana plugs.
9. Level the base.

centripetal-force-4

Figure 1: Centripetal Force Apparatus

Software Setup
1. Open any of the files CentripetalForce_A (PP).ds, CentripetalForce_B (PP).ds, and CentripetalForce_C (PP).ds.
2. Select the “Setup” button in DataStudio. Click the Change Value button. Enter the value of 0.3142 for the arc length (in meters). This corresponds to a 0.050 m radius.

0
Centripetal-Force-3 MSc Physics

Centripetal-Force-3 MSc Physics

EXPERIMENT 3 – FORCE VS. RADIUS (Mass and Velocity Must be Constant)

1. Science Workshop Interface users, open the file “CentripetalForce_C.ds.” PASPORT Interface users, open the file “CentripetalForce_C (PP).ds.”
2. Make sure the power supply is off when you begin.
3. Keep the 30g mass attached to the string and the rotating platform as it was in Experiment 1. It should be able to slide freely back and forth in the slot. If it does not, adjust the nuts and washers accordingly.
4. Now, adjust the height of the force sensor so that the sliding mass maintains an approximately 0.050 m radius. Turn on the power supply and adjust the voltage from 0 to 5 V. Observe the vertical section of cable. Turn the power supply down to 0 V. If the vertical section of cable is not completely vertical, adjust the horizontal rod. Pull the mass to tighten the cable to determine the actual radius. Record the value of the radius in the Force v. Radius data table. Remember to adjust the fixed mass to match the radius of the free mass.
5. Select the “Setup” button in DataStudio. For ScienceWorkshop Users: Double click the Smart Pulley Icon. In the Sensor Properties Dialog Box select the “Constant” tab. Highlight “Spoke Arc Length.” For PASPORT Users: If necessary, scroll until the Smart Pulley (Linear) Icon is visible. Click the “Change Value” button.
6. Enter the value of the spoke arc length using the following equation: spoke arc length = 2 x ? x radius.
7. For ScienceWorkshop Users: Select “OK” and minimize the Sensor Properties Dialog Box to return to the previous graphs in DataStudio. For PASPORT Users: Select “OK” and minimize the “Experiment Setup” window to return to the previous graphs in DataStudio.
8. From the Experiment Menu, select “Monitor Data.”
9. Slowly increase the voltage until the velocity maintains a constant value; for example, 2.0 m/s.
10. Press the Stop button.
11. Without changing the voltage, turn off the power supply.
12. Press the “TARE” or “ZERO” button.
13. Turn on the power supply.
14. Press the Start button. Observe the velocity data. If it does not maintain a constant value return to step 9.
15. Allow data collection to occur for approximately 5 seconds. Press the Stop button.
16. Decrease the voltage to 0 V. Turn off the power supply.
17. Enter the value of the Mean Force into the Force v. Radius data table.
18. From the Experiment Menu, select “Delete All Data Runs.”
19. Return to step 4 and increase the radius by approximately 0.010 m (1.0cm). Important: The spoke arc length must be recalculated each time the radius is adjusted.
20. Repeat data collection until at least 6 data pairs are recorded.

ANALYSIS – FORCE VS. RADIUS
1. Observe your Force v Radius Graph and Data Table.
2. Enter your Force values from the Force v Radius Data Table into the “Force v 1/Radius” Data Table.
3. Inverse the Radius values and enter them into the “Force v 1/Radius ” Data Table.
4. Observe the Force v 1/Radius Graph. Select the “fit” button and choose the appropriate fit.

centripetal-force-3

FINAL ANALYSIS

1. Using words and a mathematical expression, describe the relationship between force and mass in uniform circular motion.
2. Using words and a mathematical expression, describe the relationship between force and velocity in uniform circular motion.
3. Using words and a mathematical expression, describe the relationship between force and radius in uniform circular motion.
4. Combine the three relationships above to create one relationship for force, mass, velocity, and radius.
5. How would you convert this expression into an equation?
6. What is the constant of proportionality for this equation? Explain.
7. How could such an equation be used?
8. The figure above is an overhead view of the rotating mass. For each of the 4 points, draw the direction and relative magnitude of the force.

0
Centripetal-Force-2 MSc Physics

Centripetal-Force-2 MSc Physics

EXPERIMENT 1 – FORCE VS. MASS
(Radius and Velocity Must be Constant)

1. Science Workshop Interface users, open the file “CentripetalForce_A.ds.” PASPORT Interface users, open the file “CentripetalForce_A (PP).ds.”
2. Make sure the power supply is off when you begin.
3. Find the total mass of the 5 g mass, screw, washers, bolt, and nut that comprise the rotating mass. Enter that value in kilograms into the Force v Mass data table in DataStudio.
4. Attach this mass to the cable and the rotating platform as in figure 2. Make certain that the cable is attached below the mass. At this point it should be able to slide freely back and forth in the slot. If it does not, adjust the nuts and washers accordingly.
Figure 2: Attaching the “free” mass

centripetal-force-2

5. Now, adjust the height of the force sensor so that this mass maintains a 0.050 m radius. Pull the mass to tighten the cable to determine the actual radius.
6. To avoid wobbling, tighten an identical mass directly to the rotating platform as a counterbalance so that it is also 0.050 m away from the center of the rotating platform.
7. Turn on the power supply and adjust the voltage from 0 to 5 V. Observe the vertical section of cable. If it is not completely vertical, adjust the horizontal rod. Turn the power supply down to 0 V.
8. From the Experiment Menu, select “Monitor Data.”
9. Slowly increase the voltage until the velocity maintains a constant value; for example, 2.0 m/s.
10. Press the Stop button.
11. Without changing the voltage, turn off the power supply.
12. Press the “TARE” or “ZERO” button.
13. Turn on the power supply.
14. Press the Start button. Observe the velocity data. If it does not maintain a constant value return to step 9.
15. Allow data collection to occur for approximately 5 seconds. Press the Stop button.
16. Decrease the voltage to 0 V. Turn off the power supply.
17. Enter the value of the Mean Force into the Force v. Mass data table.
18. From the Experiment Menu, select “Delete All Data Runs.”
19. Return to step 3 and increase the mass by 5.0 g (0.005kg).
20. Repeat data collection until at least 6 data pairs are recorded.

ANALYSIS – FORCE VS. MASS
1. Observe the Force v Mass Graph. Select the “fit” button and choose the appropriate fit.

EXPERIMENT 2 – FORCE VS. VELOCITY
(Radius and Mass Must be Constant)

1. Science Workshop Interface users, open the file “CentripetalForce_B.ds.” PASPORT Interface users, open the file “CentripetalForce_B (PP).ds.”
2. Make sure the power supply is off when you begin.
3. Keep the 30g mass attached to the cable and the rotating platform as it was in Experiment 1. It should be able to slide freely back and forth in the slot. If it does not, adjust the nuts and washers accordingly.
4. If necessary, adjust the height of the force sensor so that this mass maintains a 0.050 m radius. Pull the mass to tighten the cable to determine the actual radius.
5. Turn on the power supply and adjust the voltage from 0 to 5 V. Observe the vertical section of cable. If it is not completely vertical, adjust the horizontal rod. Turn the power supply down to 0 V.
6. Press the “TARE” or “ZERO” button on the Force Sensor.
7. Select “Start” in DataStudio.
8. Turn on the power supply and adjust the voltage from 0 to 10 V. Do not exceed 10 V on the power supply. Collect data only as the velocity increases.
9. Press “Stop” in DataStudio when the voltage reaches 10 V.

ANALYSIS – FORCE VS. VELOCITY

1. Observe your Force v Velocity Graph and Data Table. Using the Smart Tool , select about 20 representative data points.
2. Enter the Force values from the Force v Velocity Data Table into the “Force v V^2″ Data Table.
3. Square the Velocity values and enter them into the “Force v V^2″ Data Table.
4. Observe the Force v Velocity Squared Graph. Select the “fit” button and choose the appropriate fit.

0
Centripetal-Force-1 MSc Physics

Centripetal-Force-1 MSc Physics

INTRODUCTION

In this activity, students will use a Force Sensor and Photo-gate to discover the relationship of centripetal force, mass, velocity and radius for an object in uniform circular motion. Students will determine what happens to centripetal force as the result of changes in mass, velocity, and radius.

THEORY

According to Newton’s First Law, an object in motion tends to stay in motion in a straight line at a constant speed if there is no external net force applied to the object. Does an object in circular motion tend to stay in circular motion if there is no external net force applied to it?
A constant force is required to keep an object in circular motion. Centripetal force is the force that maintains an object’s circular motion.
Examples of centripetal force include the tension in a string attached to a can twirled in a circular path, the friction between the road and the tires of a car on a curve, or the force of gravity pulling a satellite toward the center of Earth as the satellite moves in a circular orbit.
The magnitude of centripetal force Fc depends on the mass m of the object, its circular speed v, and the radius r of the circular motion.

central-force1

1. Screw the Photogate to the frame of the Centripetal Force Apparatus.
2. Attach the entire Centripetal Force Apparatus as low as possible to the 90cm rod and base.
3. Attach the 45cm rod horizontally to the 90 cm rod with the multi-clamp.
4. Hang the Force Sensor from the horizontal rod.
5. Screw the Ball Bearing Swivel to the Force Sensor.
6. Thread the cable through the plastic pulley and attach the other end to the sliding post.
7. Plug the Photogate into Digital Channel 1. Plug the Force Sensor into Analog Channel A.
8. Making sure it is off, connect the power supply to the Centripetal Force Apparatus with banana plugs.
9. Level the base.

Figure 1: Centripetal Force Apparatus

Software Setup
1. Open any of the files CentripetalForce_A.ds, CentripetalForce_B.ds, and CentripetalForce_C.ds.
2. Select the “Setup” button in DataStudio. Double click the Smart Pulley Icon. In the Sensor Properties Dialog Box select the “Constant” tab. Highlight “Spoke Arc Length.” Enter the value of 0.3142 for the arc length (in meters). This corresponds to a 0.050 m radius.

0
The Sector-Antenna at a glance

The Sector-Antenna at a glance

By the basic definition, the antenna is a piece of wire which is used to radiate electromagnetic signals. More technically, an antenna is a device used to radiate electromagnetic waves.

In addition to antennas, Sector antenna by focusing the beam in a more focused area, offers greater range and throughput. We can use various combination of sector antennas to cover 360 degree. We can use 4 sector antennas radiating at 90 degree angle or 3 radiating at 120 degree.

sector-antenna

Basic Structure

The structure of the antenna is not as much complicated as it looks since it performs a magnificent word for today & former era. Referring to structure, Antennas are generally composed of stacked of dipole by bundling their radiated power to form a desired antenna pattern in vertical plains around the antennas. Depending on the gain desired that wants to be achieved, several of those dipoles can be arranged on top of one another.

structure

Advance sector antennas:

When talking to advanced features of sector antennas, it is apparent that they have the functionality of changing the angle and direction of radiation according to our requirement automatically. Most companies use such antennas for WiMaX.

tower

Importance:

Antennas have played a tremendous role in telecommunications and so are the important part of BTS, BS, and MSC used to transmit or receive signals from one hop to next hop. Transmission quality of antennas depends upon number of factors including distance, transmission power, gain, direction, interference etc.

importance-antenna

0
NAT-Server Implementation-4

NAT-Server Implementation-4

Continued from NAT-Server-3

We sniff the packets coming from the internet by simply sniffing the packets and distinguishing them from the packets from the local network packets by Checking for the destination IP address; this is because while manipulating the packets from the local network we changed the source IP to our NAT Server’s IP. So therefore all the packets coming from the Internet side would be destined for the NAT Server.

Now the Packets are re-manipulated such that the IP of the destination and the port number is now changed by first searching which of the node originated this request and then this ip address and the port number is changed accordingly.

Sending packets back in the network

Now when all the basic NAT process is done we send the packet back in the network where it reaches the respective node.

IMPORTANT FUNCTIONS

Some of the main functions which contribute to the proper working and implementation of our NAT Server are as follows:

Get_start_list():

This function along with the callback () function is used for sniffing the packets and extracting the fields of headers of different layers. This is the main combination of function which contributes a major portion to the sniffing process.

Update record:

This function is used to maintain the database for the nodes for which we have sent the data on the internet.

Time_to_live:

This function is used in synchronization with the reply of the packets sent on the internet

Search_db:

This function searches the maintained database when a reply from the internet comes, for determining which node in the internal network originated this request.

Make_tcp:

This function is used for the manipulating the packet which is to be NAT.

Make_udp:

This is used for the manipulation of the UDP packet to send on the internet.

IMPORTANT TECHNIQUES

Some of the important techniques used while implementing the NAT server are that we have done the sniffing technique using the socket programming library. Different processes of time to live, sniffing and database update and synchronized using posix threads using the pthread.h library.

Choices And Assumptions

First of all: we have to take make a change in approach of using two network interface card for local and outside network, this is because we are modeling the NATing Technique and not implementing the firewall in our design. In short we are only implementing the SNAT.

Secondly: we this design is implemented with consideration that we have a small network of about two or three nodes because of the memory limitation of the machines in the lab and at our home of handling large traffics.

Thirdly: COMPLEXITY IN IMPLEMENTATION

nat-terminology

While implementing the NAT Server the first difficulty which we faced was of sniffing the packet and correctly extracting the fields of the headers of different layers this problem was solved by thoroughly studying the related topics by taking help from the google.com and by using function such as ntohs(), e.g. to read total length field of the IP header. Second complexity which was raised was of correct Checksum of the packet at different layers this obstacle was cleared by carefully calculating the parameters of the checksum function. Thirdly and mainly we are having some problems with the reply back of the packets sent on the internet and as the reply are so un-predictable that nothing can be said about it.

Conclusion

In the end we have tried our best to meet the design of the SNAT to provide internet access to the local network connect to the NAT Server but there are still some complexities which are hindering the server to completely function as a true NAT Server.

Filed in: - MS CS/IT, Study Stuff
1
NAT-Server Implementation-3

NAT-Server Implementation-3

Continue from NAT-Server-2

NAT Server operate on IP packet-level, most of them have built-in inter-network routing capability. The inter-network they are serving can be divided into several separate sub networks (either using different backbones or sharing the same backbone) which further simplify network administration and allow more computers to be connected to the network:

NAT works at Layer 3 of OSI

nat-server-osi

In Short a NAT Server provides the following facilities:

Automatic firewall protection for the internal network; only destination request originated from the internal network will be accessible from the Internet

Automatic client computer configuration control

Packet level filtering and routing

Phases of Implementation

The implementation of Nat Server consists of the following phases:

Building a Sniffer

Manipulating the sniffed packets

Maintaining a record of the synchronized nodes and their packets

Sending the manipulated packets on the internet

Sniffing the incoming packets from the internet

Sending those packets back in the local network

Building a Sniffer

First of all we make a sniffer which can sniff the packets which collide with our network interface card. For this purpose we have to make the respective function which is able to receive the packet and store them for further manipulation. By further manipulation we mean that validating the sniffed packets and extracting the information stored in all the respective headers encapsulated along with data.

After we have sniffed the packets correctly we have to extract the header information from the packets. First of all the Ethernet header is inspected.

Ethernet Header:

The Ethernet header consists most importantly the MAC addresses of both the source and the destination hosts. We extract this information from here.

IP Header:

Next comes the IP header this has the ip addresses of both source and destination, the protocol which defines the protocol was used on the upper layer. We extract all the information stored in this header.

TCP/UDP/ICMP header:

In the upper layer one of these three protocols are used which is defined in the protocol field of the IP header. We also extract the information from this header, which completes our sniffing part.

Manipulating the sniffed packets

After the sniffing is complete we know alter the packets received as required for the NAT process. This is done by changing the IP address of the source and the by assigning a new port number to the packet which is now to be sent on the internet, for this purpose we make another packet having all the same values as the original packet except the source IP and the port no which is assigned according to our maintained database for the outgoing packets.

Maintaining a record

Once our packet is ready to be sent to the internet we make a table like database of the nodes for which we have manipulated the packets for and distinguish their different requests from the new port numbers assigned to them by our manipulating function.

Sending Packets on the Internet

After all the process of sniffing and maintaining databases we know send the packets on the internet through the pcap.h library functions of sending the packet.

Sniffing the internet packets

Filed in: - MS CS/IT, Study Stuff
0
NAT-Server Implementation-2

NAT-Server Implementation-2

Continue from NAT-Server-1

Each client has a time-out associated with it. Whenever new traffic is received for a client, its time-out is reset. When the time-out expires, the client is removed from the table. This ensures that the table is kept to a reasonable size. Also most of NAT implementations also track TCP clients on a per-connection basis and remove them from the table as soon as the connection is closed. This is not possible for UDP traffic since it is not connection based.

As the port mapping table has complete connection information – source and destination address as well as the port numbers – it is possible to check any of this information before passing incoming packets back to the client. This checking helps to provide effective firewall protection against Internet-launched attacks on the private LAN.

nat-router

Each IP packet also contains checksums that are calculated by the originator. They are recalculated and compared by the recipient to see if the packet has been corrupted in transition process. The checksums depend on the contents of the packet. Since the NAT must modify the packet addresses and port numbers, it must also recalculate and replace the checksums.

IMPORTANCE of NAT

IP Address Consideration

An IP address is 4 bytes, the total number of available addresses is 2 to the power of 32 = 4,294,967,296. is the total theoretical number of addresses that can be allocated to the computers that can be directly connected to the Internet. While this number of available addresses seems large, however if we connect each computer with the internet by assigning a unique address every node then this number is in-sufficient. While the next generation IP protocol, IP version 6, allows for larger addresses, it will take years before the existing network infrastructure migrates to the new protocol.

Because of this major problem shortage of IP addresses, most Internet Service Providers only allocate one address to a single customer, and most of the time this address is assigned dynamically, so every time a client connects to the ISP a different address will be provided. With an NAT gateway running on this single computer, it is possible to share that single address between multiple local computers and connect them all at the same time. The outside world is unaware of this multiplexed environment and takes the network as a signal computer.

Security Considerations

Another issue is of the security of the network or any other personal computer. To tackle the security problem, a number of firewall products are available. They are placed between the user and the Internet and verify all traffic before allowing it to pass through. This means, for example, that no unauthorized user would be allowed to access the computer’s resources. The problem with firewall solutions is that they are expensive and difficult to set up and maintain, putting them out of reach for home and small business users. NAT automatically provides a firewall protection without any special set up. This is because it only allows connections that are requested from local network. This means, for example, that an internal client can connect to an outside FTP server, but an outside client will not be able to connect to an internal FTP server.

Administrative Considerations

NAT is helpful to a network administration in several ways:

It can divide a large network into several smaller ones. The smaller parts expose only one IP address to the outside, which means that computers can be added or removed, or their addresses changed, without impacting external networks. With inbound mapping, it is even possible to move services (such as Web servers) to a different computer without having to do any changes on external clients.

Some of the modern NAT Servers contain a dynamic host configuration protocol (DHCP) server. DHCP allows client computers to be configured automatically; when a computer is switched on, it searches for a DHCP server and obtains TCP/IP setup information. Changes to network configuration are done centrally at the server and affect all the clients; the administrator does not need to apply the change to every computer in the network. The new configuration will be assigned to the node next time it starts.

Filed in: - MS CS/IT, Study Stuff
0
NAT-Server Implementation-1

NAT-Server Implementation-1

This project report provides the implementation of NAT-Network Address Translate Server. It gives the detailed description of different phases of implementation of NAT Server. NAT Server hosting allows us to share a common internet connection between multiple computers on a network. The project implementation under discussion is done in Microsoft Visual C++. The machine running the NAT Server has network connection through one network card (or modem) and allows computers connected to a network visible through the second server network card to share its internet connection. The project is completed and function with the TCP, UDP and ICMP internet protocols.

nat-server

The basic purpose of a NAT Server is to multiplex traffic from the network and present it to the outer world (Internet) as if it was coming from a single computer having only one IP address.

The TCP/IP protocols include a multiplexing facility so that any computer can maintain multiple simultaneous connections with a remote computer. It is this multiplexing facility that is the key to single address NAT.

To multiplex several connections to a single destination, client computers label all packets with unique “port numbers”. Each IP packet starts with a header containing the source and destination addresses and port numbers.

The TCP/IP connection is completely defined by a combination of these IP and port numbers. The addresses specify the two machines at both ends, and the two port numbers ensure that each connection between this pair of machines can be uniquely identified.

Each unique source port number in the client can originate a separate connection, and all reply packets to these requests contain the same number as their destination port, so that the client can maintain record as to which the application originated the respective request. In this way it is possible for a web browser on the client to ask a web server for several frames at once and to know how to put all the parts of all the responses back together.

A NAT Server must change the Source address on every outgoing packet to be its single public address. It therefore also renumbers the Source Ports to be unique, so that it can keep track of each client connection. The NAT Server uses a port mapping table to remember how it renumbered the ports for each client’s outgoing packets. The port mapping table relates the client’s real local IP address and source port plus its translated source port number to a destination address and port. By using this technique it can reverse the process for returning packets and route them back to the respective clients.

When any remote server responds to an NAT client, incoming packets arriving at the NAT gateway will all have the same Destination address, but the destination Port number will be the unique Source Port number that was assigned by the NAT. The NAT Server looks in its port mapping table to determine which of its own local client address and port number a packet is destined for, and replaces these numbers before passing the packet on to the client.

When a packet is received from an internal client, NAT looks for the matching source address and port in the port mapping table. If the entry is not found, a new one is created, and a new mapping port allocated to the client:

Incoming packet received from local client

Look for source address, port in the mapping table

If found, replace source port with previously allocated mapping port

If not found, allocate a new mapping port

Replace source address with NAT address, source port with mapping port

Packets received from the outside world undergo a reverse translation process:

Incoming packet received from Internet

Look up destination port number in port mapping table

If found, replace destination address and port with entries from the mapping table

If not found, the packet is not for us and should be rejected

Filed in: - MS CS/IT, Study Stuff
0
© 2009 InfoFanz.com. All rights reserved.