环回接法!
就是本地地址(交换机设备常用) 和交叉线 是一样的
1-3 接在一起(发送数据)
2-6 接在一起(接收数据)
形成通信!
获取的IP是类似本地127.0.0.0地址
或者私有IP 169.254.*.*;也可以通过电脑虚拟机DHCP分发IP
环回接法 电脑:“本地连接 ”是连接正常 非断开状态
这个时候“网卡”处于激活状态,可以内部虚拟机通讯,或者用双网卡和别的电脑通讯.
做一个特殊RJ45头。1 3,2 6 分别短接,插入到网卡的RJ45插座中去。
mii-tool可以看到网卡速率了。
开一个TCPDUMP抓包。
在另一个CONSOLE开一个PING程序,就可以看到网卡自己发出去的和回环的包了。
如果是要做千兆的用
1-3
2-6
4-7
5-8
做成后就只有一个头的。
本来想用来给虚拟机用,不过好像新版本的在网络不连接的情况下也可以正常工作。
唯一发现的一点就是。
未连接时不能ping通本机ip地址(非loopback地址ip127.),连上这个就可以了。
ref:
Make your own Ethernet Loopback connector
Thu, 2005-08-04 16:08 — Barry
Occasionally
I have the need for a network card to operate as though it has a live
network connection, without it actually being connected to a network.
Typically for testing purposes, and occasionally for specific software
configurations. To do this I need a quick and easy way to make a
loopback connector. Something small enough to keep in my PC toolkit,
yet large enough that it won't be lost. Mine end up about the size of a
ballpoint pen. The following is a quick "how to" for making an Ethernet
loopback connector.
To build this particular loopback connector you will need one (1) spare Category 5e (cat5) cable.
- Cut 4 or 5 inches of the end off of a network cable, keeping the connector intact.
- Cut away two inches of the main sheath covering the eight wires. (Be careful not to cut the wires inside.)
- Cut the sheath on Orange-White and Green-White and twist them together. Tape this pair. (Soldering is recommended)
- Cut the sheath on Green and Orange and twist them together. Tape this pair as well. (Soldering is recommended)
- Cut the sheath on Blue and Brown-White and twist them together. Tape this pair as well. (Soldering is recommended)
- Cut the sheath on Blue-White and Brown and twist them together. Tape this pair as well. (Soldering is recommended)
- Tape the end down to make it look presentable.
- Plug your new RJ-45 loopback into your Network Card.
阅读(8487) | 评论(0) | 转发(1) |