Now my question is, can I use fiber optic cables to for Ethernet or different type of implementation is made using fiber optic cables?
Ethernet can be thought of as having multiple layers, exactly how many depends on who you ask and which variant of Ethernet you are talking about but we can divide it into four main parts.
- Framing/filtering, encapsulating the higher level packets into an Ethernet frame with source and destination mac address and filtering packets based on those MAC addreses.
- Serialisation and where nessacery medium access control, taking packets in memory and turning them into line-rate streams of data sent at the correct time.
- Physical layer encoding, turning line rate data streams into electrical or optical signals suitable for the physical medium.
- Physical medium, the actual wires or glass that carry the data.
The key is that as long as the first of these stays the same we can build a single consistent network, the end devices only need to know about the lower ones for their immediate link, they don't have to care about what they are on the rest of the network.
In some cases, external or pluggable transcievers are used, so the end device doesn't have to care about the last two points even for it's immediate connection. Those details are encapsulated in the transciever.
So yes the implementation details are different between Ethernet over Twisted pair and Ethernet over Fiber (and there are multiple variants of each) but it is still considered Ethernet.