Test the network speed between two Ubuntu/Linux Machines

Test the network speed between two Ubuntu/Linux Machines

 

iperf: It’s a client server arrangement in that you run it in server mode at one end and connect to its from another computer on the other side of the network.

One both machines run:

$ sudo apt-get install iperf

We’ll start an iperf server on one of the machines:

$ iperf -s

And then on the other computer, tell iperf to connect as a client:

$ iperf -c <address of other computer>

On the client machine, you’ll see something like this:

zen@pwning:~$ iperf -c 192.168.0.5
————————————————————
Client connecting to 192.168.0.5, TCP port 5001
TCP window size: 16.0 KByte (default)
————————————————————
[  3] local 192.168.0.4 port 37248 connected with 192.168.0.5 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.04 GBytes    893 Mbits/sec

How to set Static IP Address & Default Gateway in Ubuntu

How to set Static IP Address & Default Gateway in Ubuntu

Edit “/etc/network/interfaces” to reflect something like this:

sudo vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx (enter your ip here)
netmask xxx.xxx.xxx.xxx (mine was 255.255.255.0)
network xxx.xxx.xxx.xxx (enter Network id IP here)
broadcast xxx.xxx.xxx.xxx (enter Broadcast id IP here)
gateway xxx.xxx.xxx.xxx (enter gateway ip here,usually the address of the router)
dns-nameservers xxx.xxx.xxx.xxx (enter DNS IP here)

Then do a:

sudo /etc/init.d/networking restart

Check:

ifconfig eth0

 

To Set Default Gateway

sudo route add default gw <GATEWAY_IP> eth0

CCNA- TCP/IP Interview Questions & Answers

What is TCP/IP Model?

TCP/IP is four layer standard model. The four layers of TCP/IP model are

4)Application layer 3)Transport layer 2)Internet layer 1)Network access layer

———————————————————————————————————————–

What are the protocols that are included by each layer of TCP/IP model?

Layers of TCP/IP model                                Protocols
Application DNS, DHCP, FTP, TFTP, SMTP, HTTP, RDP, Telnet, SSH
Transport TCP, UDP
Internet layer IP, ICMP, IGMP
Network access layer Ethernet, Token Ring, FDDI, X.25, Frame Relay, ARP, RARP

———————————————————————————————————————–

What is Encapsulation & De-capsulation?

Encapsulation:-

Encapsulation is the process that occurs when data is to be sent out of the source computer. When data moves from upper layer to lower layer of TCP/IP protocol stack (outgoing transmission), each layer adds the corresponding header to the data.

  • The data package containing the header and the data from the upper layer then becomes the data that is repackaged at the next lower level with lower layer’s header.

De-capsulation:-

De-capsulation, the reverse process of encapsulation occurs when data is received on the destination computer. As the data moves up from the lower layer to the upper layer of TCP/IP protocol stack (incoming transmission), each layer unpacks the corresponding header and uses the information contained in the header to deliver the packet to the exact network application waiting for the data.

———————————————————————————————————————–

What is Message?

The format of the data packet generated at different layers is different, and known by different names.

The data packet created at the Application layer is known as a “MESSAGE”.

———————————————————————————————————————–

What is TCP Segment?

The Application layer message is again encapsulated at the Transport Layer. If the protocol used at the Transport Layer is TCP (Transmission Control Protocol), the data packet is known as a “TCP SEGMENT”.

———————————————————————————————————————–

What is UDP Datagram?

If the protocol used at the Transport layer is UDP (User Datagram Pro to co l), the data packet is known as a “UDP DATAGRAM”.

———————————————————————————————————————–

What is IP Datagram?

The data packet created at the Internet layer by Internet Protocol, which again encapsulates the Transport layer segment/datagram, is known as “IP DATAGRAM”.

———————————————————————————————————————–

What is Frame?

The data packet at the Network Access layer, which encapsulates and may subdivide the IP Datagram, is known as a “FRAME” (generally Ethernet Frame).

———————————————————————————————————————–

What is Error Control & Flow Control?

———————————————————————————————————————–

What is TCP/IP?

TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet.
———————————————————————————————————————–
What is Multiplexing and De-multiplexing in TCP/IP?

The data from different applications operating on a network device are multiplexed at the sending device using port numbers and de-multiplexed at the receiving device, again using port numbers.

Multiplexing:- The process of gathering data at the source host from different application processes, enveloping the data with header information to create segments, and passing the segments to the network layer is called multiplexing.

De-multiplexing:- At the receiving end, the transport layer can then examine this field to determine the receiving process, and then direct the segment to that process. This job of delivering the data in a transport-layer segment to the correct application process is called de-multiplexing.

Source:- http://malaysia.answers.yahoo.com/question/index?qid=20091111204540AAlSdOU

———————————————————————————————————————–

What are IPv4 Address classes?

Class A:- 0.0.0.0 to 127.255.255.255

Class B:- 128.0.0.0 to 191.255.255.255

Class C:- 192.0.0.0 to 223.255.255.255

———————————————————————————————————————–

What is APIPA?

Network 169.254.0.0 is known as APIPA (Automatic Private IPv4 addresses). APIPA range of IPv4 addresses are used when a client is configured to automatically obtain an IPv4 address from the DHCP server was unable to contact the DHCP server for dynamic IPv4 address.

———————————————————————————————————————–

What are Private IPv4 Addresses?

Class A:- 10.0.0.0 to 10.255.255.255.

Class B:- from 172.16.0.0 to 172.31.255.255.

Class C:- 192.168.0.0 to 192.168.255.255.

———————————————————————————————————————–

OSI & TCP/IP Model Comparision

Image

 

I’ll keep on improvising..