Home

Basic Switch Concept

Leave a comment

switch concept erat kaitannya dengan Ethernet , oleh karena itu worth reading untuk artikel ethernet nya

karena Switch itu mainly di layer 2 (data link)….so its worth reading too

untuk melengkapi artikel gw yang jadul ini (gw mau hapus dari index) = switch in a glanceswitch in a glance (part 2)switch in a glance (part 3)

in a glance…di switch ini lah tempat memproses MAC-Address dan tempat asal teknologi ethernet (fast ethernet)

===========================================================

dalam Ethernet terdapat 2 komunikasi: Half-Duplex dan Full Duplex

Half-Duplex..seperti yang terdapat di Walkie-Talkie, ga bisa komunikasi 2 arah…klo mau attempt 2 way communication…collision occurs, makanya di ciptakan CSMA/CD.

Full-Duplex…ga perlu…dan rata2 alat2 sekarang full duplex semua…jadi meng-eliminir kebutuhan akan CSMA/CD

===========================================================

Switch Port State itu ada 3: Auto, Full, dan Half Duplex

klo Full Duplex port ketemu Half Duplex…yang full reverting (berubah mode nya) jadi Half (ngikutin yang rendah)

nah…ada yang disebut auto-MDIX alias automatic medium-dependent interface crossover

gunanya buat apa….klo dulu lo harus aware akan tipe kabel (cross atau straight), switch2 yang mempunyai fitur auto-MDIX ga perlu pusing…mo lo colok kabel cross dari switch ke router (yang harusnya straight) juga gpp, nanti di switch nya sendiri akan otomatis ngalirin data ke kabel2 yang bersangkutan (liat deh kenapa harus straight atau cross…ada kabel2 yang jadi TX dan RX yang sama dan ga sama)

di Cisco Switch…auto-MDIX ini ada di Cisco IOS 12.2(18)SE or later…default nya on

tapi di 12.1(14)EA1 sampai 12.2(18)SE…auto-MDIX disabled by default…(bisa di aktifin koq)

dibawah versi 12.1(14)EA1 gimana ??? ya ga ada fitur itu

===========================================================

MAC Addressing and Switch MAC table

alternatif source

===========================================================

Collision and Broadcast Domain

alkisah…(wkwkwk)…ada pria dan wanita sedang jatuh cinta, kirim2an pesan pake komputer (point-to-point network)

lalu punya anak…anaknya juga pengen kirim pesan, bareng bapak ibunya…berhubung point-to-point network ga bisa lebih dari 2, diciptakanlah HUB

bapak, ibu, dan anak akhirnya bisa kirim2an pesan…tapi ada suatu masalah menanti…koq sering putus ya (collision) klo ada 2 orang ingin kirim pesan secara BERSAMAAN…HUB ternyata ga cocok

dibuatlah Bridge…masalah teratasi (untuk sementara)….

sang anak merasa….kalau mau kirim pesan secara bersamaan, koq ga bisa “bener2” bersamaan ya (Half-Duplex dan CSMA/CD)…trus ade2 nya makin banyak (bapak ibu nya ga pake program KB wkwkwk)….dibuatlah Switch (port lebih banyak..full duplex)

-.-.-.-.-.-.-.-

soooo….klo lihat dari cerita diatas…HUB menciptakan collision domain, sementara switch dan bridge memisahkan collision domain

HUB…1 collision domain (no matter how much ports)

Switch dan Bridge…tiap portnya adalah collision domain (24 port = 24 collision domain)

nah…behavior dari ketiga device layer 2 (dan layer 1) diatas kalau ketemu frame tidak dikenal bagaimana ?? di broadcast donk ?!?!?

sifat ketiga device tersebut ternyata tidak bisa memisahkan broadcast domain…yang bisa siapa??? alat di layer 3…ROUTER

===========================================================

Switch Packet Forwarding Methods

store-and-forward nampung semua…di check CRC-nya, ada error ga….baru di kirim, Cut-Through hanya baca destination MAC address…langsung dikirim…jadi ga nunggu semua framenya masuk dulu

ada lagi yang dinamakan Fragment-Free = mirip kek store-and-forward, cuma dicek 64 byte pertama…abis itu langsung di forward…kenapa di cek trus di tampung 64 bit pertama dulu ??? karena disinilah error paling banyak terjadi…hybrid antara store-and-forward dan Cut-through

Caption 1. to prevent bottleneck…biasanya pake asymmetric…bandwidth buat server digedein

An Ethernet switch may use a buffering technique to store frames before forwarding them. Buffering may also be used when the destination port is busy due to congestion and the switch stores the frame until it can be transmitted. The use of memory to store the data is called memory buffering. Memory buffering is built into the hardware of the switch and, other than increasing the amount of memory available, is not configurable.

There are two methods of memory buffering: port-based and shared memory.

