MAC 주소는 48비트라고 알고 있는데..

dlsxjsptvmfhxhzhf의 이미지


안녕하세요.

MAC주소는 48비트라고 알고 있는데.. IP주소는 몇비트 인지 찾아봐도 잘 모르겠어서 이렇게 질문을 올립니

다.

MAC주소는 16진수 12자리로 표현되는 48비트 주소인것은 알겠는데, IP주소는

찾아봐도 몇비트인지 잘 모르겠습니다.. IP주소는 몇비트인가요?

dlsxjsptvmfhxhzhf의 이미지

네 해결했습니다. 감사합니다.

twinwings의 이미지

첨언으로 IEEE 802 표준문서에 따르면 MAC 주소는 6바이트와 8바이트 2종륩니다.

           struct sockaddr_ll {
               unsigned short sll_family;   /* Always AF_PACKET */
               unsigned short sll_protocol; /* Physical-layer protocol */
               int            sll_ifindex;  /* Interface number */
               unsigned short sll_hatype;   /* ARP hardware type */
               unsigned char  sll_pkttype;  /* Packet type */
               unsigned char  sll_halen;    /* Length of address */
               unsigned char  sll_addr[8];  /* Physical-layer address */
           };

위 코드는 리눅스 저수준에서 나타내는 소켓어드레스 구조체구요,

보시다 시피 "sll_addr"의 경우 최대 8바이트 까지 할당 되어 있는 것도 확인 할 수 있습니다.