6.1 Flashcards
(15 cards)
What’s the difference between Layers 1-3 vs Layer 4?
Layers 1-3 are about moving the packet.
Layer 4 is about what to do with the packet
What are the well known vs unknown ports for IP?
0-1023 are known
.
1024-49151 are server apps
.
Remaining 65535 are private/dynamic use
What a port number with source IP form?
A Socket
TCP Header Fields (10)
Source / Destination
Seq. #
Ack #
Data Length
Flags (ACK/SYN/FIN)
Window (# of Packets / Ack)
Checksum (error check)
Urgent Pointer
Options
What is TCP 3 Way Handshake?
SYN (Client -> Server)
SYN-ACK (Server -> Client)
ACK (Client -> Server)
What’s the structure of a UDP datagram?
Source Port
Destination Port
Message Length
Checksum
What is the netstat command for?
Check state of ports on local host
Checks suspicious remote connections
Windows:
Netstat -a
Display open ports
Linux: netstat
-t & -u & -w
-t: Show TCP connections
-u: Show UDP connections
-w: Show raw connections
Linux: netstat
-x & -a & -1
-x: Shows UNIX sockets/local server ports
-a: Show all ports
-1: Shows only ports in listening state
netstat
-n & -p
-n: Displays in numerical format
-p: Add with protocol type
(TCP, TCPv6, UDP, or UDPv6)
netstat
-o & -b & -p
-o: Shows ID #
-b: Shows process name
-p: Show ID and process name
netstat
-s & -r
-s: Reports protocol statistics
-r: Shows routing table
netstat
-e & -i
-e: Ethernet stats
-i: Ethernet stats