Port-based Memory Buffering: In port-based memory buffering, frames are stored in queues that are linked to specific incoming ports. A frame is transmitted to the outgoing port only when all the frames ahead of it in the queue have been successfully transmitted. It is possible for a single frame to delay the transmission of all the frames in memory because of a busy destination port. This delay occurs even if the other frames could be transmitted to open destination ports.

Shared Memory Buffering: Shared memory buffering deposits all frames into a common memory buffer that all the ports on the switch share. The amount of buffer memory required by a port is dynamically allocated. The frames in the buffer are linked dynamically to the destination port. This allows the packet to be received on one port and then transmitted on another port, without moving it to a different queue.

The switch keeps a map of frame to port links showing where a packet needs to be transmitted. The map link is cleared after the frame has been successfully transmitted. The number of frames stored in the buffer is restricted by the size of the entire memory buffer and not limited to a single port buffer. This permits larger frames to be transmitted with fewer dropped frames. This is important to asymmetric switching, where frames are being exchanged between different rate ports.

bedanya apa Switch Layer 2 dan Layer 3…..bedanya Switch Layer 3 (Multilayer Switch) bisa menjalankan fungsi router…transfer packets which is in Layer 3 (network) with IP protocol

WIC….WAN Interface Card…alias Router itu kek PC…bisa di bongkar pasang….kurang wireless…tambahin…jadi lah Wireless Router..kurang serial…tambahin serial WAN…jadilah Serial Router….bla bla bla, bisa pake BGP protocol..untuk menghubungkan antar ISP….yang mana Switch layer 3 ga bisa

tapi…banyak CCIE merasa….kedepannya nanti..Switch layer 3 akan gantiin Router…secara dia bisa routing…plus PORT nya banyak…(liat router port nya terbatas)

===========================================================

Communications in a switched LAN network occur in three ways: unicast, broadcast, and multicast:

  • Unicast: HTTP, SMTP, Telnet, & FTP
  • Broadcast: ARP, DHCP Request
  • Multicast: Online Business Meeting

Ethernet Frame

  • 7 bytes preamble dan 1 byte SFD: buat sinkronisasi antara device pengirim dan dikirim. These first 8 bytes of the frame are used to get the attention of the receiving nodes. Essentially, the first few bytes tell the receivers to get ready to receive a new frame.
  • 6 bytes Field buat Destination MAC: ya buat identifier biar tau mau dikirim ke mana
  • 6 bytes Field buat Source MAC: identifier si MAC si pengirim
  • 2 bytes Length/Type: buat FCS alias Frame Check Sequence biar ensure frame received properly, kenapa Length atau Type ?? klo length (2 byte value kurang dari 0x0600) berarti merepresentasikan frame itu sendiri (length/panjang data di frame…), klo type (lebih dari 0x0600 alias 1536 desimal)berarti frame di decode menurut protocol layer 3 tertentu (bisa IP, IPX, AppleTalk, dll)…ada penanganan khusus lah…
  • Data Fields (46 – 1500 bytes): ini datanya…klo 2 byte yang sebelumnya adalah jumlah datanya, data field ini adalah isinya…contoh: lo punya 5 kambing dalam kotak, nah kotak itu dikasi label 5 kambing (ini Length/Type)…isi kotak yang 5 kambing itu adalah datanya
  • 4 bytes FCS Frame: buat detect frame yang error (detect nya dari 2 bytes length/type itu). pas ngirim frame…sender bikin suatu value (CRC = cyclic redudancy check) tentang frame itu…nanti pas uda di kirim…si receiver ngecek value itu..bener ga…klo ga match..di drop, buat apa sih ada CRC…klo lo kopi data rusak???? kan berabe klo ga ada CRC???

contoh MAC Address: 00-05-9A-3C-78-00 atau 00:05:9A:3C:78:00 atau 0005.9A3C.7800

MAC address total size is 48 bit…dibagi jadi 2 bagian (liat gambar)

1 bit buat broadcast: bit untuk identifier bahwa ini frame MAC address ditujuan ke semua station di LAN segment

1 bit buat local: If the vendor-assigned MAC address can be modified locally, this bit should be set. (ga ngerti gw yang ini)

22 bit buat OUI: nomor identifikasi perusahaan pembuat alat yang ber-MAC address, nomor ini di-assign oleh IEEE (jadi klo mo bikin alat jaringan harus di daftarin dulu di IEEE)

24 bit buat Vendor Unique Number: nomor yang dibuat oleh perusahaan itu sendiri, bukan dari IEEE

jadi…klo kira2 label di NIC lo ilang, wireless card lo lupa siapa manufakturnya….lo bisa liat di 22 bit pertama…(liat di cmd -> ipconfig /all)

contoh mac address yang diatas: 00:05:9A, cari di google..ketik OUI…paste itu 00:05:9A….liat punya sapa…CISCO !!!..wkkwkww

