CS log

ch4 47~72 본문

CS/Computer Network

ch4 47~72

sj.cath 2023. 12. 4. 00:17
  • When is a DHCP protocol required? host dynamically obtains ip address from nw server when it joins nw.
  • What information are provided by a DHCP server? (Hint: 3 IP addresses) nw mask, first-hop router, dns server의 ip address
  • Why should a DHCP client listen on a well-known port 68? no client address & broadcast(다받아라~)
  1. Since a DHCP server broadcast its reply 
  2. if the client uses a random port assigned by OS, then an unintended client in the same network which uses broadcast communication (e.g., chat app. MQTT) may receive the DHCP reply.
  • 같은 네트워크에 연결된 여러 DHCP client들은 모두 (255.255.255.255, 68) 으로 UDP 소켓을 열어놓았으므로 DHCP 서버가 (특정 client에게) 보낸 메세지를 모두 받게 된다따라서 각 client들은 (자신이 서버에게 알려주었고 서버가 그대로 보낸) transaction ID로 자신에게 보낸 메세지를 구별해낸다. 
  • BootP v.s. DHCP = Static IP  v.s. Dynamic IP

Route aggregation and Longest Prefix matching : 이 둘은 tightly coupled 된 기술임.

    • What is the route aggregation?
      • : 200.23.16.0/20으로 route aggregation 후 보내줌. (어떤 8개의 subnet이든 앞에서부터 20bits는 같기 때문) → 상위 Provider ISP IP주소 앞의 20 byte만 보고 이화여대로 보내버린다. 이화여대는 뒤를 보고 8개 중 어떤 subnet인지 가리면 됨. 상위 Provider ISP까지 나머지 3bit를 더 볼 필요가 없다 = aggregation
  • FIB table lookup is performed based on "the longest prefix matching" : Do you know how "the longest prefix matching" works? 똑같은 bit가 가장 많이 나오는 destination address range의 link interface를 선택
  1. 만일 incoming IP 패킷의 destination IP 주소와 일치하는 FIB entry 가 둘 이상일 경우 가장 길게 mapping 되는 entry 에 기록된 output port forwarding. 
  2. longest prefix matching 연산을 사용하기 때문에 만일 8개의 subnet이 같은 ISP에 속해 있가다 그 중 한 subnet이 다른 ISP로 이동한 경우에도 상위 라우터의 FIB 테이블은 이사한 subnet을 위한 엔트리 한 개만 추가하면 된다
  3. 라우터가 incoming IP 패킷을 포워딩할 output port를 결정하기 위해서 FIB(forwarding table) mapping entry를 찾을 때 도착한 패킷의 destination IPv4 주소 32bit 를 모두 보고 결정하는 것은 아니다. (결론적으로 라우터의 위치에 따라 해당하는) subnet part 만 보고 forwarding 하게된다.
      • Why and when do we need the NAT technology? private IP address는 인터넷에 나가지 못 하는 non-routable address. 이를 routable Public IP address convert해주는 것을 NAT라고 한다. 외부로는 private IP address로 나갈 수 없음. 10.0.0.-/24는 전세계에 엄청 많을 수 있음. 나만 쓰는 주소 X
      • 그럼, 어떻게 바꿀 것이냐? local network를 떠나 Internet으로 가는 애들은 이 주소를 달고 갈 수 없기 때문에 공식적인 IP주소를 딱 하나만 받아(138.76.29.7) 나갈 때 무조건 이 주소를 대표로 바뀌어서 나감.
        • 모든 IP-capable device는 public routable IP address가 필요하다.
        • IP에게 너무 많은 범위의 IP를 받을 필요가 없고 just one IP address for all devices가 필요할 때
        • 주소가 노출이 안 되니 security 보장, 공격을 받지 않을 수 있음.
        • 내 local network 안에서 device의 주소를 마음껏 바꿀 수 있고, 상위 ISP에게 알려줄 필요도 없음.
  • What are drawbacks of NAT?
    • IPv6 쓰면 되지 NAT를 왜 쓰는가?
    • layer 3에서 4계층의 port 번호를 보며 layering을 망가뜨리는 것이 옳은가?
    • end-to-end connectivity를 파괴. 엄밀히 말하면 end to end connection이 아닌 router에서 끊긴 후 다시 보내주고 있기 때문에
    • server home network 안에 두는 경우 (Ex. P2P) 생기는 문제
      private network
      안에 private IP address를 가진 어떤 peer server가 되면, public network IP를 가진 어떤 client host로 들어올 수 없음 ⇒ NAT traversal techniques
  • What are differences between two NAT traversal technologies, relaying and connection reversal?
  1. Relaying : there is no direct connection between a client and a server and all messages are forwarded via a relay.
  2. Connection reversal : a client and a server are connected and directly exchange messages.

'CS > Computer Network' 카테고리의 다른 글

Network Layer : The data Plane 총정리  (0) 2023.12.06
ch4 73~끝, ch5 1~7  (1) 2023.12.05
ch4 33~46  (0) 2023.12.02
ch4 14~32  (0) 2023.11.30
Ch4 p1~13  (0) 2023.11.29