06 - TCP/IP Basics Flashcards
Protocols of IP
IPv4
IPv6
ICMP
TCP Three-way Handshake
SYN -
SYN-ACK -
ACK -
Parts of a TCP Header
Source Port
Desitnation Port
Sequence Number & ACK - keeps track of data flow
Flags - give both sides detailed info about connecttion
Checksum - checks header for errors
DNS & DHCP use what protocol?
UDP
How does a computer find a MAC address on the network?
Sends an ARP (Address Resolution Protocol) request to the broadcast address (FF-FF-FF-FF-FF-FF)
See ARP cache in Windows?
arp -a
Delete an address in ARP cache?
arp -d [address]
What three things must an IP numbering system do?
- create network IDs so each LAN has its own identification
- Interconnect LANs using routers,
- use subnet mask to determine if packet is for LAN or WAN
WAN
Wide Area Network
- group of 2 or more interconnected LANs
default gateway
- the router interface for a single LAN
- gives access beyond the router
How do routers determine where network traffic goes?
Network IDs
Routing Table
instructions that tell the router what to do with incoming packets
Subnet Mask
- series of ones followed by series of zeroes
- always totals 32 bits
- one’s are always the network ID, zeroes are the host ID
Whack
number of ones in an subnet mask
/24 = 24 ones
Who hands out IP addresses
IANA - Internet Assigned Numbers Authority
- oversee’s 5 Regional Internet Registries (RIR)
RIR for North America
ARIN - American Registry for Internet Numbers
Class A network block
1-126
1.0.0.0 - 126.255.255.255
16k hosts per network ID
Class B network block
128-191
128.0.0.0 - 191.255.255.255
65k hosts per network ID
Class C network Block
192-223
192.0.0.0 - 223.255.255.255
254 hosts per network ID
class D network block
224-239
224.0.0.0 - 239.255.255.255
Multicast
Class E network Block
240 - 254
240.0.0.0 - 254.255.255.255
Experimental
Difference between broadcast, unicast, multicast
broadcast - every computer on LAN gets message
unicast - message sent directly to one computer
multicast - message sent to a group of interested comptuers
octets for class network blocks
a - 0 b - 10 c - 110 d - 1110 e - 1111
CIDR
Classless Inter-Domain Routing
- breaking a single address into multiple subnets
VLSM
Variable Length Subnet Masking
-
Rules for addressing
1 - give default gateway first ip address in the network id
2 - try to use IPs in seqenctial order
3 - separate servers from clients with ranges
4 - document
Enter IP in Linux CLI
ip addr add 111.111.111.111 dev eth1
- temporary and will be lost on reboot
Standard before DHCP
BOOTP (bootstrap protocol)
- works just like DHCP
DORA
DHCP Four Way Handshake
Discover - client asks if theres any servers
Offer - includes IP, subnet mask, gateway
Request - server accepts offer
Acknowledgement - finished
DHCP Ports
UDP 67 and 68
DHCP servers require
- legitimate pool of IP addresses to hand out (called DHCP Scope)
- subnet masks for network
- ip address for gateway
DHCP relay
- used when there are many LANs to route to a single DHCP server
- needs real address of DHCP server to work (called IP Helper Address)
Blacklist of IPs on DHCP
IP Exclusion
MAC Reservation
DHCP assigns a specific IP address for a specific MAC address
APIPA Address
Automatic Private IP Addressing
- IP address assigned when DHCP doesn’t reply
- generated by zero-configuration networking (zeroconf)
- starts with 169.254
Release and renew IP address in Windows CLI
ipconfig /release
ipconfig /renew
Release and renew IP address in Linux CLI
sudo dhclient -r
sudo dhclient
Release and renew IP address in Mac CLI
sudo ifconfig eth0 down
sudo ifconfig eth0 up
DHCP Failover
- Has primary and secondary servers
- when one fails,the other picks up
Rogue DHCP server
a DHCP server that shoudln’t be on the network
Private class A block
10.0.0.0 - 10.255.255.255
Private class B block
172.16.0.0 - 172.31.255.255
Private class C block
192.168.0.0 - 192.168.255.255
How many bits in an IPv4 address?
32