Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
LAN and OSI relationship Layers in OSI 7 Application Layers in a LAN Higher layers (depend on the used system of protocols) 3 Network LLC 2 Data link MAC 1 Physical Physical LLCMACNIC- Logical Link Control Media Access Control Network Interface Card To/from higher layer MAC Header NIC This a datagram (for TCP/IP) frame data frame data frame MAC Frame MAC Trailer (FCS) 1 MAC frame in Ethernet (IEEE 802.3 standard and DIX standard) Physical address (MAC addresses) in the LAN If 802.3 preamable Dest. Source Length addr. addr. or Type 8 octets 6 6 2 Frame check sequence(FCS) Data 46 – 1 500 4 If DIX 72 – 1526 octets 101010...10 64 bits Physical (MAC) address 1st Bit --> 47 transmitted 0 Address in LAN Type Type = 0 – a unique (individual) address 1 – a group (multicast) address If all 48 bits are 1, this is the broadcast address. MAC addresses are controlled by IEEE Registration Authority. 2 Example of a MAC (phys.) address (a) As written in hexadecimal form F0 12 01 A3 52 10 0000 1111 0100 1000 … 0000 1000 The 1st bit to be transmitted (b) As transmitted (in binary): each octet is transmitted starting from the least significant bit (LSB). In this example: The 1st transmitted bit is 0, so that this is an individual address( not multicast address). 3 Multicasting in TCP/IP Application This is done by setsockopt sys. call Join a multicast group with IP=230.4.5.6 UDP Individual IP = 193.15.20.30 IP layer: Checks both 193.15.20.30 and 230.4.5.6 Datalink layer: Receives all frames with destination MAC Fixed NIC address Muticast IP = 230.4.5.6 Mapping to temporary MAC address 02:60:2f:6c:e4:12 and 01:00:5e:04:05:06 LAN How to map a multicast IP address into a MAC address: See Stewens, UNIX Netw. Progr, p.489. 4 Hub (a multiport repeater) Hub Coax. cable To other hub(s) Hub Ports Up to 100 m Two unshielded twisted pairs (UTP) ……… Host 1 Host N A logical view of a repeating hub One collision domain for all ports! (like a “compressed” Ethernet LAN) 5 A switched Ethernet LAN The purpose is to have large number of stations, with the possibility more than one station transmitting at the same time. A line card A switch A high-speed backplane With buffer memory A high-speed bus (1 Gbps) Like usual Ethernet Card 1 Stations of card 1 Switch Card M Stations of card M 6 CSMA/CD (IEEE 802.3 Standard) Major Advantages: 1. Algorithm is completely distributed. 2. The protocol is simple (the standard 802.3 is presented as Pascal procedures). 3. No special procedures to include or remove a station from the network. 4. No control frames. Major Disadvantages: 1. A station might wait indefinitely long to start transmitting (real type application is not suitable). 2. Data packets have no priorities. 3. Bad performance under heavy load. What is the minimal size of a frame in IEEE 802.3? l = 8 + 6 + 6 + 2 + 46 + 4 = 72 bytes = 576 bits 8:preamble, 2:length of data, 46:data, 4:frame check sequence This requires (576 bits/10 Mbps) = 576/107 sec = 57.6 s The window slot = 512bits/10 Mbps = 51.2 s (5 segments of cable with 500 m long each plus 4 repeaters between the segments). 7 Performance of a CSMA/CD network Let there be k – number of stations, p – the probability that each station wants to transmit during a collision window. CSMA/CD network 1 2 k Then A = kp(1-p)k-1 , A = Amax when k=1/p is the probability that some station acquires the medium during a collision window. And channel efficiency be T/(T+2/A) Where T – mean time to send a frame, 2 - duration of the collision window ( 51.2 s for 2.5 km of cable and 4 repeaters). Channel 1.0 efficiency .9 1024 .7 256 .5 64 byte 51.2 s to send, with 10 Mbps .3 .1 0 1 2 4 8 16 32 64 128 256 Number of stations 8 Token ring access method (IEEE 802.5) A wants to send to C. Ring B interface Sender A A token (NIC) waits for free token. Then changes free token to C A busy token and appends Data. waits Station D Now receiver C copies data addressed to it. Data continues traveling along the ring. B A C D Sender: receives its own packets, removes (absorbs) it from the ring and then generates a free token. B A C D Station A will generate a new free token when both of the following conditions take place: 1. The station has completed transmission of its packet. 2. The busy token has returned to the station. With the speed = 10 Mbps, a data packet of 512 bytes can occupy 200 000 000 m/sec.(512*8)bits/107 bit/sec 80 km, if there are no delays in stations’ interfaces 9 Operating modes of ring interfaces: a) Listen. 1 bit delay Station Ring interface Media To station From station Ring interface (Repeater) Media b) Transmit Station Media Ring interface To station From station c) bypass Media To station From station 10 Algorithm of the ring interface Start Continue listening No A free token arrived Is there a frame to transmit? Yes Change the free token to busy token (and let it go) Switch to “transmit” mode. Transmit the frame. Frame has been transmitted AND Busy token returned? Token holding time=10 ms for IEEE 802.5 No Yes Generate new free token. Switch to “listen” mode. 11 Token Ring Protocol (802.5) Token format: 1 1 Bytes 1 SD AC ED 1 1 1 2 or 6 2 or 6 No limit Data frame: SD AC FC Dest. Source Data Start delimiter 4 1 CRC ED FS Frame control (data or control frame) Access control 1 Frame status End delimiter Token holding time = 10 ms With the rate = 4 Mbps, up to 10*10-3*4*106 = 40 000 bits may be transmitted. Frame status bits A and C in FS byte: 1) A=0, C=0 : destination is not present or not powered. 2) A=1, C=0 : destination is present but frame not accepted. 3) A=1, C=1 : destination is present, frame copied. 12 AC byte: Contains: the token bit (0 – token, 1 – frame) the Monitor bit Priority bit Reservation bits A station wants to transmit a priority n frame A token arrived with priority m n>=m ? Yes No Transmit the frame A station wants to receive next token with priority s Wait for a data frame The token is already No with priority t>s Yes Set priority s in Reservation bits 13 Features of the standard IEEE 802.5 1) Transmission Media: shielded twisted pair, coaxial Cable, fiber 2) Transmission Rate: 4 Mbps, 16 Mbps 3) Physical signals: Manchester code 4) There is a possibility using a wire center. Station Wire center Station Station Bypass relay Physical structure: star Logical structure: ring Station Wire center 1 2 3 Extending the ring by using many wire centers. 14 Using priorities Pm – station wants to transmit a data Station packet with priority Pm. Pr – priority value in the received token (free or busy). Pm Rr – reservation priority value in the received token (free or busy). A token arrived Busy No Yes Rr Pm Pr Free Free or busy ? Pm > Rr ? Rr Pr is the highest ? Yes Yes No Pm >= Pr ? Seize a token Reserve future token at Pm Store Pr, Rr, Rr0 Transmit with Pr No Pm>Rr Yes Decrease Pr to stored value No RrPm Generate new free token with Pr=max(oldRr, Pr, Pm) Rr=max(oldRr, Pm) 15 Token Ring management Active Monitor Monitor station token Start time-out Time-out expired Other operations Purge the ring Generate new free token Active Monitor passive Monitor Busy token Is monitor bit set ? No Set it Yes (Circulating busy token, packet was not purged by transmission station) Change busy token to free token Active monitor failed ? No Yes Start an election algorithm Advantages: 1) Traffic can be easily regulated. 2) Advantages of the token bus. Disadvantages: 1) Complexity of ring maintenance. 16