Open anitsh opened 4 years ago
Command | Description |
---|---|
watch ss -tp | Network Connections |
netstat -ant | TCP connections |
netstat -anu | UDP Connections |
netstat -tulpn | Connections with PIDs |
lsof -i | Established Connections |
smb://<IP>/<SHARENAME> | Access Windows SMB Share |
share <USERNAME> |
Mount Windows Share |
ifconfig <INTERFACE> <IP/CIDR> | Set IP and netmask |
ifconfig eth0:1 <IP/CIDR> | Set virtual interface |
route add default gw <IP> | Set Default Gateway |
ifconfig <INTERFACE> mtu <SIZE> | Change MTU size |
export MAC=<MACADDRESS> | Change MAC Address |
ifconfig int hw ether <MACADDRESS> | Change MAC Address |
dig -x <IP> | Domain Lookup IP |
host <IP> | Domain Lookup IP |
dig@<IP> <DOMAIN> -t AXFR | DNS Zone Transfer |
host -l <DOMAIN> <NAMESERVER> | DNS Zone Transfer |
echo "1" > /proc/sys/net/ipv4/ip forward | Enable IP Forwarding |
echo <"NAMESERVER"> > /etc/resolv.conf | Add DNS Server |
ss -p | See what apps are consuming internet |
Utility to investigate sockets. Alternative to netstat which is by default not installed in Ubuntu. ss is. ss -lntu -l – prints only listening sockets -n – shows port number -t – enables listing of tcp ports -u – enables listing of udp ports
Network
The Open Systems Interconnection (OSI) Network Model
What is zero configuration networking? Zero configuration networking allows you to automatically create a network of devices without having to manually configure a DHCP server, DNS services, or network settings for each device that you want to connect to that network. Avahi is an implementation of zero configuration networking that you use with Linux operating systems. Avahi is installed by default on most Linux systems and can run multicast DNS and DNS service discovery. Bonjour is a zero configuration networking application from Apple. #357
Network Qualities
Latency
Latency is the time delay between the cause and the effect of some physical change in the system being observed.
Network latency in a packet-switched network is measured as either one-way (the time from the source sending a packet to the destination receiving it), or round-trip delay time (the one-way latency from source to destination plus the one-way latency from the destination back to the source). Round-trip latency is more often quoted, because it can be measured from a single point. Note that round trip latency excludes the amount of time that a destination system spends processing the packet.
Many software platforms provide a service called ping that can be used to measure round-trip latency. Ping uses the Internet Control Message Protocol (ICMP) echo request which causes the recipient to send the received packet as an immediate response, thus it provides a rough way of measuring round-trip delay time. Ping cannot perform accurate measurements, principally because ICMP is intended only for diagnostic or control purposes, and differs from real communication protocols such as TCP. Furthermore, routers and internet service providers might apply different traffic shaping policies to different protocols. For more accurate measurements it is better to use specific software, for example: hping, Netperf or Iperf.
However, in a non-trivial network, a typical packet will be forwarded over multiple links and gateways, each of which will not begin to forward the packet until it has been completely received. In such a network, the minimal latency is the sum of the transmission delay of each link, plus the forwarding latency of each gateway. In practice, minimal latency also includes queuing and processing delays. Queuing delay occurs when a gateway receives multiple packets from different sources heading towards the same destination. Since typically only one packet can be transmitted at a time, some of the packets must queue for transmission, incurring additional delay. Processing delays are incurred while a gateway determines what to do with a newly received packet. Bufferbloat can also cause increased latency that is an order of magnitude or more. The combination of propagation, serialization, queuing, and processing delays often produces a complex and variable network latency profile. Latency limits total throughput in reliable two-way communication systems as described by the bandwidth-delay product.
Throughput
Network throughput is the rate of successful message delivery over a communication channel such as Ethernet or packet radio. The data these messages belong to may be delivered over a physical or logical link, or it can pass through a certain network node. Throughput is usually measured in bits per second (bit/s or bps), and sometimes in data packets per second (p/s or pps) or data packets per time slot. The system throughput or aggregate throughput is the sum of the data rates that are delivered to all terminals in a network.
Tarpit
A tarpit is a service on a computer system (usually a server) that purposely delays incoming connections. The technique was developed as a defense against a computer worm, and the idea is that network abuses such as spamming or broad scanning are less effective, and therefore less attractive, if they take too long. The concept is analogous with a tar pit, in which animals can get bogged down and slowly sink under the surface, like in a swamp.
Resource
[ ] https://en.wikipedia.org/wiki/Network_monitoring
Reference
https://github.com/LearnWithAnit/library/issues/11 #460 #78 #35 #461 #457 #428 #330 #424 #491 #460 https://en.wikipedia.org/wiki/Tarpit_(networking)