CN Lab5
CN Lab5
CN Lab5
31.1 Theory
A public IP address is assigned to every computer that connects to the Internet where each IP is
unique. Hence there cannot exist two computers with the same public IP address all over the
Internet. This addressing scheme makes it possible for the computers to “find each other” online and
exchange information. User has no control over the IP address (public) that is assigned to the
computer. The public IP address is assigned to the computer by the Internet Service Provider as
soon as the computer is connected to the Internet gateway.
An IP address is considered private if the IP number falls within one of the IP address ranges
reserved for private networks such as a Local Area Network (LAN). The Internet Assigned Numbers
Authority (IANA) has reserved the following three blocks of the IP address space for private networks
(local networks):
Devices with private IP addresses cannot connect directly to the Internet. Likewise, computers
outside the local network cannot connect directly to a device with a private IP. It is possible to
interconnect two private networks with the help of a router or a similar device that supports Network
Address Translation.
If the private network is connected to the Internet (through an Internet connection via ISP) then each
computer will have a private IP as well as a public IP. Private IP is used for communication within
the network whereas the public IP is used for communication over the Internet.
A NAT (Network Address Translation or Network Address Translator) is the virtualization of Internet
Protocol (IP) addresses. NAT helps to improve security and decrease the number of IP addresses
an organization needs.
A device that is configured with NAT will have at least one interface to the inside network and one to
the outside network. In a typical environment, NAT is configured at the exit device between a stub
domain (inside network) and the backbone. When a packet leaves the domain, NAT translates the
locally significant source address into a globally unique address. When a packet enters the domain,
NAT translates the globally unique destination address into a local address. If more than one exit
point exists, each NAT must have the same translation table. NAT can be configured to advertise to
the outside world only one address for the entire network. This ability provides additional security by
effectively hiding the entire internal network behind that one address. If NAT cannot allocate an
address because it has run out of addresses, it drops the packet and sends an Internet Control
Message Protocol (ICMP) host unreachable packet to the destination.
In the above figure, a simple network of 4 hosts and one router that connects this network to the
Internet. All hosts in the network have a private Class C IP Address, including the router's private
interface (192.168.0.1), while the public interface that's connected to the Internet has a real IP
Address (203.31.220.134). This is the IP address the Internet sees as all internal IP addresses are
hidden.
31.3 Procedure
The following set of procedures were done to generate this sample:
Step 2: In the INTERFACE (ETHERNET) > NETWORK LAYER of the Wired Nodes, the IP Address
and the Subnet Mask are set as per the table given below Table 31-2.
7 10.0.0.2 255.0.0.0
8 10.0.0.3 255.0.0.0
9 10.0.0.4 255.0.0.0
10 172.16.0.2 255.255.0.0
11 172.16.0.3 255.255.0.0
12 172.16.0.4 255.255.0.0
Table 31-2: IP Address and the Subnet mask for Wired nodes
Step 3: The IP Address and the Subnet Mask in Routers are set as per the table given below Table
31-3.
A CBR Application is generated from Wired Node 7 i.e. Source to Wired Node 10 i.e. Destination
with Packet Size remaining 1460Bytes and Inter Arrival Time remaining 20000µs.
Additionally, the “Start Time(s)” parameter is set to 50(Figure 31-4), while configuring the application.
This time is usually set to be greater than the time taken for OSPF Convergence (i.e. Exchange of
OSPF information between all the routers), and it increases as the size of the network increases.
Step 6: Enable the plots and run the Simulation for 100 Seconds.
31.4 Output
After simulation open Packet Trace and filter Packet ID to 1.