===========================================================

Tools2 buat Manage Switch

Cisco Network Assistant (Free – Cisco CCO Username Password Required)

Cisco View

Cisco Device Manager

dan masih banyak lagi di luar Cisco…baik yang free maupun yang bayar

===========================================================

Switch Boot Sequence

*buat article security 3:2.4.4.1

SEKIAN

Ethernet (802.3)

2 Comments

Important Note: Ethernet dalam istilah Computer Network (IEEE 802.3) adalah teknologi layer 2 (data link) untuk menghantarkan data dalam suatu Local Area Network (LAN) dengan membaca MAC Address (dalam bentuk frame), jadi bukan sebuah mesin, alat, atau kabel yang seperti kebanyakan orang bilang

Ethernet itu adalah sebuah protocol

Ethernet Frame Field (di dalam data Ethernet yang dikirim Switch…ada apa aja sih??)

warning: most of this article words are in english…wkwkwk


The Preamble (7 bytes) and Start Frame Delimiter (SFD) (1 byte) fields digunakan untuk sending dan receiving. 8 byte pertama dari frame Ethernet digunakan untuk memberitahu lawan “bicara” bahwa mereka siap untuk menerima atau mengirim frame.

The Destination MAC Address field (6 bytes) is the identifier for the intended recipient. Seperti yang kita tahu bahwa alamat ini digunakan layer 2 (data link) untuk membantu devices menentukan apakah sebuah frame yang ditujukan kepada mereka. The address in the frame is compared to the MAC address in the device. If there is a match, the device accepts the frame.

Length field (or Type Field) defines the exact length of the frame’s data field. This is used later as part of the FCS to ensure that the message was received properly. If the purpose of the field is to designate a type as in Ethernet II, the Type field describes which protocol is implemented. (apakah Ethernet II ini lebih baik daripada Ethernet biasa ataukah Ethernet II ini maksudnya adalah FastEthernet yang digunakan sekarang ini, gw kurang tau…feel free to provide me with the Information)

The Data and Pad field (46 – 1500 bytes) contains the encapsulated data from a higher layer, which is a generic Layer 3 PDU, or more commonly, an IPv4 packet. All frames must be at least 64 bytes long. If a small packet is encapsulated, the Pad is used to increase the size of the frame to this minimum size.

The Frame Check Sequence (FCS) field (4 bytes) is used to detect errors in a frame. It uses a cyclic redundancy check (CRC). The sending device includes the results of a CRC in the FCS field of the frame.

*gw ga ajarin CRC, out of field gw…liat aja di Wikipedia

Initially, Ethernet was implemented as part of a bus topology. Every network device was connected to the same, shared media. In low traffic or small networks, this was an acceptable deployment. The main problem to solve was how to identify each device. The signal could be sent to every device, but how would each device identify if it were the intended receiver of the message?

using MAC Address Structure

MAC Address = 48 bit size

The MAC address value is a direct result of IEEE-enforced rules for vendors to ensure globally unique addresses for each Ethernet device (kita bisa bilang…ini nomor/alamat Mesin). The rules established by IEEE require any vendor that sells Ethernet devices to register with IEEE. The IEEE assigns the vendor a 3-byte code, called the Organizationally Unique Identifier (OUI) (ada 1 pertanyaan CCNA Exam tentang ginian loh…wkwkw kampret kan..ginian jg ditanyain).

IEEE requires a vendor to follow two simple rules:

  • All MAC addresses assigned to a NIC or other Ethernet device must use that vendor’s assigned OUI as the first 3 bytes.
  • All MAC addresses with the same OUI must be assigned a unique value (vendor code or serial number) in the last 3 bytes.

The MAC address is often referred to as a burned-in address (BIA) because it is burned into ROM (Read-Only Memory) on the NIC. This means that the address is encoded into the ROM chip permanently – it cannot be changed by software. (makanya kadang disebut Physical Address)

However, when the computer starts up, the NIC copies the address into RAM. When examining frames, it is the address in RAM that is used as the source address to compare with the destination address. The MAC address is used by the NIC to determine if a message should be passed to the upper layers for processing. (makanya ada software2/hardware2 buat duplikat MAC address…contohnya aja TP-LINK…ada tuh buat duplicate mac address…biasanya buat Internetan pake Cable modem kek FastNet)

Figure 1 Taken from Wikipedia.org

The source device sends the data through the network. Each NIC in the network views the information to see if the MAC address matches its physical address. If there is no match, the device discards the frame. When the frame reaches the destination where the MAC of the NIC matches the destination MAC of the frame, the NIC passes the frame up the OSI layers, where the decapsulation process take place.

