TCP\IP Basics Flashcards

1
Q

Where does Internet Protocol work?

TCIP Model

A
  • at the internet layer
  • takes data chunks from the transport layer
  • adds addressing
  • creates final IP Packet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Protocols of the internet layer?

A
  • IPv4
  • IPv6
  • ICMP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

parts of an IP Packet?

A
  • version - 4 or 6
  • header length - total size of ip portion of packet
  • DSCP - differentiated services code point - contains data used by bandwidth-sensative applications like voice over ip
  • TTL - prevents loops by using a counter
  • protocol - TCP or UDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

TCP connection rules

A
  • uses 3 way handshake
  • SYN, SYN-ACK, ACK
  • gives all segments a sequence number to verify all segments received
  • if segment missing, the receiving system must request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

parts of a tcp header

A
  • source port
  • destination port
  • sequence number
  • ack
  • flags - state of connection
  • checksum - checks header for errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

protocol for DNS and DHCP

A

UDP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how does the packet find the reciving computers MAC address?

A

sends out an ARP (address resolution protocol) request to MAC address FF-FF-FF-FF-FF-FF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

view arp cache in windows CLI

A

arp -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Three things the IP numbering system must do:

A

1) create network IDs
2) Interconnect LANs using routers / give routers a way to use the network ID to send packets
3) use subnet mask to recognize if the packet is for the LAN or WAN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

WAN

A

Wide Area Network

- a group of two or more interconnected LANs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Network ID

A

unique identifier for a LAN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Host ID

A

part of the IP that isn’t the Network ID

cannot end in 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Routing table

A

instructions built into a router that instructs it what to do with incoming packets and where to send them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

subnet mask

A
  • a bunch of 1’s followed by some number of zero’s
  • always totals 32 bits
  • 1’s always line up with network id in ip address
  • 0’s always line up with host id in ip address
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what happens when a computer wants to send to an IP address

A
  • it will send to default gateway

- still does arp request to get MAC address for gateway

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a whack

A

a slash followed by the number of ones in the subnet mask

  • /24 = 24 ones - 255.255.255.0
  • /16 = 16 ones - 255.255.0.0
  • /8 = 8 ones - 255.0.0.0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

a computer needs what to work in a network environment

A
  • ip address that’s part of it’s network ID
  • subnet mask
  • default gateway
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what organization tracks and disperses ip addresses globally

A

IANA

  • Internet Assigned Numbers Authority
  • hands out IPs in contiguous chunks called network blocks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what organization tracks and disperses ip addresses regionally

A

RIR

  • Regional Internet Registries
  • there are 5
20
Q

What is the RIR for north america?

A

ARIN

American Registry for Internet Numbers

21
Q

class A network block

A

first decimal 1-126
1.0.0.0 - 126.255.255.255
16M hosts per network ID

22
Q

class B network block

A

first decimal 128-191
128.0.0.0 - 191.255.255.255
65K hosts per network ID

23
Q

class C network block

A

first decimal 192-223
192.0.0.0 - 223.255.255.255
254 hosts per network id

24
Q

class d network block

A

first decimal 224-239
224.0.0.0 - 239.255.255.255
multicast

25
Q

class e network block

A

first decimal 240-254
240.0.0.0 - 254.255.255.255
experimental

26
Q

multicast class blocks

A
  • used for one-to-many communication
  • can send packet with a broadcast, unicast, or multicast
  • multicast often used when routers talk to each other
27
Q

CIDR

A
  • Classless Inter-Domain Routing

- ISP is given a block of addresses, subnets block into multiple subnets, then passes out smaller subnets to customers

28
Q

VLSM

A

Variable Length Subnet Masking

29
Q

BOOTP

A

bootstrap protocol

- predates DHCP, does same thing

30
Q

how dhcp works

A

Four way handshake or DORA (Discover, offer, request, acknowledgement)

  • client sends DHCP Discover message using broadcast when it boots up
  • server sends DHCP offer message (includes IP address, subnet mask and gateway)
  • client sends DHCP request (accepting offer)
  • server sends DHCP Acknowledgement (unicast)
  • client receives DHCP lease (good for fixed amount of time, usually 1 to 8 days)
  • near end of lease, client sends out another DHCP request
31
Q

DHCP ports

A

UDP 67 (server) and 68 (client)

32
Q

What does a DHCP server need?

A
  • pool of ip addresses to pass out
  • know subnet mask of network
  • ip address of default gateway
33
Q

DHCP scope

A

range of ip address for server to hand out

34
Q

DHCP scope options

A

choices like default gateway, dns server, network time server, etc

35
Q

DHCP relay

A
  • built into most routers
  • accepts DHCP broadcasts from clients then sends them via unicast directly to the DHCP server by IP address (IP helper address)
36
Q

DHCP TTL

A

Time to Live

- determines how many routers (hops) a DHCP relay can be from the helper IP

37
Q

IP Exclusion in DHCP

A

an address that the dhcp server will not hand out (for clients with static ip)

38
Q

MAC Reservation in DHCP

A

assigns ip by MAC address

39
Q

ip address when DHCP cant be reached

A
  1. 254..
    - generated by zeroconf (zero-configuration networking)
    - Microsofts APIPA (Automatic Private IP Addressing)
    - can not issue default gateway
40
Q

Renew lease windows CLI

A

ipconfig /release

ipconfig /renew

41
Q

Renew lease Mac CLI

A

sudo ifconfig eth0 down

sudo ifconfig eth0 up

42
Q

Renew lease linux CLI

A

sudo dhclient -r

sudo dhclient

43
Q

DHCP Failover

A

2 (only 2) dhcp servers work together to provide DHCP for the network (primary and secondary)

  • share a single scope
  • if either fails, the other picks up
44
Q

rogue DHCP

A

another DHCP server added to the network handing out wrong addresses

45
Q

private ip addresses

A
  1. 0.0.0 - 10.255.255.255 (1 class a network block)
  2. 16.0.0 - 172.31.255.255 (16 class b network blocks)
  3. 168.0.0 - 192.168.255.255 (256 class c network blocks)