What is an IP address
- Distinguishes devices that can do networking.
-> Follows certain protocol.
-> 12 digit #
- In one network, needs same network address but different host address to communicate.
IPv4 : 0.0.0.0 ~ 255.255.255.255
- 32 bit decimal
- 127.0.0.1 is registered as local host.
IPv6 : (ex) 0123:4567:89ab:cdef:0123:4567:89ab:cdef
- 128 bit hexadecimal
- Due to lack of IPv4...
What is a class of IP addresses
- How to determine network address and host address in on IP.
A Class | net1 host3
- 2진수의 32자리로 나타내었을 시 0 시작
- Theoretically, 0.0.0.0 ~ 127.255.255.255
- In protocol, 188.8.131.52 ~ 184.108.40.206
B Class | net2 host2
- 10 시작
- 220.127.116.11 ~ 18.104.22.168
C Class | net3 host1
- 110 시작
- 192.0.0.0 ~ 22.214.171.124
D E | for multicast, 연구용
Calculation : Possible Combination
- When calculating host address combination, need to subtract 2
-> All 0 is registered for network address.
-> All 1 is registered for broadcast address.
What are the differences between public and private IPs
- Provided by ISP
-> Unique IP address
-> Can be visited from any computer in the world.
- Subnetted IP
-> Can only be used by computers on same network.
- A : 10.0.0.0 ~ 10.255.255.255
- B : 172.16.0.0 ~ 126.96.36.199
- C : 192.168.0.0 ~ 192.168.255.255
Static IP | 고정 IP
- Never changes as long as you stay with the same provider or same server
Dynamic IP | 유동 IP
- Can change from time-to-time
What is a Netmask
- Network address를 1로 치환 한 값
-> (ex) 255.255.255.0
- IP address & Netmask = Network address
What is the broadcast address of a subnet
- All hosts get to send data in network.
-> Change 0 to 1 in subnet mask.
What is the subnet of an IP with Netmask
Subnetting : Dividing one network into several subnet network using subnet mask
- To use network efficiently.
- Expands bits in network address, and rest of host address becomes host identifier.
- Increases possible networks to allocate.
-> need router to communicate since network is divided.
- Solves traffic problem
- <=> Supernetting : Combining network
Calculation : Subnetting
- Subnet mask 가 Network address 를 확장하면서 1 bit 씩 확보하게 되면 네트워크 할당 가능 수가 2배 로 증가하지만 호스트 할당 가능 수가 2배 줄어듬.
- (ex) 188.8.131.52/25*
-> 25bit Subnet mask 255.255.255.128
-> Divided into 184.108.40.206 and 220.127.116.11
What is the OSI model
- A conceptual model that characterises and standardises the communication functions of a telecommunication or computing system.
Layer 1: Physical Layer
- Responsible for the transmission and reception of unstructured raw data between a devide and a physical transmission medium.
- Converts the digital bits into electrical, radio, or optical signals.
- PDU (Process Data Unit): Bit
- Protocol : Ethernet, RS-232C (software associated)
- Equipment : Modem, hub, repeaters (hardware associated)
Layer 2: Data Link Layer
- Provides node-to-node data transfer.
- Detects and possibly corrects errors that may occur in the physical layer.
- Defines the protocol to establish and terminate a connection between two physically connected devides.
- PDU : Frame
- Protocol : Ethernet, MAC, PPP, ATM, LAN, Wifi
Layer 3: Network Layer
- Finds the way to deliver the message to the destination node using routing algorithm.
- PDU : Packet
- Protocol : IP, ICMP
What is ICMP?
Sends error messages and operational information indicating success or failure when communicating with another IP address.
Uses ping which measures the round-trip time for message sent from the originiating host to the destination that are echoed back.
Layer 4: Transport Layer
- Controls the reliability of given link through flow control, segmentation/desegmentation, and error control.
- Keeps track of the segments and retransmit those that fail delivery.
- PDU : Segment
- Protocol : TCP, UDP, ARP, RTP
Layer 5: Session Layer
- Controls dialogues between computers.
- Establishes, manages and terminates the connections between the local and remote application.
- Provides for full-duplex, half-duplex, or simplex opertation.
- Responsible for closing a session especially in OSI model.
- Responsible for session checkpointing and recovery.
- Protocol : NetBIOS, SSH, TLS
Layer 6: Presentation Layer
- Transforms data into the form that the application accepts.
- Protocol : JPG, MPEG, SMB, AFP
Layer 7: Application Layer
- Interacts directly with user.
- Identifies communication partners, determines resoure availability, and synchronizes communication.
- Protocol : DHCP, DNS, FTP, HTTP
What is TCP | What is UDP
- Internet protocol does not follow OSI model completely.
-> Most follows TCP/IP model.
- Four Layers
-> Application Layer : Application + Presentation + Session
-> Transport Layer : TCP + UDP
-> Internet Layer : Network Layer
-> Link Layer : Data Link Layer + Physical Layer
Tranmisson Control Protocol
- Connection-oriented protocol
- Connection by byte stream
- Congestion 혼잡제어 / Flow control 흐름제어
-> Receiver can decide window size
- Ordered / Low speed
- Reliable data transmission
-> Dupack-based retransmission : if ACK is duplicated, request retransmission
-> Timeout-based retransmission : if did not receive ACK for certain period, request retransmission
- Packet : Segment
-> No multitasking, no broadcasting
- HTTP, Email, File transfer ...
- Port #
-> TCP 로 연결되는 가상 회선 양단의 송수신 프로세스에 할당되는 주소
- Sequence #
-> Sender가 지정하는 순서번호. 전송되는 바이트 기준 증가
-> SYN = 1 : The first sequence #. ACK = SYN + 1
-> SYN = 0 : 현재 세션의 이 세그먼트 데이터의 최초 바이트 값의 누적 sequence #
- Acknowledgement #
-> 제대로 수신한 바이트의 수를 응답하기 위해
- Header Length
-> 데이터의 시작 위치 표현
-> Reserved field for future use. Filled with 0.
-> NS : ECN-nonce 은폐 보호
-> CWR : 호스트가 ECE flag가 포함된 TCP segment를 수신했으며 혼잡 제어 메커니즘에 의해 응답했음
-> ECE (ECN-Echo) : SYN = 1 명시적 혼잡 통지 가능 | SYN = 0 혼잡 경험 플래그 패킷 수신완료
-> URG : Urgent pointer 필드의 값이 유효한가
-> ACK : 클라이언트가 보낸 최초의 SYN 패킷 이후에 전송되는 모든 패킷은 필수
-> PSH : 수신 어플리케이션에 버퍼링된 데이터를 상위 계층에 즉시 전달 할때
-> RST : Connection reset | 유효하지 않은 segment의 응답
-> SYN : 동기화 sequence #. 양쪽이 보낸 최초의 패킷에만 설정
-> FIN : 남은 송신측 데이터 없음
- Window size
-> 수신 윈도우의 크기
-> 0 이면 송신 프로세스의 전송 중지
-> 헤더 및 데이터의 에러 확인
- Urgent pointer
-> URG 플래그가 지정된 경우에만
-> 마지막 긴급 데이터 바이트를 가리킴
User Datagram Protocol
- Connection less protocol
- Connection by message stream
- No congestion / Flow control
- Not ordered / high speed
- Unreliable data transmission
- Packet : Datagram
- DNS, Broadcasting ...
- Port #
- Total length
-> Header + Data
- ** Checksum**
-> 오류 탐지
What is a DHCP server and the DHCP protocol
DHCP : Dynamic Host Configuration Protocol
- IPv4 and IPv6 supported.
- Allocates IP address, subnet mask, default gateway IP address, and DNS server IP address for certain period.
- To lease more, IP address renewal through DHCP server
- If no more need, IP address release
- DHCP Discover
- Broadcasts message including host's MAC address
- DHCP Offer
- Broadcasts / Unicasts IP address including network info.
-> Client MAC
-> 할당할 IP
-> Subnet mask
-> Router : 단말의 default gateway IP
-> DNS server IP
-> IP lease time
-> DHCP server identifier
- DHCP Request
- Picks one DHCP server and requests network info
- Broadcasts message including host's MAC address, requested IP address, and DHCP server identifier
- DHCP ACK
- Broadcasts / Unicasts network info
- Same packet as DHCP Request
What is a DNS server and the DNS protocol
DNS : Domain Name System
- IP address 를 www...com 처럼 변환 혹은 역변환 역할을 하는 프로토콜
- Client inputs URL.
- Browser connects to DNS server, requests IP address of domain name.
- With IP address, browser communicates computer, requests page requested by client.
How does routing work with IP
- Uses LAN table, Network table, Rounting table to identify connected devices' addresses
- Based on info, chooses transfer path.
- LAN table : Is destination of packet is in same network?
-> Manages LAN segment address connected with router, used for filtering.
- Network table : Finds network address to send.
-> Saves all router address in network, distinguishs sender router
- Routing table : Transfer through proper path.
-> Maintains each path's info, chooses efficient path.
목적지 학습 방법
-> Knows physically connected IP addresses
-> 관리자가 직접 라우팅 경로 설정
-> Adv. Efficient management of path
-> Con. Slow handling on network change
-> Shares each router info, saves at routing table
-> Adv. Fast handling on network change
-> Con. Frequent path calculation => 리소스 소비량 증가
-> 관리자가 강제로 정보교환
What is a default gateway for routing
- A device such as router that serves as the edge devices providing an access point to other networks and is used to forward IP packets wichi does not match any routes in routing table.