All devices connected to an Ethernet LAN have MAC-addressed interfaces. Different hardware and software manufacturers might represent the MAC address in different hexadecimal formats. The address formats might be similar to 00-05-9A-3C-78-00, 00:05:9A:3C:78:00, or 0005.9A3C.7800 (klo lo liat2 sama…Cuma beda penempatan titk, dash, sama titik dua aja). MAC addresses are assigned to workstations, servers, printers, switches, and routers any device that must originate and/or receive data on the network.

Hexadecimal Numbering on Ethernet

View MAC Address

Ketik di command prompt > ipconfig /all

Sekarang….coba search…di http://standards.ieee.org/develop/regauth/oui/public.html , MAC address lo siapa yang bikin (LAN Card/ NIC lo manufakturnya siapa?? Dari ketik ipconfig /all, alamat MAC uda diketahui kan ?? nah…3 HURUF pertama adalah kode dari vendor / manufaktur LAN Card / NIC lo)

Oh iya…sebelum lupa….

Ketika host send frame…untuk bisa sampai ke tujuan, tergantung tipe koneksinya (Unicast, Broadcast, Multicast)

  1. Klo UNICAST= switch/router akan baca DESTINATION MAC & IP Address
  2. Klo Multicast = switch/router akan baca DESTINATION MAC Address & IP Multicast (224.0.0.1)
  3. Klo Broadcast = switch/router akan baca BROADCAST MAC & IP Address (FF-FF-FF-FF-FF-FF (dan 255.255.255.255 ga ada IP sama sekali) & 192.168.1. [255] ) – 255: broadcast (kalau subnet mask/prefix nya adalah /24, klo /23, /25, itu itung lagi..bisa dengan VLSM)

Media Access Control in Ethernet (CSMA/CD) – The Process

Collision Domain

Karena metode CSMA/CD sewaktu2 bisa saja terjadi collision, maka kita perlu tahu…daerah mana yang sering terjadi collision

Hub (Multi Port Repeater) = yaitu alat untuk menghubungkan device satu dengan yang lain, 1 Hub = 1 Collision Domain (dikarenakan Hub adalah network devices tipe lama), kalau ga ngerti…penjelasannya ada di bawah ini (Switch)

Switch = fungsi sama dengan Hub, hanya saja karena Switch adalah teknologi baru, dia bisa menghubungkan device yang 1 dengan yang lain dengan resiko ZERO collision, kenapa ?? karena tiap port dalam switch adalah 1 collision domain tersendiri, koq bisa tiap 1 port adalah 1 domain collision sedangkan Hub adalah 1 collision domain tanpa perduli jumlah portnya ??? karena switch bisa menggunakan teknologi multiplexing (memecah data dan mentransfernya tanpa harus tabrakan dengan packet lain), kelemahan dari multiplexing adalah, lebih lambat transfer datanya (kan dipecah2 dulu / segmentasi)

The electrical signal that is transmitted takes a certain amount of time (latency) to propagate (travel) down the cable

Ethernet with throughput speeds of 10 Mbps and slower are asynchronous. An asynchronous communication in this context means that each receiving device will use the 8 bytes of timing information to synchronize the receive circuit to the incoming data and then discard the 8 bytes.

Ethernet implementations with throughput of 100 Mbps and higher are synchronous. Synchronous communication in this context means that the timing information is not required. However, for compatibility reasons, the Preamble and Start Frame Delimiter (SFD) fields are still present.

Type of Ethernet (lebih lengkap)

ARP Process – Mapping IP to MAC Address

ARP means Address Resolution Protocol (Mapping IP to MAC Address), ARP inilah yg dipakai ketika suatu host ingin menemukan host lainnya untuk mengirim datanya

ARP-How it works:

NO ARP Entry at First


Broadcast ARP Frame


Unicast Frame from 10.10.0.3 (owner of destination frame)


Adding MAC Address of Destination Host to its ARP Cache

Done….

Standar ARP “ping” (di windows sih) itu dalah 2 menit, jika “tetangga” menjawab, akan ditambah jadi 10 menit, untuk bisa ping2an lagi

As a broadcast frame, an ARP request is received and processed by every device on the local network. On a typical business network, these broadcasts would probably have minimal impact on network performance. However, if a large number of devices were to be powered up and all start accessing network services at the same time, there could be some reduction in performance for a short period of time. For example, if all students in a lab logged into classroom computers and attempted to access the Internet at the same time, there could be delays. (Overhead on the Media)

In some cases, the use of ARP can lead to a potential security risk. ARP spoofing, or ARP poisoning, is a technique used by an attacker to inject the wrong MAC address association into a network by issuing fake ARP requests. An attacker forges the MAC address of a device and then frames can be sent to the wrong destination. (Security)

Manually configuring static ARP associations is one way to prevent ARP spoofing. Authorized MAC addresses can be configured on some network devices to restrict network access to only those devices listed.

*untuk Spoofing dan ARP Poisoning nanti akan kita pelajari

Older Entries Newer Entries