Skip to content

Latest commit

 

History

History
128 lines (94 loc) · 4.1 KB

USERGUIDE.adoc

File metadata and controls

128 lines (94 loc) · 4.1 KB

User Guide

Installation

Install on Red Hat Linux via:

rpm -ivh ttcp-1.12-1.x86_64.rpm

Run

ttcp

Run as Receiver
ttcp -r -s -4 -v -p 5050
Run as Transfer
ttcp -t -s -n 10240 -v -4 -p 5050 10.1.20.203
Collect Results
ttcp-r: 83886080 bytes in 1.34 real seconds = 61108.02 KB/sec +++
ttcp-r: 83886080 bytes in 0.10 CPU seconds = 827040.34 KB/cpu sec
ttcp-r: 10341 I/O calls, msec/call = 0.13, calls/sec = 7713.84
ttcp-r: 0.0user 0.0sys 0:01real 6% 0i+0d 330maxrss 0+2pf 368+0csw

ttcp-t: 83886080 bytes in 1.29 real seconds = 63287.18 KB/sec +++
ttcp-t: 83886080 bytes in 0.03 CPU seconds = 2522633.49 KB/cpu sec
ttcp-t: 10240 I/O calls, msec/call = 0.13, calls/sec = 7910.90
ttcp-t: 0.0user 0.0sys 0:01real 1% 0i+0d 362maxrss 0+2pf 122+0csw

echoS

Run as Server
# echoS -s -p 12302 -4
Run as Client
# echoS -c -p 12302 -P 23401 10.1.20.203
1649260296 1962 echoS: socket
1649260296 1962 echoS: bind
1649260296 1962 echoS: connect
time
1649260300
daytime
Wed Apr  6 23:51:44 2022
chargen
u$a71i0Rkk*1LkQ46d2Dqtau4Pn1cU;tZ8G'#Xsn_};-&)\<

chat

Run as Server
# chat -s -p 12303 -4
chat-s: socket
chat-s: bind
chat-s: accept from 10.1.20.201
10.1.20.201: hi
chat-s: yes
Run as Client
# chat -c -p 12303 -P 23401 10.1.20.203
chat-c: socket
chat-c: bind
chat-c: connect
chat-c: hi
10.1.20.203: yes

Prerequisites

Lab Topologies

As showing in figure, there are 4 hosts, lb-1, lb-2, app-1, app-2, as per host name suggestions, 2 hosts for proxy/loadbalancer, 2 hosts for apps. The hosts for proxy/loadbalancer has 2 NICs, ens33 for public access, and ens34 for NAT or internal route usage. lb-1 and lb-2 are in 10.1.10.0/24 network, all hosts are in 10.1.20.0/24 network.

tcp lab topology

Linux Kernel Networking Stack

There are seven logical networking layers according to the Open Systems Interconnection (OSI) model. The lowest layer is the physical layer, which is the hardware, and the highest layer is the application layer, where userspace software processes are running. These seven layers are:

  1. The physical layer: Handles electrical signals and the low level details.

  2. The data link layer: Handles data transfer between endpoints. The most common data link layer is Ethernet. The Linux Ethernet network device drivers reside in this layer.

  3. The network layer: Handles packet forwarding and host addressing. The most common network layers of the Linux Kernel Networking subsystem: IPv4 or IPv6.

  4. The transport layer: Handles data sending between nodes. The TCP and UDP protocols are the best-known protocols.

  5. The session layer: Handles sessions between endpoints.

  6. The presentation layer: Handles delivery and formatting.

  7. The application layer: Provides network services to end-user applications.

Linux Kernel Networking stack handles 3 layers, the L2, L3 and L4, correspond to the data link layer, the network layer, and the transport layer in the seven-layer model. The essence of the Linux kernel stack is passing incoming packets from L2 (the network device drivers) to L3 (the network layer, usually IPv4 or IPv6) and then to L4 (the transport layer, where you have, for example, TCP or UDP listening sockets) if they are for local delivery, or back to L2 for transmission when the packets should be forwarded. Outgoing packets that were locally generated are passed from L4 to L3 and then to L2 for actual transmission by the network device driver.

The kernel does not handle any layer above L4; those layers (the session, presentation, and application layers) are handled solely by userspace applications. The physical layer (L1) is also not handled by the Linux kernel.

linux network

Linux Network TCP

Refer to link for Linux Network TCP.

Linux Network Filter

Refer to link for linux kernel network netfilter.

Linux Network IP

Refer to link for linux Network IP.