目录
Connection mode of computer
coaxial cable
characteristic:Half-duplex communication,easy-conflict,not secure,中间断了,整个瘫痪
Hub
characteristic:Half-duplex communication,easy-conflict,not secure
Bridge
characteristic:The MAC address of each interface can be learned by self-learning to isolate conflict domains
Switch
characteristic:It's like a bridge with more interfaces,Full-Duplex Communication,secure
Router
- direct network cable,coaxial cable,Hub,bridge,switch,the connected devices who use them must be on the same network segment and in the same broadcast domain.
characteristic:Data can be forwarded on different network segments,Isolated broadcast domain
MAC地址
- Each NIC has a six-byte (48-bit) MAC address
- Unique in the world, solidified in the ROM of the NIC, by the IEEE802 standard
- First three bytes: OUI (Organization Unique Identifier), which is assigned to the vendor by the registrar of IEEE
- Last three bytes: allocated by the vendor
MAC地址的表示格式
MAC地址操作
ARP协议获得MAC地址
Two machines need IP addresses and MAC addresses to communicate with each other,如下:
如果一开始两台机器没有在命令行中进行ping操作,是无法进行ICMP的,因为缺少MAC。
此时发送请求的机器就会进行ARP协议发送广播给所有连接的设备,告诉那些设备要寻找MAC的ip地址
FFFF.FFFF.FFF就是广播,在计算机中是一堆1。
然后所有的设备进行检查,当一个设备发现寻找的ip地址就是自己时,就会将MAC返回到原来的机器。
这样,有ip又有MAC,之后就可以进行ICMP协议ping通
IP地址
A类地址
B类地址
C类地址
子网掩码的CIDR表示方法
子网
为什么要进行子网划分?
等长子网划分:等分成两个子网段做例子
边长子网划分: