1 / 67

Chapter 4. MAC Sublayer

Chapter 4. MAC Sublayer. 고려대학교 네트워크 연구실. The Medium Access Sublayer. The medium access sublayer. The key issue is how to determine who gets to use the channel when there is competition

gamba
Télécharger la présentation

Chapter 4. MAC Sublayer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4. MAC Sublayer • 고려대학교 • 네트워크 연구실 The Medium Access Sublayer

  2. The medium access sublayer • The key issue is how to determine who gets to use the channel when there is competition • determine who goes next on a mutiaccess channel belong to a sublayer of the data link layer called the MAC(Medium Access Control)

  3. The channel allocation problem(1) • Data link layer • Logical link control(LLC)-a protocol forming part of the data link layer in Lans. It is concerned with the reliable transfer of data across the data link btw. two communicating systems. • Medium access control (MAC)-many Lans use a single common transission medium-for example, a bus, ring- to which all the interconneted devices are attached. A precedure must be followed by each device, therefore, to ensure that transmissions occur in an orderly and fair way. In general, this is known as the medium access control procedure.

  4. The channel allocation problem(2) • Static channel allocation • FDM, TDM • Dynamic channel allocation • Station model - N independent stations, each generates frames for transmission • single channel assumption- a single channel is available for all communication • collision assumptoin model

  5. The channel allocation problem(3) • Dynamic channel allocation • Continuous time-there is no master clock dividing time into discrete interval. • Slotted time- time is divided to discrete intervals. • Carrier sense • No carrier sense

  6. Multiple access protocols(1) • Aloha -pure aloha, slotted aloha Difference- time is divided up to discrte slots into which all frames must fit. Pure aloha don’t require global time synchronization.

  7. Multiple access protocols(2) • Aloha • Pure aloha-feedback property. • Frame time-time to transmit the standard, fixed-length frame.( fig.4.2) • slotted aloha • Divide time up into discrite interval. Each interval corresponding to one frame.

  8. Multiple access protocols(3) • Carrier sense multiple access.protocols(1) -Stations listen for a carrier • Persistent and nonpersistent CMCA. • 1-persistent CSMA(carrier sense multiple access) • if a collision occurs, the station waits a random amount of time and starts all over again. • Nonpersistent CSMA-less greedy, so not continuously sense carrier.

  9. Multiple access protocols(4) • Carrier sense multiple access.protocols(2) • CSMA with collision detection • Station abort their transmission as soon as they detect a collision. • Quickly terminating damaged frames saves time and bandwidth. • Contention algorithm.(fig 4.5)(consists of contetion,transmission,idle period) • The minimum time to detect the collison is the time it takes the signal to propagate from one station to the other.

  10. Multiple access protocols(5) • Collision-Free protocols -resolve the contention for the channel without any collisions • A Bit-Map protocol • Each contention period consists of exactly N slots • station j may announce the fact that it has a frame to send by insertiong a 1 bit into slot j. • numberical order. Reservation protocol. • Channel efficiency at low load=d/(N+d) (N overhead) • channel efficiency at high load=d/(d=1) (1 overhead)

  11. Multiple access protocols(6) • Collision-Free protocol • Binary Countdown. • Using binary station address.(fig 4-7) • A station waiting to use the channel now broadcasts its address as a binary bit string, starting with the high-order bit. • Channel efficiency=d/(d/log2N)

  12. Multiple access protocols(7) • Limited-Contention protocol Delay at low load and channel efficiency at high load • Combine the best properties of the contention and collision-free protocols. • How to assign station to slots dynamically. • At low load, many slot per slot and at high load few station per slot.

  13. Multiple access protocols(8) • Limited-Contention protocol • The Adaptive Tree Walk Protocol. • Think of the stations as the leaves of a binary tree. • Slot 0, all stations are permitted are permitted to try to acquire channel. • If a collision occurs, the search continues recursively with the node’s left and right children.if a bit slot is idle,or if there is only one station that transmits , the searching stops.

  14. Multiple access protocols(9) • Wavelength Division multiple Access protocol • The spectrum is divided up into channels. • Consist of two channel -narrow channel-control to signal the station -wide channel-output data frame • Each channel is divided up into group of time slots.

  15. Multiple access protocols(10) • Wireless LAN protocol. • Require special MAC sublayer protocol. • Assumption-all radio transmitters have some fixed range • hidden station problem. • Exposed station problem.

  16. Multiple access protocols(11) • Wireless LAN protocol. • MACA and MACAW. • Mutiple access with collision avoidance • the sender stimulates the receiver into outputting short time(fig 4-12) • binary exponential back off-dynamically adapt to the number of station trying to send. • MACAW-without data link layer ack, lost frames were not retransmitted until transport layer noticed their absence

  17. Multiple access protocols(12) • Digital Cellular Radio. -wireless networking -more efficient to do channel allocation per call than per frame • Advatage in digital transmission. -voice, data,and fax can be integrated into a system. -less bandwidth per channel because of compression. -transmission quality by error-correction codes -encryption for security.

  18. Multiple access protocols(13) • Digital Cellular Radio. • GSM-global system for mobile communications • Each channel consists of downlink frequency, and uplink frequency. Frequency channel supports eight separate connections using TDM. • Broadcast control channel-output stream of base station containing identity and channel status. • dedicated control channel-location updating, registration and call set up. • common comtrol channel(paging, random access, access grant channel) • circuit switched. Handoffs are frequent. High error rate.

  19. Multiple access protocols(14) • CDPD- Cellular digital packet data • Packet-switched digital datagram. • Consists of mobile host, base stations, base interface stations. • Interface-E-interface, I-interface, A-interface.(fig 4-15) • has only downlink/uplink pair available for data. At uplink channel, all mobile hosts wishing to send must contend. • DSMA-digital Sense Multiple Access • Prevent all the mobile hosts from jumping on the uplink channel as soon it goes idle.

  20. Multiple access protocols(15) • CDMA-code division multiple access • Allows each station to transmit over the entire freqency spectrum all the time. Multiple simultaneous transmissions are seperated using coding theory.

  21. 4.3 IEEE 802 standard • Layer 구성 • 802.6 DQDB

  22. IEEE 802.3 • 기본동작 • 전송을 원하는 스테이션이 있을 때, 케이블이 사용 중이면, idle 상태에 있고, 아니면 전송을 한다. 만약 전송을 원하는 다른 스테이션과 충돌이 있을 경우 일정 시간 후 재전송 한다. • CSMA/CD의 기본 속도는 2.94Mbps 인데, Xerox에서 개발한 Ethernet은 10 Mbps 로 동작한다. • 보통 CSMA/CD를 ‘이더넷’ 이라 한다.

  23. 802.3 cable • 속도 + Base + 전송 매체나 전송거리 • Ex) 10 base 5 는 500미터까지 전송 가능한 10 Mbps 속도의 동축케이블 • Ex) 10 base-T 는 100미터까지 전송 가능한 10 Mbps 속도의 Twisted pair • Ex) 10 base-F 는 2000미터까지 전송 가능한 10 Mbps 속도의 광 케이블

  24. Manchester Encoding • 장점은 동기를 맞추기 위해서 별도의 외부 클럭이 필요 없다. • 단점은 한 펄스를 반으로 나누어 쓰기 때문에 대역폭이 두 배로 늘어 난다. • Differential manchester encoding 이라는 방법은 노이즈에는 강하지만 장비가 복잡해 지는 단점이 있다.

  25. 802.3 MAC sub layer (1) • 802.3 frame 구조 • Source address and destination address • Destination address의 최상위 비트는 ‘0’일 떄 일반 주소를 나타내고,’1’이면, ‘multicast’를 나타낸다. • Address field가 모두 ‘1’이땐 ‘broadcasting’을 나타낸다.

  26. 802.3 MAC sub layer (2) • 802.3 frame 구조 • Preamble 은 연속된 일곱 개의 ‘10101010’ ( 1바이트 * 7 )로 구성되어있다. • Start of frame (10101011) • 46비트(48-2비트)의 전세계에서 유일한 주소를 갖는다. ( local address 는 local network관리자가 부여해 주고, 외부 망에서 보면 local address는 중요하지 않다.)

  27. 802.3 MAC sub layer (3) • 802.3 frame 구조 • Length field는 data field에 몇 바이트의 데이터가 있는지 알려준다. • Data field size가 ‘0’이면 충돌이 일어나기 때문에 data가 46 바이트 이하이면 ‘PAD’를 이용해서 최소 frame size를 맞춘다. • 여기서 46바이트는 64 – 18 (destination address 에서 check sum까지 64 바이트이다 ) 바이트 이다.

  28. 802.3 MAC sub layer (4) • 802.3 frame 구조 • 10Mbps의 이더넷에서 최장길이 2500미터,4개의 repeater 를 가질 때,충돌이 일어나지 않을 최소 대기시간은 51.2 uS이다. • 51.2 uS는 64 바이트가 전송되는 시간을 나타낸다. • 만약, 100Mbps 의 이더넷에서 최장길이 2500미터,4개의 repeater 를 가질 때, frame의 최소길이는 640 바이트가 된다.

  29. 802.3 MAC sub layer (5) • Binary exponential backoff algorithm • 충돌이 일어날 경우에 임의의 시간 이후에 다시 전송을 시도한다. • Randomization interval이 너무 길거나 짧아도, delay time이 길어지게 된다. • ACK 신호를 보낼 수 없기 때문에, 한 프레임을 전송한 후에 첫번째 contention slot은 destination station에 예약하는 방법도 제안되었다.

  30. 802.3 MAC sub layer (6) • Switched 802.3 LAN • Station 의 숫자가 많아 질수록, 속도가 떨어지는 단점을 보완해준다. • 내부적으로는 고속의 선로와 4개에서 32 개의 plug-in-card로 구성되어 있다. • 한 카드 내에서, CSMA/CD 방식으로 동작하는 것도 있고, INPUT BUFFER를 달아서 모든 입력이 병렬로 동작 하는 것도 있다.

  31. IEEE 802.4 Token bus • 특징 • Token : special control frame • 각 STATION에게 골고루 전송 할 수 있게 해준다. (최악의 경우라도 token이 다시 돌아 올 때까지만 기다리면 된다.) • Priority를 줄 수 있어서, 긴급한 data를 우선적으로 보낼 수가 있다. • 가상의 ring 개념으로, 선형구조에 적합 하다.

  32. Token bus MAC sublayer • Priority class • 0,2,4,6의 네 개의 level을 갖는데, 6이 최상위 우선순위 이다. • Token이 넘어오면, 내부적으로 priority 6을 갖는 substation 으로 token이 전달되어, data를 전송한다. • 만약 전송 할 data가 없거나, 전송이 끝나면,token은 priority 4을 갖는 substation 으로 전달된다. • Priority 0까지 통과한 token은 다은 station으로 전달된다.

  33. IEEE 802.4 Token bus • Frame format • 1 바이트의 preamble로 수신측과 동기를 맞춘다. • Start delimiter 와 end delimiter 는 ‘0’ 이나 ‘1’이 아닌 analog coding을 포함하기때문에 user data와 구별 할 수 있다. • Destination and source address는 802.2 와 달리 2바이트와 6바이트를 혼용할 수 있다. • Data frame은 frame’s priority , ack , nack 를 포함한다.

  34. IEEE 802.4 Token bus • Frame format • Frame control field 는 data frame과 control frame에서 서로 다른 내용을 갖는다. • Data frame 에선 frame의 priority와 ack 신호를 전달한다. • Control frame에선 세가지 타입을 지원한다. • Token 전달 • Maintenance • 새로운 station 의 추가, 삭제

  35. IEEE 802.4 Token bus • Frame format • Address field의 크기는 2바이트나 6바이트 모두 갖을 수 있다.

  36. Logical Ring Maintenance • Station의 interface는 내부적으로 전후에 붙은 station 의 주소를 가지고 있다. • Token을 갖는 station은 주기적으로 solicit_successor 신호를 보내서,새로운 station이 들어오도록 허용한다. • 만약 slot time 동안 station 이 들어 오지 않으면 response window는 닫히고, 다음 일을 수행한다. • 만약 한 station 이 들어오면, ring에 삽입되고, token을 갖는 station 의 다음 station 으로 등록 된다.

  37. IEEE 802.5 Token ring • 특징 • broadcasting media • point-to-point link (well understood and field_proven technology) • 구조 • a collection of ring interfaces connected by point-to-point

  38. IEEE 802.5 Token ring • 동작 원리 • station이 전송할 frame이 생기면, token을 요구하고, 전송이 끝나면, token을 버린다. (일반 data frame의 첫 3 바이트 중 1비트를 바꾼다) • ring interface는 listen, transmission 두 가지 mode를 갖는다. • Listen mode 에서 input bit 은 output bit로 (1비트 delay를 가지고) 복사한다. • Transmission mode에서 token 다음에 들어온 것은 고정되고, input과 output 사이의 연결은 해제된다.

  39. IEEE 802.5 Token ring • Star shaped ring • 선로가 끊어 졌을 때, segment를 by pass 시켜서 정상적으로 동작하게 한다. • Token ring MAC sublayer protocol • frame 구성 • start delimiter , end delimiter : 각각 1 비트 • access control : token bit, monitor bit, priority bit, reservation bit 를 포함한다. • Frame control : data frame과 control frame으 구분

  40. IEEE 802.5 Token ring • Frame 구성 • frame statue : • A=0 and C=0 : 대상 station 이 없거나, 꺼져 있다. • A=1 and C=0 : 대상 station은 있지만, frame을 받을 수 없다. • A=1 and C=1 : 대상 station 이 있고, FRAME 이 전달 되었다.

  41. IEEE 802.5 Token ring • Multiple priority • 3 바이트의 token 중 가운데 바이트는 priority정보를 갖는다. • 만약 station 이 priority n을 갖을 때, n보다 작거나, 같은 priority를 갖는 token을 만나야, 전송을 할 수 있다. • Token이 가지고 있는 priority 보다 큰 priority를 가지면, 예약을 할 수가 있다. ( token bus와는 다르다)

  42. Comparison of 802.3, 802.4, and 802.5 • 802.3 • 장점 • 가장 많이 보급, 간단한 구조, 빠르다. • 단점 • 최소 64 바이트의 크기를 갖기 때문에 overhead가 크다. • 실시간 처리가 어렵고, 거리가 제한된다.

  43. Comparison of 802.3, 802.4, and 802.5 • 802.4 • 장점 • 고 신뢰성, 우선권 부여가능 • 실시간 전송이 가능 하다. • 작은 frame도 가질 수 있다. • 단점 • 연속적으로 token이 손실 되었을 때, 치명적이다. • Analog device 의 사용으로 기기가 복잡 • protocol이 복잡

  44. Comparison of 802.3, 802.4, and 802.5 • 802.5 • 장점 • 일대일 연결을 기본으로 해서 간단하고, 완전히 digital화 할 수 있다. • 우선권 부여가능,고성능이다 • 길고 짧은 frame을 가질 수 있다. • 단점 • monitor function 이 집중화 되어, 있다. • Low load에서도 기본적인 delay가 존재

  45. DQDB (802.6) • 특징 • 두 개의 단 방향 병렬 버스 구조 • LAN의 거리 제한을 극복 • 53 바이트의 cell (44 byte payload field) • 일반적으로 160 km 까지 전송 가능하고, 44.736 Mbps의 속도를 갖는다.

  46. Logical link control(IEEE 802.2) • 역할 • error control과 flow control을 담당한다.(하위 layer 에서 packet의 손실을 보장하지 못한다) • 세가지 service를 제공한다 • unreliable datagram service • acknowledged datagram service • reliable connection-oriented service

  47. Bridge • Bridge의 역할 • 여러 가지 형태의 LAN 구성이 가능하다 • 거리적으로 떨어진 곳(LAN)과 연결 시킨다. • 부하를 줄이기 위해, LAN을 분리 할 수 있다 • LAN 거리를 확장 시켜 준다. • LAN을 안정적으로 운용 할 수 있다. (더러운 신호가 유입되는 것을 막아 준다.) • 보안성을 강화 시킨다.

  48. Bridge from 802.x to 802.y • 유발될 수 있는 문제들 • 각각의 LAN은 다른 형태의 Frame을 갖는다. • 속도의 차이가 생긴다. • 최대 frame의 길이가 서로 다르다. • 802.3 : 1500 byte • 802.4 : 8191 byte • 802.5 : 5000 byte

  49. Bridge 의 종류 • Transparent bridge • promiscuous mode • 주소록(hash table)을 갖고 있어서, destination address 를 찾는다. • Hash table 에 없는 주소는 flooding 해서, 새로운 hash table 작성 ( backward learning ) • 주기적으로 hash table 갱신 • two parallel transparent bridge : 안정성 증가

  50. Bridge 의 종류 • Spanning tree bridge • 가상의 폐 루프가 생기지 않도록 해 준다. • 가장 serial 번호가 작은 브리지는 root tree 가 생성되는 하나의 브리지를 선택하고, 가장 최단거리에 있는 브리지와 LAN으로 Tree를 생성한다.

More Related